From 7d1ab061891a94bc40e4954c2851bb1691ea3d54 Mon Sep 17 00:00:00 2001 From: Eirik Nygaard Date: Sat, 12 Mar 2005 19:13:54 +0000 Subject: [PATCH] Update ncurses to version 5.4. The framework has been written from scratch and I moved everything into lib/libncurses to centralize the build process for it. The man-pages is modified by the build in the ncurses paged so I have added the modified man-pages here. --- Makefile.inc1 | 6 +- lib/Makefile | 6 +- lib/libform/Makefile | 94 - lib/libmenu/Makefile | 79 - lib/libncurses/Makefile | 541 +--- lib/libncurses/Makefile.inc | 3 + lib/libncurses/include/MKterm.h.awk | 332 ++ lib/libncurses/include/curses.head | 1038 +++++++ lib/libncurses/{ => include}/ncurses_cfg.h | 145 +- lib/libncurses/{ => include}/pathnames.h | 2 +- lib/libncurses/include/termcap.h | 95 + lib/libncurses/include/unctrl.h | 64 + lib/libncurses/libform/Makefile | 76 + lib/libncurses/libmenu/Makefile | 63 + lib/libncurses/libncurses/Makefile | 265 ++ lib/libncurses/{ => libncurses}/termcap.c | 2 +- lib/libncurses/libpanel/Makefile | 53 + lib/libncurses/man/Makefile | 669 ++++ lib/libncurses/man/clear.1 | 49 + lib/libncurses/man/curs_add_wch.3 | 135 + lib/libncurses/man/curs_add_wchstr.3 | 99 + lib/libncurses/man/curs_addch.3 | 174 ++ lib/libncurses/man/curs_addchstr.3 | 83 + lib/libncurses/man/curs_addstr.3 | 88 + lib/libncurses/man/curs_addwstr.3 | 92 + lib/libncurses/man/curs_attr.3 | 233 ++ lib/libncurses/man/curs_beep.3 | 64 + lib/libncurses/man/curs_bkgd.3 | 99 + lib/libncurses/man/curs_bkgrnd.3 | 108 + lib/libncurses/man/curs_border.3 | 139 + lib/libncurses/man/curs_border_set.3 | 203 ++ lib/libncurses/man/curs_clear.3 | 95 + lib/libncurses/man/curs_color.3 | 217 ++ lib/libncurses/man/curs_delch.3 | 71 + lib/libncurses/man/curs_deleteln.3 | 88 + lib/libncurses/man/curs_extend.3 | 85 + lib/libncurses/man/curs_get_wch.3 | 162 + lib/libncurses/man/curs_get_wstr.3 | 168 + lib/libncurses/man/curs_getcchar.3 | 145 + lib/libncurses/man/curs_getch.3 | 308 ++ lib/libncurses/man/curs_getstr.3 | 108 + lib/libncurses/man/curs_getyx.3 | 90 + lib/libncurses/man/curs_in_wch.3 | 69 + lib/libncurses/man/curs_in_wchstr.3 | 118 + lib/libncurses/man/curs_inch.3 | 74 + lib/libncurses/man/curs_inchstr.3 | 89 + lib/libncurses/man/curs_initscr.3 | 125 + lib/libncurses/man/curs_inopts.3 | 215 ++ lib/libncurses/man/curs_ins_wch.3 | 66 + lib/libncurses/man/curs_ins_wstr.3 | 105 + lib/libncurses/man/curs_insch.3 | 71 + lib/libncurses/man/curs_insstr.3 | 96 + lib/libncurses/man/curs_instr.3 | 90 + lib/libncurses/man/curs_inwstr.3 | 96 + lib/libncurses/man/curs_kernel.3 | 160 + lib/libncurses/man/curs_mouse.3 | 255 ++ lib/libncurses/man/curs_move.3 | 64 + lib/libncurses/man/curs_outopts.3 | 194 ++ lib/libncurses/man/curs_overlay.3 | 77 + lib/libncurses/man/curs_pad.3 | 134 + lib/libncurses/man/curs_print.3 | 75 + lib/libncurses/man/curs_printw.3 | 85 + lib/libncurses/man/curs_refresh.3 | 127 + lib/libncurses/man/curs_scanw.3 | 98 + lib/libncurses/man/curs_scr_dump.3 | 95 + lib/libncurses/man/curs_scroll.3 | 85 + lib/libncurses/man/curs_slk.3 | 150 + lib/libncurses/man/curs_termattrs.3 | 135 + lib/libncurses/man/curs_termcap.3 | 165 + lib/libncurses/man/curs_terminfo.3 | 295 ++ lib/libncurses/man/curs_touch.3 | 97 + lib/libncurses/man/curs_trace.3 | 150 + lib/libncurses/man/curs_util.3 | 147 + lib/libncurses/man/curs_window.3 | 160 + lib/libncurses/man/default_colors.3 | 126 + lib/libncurses/man/define_key.3 | 61 + lib/libncurses/man/form.3 | 201 ++ lib/libncurses/man/form_cursor.3 | 75 + lib/libncurses/man/form_data.3 | 64 + lib/libncurses/man/form_driver.3 | 273 ++ lib/libncurses/man/form_field.3 | 98 + lib/libncurses/man/form_field_attributes.3 | 92 + lib/libncurses/man/form_field_buffer.3 | 100 + lib/libncurses/man/form_field_info.3 | 85 + lib/libncurses/man/form_field_just.3 | 79 + lib/libncurses/man/form_field_new.3 | 97 + lib/libncurses/man/form_field_opts.3 | 121 + lib/libncurses/man/form_field_userptr.3 | 74 + lib/libncurses/man/form_field_validation.3 | 145 + lib/libncurses/man/form_fieldtype.3 | 136 + lib/libncurses/man/form_hook.3 | 101 + lib/libncurses/man/form_new.3 | 80 + lib/libncurses/man/form_new_page.3 | 78 + lib/libncurses/man/form_opts.3 | 91 + lib/libncurses/man/form_page.3 | 96 + lib/libncurses/man/form_post.3 | 91 + lib/libncurses/man/form_requestname.3 | 70 + lib/libncurses/man/form_userptr.3 | 74 + lib/libncurses/man/form_win.3 | 96 + lib/libncurses/man/key_defined.3 | 61 + lib/libncurses/man/keybound.3 | 65 + lib/libncurses/man/keyok.3 | 64 + lib/libncurses/man/menu.3 | 191 ++ lib/libncurses/man/menu_attributes.3 | 101 + lib/libncurses/man/menu_cursor.3 | 74 + lib/libncurses/man/menu_driver.3 | 171 + lib/libncurses/man/menu_format.3 | 85 + lib/libncurses/man/menu_hook.3 | 102 + lib/libncurses/man/menu_items.3 | 92 + lib/libncurses/man/menu_mark.3 | 85 + lib/libncurses/man/menu_new.3 | 80 + lib/libncurses/man/menu_opts.3 | 105 + lib/libncurses/man/menu_pattern.3 | 83 + lib/libncurses/man/menu_post.3 | 92 + lib/libncurses/man/menu_requestname.3 | 70 + lib/libncurses/man/menu_spacing.3 | 85 + lib/libncurses/man/menu_userptr.3 | 74 + lib/libncurses/man/menu_win.3 | 96 + lib/libncurses/man/mitem_current.3 | 102 + lib/libncurses/man/mitem_name.3 | 65 + lib/libncurses/man/mitem_new.3 | 84 + lib/libncurses/man/mitem_opts.3 | 85 + lib/libncurses/man/mitem_userptr.3 | 73 + lib/libncurses/man/mitem_value.3 | 77 + lib/libncurses/man/mitem_visible.3 | 60 + lib/libncurses/man/ncurses.3 | 913 ++++++ lib/libncurses/man/panel.3 | 183 ++ lib/libncurses/man/resizeterm.3 | 93 + lib/libncurses/man/term.5 | 209 ++ lib/libncurses/man/term.7 | 205 ++ lib/libncurses/man/terminfo.5 | 3266 ++++++++++++++++++++ lib/libncurses/man/tput.1 | 289 ++ lib/libncurses/man/tset.1 | 254 ++ lib/libncurses/man/wresize.3 | 65 + lib/libpanel/Makefile | 42 - 135 files changed, 20220 insertions(+), 823 deletions(-) delete mode 100644 lib/libform/Makefile delete mode 100644 lib/libmenu/Makefile create mode 100644 lib/libncurses/Makefile.inc create mode 100644 lib/libncurses/include/MKterm.h.awk create mode 100644 lib/libncurses/include/curses.head rename lib/libncurses/{ => include}/ncurses_cfg.h (83%) rename lib/libncurses/{ => include}/pathnames.h (95%) create mode 100644 lib/libncurses/include/termcap.h create mode 100644 lib/libncurses/include/unctrl.h create mode 100644 lib/libncurses/libform/Makefile create mode 100644 lib/libncurses/libmenu/Makefile create mode 100644 lib/libncurses/libncurses/Makefile rename lib/libncurses/{ => libncurses}/termcap.c (98%) create mode 100644 lib/libncurses/libpanel/Makefile create mode 100644 lib/libncurses/man/Makefile create mode 100644 lib/libncurses/man/clear.1 create mode 100644 lib/libncurses/man/curs_add_wch.3 create mode 100644 lib/libncurses/man/curs_add_wchstr.3 create mode 100644 lib/libncurses/man/curs_addch.3 create mode 100644 lib/libncurses/man/curs_addchstr.3 create mode 100644 lib/libncurses/man/curs_addstr.3 create mode 100644 lib/libncurses/man/curs_addwstr.3 create mode 100644 lib/libncurses/man/curs_attr.3 create mode 100644 lib/libncurses/man/curs_beep.3 create mode 100644 lib/libncurses/man/curs_bkgd.3 create mode 100644 lib/libncurses/man/curs_bkgrnd.3 create mode 100644 lib/libncurses/man/curs_border.3 create mode 100644 lib/libncurses/man/curs_border_set.3 create mode 100644 lib/libncurses/man/curs_clear.3 create mode 100644 lib/libncurses/man/curs_color.3 create mode 100644 lib/libncurses/man/curs_delch.3 create mode 100644 lib/libncurses/man/curs_deleteln.3 create mode 100644 lib/libncurses/man/curs_extend.3 create mode 100644 lib/libncurses/man/curs_get_wch.3 create mode 100644 lib/libncurses/man/curs_get_wstr.3 create mode 100644 lib/libncurses/man/curs_getcchar.3 create mode 100644 lib/libncurses/man/curs_getch.3 create mode 100644 lib/libncurses/man/curs_getstr.3 create mode 100644 lib/libncurses/man/curs_getyx.3 create mode 100644 lib/libncurses/man/curs_in_wch.3 create mode 100644 lib/libncurses/man/curs_in_wchstr.3 create mode 100644 lib/libncurses/man/curs_inch.3 create mode 100644 lib/libncurses/man/curs_inchstr.3 create mode 100644 lib/libncurses/man/curs_initscr.3 create mode 100644 lib/libncurses/man/curs_inopts.3 create mode 100644 lib/libncurses/man/curs_ins_wch.3 create mode 100644 lib/libncurses/man/curs_ins_wstr.3 create mode 100644 lib/libncurses/man/curs_insch.3 create mode 100644 lib/libncurses/man/curs_insstr.3 create mode 100644 lib/libncurses/man/curs_instr.3 create mode 100644 lib/libncurses/man/curs_inwstr.3 create mode 100644 lib/libncurses/man/curs_kernel.3 create mode 100644 lib/libncurses/man/curs_mouse.3 create mode 100644 lib/libncurses/man/curs_move.3 create mode 100644 lib/libncurses/man/curs_outopts.3 create mode 100644 lib/libncurses/man/curs_overlay.3 create mode 100644 lib/libncurses/man/curs_pad.3 create mode 100644 lib/libncurses/man/curs_print.3 create mode 100644 lib/libncurses/man/curs_printw.3 create mode 100644 lib/libncurses/man/curs_refresh.3 create mode 100644 lib/libncurses/man/curs_scanw.3 create mode 100644 lib/libncurses/man/curs_scr_dump.3 create mode 100644 lib/libncurses/man/curs_scroll.3 create mode 100644 lib/libncurses/man/curs_slk.3 create mode 100644 lib/libncurses/man/curs_termattrs.3 create mode 100644 lib/libncurses/man/curs_termcap.3 create mode 100644 lib/libncurses/man/curs_terminfo.3 create mode 100644 lib/libncurses/man/curs_touch.3 create mode 100644 lib/libncurses/man/curs_trace.3 create mode 100644 lib/libncurses/man/curs_util.3 create mode 100644 lib/libncurses/man/curs_window.3 create mode 100644 lib/libncurses/man/default_colors.3 create mode 100644 lib/libncurses/man/define_key.3 create mode 100644 lib/libncurses/man/form.3 create mode 100644 lib/libncurses/man/form_cursor.3 create mode 100644 lib/libncurses/man/form_data.3 create mode 100644 lib/libncurses/man/form_driver.3 create mode 100644 lib/libncurses/man/form_field.3 create mode 100644 lib/libncurses/man/form_field_attributes.3 create mode 100644 lib/libncurses/man/form_field_buffer.3 create mode 100644 lib/libncurses/man/form_field_info.3 create mode 100644 lib/libncurses/man/form_field_just.3 create mode 100644 lib/libncurses/man/form_field_new.3 create mode 100644 lib/libncurses/man/form_field_opts.3 create mode 100644 lib/libncurses/man/form_field_userptr.3 create mode 100644 lib/libncurses/man/form_field_validation.3 create mode 100644 lib/libncurses/man/form_fieldtype.3 create mode 100644 lib/libncurses/man/form_hook.3 create mode 100644 lib/libncurses/man/form_new.3 create mode 100644 lib/libncurses/man/form_new_page.3 create mode 100644 lib/libncurses/man/form_opts.3 create mode 100644 lib/libncurses/man/form_page.3 create mode 100644 lib/libncurses/man/form_post.3 create mode 100644 lib/libncurses/man/form_requestname.3 create mode 100644 lib/libncurses/man/form_userptr.3 create mode 100644 lib/libncurses/man/form_win.3 create mode 100644 lib/libncurses/man/key_defined.3 create mode 100644 lib/libncurses/man/keybound.3 create mode 100644 lib/libncurses/man/keyok.3 create mode 100644 lib/libncurses/man/menu.3 create mode 100644 lib/libncurses/man/menu_attributes.3 create mode 100644 lib/libncurses/man/menu_cursor.3 create mode 100644 lib/libncurses/man/menu_driver.3 create mode 100644 lib/libncurses/man/menu_format.3 create mode 100644 lib/libncurses/man/menu_hook.3 create mode 100644 lib/libncurses/man/menu_items.3 create mode 100644 lib/libncurses/man/menu_mark.3 create mode 100644 lib/libncurses/man/menu_new.3 create mode 100644 lib/libncurses/man/menu_opts.3 create mode 100644 lib/libncurses/man/menu_pattern.3 create mode 100644 lib/libncurses/man/menu_post.3 create mode 100644 lib/libncurses/man/menu_requestname.3 create mode 100644 lib/libncurses/man/menu_spacing.3 create mode 100644 lib/libncurses/man/menu_userptr.3 create mode 100644 lib/libncurses/man/menu_win.3 create mode 100644 lib/libncurses/man/mitem_current.3 create mode 100644 lib/libncurses/man/mitem_name.3 create mode 100644 lib/libncurses/man/mitem_new.3 create mode 100644 lib/libncurses/man/mitem_opts.3 create mode 100644 lib/libncurses/man/mitem_userptr.3 create mode 100644 lib/libncurses/man/mitem_value.3 create mode 100644 lib/libncurses/man/mitem_visible.3 create mode 100644 lib/libncurses/man/ncurses.3 create mode 100644 lib/libncurses/man/panel.3 create mode 100644 lib/libncurses/man/resizeterm.3 create mode 100644 lib/libncurses/man/term.5 create mode 100644 lib/libncurses/man/term.7 create mode 100644 lib/libncurses/man/terminfo.5 create mode 100644 lib/libncurses/man/tput.1 create mode 100644 lib/libncurses/man/tset.1 create mode 100644 lib/libncurses/man/wresize.3 delete mode 100644 lib/libpanel/Makefile diff --git a/Makefile.inc1 b/Makefile.inc1 index eb00f6ee71..5827e57a51 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.57 2005/02/21 18:22:06 swildner Exp $ +# $DragonFly: src/Makefile.inc1,v 1.58 2005/03/12 19:13:54 eirikn Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -924,8 +924,8 @@ _generic_libs+= kerberos5/lib .endif _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libmd \ - lib/libncurses lib/libopie lib/libradius lib/libskey \ - lib/libtacplus lib/libz lib/msun + lib/libncurses/libncurses lib/libopie lib/libradius \ + lib/libskey lib/libtacplus lib/libz lib/msun lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L lib/libskey__L: lib/libcrypt__L lib/libmd__L diff --git a/lib/Makefile b/lib/Makefile index bac5192da6..1ec9bb2c48 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD: src/lib/Makefile,v 1.107.2.16 2002/10/10 19:24:35 kbyanc Exp $ -# $DragonFly: src/lib/Makefile,v 1.15 2005/02/09 21:01:50 drhodus Exp $ +# $DragonFly: src/lib/Makefile,v 1.16 2005/03/12 19:13:54 eirikn Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -23,9 +23,9 @@ SUBDIR= ${_csu} csu/common libarchive libcom_err libcrypt msun libmd \ libncurses libradius libskey libtacplus libutil libsbuf ${_compat} \ libalias libatm ${_libbind} libbz2 libc ${_libc_r} libcalendar \ - libcam libcompat libdevstat libdisk libedit libfetch libform libftpio \ + libcam libcompat libdevstat libdisk libedit libfetch libftpio \ ${_libio} libipsec libipx libisc libkcore libkinfo libkvm libmagic \ - libmenu ${_libmilter} ${_libncp} libnetgraph libopie libpam libpanel \ + ${_libmilter} ${_libncp} libnetgraph libopie libpam \ libpcap libposix1e librpcsvc ${_libsm} ${_libsmb} ${_libsmdb} \ ${_libsmutil} libstand libtelnet libthread_xu libusbhid ${_libvgl} \ libwrap libxpg4 liby libz diff --git a/lib/libform/Makefile b/lib/libform/Makefile deleted file mode 100644 index 18841339d6..0000000000 --- a/lib/libform/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# Makefile for libform -# $FreeBSD: src/lib/libform/Makefile,v 1.2.2.4 2001/04/25 10:04:30 ru Exp $ -# $DragonFly: src/lib/libform/Attic/Makefile,v 1.2 2003/06/17 04:26:49 dillon Exp $ - -NCURSES=${.CURDIR}/../../contrib/ncurses - -.PATH: ${NCURSES}/form -.PATH: ${NCURSES}/include -.PATH: ${NCURSES}/man - -LIB= form -AWK?= awk - -SRCS= ncurses_def.h \ - fld_arg.c fld_attr.c fld_current.c fld_def.c fld_dup.c fld_ftchoice.c \ - fld_ftlink.c fld_info.c fld_just.c fld_link.c fld_max.c fld_move.c \ - fld_newftyp.c fld_opts.c fld_pad.c fld_page.c fld_stat.c fld_type.c \ - fld_user.c frm_cursor.c frm_data.c frm_def.c frm_driver.c frm_hook.c \ - frm_opts.c frm_page.c frm_post.c frm_req_name.c frm_scale.c frm_sub.c \ - frm_user.c frm_win.c fty_alnum.c fty_alpha.c fty_enum.c fty_int.c \ - fty_ipv4.c fty_num.c fty_regex.c -INCS= ${NCURSES}/form/form.h - -CLEANFILES+= ncurses_def.h -CFLAGS+= -I. -I${.CURDIR}/../libncurses -I${NCURSES}/form -I${NCURSES}/menu \ - -I${NCURSES}/include -Wall -DNDEBUG -DHAVE_CONFIG_H - -ncurses_def.h: MKncurses_def.sh ncurses_defs - AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \ - ${NCURSES}/include/ncurses_defs > ncurses_def.h - -MANx= form.3x form_cursor.3x form_data.3x form_driver.3x \ - form_field.3x form_field_attributes.3x form_field_buffer.3x \ - form_field_info.3x form_field_just.3x form_field_new.3x \ - form_field_opts.3x form_field_userptr.3x \ - form_field_validation.3x form_fieldtype.3x form_hook.3x \ - form_new.3x form_new_page.3x form_opts.3x form_page.3x \ - form_post.3x form_requestname.3x form_userptr.3x form_win.3x - -# Generate the MAN list from MANx -.for page in ${MANx} -CLEANFILES+=${page:T:S/x$//g} -MAN+=${page:T:S/x$//g} -${page:T:S/x$//g}: ${page} - ln -s ${.ALLSRC} ${.TARGET} -.endfor - -MLINKS+=form_cursor.3 pos_form_cursor.3 -MLINKS+=form_data.3 data_ahead.3 form_data.3 data_behind.3 -MLINKS+=form_field.3 field_count.3 form_field.3 form_fields.3 \ - form_field.3 move_field.3 form_field.3 set_form_fields.3 -MLINKS+=form_field_attributes.3 field_back.3 \ - form_field_attributes.3 field_fore.3 \ - form_field_attributes.3 field_pad.3 \ - form_field_attributes.3 set_field_back.3 \ - form_field_attributes.3 set_field_fore.3 \ - form_field_attributes.3 set_field_pad.3 -MLINKS+=form_field_buffer.3 field_buffer.3 \ - form_field_buffer.3 field_status.3 \ - form_field_buffer.3 set_field_buffer.3 \ - form_field_buffer.3 set_field_status.3 \ - form_field_buffer.3 set_max_field.3 -MLINKS+=form_field_info.3 dynamic_fieldinfo.3 form_field_info.3 field_info.3 -MLINKS+=form_field_just.3 field_just.3 form_field_just.3 set_field_just.3 -MLINKS+=form_field_new.3 dup_field.3 form_field_new.3 free_field.3 \ - form_field_new.3 link_field.3 form_field_new.3 new_field.3 -MLINKS+=form_field_opts.3 field_opts.3 form_field_opts.3 field_opts_off.3 \ - form_field_opts.3 field_opts_on.3 form_field_opts.3 set_field_opts.3 \ - form_field_opts.3 set_form_opts.3 -MLINKS+=form_field_userptr.3 field_userptr.3 \ - form_field_userptr.3 set_field_userptr.3 -MLINKS+=form_field_validation.3 field_arg.3 \ - form_field_validation.3 field_type.3 \ - form_field_validation.3 set_field_type.3 -MLINKS+=form_fieldtype.3 link_fieldtype.3 \ - form_fieldtype.3 set_fieldtype_arg.3 \ - form_fieldtype.3 set_fieldtype_choice.3 -MLINKS+=form_hook.3 field_init.3 form_hook.3 field_term.3 \ - form_hook.3 form_init.3 form_hook.3 form_term.3 \ - form_hook.3 set_field_init.3 form_hook.3 set_field_term.3 \ - form_hook.3 set_form_init.3 form_hook.3 set_form_term.3 -MLINKS+=form_new.3 free_form.3 form_new.3 new_form.3 -MLINKS+=form_new_page.3 new_page.3 form_new_page.3 set_new_page.3 -MLINKS+=form_opts.3 form_opts_off.3 form_opts.3 form_opts_on.3 -MLINKS+=form_page.3 current_field.3 form_page.3 field_index.3 \ - form_page.3 set_current_field.3 form_page.3 set_form_page.3 -MLINKS+=form_post.3 post_form.3 form_post.3 unpost_form.3 -MLINKS+=form_requestname.3 form_request_by_name.3 \ - form_requestname.3 form_request_name.3 -MLINKS+=form_userptr.3 set_form_userptr.3 -MLINKS+=form_win.3 form_sub.3 form_win.3 scale_form.3 \ - form_win.3 set_form_sub.3 form_win.3 set_form_win.3 - -.include diff --git a/lib/libmenu/Makefile b/lib/libmenu/Makefile deleted file mode 100644 index cddc046616..0000000000 --- a/lib/libmenu/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# Makefile for libmenu -# $FreeBSD: src/lib/libmenu/Makefile,v 1.2.2.4 2001/04/25 10:04:33 ru Exp $ -# $DragonFly: src/lib/libmenu/Attic/Makefile,v 1.2 2003/06/17 04:26:50 dillon Exp $ - -NCURSES=${.CURDIR}/../../contrib/ncurses - -.PATH: ${NCURSES}/menu ${NCURSES}/include -.PATH: ${NCURSES}/man - -LIB= menu -AWK?= awk - -SRCS= ncurses_def.h \ - m_attribs.c m_cursor.c m_driver.c m_format.c m_global.c m_hook.c \ - m_item_cur.c m_item_nam.c m_item_new.c m_item_opt.c m_item_top.c \ - m_item_use.c m_item_val.c m_item_vis.c m_items.c m_new.c m_opts.c \ - m_pad.c m_pattern.c m_post.c m_req_name.c m_scale.c m_spacing.c \ - m_sub.c m_userptr.c m_win.c -INCS= ${NCURSES}/menu/menu.h ${NCURSES}/menu/eti.h - -CLEANFILES+= ncurses_def.h -CFLAGS+= -I. -I${.CURDIR}/../libncurses -I${NCURSES}/menu -I${NCURSES}/include \ - -Wall -DNDEBUG -DHAVE_CONFIG_H - -ncurses_def.h: MKncurses_def.sh ncurses_defs - AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \ - ${NCURSES}/include/ncurses_defs > ncurses_def.h - -MANx= menu.3x menu_attribs.3x menu_attributes.3x menu_cursor.3x \ - menu_driver.3x menu_format.3x menu_hook.3x menu_items.3x \ - menu_mark.3x menu_new.3x menu_opts.3x menu_pattern.3x \ - menu_post.3x menu_requestname.3x menu_spacing.3x \ - menu_userptr.3x menu_win.3x mitem_current.3x mitem_name.3x \ - mitem_new.3x mitem_opts.3x mitem_userptr.3x mitem_value.3x \ - mitem_visible.3x - -# Generate the MAN list from MANx -.for page in ${MANx} -CLEANFILES+=${page:T:S/x$//g} -MAN+=${page:T:S/x$//g} -${page:T:S/x$//g}: ${page} - ln -s ${.ALLSRC} ${.TARGET} -.endfor - -MLINKS+=menu_attributes.3 menu_back.3 menu_attributes.3 menu_fore.3 \ - menu_attributes.3 menu_grey.3 menu_attributes.3 menu_pad.3 \ - menu_attributes.3 set_menu_back.3 menu_attributes.3 set_menu_fore.3 \ - menu_attributes.3 set_menu_grey.3 menu_attributes.3 set_menu_pad.3 -MLINKS+=menu_cursor.3 pos_menu_cursor.3 -MLINKS+=menu_format.3 set_menu_format.3 -MLINKS+=menu_hook.3 item_init.3 menu_hook.3 item_term.3 \ - menu_hook.3 menu_init.3 menu_hook.3 menu_term.3 \ - menu_hook.3 set_item_init.3 menu_hook.3 set_item_term.3 \ - menu_hook.3 set_menu_init.3 menu_hook.3 set_menu_term.3 -MLINKS+=menu_items.3 item_count.3 menu_items.3 set_menu_items.3 -MLINKS+=menu_mark.3 set_menu_mark.3 -MLINKS+=menu_new.3 free_menu.3 menu_new.3 new_menu.3 -MLINKS+=menu_opts.3 menu_opts_off.3 menu_opts.3 menu_opts_on.3 -MLINKS+=menu_pattern.3 set_menu_pattern.3 -MLINKS+=menu_post.3 post_menu.3 menu_post.3 unpost_menu.3 -MLINKS+=menu_requestname.3 menu_request_by_name.3 \ - menu_requestname.3 menu_request_name.3 -MLINKS+=menu_spacing.3 set_menu_spacing.3 -MLINKS+=menu_userptr.3 set_menu_userptr.3 -MLINKS+=menu_win.3 menu_sub.3 menu_win.3 scale_menu.3 \ - menu_win.3 set_menu_sub.3 menu_win.3 set_menu_win.3 -MLINKS+=mitem_current.3 current_item.3 mitem_current.3 item_index.3 \ - mitem_current.3 set_top_row.3 mitem_current.3 top_row.3 \ - mitem_current.3 set_current_item.3 -MLINKS+=mitem_name.3 item_description.3 mitem_name.3 item_name.3 -MLINKS+=mitem_new.3 free_item.3 mitem_new.3 new_item.3 -MLINKS+=mitem_opts.3 item_opts.3 mitem_opts.3 item_opts_off.3 \ - mitem_opts.3 item_opts_on.3 mitem_opts.3 set_item_opts.3 \ - mitem_opts.3 set_menu_opts.3 -MLINKS+=mitem_userptr.3 item_userptr.3 mitem_userptr.3 set_item_userptr.3 -MLINKS+=mitem_value.3 item_value.3 mitem_value.3 set_item_value.3 -MLINKS+=mitem_visible.3 item_visible.3 - -.include diff --git a/lib/libncurses/Makefile b/lib/libncurses/Makefile index daa48e2f18..b0dee1ec84 100644 --- a/lib/libncurses/Makefile +++ b/lib/libncurses/Makefile @@ -1,535 +1,10 @@ -# $FreeBSD: src/lib/libncurses/Makefile,v 1.39.2.13 2002/08/07 16:31:48 ru Exp $ -# $DragonFly: src/lib/libncurses/Makefile,v 1.6 2004/09/26 15:43:40 asmodai Exp $ +# $DragonFly: src/lib/libncurses/Makefile,v 1.7 2005/03/12 19:13:54 eirikn Exp $ -NCURSES=${.CURDIR}/../../contrib/ncurses +SUBDIR= \ + libform \ + libmenu \ + libncurses \ + libpanel \ + man -LIB= ncurses -SHLIB_MAJOR=5 -SHLIB_MINOR=0 - -# Should be elsewhere -AWK?= awk -TERMINFODIR?= ${SHAREDIR}/misc - -NCURSES_MAJOR!=egrep 'NCURSES_MAJOR[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' -NCURSES_MINOR!=egrep 'NCURSES_MINOR[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' -NCURSES_PATCH!=egrep 'NCURSES_PATCH[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' - -# From autoconf (!) -NCURSES_CONST= const -NCURSES_XNAMES= 1 -OSPEED_INCLUDES=\#include -OSPEED_TYPE= speed_t -BUILTIN_BOOL= 1 -BOOL_TYPE= 0 -TYPE_OF_BOOL= char -TYPEOF_CHTYPE= long -WIDEC_SHIFT= 8 -SHIFT_LIMIT= 32 -ONEUL= 1UL - -.PATH: ${NCURSES}/ncurses -.PATH: ${NCURSES}/ncurses/base -.PATH: ${NCURSES}/ncurses/tinfo -.PATH: ${NCURSES}/ncurses/tty -.PATH: ${NCURSES}/ncurses/trace -.PATH: ${NCURSES}/include -.PATH: ${NCURSES}/man - -CFLAGS+=-I. -I${.CURDIR} -I${NCURSES}/ncurses -I${NCURSES}/include -CFLAGS+=-Wall -DFREEBSD_NATIVE -DNDEBUG -DHAVE_CONFIG_H -DTERMIOS - -GENSRC= \ - codes.c \ - expanded.c \ - fallback.c \ - lib_gen.c \ - lib_keyname.c \ - names.c \ - unctrl.c - -GENHDR= \ - curses.h \ - hashsize.h \ - init_keytry.h \ - ncurses_def.h \ - nomacros.h \ - parametrized.h \ - term.h \ - termcap.h \ - unctrl.h - -# Installed -HEADERS=curses.h term.h termcap.h unctrl.h -INCS= ${HEADERS} -INCSLINKS= curses.h ${INCLUDEDIR}/ncurses.h - -# Components of names.c and codes.c -NAMESRC=boolnames boolfnames numnames numfnames strnames strfnames -CODESRC=boolcodes numcodes strcodes - -SRCS= ${GENHDR} ${GENSRC} \ - access.c \ - add_tries.c \ - alloc_entry.c \ - alloc_ttype.c \ - captoinfo.c \ - comp_captab.c \ - comp_error.c \ - comp_expand.c \ - comp_hash.c \ - comp_parse.c \ - comp_scan.c \ - define_key.c \ - doalloc.c \ - free_ttype.c \ - getenv_num.c \ - hardscroll.c \ - hashmap.c \ - home_terminfo.c \ - init_keytry.c \ - keybound.c \ - keyok.c \ - lib_acs.c \ - lib_addch.c \ - lib_addstr.c \ - lib_baudrate.c \ - lib_beep.c \ - lib_bkgd.c \ - lib_box.c \ - lib_chgat.c \ - lib_clear.c \ - lib_clearok.c \ - lib_clrbot.c \ - lib_clreol.c \ - lib_color.c \ - lib_colorset.c \ - lib_cur_term.c \ - lib_data.c \ - lib_delch.c \ - lib_delwin.c \ - lib_dft_fgbg.c \ - lib_echo.c \ - lib_endwin.c \ - lib_erase.c \ - lib_flash.c \ - lib_freeall.c \ - lib_getch.c \ - lib_getstr.c \ - lib_has_cap.c \ - lib_hline.c \ - lib_immedok.c \ - lib_inchstr.c \ - lib_initscr.c \ - lib_insch.c \ - lib_insdel.c \ - lib_insstr.c \ - lib_instr.c \ - lib_isendwin.c \ - lib_kernel.c \ - lib_leaveok.c \ - lib_longname.c \ - lib_mouse.c \ - lib_move.c \ - lib_mvcur.c \ - lib_mvwin.c \ - lib_napms.c \ - lib_newterm.c \ - lib_newwin.c \ - lib_nl.c \ - lib_options.c \ - lib_overlay.c \ - lib_pad.c \ - lib_print.c \ - lib_printw.c \ - lib_raw.c \ - lib_redrawln.c \ - lib_refresh.c \ - lib_restart.c \ - lib_scanw.c \ - lib_screen.c \ - lib_scroll.c \ - lib_scrollok.c \ - lib_scrreg.c \ - lib_set_term.c \ - lib_setup.c \ - lib_slk.c \ - lib_slkatr_set.c \ - lib_slkatrof.c \ - lib_slkatron.c \ - lib_slkatrset.c \ - lib_slkattr.c \ - lib_slkclear.c \ - lib_slkcolor.c \ - lib_slkinit.c \ - lib_slklab.c \ - lib_slkrefr.c \ - lib_slkset.c \ - lib_slktouch.c \ - lib_termcap.c \ - lib_termname.c \ - lib_tgoto.c \ - lib_ti.c \ - lib_touch.c \ - lib_tparm.c \ - lib_tputs.c \ - lib_trace.c \ - lib_traceatr.c \ - lib_tracebits.c \ - lib_tracechr.c \ - lib_tracedmp.c \ - lib_tracemse.c \ - lib_tstp.c \ - lib_ttyflags.c \ - lib_twait.c \ - lib_ungetch.c \ - lib_vidattr.c \ - lib_vline.c \ - lib_wattroff.c \ - lib_wattron.c \ - lib_winch.c \ - lib_window.c \ - memmove.c \ - name_match.c \ - nc_panel.c \ - parse_entry.c \ - read_entry.c \ - resizeterm.c \ - safe_sprintf.c \ - setbuf.c \ - sigaction.c \ - strings.c \ - trace_buf.c \ - trace_tries.c \ - trace_xnames.c \ - tries.c \ - tty_update.c \ - version.c \ - vsscanf.c \ - wresize.c \ - write_entry.c \ - -# From our old libtermcap. -# Used instead of the hideous read_termcap.c abomination. -SRCS+= termcap.c - -CLEANFILES+= ${GENSRC} ${GENHDR} keys.tries make_hash term.h.new \ - make_keys MKterm.h.awk comp_captab.c \ - namehdr nameftr codeftr ${NAMESRC} ${CODESRC} - -SYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a -SYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a -SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a -SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a -SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a -.if !defined(NOPIC) -# no need for major at all, it's an ld-time redirection only -SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so -SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so -SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so -SYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so -SYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so -.endif -.if !defined(NOPROFILE) -SYMLINKS+=libncurses_p.a ${LIBDIR}/libcurses_p.a -SYMLINKS+=libncurses_p.a ${LIBDIR}/libtermcap_p.a -SYMLINKS+=libncurses_p.a ${LIBDIR}/libtermlib_p.a -SYMLINKS+=libncurses_p.a ${LIBDIR}/libmytinfo_p.a -SYMLINKS+=libncurses_p.a ${LIBDIR}/libtinfo_p.a -.endif - -DOCSDIR= /usr/share/doc/ncurses -DOCS= ncurses-intro.html hackguide.html - -.if !defined(NOHTML) -afterinstall: -.for file in ${DOCS} - cd ${.CURDIR}/../../contrib/ncurses/misc ; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 ${file} \ - ${DESTDIR}${DOCSDIR} -.endfor -.endif - -# Generated source -namehdr nameftr codeftr ${NAMESRC} ${CODESRC}: MKnames.awk Caps - ${AWK} -f ${NCURSES}/ncurses/tinfo/MKnames.awk ${NCURSES}/include/Caps - -.ORDER: namehdr ${NAMESRC} ${CODESRC} nameftr codeftr names.c codes.c - -names.c: namehdr ${NAMESRC} nameftr - cat namehdr ${NAMESRC} nameftr > $@ - -codes.c: namehdr ${CODESRC} codeftr - cat namehdr ${CODESRC} codeftr > $@ - -lib_gen.c: MKlib_gen.sh curses.h ncurses_def.h - sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${CFLAGS}" \ - "${AWK}" < curses.h >$@ - -lib_keyname.c: keys.list MKkeyname.awk - ${AWK} -f ${NCURSES}/ncurses/base/MKkeyname.awk \ - ${NCURSES}/ncurses/tinfo/keys.list > lib_keyname.c - -unctrl.c: MKunctrl.awk - echo | ${AWK} -f ${NCURSES}/ncurses/base/MKunctrl.awk > unctrl.c - -comp_captab.c: MKcaptab.awk Caps make_hash - sh ${NCURSES}/ncurses/tinfo/MKcaptab.awk "${AWK}" \ - ${NCURSES}/include/Caps > comp_captab.c - -expanded.c: MKexpanded.sh - sh ${NCURSES}/ncurses/tty/MKexpanded.sh "${CC} -E" ${CFLAGS} >expanded.c - -fallback.c: MKfallback.sh - sh ${NCURSES}/ncurses/tinfo/MKfallback.sh > fallback.c - -# Generated headers -ncurses_def.h: MKncurses_def.sh ncurses_defs - AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \ - ${NCURSES}/include/ncurses_defs > ncurses_def.h - -nomacros.h: MKlib_gen.sh curses.h ncurses_def.h - sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${CFLAGS}" \ - "${AWK}" < curses.h | fgrep undef > $@ - -init_keytry.h: keys.list make_keys - ./make_keys ${NCURSES}/ncurses/tinfo/keys.list > init_keytry.h - -hashsize.h: MKhashsize.sh Caps - sh ${NCURSES}/include/MKhashsize.sh ${NCURSES}/include/Caps > $@ - -parametrized.h: MKparametrized.sh Caps - AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \ - ${NCURSES}/include/Caps > $@ - -term.h: MKterm.h.awk edit_cfg.sh Caps - ${AWK} -f MKterm.h.awk ${NCURSES}/include/Caps > $@.new - sh ${NCURSES}/include/edit_cfg.sh ${.CURDIR}/ncurses_cfg.h $@.new - mv -f $@.new $@ - -# Build tools -# -# NOTE! make_hash, at least, is directly referenced by scripts -# in contrib/ncurses. -# -build-tools: make_hash make_keys - -make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} - ${NXCC} -o $@ ${NXCFLAGS} ${NCURSES}/ncurses/tinfo/make_keys.c - -make_hash: comp_hash.c hashsize.h ncurses_def.h ${HEADERS} - ${NXCC} -o $@ ${NXCFLAGS} -DMAIN_PROGRAM \ - ${NCURSES}/ncurses/tinfo/comp_hash.c - -# ./configure generated -MKterm.h.awk: MKterm.h.awk.in - sed <${NCURSES}/include/$@.in >$@ \ - -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ - -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ - -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ - -e "/@NCURSES_XNAMES@/s//${NCURSES_XNAMES}/" - -termcap.h: termcap.h.in - sed <${NCURSES}/include/$@.in >$@ \ - -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ - -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ - -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ - -e "/@OSPEED_INCLUDES@/s//${OSPEED_INCLUDES}/" \ - -e "/@OSPEED_TYPE@/s//${OSPEED_TYPE}/" - -curses.h: curses.h.in - sed <${NCURSES}/include/$@.in >$@ \ - -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ - -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ - -e "/@NCURSES_PATCH@/s//${NCURSES_PATCH}/" \ - -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ - -e "s/@cf_cv_builtin_bool@/${BUILTIN_BOOL}/g" \ - -e "s/@cf_cv_cc_bool_type@/${BOOL_TYPE}/g" \ - -e "s/@cf_cv_type_of_bool@/${TYPE_OF_BOOL}/g" \ - -e "s/@cf_cv_typeof_chtype@/${TYPEOF_CHTYPE}/g" \ - -e "s/@cf_cv_widec_shift@/${WIDEC_SHIFT}/g" \ - -e "s/@cf_cv_shift_limit@/${SHIFT_LIMIT}/g" \ - -e "s/@cf_cv_1UL@/${ONEUL}/g" - -unctrl.h: unctrl.h.in - sed <${NCURSES}/include/$@.in >$@ \ - -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ - -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" - -# MAN page gunk -terminfo.5: MKterminfo.sh terminfo.head Caps - sh ${NCURSES}/man/MKterminfo.sh ${NCURSES}/man/terminfo.head \ - ${NCURSES}/include/Caps ${NCURSES}/man/terminfo.tail >$@ - -CLEANFILES+= terminfo.5 -MANFILTER= sed -e 's\#@TERMINFO@\#${TERMINFODIR}/terminfo\#g' - -MANx= curs_addch.3x curs_addchstr.3x curs_addstr.3x curs_attr.3x \ - curs_beep.3x curs_bkgd.3x curs_border.3x curs_clear.3x curs_color.3x \ - curs_delch.3x curs_deleteln.3x curs_extend.3x curs_getch.3x \ - curs_getstr.3x \ - curs_getyx.3x curs_inch.3x curs_inchstr.3x curs_initscr.3x \ - curs_inopts.3x curs_insch.3x curs_insstr.3x curs_instr.3x \ - curs_kernel.3x curs_mouse.3x curs_move.3x curs_outopts.3x \ - curs_overlay.3x curs_pad.3x curs_print.3x curs_printw.3x \ - curs_refresh.3x curs_scanw.3x curs_scr_dump.3x curs_scroll.3x \ - curs_slk.3x curs_termattrs.3x curs_termcap.3x curs_terminfo.3x \ - curs_touch.3x curs_trace.3x curs_util.3x curs_window.3x \ - default_colors.3x define_key.3x \ - dft_fgbg.3x keybound.3x keyok.3x ncurses.3x resizeterm.3x wresize.3x -MAN= term.5 terminfo.5 -MAN+= term.7 - -# Generate the MAN list from MANx -.for page in ${MANx} -CLEANFILES+=${page:T:S/x$//g} -MAN+=${page:T:S/x$//g} -${page:T:S/x$//g}: ${page} - ln -s ${.ALLSRC} ${.TARGET} -.endfor - -MLINKS+=ncurses.3 curses.3 -MLINKS+=curs_addch.3 addch.3 curs_addch.3 echochar.3 curs_addch.3 mvaddch.3 \ - curs_addch.3 mvwaddch.3 curs_addch.3 waddch.3 curs_addch.3 wechochar.3 -MLINKS+=curs_addchstr.3 addchnstr.3 curs_addchstr.3 addchstr.3 \ - curs_addchstr.3 mvaddchnstr.3 curs_addchstr.3 mvaddchstr.3 \ - curs_addchstr.3 mvwaddchnstr.3 curs_addchstr.3 mvwaddchstr.3 \ - curs_addchstr.3 waddchnstr.3 curs_addchstr.3 waddchstr.3 -MLINKS+=curs_addstr.3 addnstr.3 curs_addstr.3 addstr.3 \ - curs_addstr.3 mvaddnstr.3 curs_addstr.3 mvaddstr.3 \ - curs_addstr.3 mvwaddnstr.3 curs_addstr.3 mvwaddstr.3 \ - curs_addstr.3 waddnstr.3 curs_addstr.3 waddstr.3 -MLINKS+=curs_attr.3 PAIR_NUMBER.3 \ - curs_attr.3 attr_get.3 curs_attr.3 attr_off.3 curs_attr.3 attr_on.3 \ - curs_attr.3 attr_set.3 curs_attr.3 attroff.3 curs_attr.3 attron.3 \ - curs_attr.3 attrset.3 curs_attr.3 chgat.3 curs_attr.3 color_set.3 \ - curs_attr.3 mvchgat.3 curs_attr.3 mvwchgat.3 curs_attr.3 standend.3 \ - curs_attr.3 standout.3 curs_attr.3 wattr_get.3 curs_attr.3 wattr_off.3 \ - curs_attr.3 wattr_on.3 curs_attr.3 wattr_set.3 curs_attr.3 wattroff.3 \ - curs_attr.3 wattron.3 curs_attr.3 wattrset.3 curs_attr.3 wchgat.3 \ - curs_attr.3 wcolor_set.3 curs_attr.3 wstandend.3 \ - curs_attr.3 wstandout.3 -MLINKS+=curs_beep.3 beep.3 curs_beep.3 flash.3 -MLINKS+=curs_bkgd.3 bkgd.3 curs_bkgd.3 bkgdset.3 curs_bkgd.3 getbkgd.3 \ - curs_bkgd.3 wbkgd.3 curs_bkgd.3 wbkgdset.3 -MLINKS+=curs_border.3 border.3 curs_border.3 box.3 curs_border.3 hline.3 \ - curs_border.3 mvhline.3 curs_border.3 mvvline.3 \ - curs_border.3 mvwhline.3 \ - curs_border.3 mvwvline.3 curs_border.3 vline.3 curs_border.3 wborder.3 \ - curs_border.3 whline.3 curs_border.3 wvline.3 -MLINKS+=curs_clear.3 clear.3 curs_clear.3 clrtobot.3 curs_clear.3 clrtoeol.3 \ - curs_clear.3 erase.3 curs_clear.3 wclear.3 curs_clear.3 wclrtobot.3 \ - curs_clear.3 wclrtoeol.3 curs_clear.3 werase.3 -MLINKS+=curs_color.3 COLOR_PAIR.3 \ - curs_color.3 can_change_color.3 curs_color.3 color_content.3 \ - curs_color.3 has_colors.3 curs_color.3 init_color.3 \ - curs_color.3 init_pair.3 curs_color.3 pair_content.3 \ - curs_color.3 start_color.3 -MLINKS+=curs_delch.3 delch.3 curs_delch.3 mvdelch.3 curs_delch.3 mvwdelch.3 \ - curs_delch.3 wdelch.3 -MLINKS+=curs_deleteln.3 deleteln.3 curs_deleteln.3 insdelln.3 \ - curs_deleteln.3 insertln.3 curs_deleteln.3 wdeleteln.3 \ - curs_deleteln.3 winsdelln.3 curs_deleteln.3 winsertln.3 -MLINKS+=curs_extend.3 curses_version.3 curs_extend.3 use_extended_names.3 -MLINKS+=curs_getch.3 getch.3 curs_getch.3 has_key.3 curs_getch.3 mvgetch.3 \ - curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3 curs_getch.3 wgetch.3 -MLINKS+=curs_getstr.3 getnstr.3 curs_getstr.3 getstr.3 \ - curs_getstr.3 mvgetnstr.3 curs_getstr.3 mvgetstr.3 \ - curs_getstr.3 mvwgetnstr.3 curs_getstr.3 mvwgetstr.3 \ - curs_getstr.3 wgetnstr.3 curs_getstr.3 wgetstr.3 -MLINKS+=curs_getyx.3 getbegyx.3 curs_getyx.3 getmaxyx.3 \ - curs_getyx.3 getparyx.3 curs_getyx.3 getyx.3 -MLINKS+=curs_inch.3 inch.3 curs_inch.3 mvinch.3 curs_inch.3 mvwinch.3 \ - curs_inch.3 winch.3 -MLINKS+=curs_inchstr.3 inchnstr.3 curs_inchstr.3 inchstr.3 \ - curs_inchstr.3 mvinchnstr.3 curs_inchstr.3 mvinchstr.3 \ - curs_inchstr.3 mvwinchnstr.3 curs_inchstr.3 mvwinchstr.3 \ - curs_inchstr.3 winchnstr.3 curs_inchstr.3 winchstr.3 -MLINKS+=curs_initscr.3 delscreen.3 curs_initscr.3 endwin.3 \ - curs_initscr.3 initscr.3 curs_initscr.3 isendwin.3 \ - curs_initscr.3 newterm.3 curs_initscr.3 set_term.3 -MLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 echo.3 curs_inopts.3 halfdelay.3 \ - curs_inopts.3 intrflush.3 curs_inopts.3 keypad.3 curs_inopts.3 meta.3 \ - curs_inopts.3 nocbreak.3 curs_inopts.3 nodelay.3 \ - curs_inopts.3 noecho.3 curs_inopts.3 noqiflush.3 curs_inopts.3 noraw.3 \ - curs_inopts.3 notimeout.3 curs_inopts.3 qiflush.3 curs_inopts.3 raw.3 \ - curs_inopts.3 timeout.3 curs_inopts.3 typeahead.3 \ - curs_inopts.3 wtimeout.3 -MLINKS+=curs_insch.3 insch.3 curs_insch.3 mvinsch.3 curs_insch.3 mvwinsch.3 \ - curs_insch.3 winsch.3 -MLINKS+=curs_insstr.3 insnstr.3 curs_insstr.3 insstr.3 \ - curs_insstr.3 mvinsnstr.3 curs_insstr.3 mvinsstr.3 \ - curs_insstr.3 mvwinsnstr.3 curs_insstr.3 mvwinsstr.3 \ - curs_insstr.3 winsnstr.3 curs_insstr.3 winsstr.3 -MLINKS+=curs_instr.3 innstr.3 curs_instr.3 instr.3 curs_instr.3 mvinnstr.3 \ - curs_instr.3 mvinstr.3 curs_instr.3 mvwinnstr.3 \ - curs_instr.3 mvwinstr.3 curs_instr.3 winnstr.3 curs_instr.3 winstr.3 -MLINKS+=curs_kernel.3 curs_set.3 curs_kernel.3 def_prog_mode.3 \ - curs_kernel.3 def_shell_mode.3 curs_kernel.3 getsyx.3 \ - curs_kernel.3 napms.3 curs_kernel.3 reset_prog_mode.3 \ - curs_kernel.3 reset_shell_mode.3 curs_kernel.3 resetty.3 \ - curs_kernel.3 ripoffline.3 curs_kernel.3 savetty.3 \ - curs_kernel.3 setsyx.3 -MLINKS+=curs_mouse.3 getmouse.3 curs_mouse.3 mouse_trafo.3 \ - curs_mouse.3 mouseinterval.3 \ - curs_mouse.3 mousemask.3 curs_mouse.3 ungetmouse.3 \ - curs_mouse.3 wenclose.3 curs_mouse.3 wmouse_trafo.3 -MLINKS+=curs_move.3 move.3 curs_move.3 wmove.3 -MLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idcok.3 curs_outopts.3 idlok.3 \ - curs_outopts.3 immedok.3 curs_outopts.3 leaveok.3 curs_outopts.3 nl.3 \ - curs_outopts.3 nonl.3 curs_outopts.3 scrollok.3 \ - curs_outopts.3 setscrreg.3 curs_outopts.3 wsetscrreg.3 -MLINKS+=curs_overlay.3 copywin.3 curs_overlay.3 overlay.3 \ - curs_overlay.3 overwrite.3 -MLINKS+=curs_pad.3 newpad.3 curs_pad.3 pechochar.3 curs_pad.3 pnoutrefresh.3 \ - curs_pad.3 prefresh.3 curs_pad.3 subpad.3 -MLINKS+=curs_print.3 mcprint.3 -MLINKS+=curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \ - curs_printw.3 printw.3 curs_printw.3 vw_printw.3 \ - curs_printw.3 vwprintw.3 curs_printw.3 wprintw.3 -MLINKS+=curs_refresh.3 doupdate.3 curs_refresh.3 redrawwin.3 \ - curs_refresh.3 refresh.3 curs_refresh.3 wnoutrefresh.3 \ - curs_refresh.3 wredrawln.3 curs_refresh.3 wrefresh.3 -MLINKS+=curs_scanw.3 mvscanw.3 curs_scanw.3 mvwscanw.3 curs_scanw.3 scanw.3 \ - curs_scanw.3 vw_scanw.3 curs_scanw.3 vwscanw.3 curs_scanw.3 wscanw.3 -MLINKS+=curs_scr_dump.3 scr_dump.3 curs_scr_dump.3 scr_init.3 \ - curs_scr_dump.3 scr_restore.3 curs_scr_dump.3 scr_set.3 -MLINKS+=curs_scroll.3 scrl.3 curs_scroll.3 scroll.3 curs_scroll.3 wscrl.3 -MLINKS+=curs_slk.3 slk_attr.3 curs_slk.3 slk_attr_off.3 \ - curs_slk.3 slk_attr_on.3 curs_slk.3 slk_attr_set.3 \ - curs_slk.3 slk_attroff.3 curs_slk.3 slk_attron.3 \ - curs_slk.3 slk_attrset.3 curs_slk.3 slk_clear.3 \ - curs_slk.3 slk_color.3 curs_slk.3 slk_init.3 curs_slk.3 slk_label.3 \ - curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_refresh.3 \ - curs_slk.3 slk_restore.3 curs_slk.3 slk_set.3 curs_slk.3 slk_touch.3 -MLINKS+=curs_termattrs.3 baudrate.3 curs_termattrs.3 erasechar.3 \ - curs_termattrs.3 has_ic.3 curs_termattrs.3 has_il.3 \ - curs_termattrs.3 killchar.3 curs_termattrs.3 longname.3 \ - curs_termattrs.3 termattrs.3 curs_termattrs.3 termname.3 -MLINKS+=curs_termcap.3 termcap.3 curs_termcap.3 tgetent.3 \ - curs_termcap.3 tgetflag.3 curs_termcap.3 tgetnum.3 \ - curs_termcap.3 tgetstr.3 curs_termcap.3 tgoto.3 \ - curs_termcap.3 tputs.3 -MLINKS+=curs_terminfo.3 del_curterm.3 curs_terminfo.3 mvcur.3 \ - curs_terminfo.3 putp.3 curs_terminfo.3 restartterm.3 \ - curs_terminfo.3 set_curterm.3 curs_terminfo.3 setterm.3 \ - curs_terminfo.3 setupterm.3 curs_terminfo.3 tigetflag.3 \ - curs_terminfo.3 tigetnum.3 curs_terminfo.3 tigetstr.3 \ - curs_terminfo.3 tparm.3 curs_terminfo.3 tputs.3 \ - curs_terminfo.3 vidattr.3 curs_terminfo.3 vidputs.3 -MLINKS+=curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3 \ - curs_touch.3 touchline.3 curs_touch.3 touchwin.3 \ - curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3 -MLINKS+=curs_util.3 delay_output.3 curs_util.3 filter.3 \ - curs_util.3 flushinp.3 curs_util.3 getwin.3 \ - curs_util.3 keyname.3 curs_util.3 putwin.3 \ - curs_util.3 unctrl.3 curs_util.3 use_env.3 -MLINKS+=curs_window.3 delwin.3 curs_window.3 derwin.3 curs_window.3 dupwin.3 \ - curs_window.3 mvderwin.3 curs_window.3 mvwin.3 curs_window.3 newwin.3 \ - curs_window.3 subwin.3 curs_window.3 syncok.3 \ - curs_window.3 wcursyncup.3 curs_window.3 wsyncdown.3 \ - curs_window.3 wsyncup.3 -MLINKS+=default_colors.3 assume_default_colors.3 \ - default_colors.3 use_default_colors.3 - -.include +.include diff --git a/lib/libncurses/Makefile.inc b/lib/libncurses/Makefile.inc new file mode 100644 index 0000000000..ed6693d570 --- /dev/null +++ b/lib/libncurses/Makefile.inc @@ -0,0 +1,3 @@ +# $DragonFly: src/lib/libncurses/Makefile.inc,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +NCURSESDIR= ${.CURDIR}/../../../contrib/ncurses-5.4/ diff --git a/lib/libncurses/include/MKterm.h.awk b/lib/libncurses/include/MKterm.h.awk new file mode 100644 index 0000000000..0fdf43a410 --- /dev/null +++ b/lib/libncurses/include/MKterm.h.awk @@ -0,0 +1,332 @@ +# $DragonFly: src/lib/libncurses/include/MKterm.h.awk,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +BEGIN { + print "/****************************************************************************" + print " * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *" + print " * *" + print " * Permission is hereby granted, free of charge, to any person obtaining a *" + print " * copy of this software and associated documentation files (the *" + print " * \"Software\"), to deal in the Software without restriction, including *" + print " * without limitation the rights to use, copy, modify, merge, publish, *" + print " * distribute, distribute with modifications, sublicense, and/or sell *" + print " * copies of the Software, and to permit persons to whom the Software is *" + print " * furnished to do so, subject to the following conditions: *" + print " * *" + print " * The above copyright notice and this permission notice shall be included *" + print " * in all copies or substantial portions of the Software. *" + print " * *" + print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *" + print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *" + print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *" + print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *" + print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *" + print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *" + print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *" + print " * *" + print " * Except as contained in this notice, the name(s) of the above copyright *" + print " * holders shall not be used in advertising or otherwise to promote the *" + print " * sale, use or other dealings in this Software without prior written *" + print " * authorization. *" + print " ****************************************************************************/" + print "" + print "/****************************************************************************/" + print "/* Author: Zeyd M. Ben-Halim 1992,1995 */" + print "/* and: Eric S. Raymond */" + print "/* and: Thomas E. Dickey 1995-2003 */" + print "/****************************************************************************/" + print "" + print "/* $Id: MKterm.h.awk.in,v 1.42 2003/12/27 19:09:16 tom Exp $ */" + print "" + print "/*" + print "** term.h -- Definition of struct term" + print "*/" + print "" + print "#ifndef NCURSES_TERM_H_incl" + print "#define NCURSES_TERM_H_incl 1" + print "" + print "#undef NCURSES_VERSION" + print "#define NCURSES_VERSION \"5.4\"" + print "" + print "#if 0" + print "#include " + print "#else" + print "/* From ncurses_dll.h */" + print "/* This is copied so we don't need to install" + print "/* ncurses_dll.h as well */" + print "/* Take care of non-cygwin platforms */" + print "#if !defined(NCURSES_IMPEXP)" + print "# define NCURSES_IMPEXP /* nothing */" + print "#endif" + print "#if !defined(NCURSES_API)" + print "# define NCURSES_API /* nothing */" + print "#endif" + print "#if !defined(NCURSES_EXPORT)" + print "# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API" + print "#endif" + print "#if !defined(NCURSES_EXPORT_VAR)" + print "# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type" + print "#endif" + print "#endif" + print "#" + print "" + print "#ifdef __cplusplus" + print "extern \"C\" {" + print "#endif" + print "" + print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H" + print " * definition (based on the system for which this was configured)." + print " */" + print "" + print "#undef HAVE_TERMIOS_H" + print "#define HAVE_TERMIOS_H 1/*default*/" + print "" + print "#undef HAVE_TCGETATTR" + print "#define HAVE_TCGETATTR 1/*default*/" + print "" + print "#undef NCURSES_CONST" + print "#define NCURSES_CONST /*nothing*/" + print "" + print "#undef NCURSES_XNAMES" + print "#define NCURSES_XNAMES 1" + print "" + print "/* We will use these symbols to hide differences between" + print " * termios/termio/sgttyb interfaces." + print " */" + print "#undef TTY" + print "#undef SET_TTY" + print "#undef GET_TTY" + print "" + print "/* Assume POSIX termio if we have the header and function */" + print "#if HAVE_TERMIOS_H && HAVE_TCGETATTR" + print "" + print "#undef TERMIOS" + print "#define TERMIOS 1" + print "" + print "#include " + print "#define TTY struct termios" + print "" + print "#else /* !HAVE_TERMIOS_H */" + print "" + print "#if HAVE_TERMIO_H" + print "" + print "#undef TERMIOS" + print "#define TERMIOS 1" + print "" + print "#include " + print "#define TTY struct termio" + print "" + print "/* Add definitions to make termio look like termios." + print " * But ifdef it, since there are some implementations" + print " * that try to do this for us in a fake ." + print " */" + print "#ifndef TCSANOW" + print "#define TCSANOW TCSETA" + print "#endif" + print "#ifndef TCSADRAIN" + print "#define TCSADRAIN TCSETAW" + print "#endif" + print "#ifndef TCSAFLUSH" + print "#define TCSAFLUSH TCSETAF" + print "#endif" + print "#ifndef tcsetattr" + print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)" + print "#endif" + print "#ifndef tcgetattr" + print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)" + print "#endif" + print "#ifndef cfgetospeed" + print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)" + print "#endif" + print "#ifndef TCIFLUSH " + print "#define TCIFLUSH 0" + print "#endif" + print "#ifndef TCOFLUSH " + print "#define TCOFLUSH 1" + print "#endif" + print "#ifndef TCIOFLUSH " + print "#define TCIOFLUSH 2" + print "#endif" + print "#ifndef tcflush" + print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)" + print "#endif" + print "" + print "#else /* !HAVE_TERMIO_H */" + print "" + print "#undef TERMIOS" + print "#include " + print "#include " + print "#define TTY struct sgttyb" + print "" + print "#endif /* HAVE_TERMIO_H */" + print "" + print "#endif /* HAVE_TERMIOS_H */" + print "" + print "#ifdef TERMIOS" + print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)" + print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)" + print "#else" + print "#define GET_TTY(fd, buf) gtty(fd, buf)" + print "#define SET_TTY(fd, buf) stty(fd, buf)" + print "#endif" + print "" + print "#define NAMESIZE 256" + print "" + print "#define CUR cur_term->type." + print "" + } + +$2 == "%%-STOP-HERE-%%" { + print "" + printf "#define BOOLWRITE %d\n", BoolCount + printf "#define NUMWRITE %d\n", NumberCount + printf "#define STRWRITE %d\n", StringCount + print "" + print "/* older synonyms for some capabilities */" + print "#define beehive_glitch no_esc_ctlc" + print "#define teleray_glitch dest_tabs_magic_smso" + print "#define micro_char_size micro_col_size" + print "" + print "#ifdef __INTERNAL_CAPS_VISIBLE" + } + +/^#/ {next;} + +$1 == "acs_chars" {acsindex = StringCount} + +$3 == "bool" { + printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++ + } + +$3 == "num" { + printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++ + } + +$3 == "str" { + printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++ + } + +END { + print "#endif /* __INTERNAL_CAPS_VISIBLE */" + print "" + print "" + print "/*" + print " * Predefined terminfo array sizes" + print " */" + printf "#define BOOLCOUNT %d\n", BoolCount + printf "#define NUMCOUNT %d\n", NumberCount + printf "#define STRCOUNT %d\n", StringCount + print "" + print "/* used by code for comparing entries */" + print "#define acs_chars_index ", acsindex + print "" + print "typedef struct termtype { /* in-core form of terminfo data */" + print " char *term_names; /* str_table offset of term names */" + print " char *str_table; /* pointer to string table */" + print " char *Booleans; /* array of boolean values */" + print " short *Numbers; /* array of integer values */" + print " char **Strings; /* array of string offsets */" + print "" + print "#if NCURSES_XNAMES" + print " char *ext_str_table; /* pointer to extended string table */" + print " char **ext_Names; /* corresponding names */" + print "" + print " unsigned short num_Booleans;/* count total Booleans */" + print " unsigned short num_Numbers; /* count total Numbers */" + print " unsigned short num_Strings; /* count total Strings */" + print "" + print " unsigned short ext_Booleans;/* count extensions to Booleans */" + print " unsigned short ext_Numbers; /* count extensions to Numbers */" + print " unsigned short ext_Strings; /* count extensions to Strings */" + print "#endif /* NCURSES_XNAMES */" + print "" + print "} TERMTYPE;" + print "" + print "typedef struct term { /* describe an actual terminal */" + print " TERMTYPE type; /* terminal type description */" + print " short Filedes; /* file description being written to */" + print " TTY Ottyb, /* original state of the terminal */" + print " Nttyb; /* current state of the terminal */" + print " int _baudrate; /* used to compute padding */" + print " char * _termname; /* used for termname() */" + print "} TERMINAL;" + print "" + print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;" + print "" + print "#if BROKEN_LINKER" + print "#define boolnames _nc_boolnames()" + print "#define boolcodes _nc_boolcodes()" + print "#define boolfnames _nc_boolfnames()" + print "#define numnames _nc_numnames()" + print "#define numcodes _nc_numcodes()" + print "#define numfnames _nc_numfnames()" + print "#define strnames _nc_strnames()" + print "#define strcodes _nc_strcodes()" + print "#define strfnames _nc_strfnames()" + print "" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolnames (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolcodes (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolfnames (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numnames (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numcodes (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numfnames (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strnames (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strcodes (void);" + print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strfnames (void);" + print "" + print "#else" + print "" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];" + print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];" + print "" + print "#endif" + print "" + print "/* internals */" + print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);" + print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);" + print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);" + print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);" + print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);" + print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);" + print "extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);" + print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);" + print "" + print "/* entry points */" + print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);" + print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);" + print "" + print "/* miscellaneous entry points */" + print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);" + print "extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);" + print "" + print "/* terminfo entry points, also declared in curses.h */" + print "#if !defined(__NCURSES_H)" + print "extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);" + print "extern NCURSES_EXPORT_VAR(char) ttytype[];" + print "extern NCURSES_EXPORT(int) putp (const char *);" + print "extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);" + print "#endif /* __NCURSES_H */" + print "" + print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */" + print "#if !defined(NCURSES_TERMCAP_H_incl)" + print "extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);" + print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);" + print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);" + print "extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);" + print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));" + print "#endif /* NCURSES_TERMCAP_H_incl */" + print "" + print "#ifdef __cplusplus" + print "}" + print "#endif" + print "" + print "#endif /* NCURSES_TERM_H_incl */" + } diff --git a/lib/libncurses/include/curses.head b/lib/libncurses/include/curses.head new file mode 100644 index 0000000000..1416c9986a --- /dev/null +++ b/lib/libncurses/include/curses.head @@ -0,0 +1,1038 @@ +/**************************************************************************** + * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim 1992,1995 * + * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * + ****************************************************************************/ + +/* $Id: curses.h.in,v 1.148 2004/01/14 23:50:12 tom Exp $ */ +/* $DragonFly: src/lib/libncurses/include/curses.head,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ + +#ifndef __NCURSES_H +#define __NCURSES_H + +#define CURSES 1 +#define CURSES_H 1 + +/* This should be defined for the enhanced functionality to be visible. + * However, some of the wide-character (enhanced) functionality is missing. + * So we do not define it (yet). +#define _XOPEN_CURSES 1 + */ + +/* These are defined only in curses.h, and are used for conditional compiles */ +#define NCURSES_VERSION_MAJOR 5 +#define NCURSES_VERSION_MINOR 4 +#define NCURSES_VERSION_PATCH 20040208 + +/* This is defined in more than one ncurses header, for identification */ +#undef NCURSES_VERSION +#define NCURSES_VERSION "5.4" + +#if 0 +#include +#else +/* From ncurses_dll.h */ +/* This is copied so we don't need to install ncurses_dll.h as well */ +/* Take care of non-cygwin platforms */ +#if !defined(NCURSES_IMPEXP) +# define NCURSES_IMPEXP /* nothing */ +#endif +#if !defined(NCURSES_API) +# define NCURSES_API /* nothing */ +#endif +#if !defined(NCURSES_EXPORT) +# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API +#endif +#if !defined(NCURSES_EXPORT_VAR) +# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type +#endif +#endif + +/* + * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses + * configured using --disable-macros. + */ +#ifdef NCURSES_NOMACROS +#define NCURSES_ATTR_T attr_t +#endif + +#ifndef NCURSES_ATTR_T +#define NCURSES_ATTR_T int +#endif + +/* + * Expands to 'const' if ncurses is configured using --enable-const. Note that + * doing so makes it incompatible with other implementations of X/Open Curses. + */ +#undef NCURSES_CONST +#define NCURSES_CONST /*nothing*/ + +/* + * The internal type used for color values + */ +#undef NCURSES_COLOR_T +#define NCURSES_COLOR_T short + +/* + * The internal type used for window dimensions. + */ +#undef NCURSES_SIZE_T +#define NCURSES_SIZE_T short + +/* + * NCURSES_CH_T is used in building the library, but not used otherwise in + * this header file, since that would make the normal/wide-character versions + * of the header incompatible. + */ +#undef NCURSES_CH_T +#define NCURSES_CH_T chtype + +typedef unsigned long chtype; + +#include +#include +#include /* we need va_list */ +#ifdef _XOPEN_SOURCE_EXTENDED +#include /* we want wchar_t */ +#endif /* _XOPEN_SOURCE_EXTENDED */ + +/* XSI and SVr4 specify that curses implements 'bool'. However, C++ may also + * implement it. If so, we must use the C++ compiler's type to avoid conflict + * with other interfaces. + * + * A further complication is that may declare 'bool' to be a + * different type, such as an enum which is not necessarily compatible with + * C++. If we have , make 'bool' a macro, so users may #undef it. + * Otherwise, let it remain a typedef to avoid conflicts with other #define's. + * In either case, make a typedef for NCURSES_BOOL which can be used if needed + * from either C or C++. + */ + +#undef TRUE +#define TRUE 1 + +#undef FALSE +#define FALSE 0 + +typedef unsigned char NCURSES_BOOL; + +#if defined(__cplusplus) /* __cplusplus, etc. */ + +/* use the C++ compiler's bool type */ +#define NCURSES_BOOL bool + +#else /* c89, c99, etc. */ + +#if 1 +#include +/* use whatever the C compiler decides bool really is */ +#define NCURSES_BOOL bool +#else +/* there is no predefined bool - use our own */ +#undef bool +#define bool NCURSES_BOOL +#endif + +#endif /* !__cplusplus, etc. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * XSI attributes. In the ncurses implementation, they are identical to the + * A_ attributes. + */ +#define WA_ATTRIBUTES A_ATTRIBUTES +#define WA_NORMAL A_NORMAL +#define WA_STANDOUT A_STANDOUT +#define WA_UNDERLINE A_UNDERLINE +#define WA_REVERSE A_REVERSE +#define WA_BLINK A_BLINK +#define WA_DIM A_DIM +#define WA_BOLD A_BOLD +#define WA_ALTCHARSET A_ALTCHARSET +#define WA_INVIS A_INVIS +#define WA_PROTECT A_PROTECT +#define WA_HORIZONTAL A_HORIZONTAL +#define WA_LEFT A_LEFT +#define WA_LOW A_LOW +#define WA_RIGHT A_RIGHT +#define WA_TOP A_TOP +#define WA_VERTICAL A_VERTICAL + +/* colors */ +extern NCURSES_EXPORT_VAR(int) COLORS; +extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS; + +#define COLOR_BLACK 0 +#define COLOR_RED 1 +#define COLOR_GREEN 2 +#define COLOR_YELLOW 3 +#define COLOR_BLUE 4 +#define COLOR_MAGENTA 5 +#define COLOR_CYAN 6 +#define COLOR_WHITE 7 + +/* line graphics */ + +#if 0 +extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void); +#define acs_map (_nc_acs_map()) +#else +extern NCURSES_EXPORT_VAR(chtype) acs_map[]; +#endif + +#define NCURSES_ACS(c) (acs_map[(unsigned char)c]) + +/* VT100 symbols begin here */ +#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */ +#define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */ +#define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */ +#define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */ +#define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */ +#define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */ +#define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */ +#define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */ +#define ACS_HLINE NCURSES_ACS('q') /* horizontal line */ +#define ACS_VLINE NCURSES_ACS('x') /* vertical line */ +#define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */ +#define ACS_S1 NCURSES_ACS('o') /* scan line 1 */ +#define ACS_S9 NCURSES_ACS('s') /* scan line 9 */ +#define ACS_DIAMOND NCURSES_ACS('`') /* diamond */ +#define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */ +#define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */ +#define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */ +#define ACS_BULLET NCURSES_ACS('~') /* bullet */ +/* Teletype 5410v1 symbols begin here */ +#define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */ +#define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */ +#define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */ +#define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ +#define ACS_BOARD NCURSES_ACS('h') /* board of squares */ +#define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */ +#define ACS_BLOCK NCURSES_ACS('0') /* solid square block */ +/* + * These aren't documented, but a lot of System Vs have them anyway + * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings). + * The ACS_names may not match AT&T's, our source didn't know them. + */ +#define ACS_S3 NCURSES_ACS('p') /* scan line 3 */ +#define ACS_S7 NCURSES_ACS('r') /* scan line 7 */ +#define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */ +#define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */ +#define ACS_PI NCURSES_ACS('{') /* Pi */ +#define ACS_NEQUAL NCURSES_ACS('|') /* not equal */ +#define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */ + +/* + * Line drawing ACS names are of the form ACS_trbl, where t is the top, r + * is the right, b is the bottom, and l is the left. t, r, b, and l might + * be B (blank), S (single), D (double), or T (thick). The subset defined + * here only uses B and S. + */ +#define ACS_BSSB ACS_ULCORNER +#define ACS_SSBB ACS_LLCORNER +#define ACS_BBSS ACS_URCORNER +#define ACS_SBBS ACS_LRCORNER +#define ACS_SBSS ACS_RTEE +#define ACS_SSSB ACS_LTEE +#define ACS_SSBS ACS_BTEE +#define ACS_BSSS ACS_TTEE +#define ACS_BSBS ACS_HLINE +#define ACS_SBSB ACS_VLINE +#define ACS_SSSS ACS_PLUS + +#undef ERR +#define ERR (-1) + +#undef OK +#define OK (0) + +/* values for the _flags member */ +#define _SUBWIN 0x01 /* is this a sub-window? */ +#define _ENDLINE 0x02 /* is the window flush right? */ +#define _FULLWIN 0x04 /* is the window full-screen? */ +#define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */ +#define _ISPAD 0x10 /* is this window a pad? */ +#define _HASMOVED 0x20 /* has cursor moved since last refresh? */ +#define _WRAPPED 0x40 /* cursor was just wrappped */ + +/* + * this value is used in the firstchar and lastchar fields to mark + * unchanged lines + */ +#define _NOCHANGE -1 + +/* + * this value is used in the oldindex field to mark lines created by insertions + * and scrolls. + */ +#define _NEWINDEX -1 + +typedef struct screen SCREEN; +typedef struct _win_st WINDOW; + +typedef chtype attr_t; /* ...must be at least as wide as chtype */ + +#ifdef _XOPEN_SOURCE_EXTENDED + +#if 0 +#ifdef mblen /* libutf8.h defines it w/o undefining first */ +#undef mblen +#endif +#include +#endif + +#if 0 +#include /* ...to get mbstate_t, etc. */ +#endif + +#if 0 +typedef unsigned short wchar_t; +#endif + +#if 0 +typedef unsigned int wint_t; +#endif + +#define CCHARW_MAX 5 +typedef struct +{ + attr_t attr; + wchar_t chars[CCHARW_MAX]; +} +cchar_t; + +#endif /* _XOPEN_SOURCE_EXTENDED */ + +struct ldat; + +struct _win_st +{ + NCURSES_SIZE_T _cury, _curx; /* current cursor position */ + + /* window location and size */ + NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ + NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */ + + short _flags; /* window state flags */ + + /* attribute tracking */ + attr_t _attrs; /* current attribute for non-space character */ + chtype _bkgd; /* current background char/attribute pair */ + + /* option values set by user */ + bool _notimeout; /* no time out on function-key entry? */ + bool _clear; /* consider all data in the window invalid? */ + bool _leaveok; /* OK to not reset cursor on exit? */ + bool _scroll; /* OK to scroll this window? */ + bool _idlok; /* OK to use insert/delete line? */ + bool _idcok; /* OK to use insert/delete char? */ + bool _immed; /* window in immed mode? (not yet used) */ + bool _sync; /* window in sync mode? */ + bool _use_keypad; /* process function keys into KEY_ symbols? */ + int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */ + + struct ldat *_line; /* the actual line data */ + + /* global screen state */ + NCURSES_SIZE_T _regtop; /* top line of scrolling region */ + NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */ + + /* these are used only if this is a sub-window */ + int _parx; /* x coordinate of this window in parent */ + int _pary; /* y coordinate of this window in parent */ + WINDOW *_parent; /* pointer to parent if a sub-window */ + + /* these are used only if this is a pad */ + struct pdat + { + NCURSES_SIZE_T _pad_y, _pad_x; + NCURSES_SIZE_T _pad_top, _pad_left; + NCURSES_SIZE_T _pad_bottom, _pad_right; + } _pad; + + NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */ + +#ifdef _XOPEN_SOURCE_EXTENDED + cchar_t _bkgrnd; /* current background char/attribute pair */ +#endif +}; + +extern NCURSES_EXPORT_VAR(WINDOW *) stdscr; +extern NCURSES_EXPORT_VAR(WINDOW *) curscr; +extern NCURSES_EXPORT_VAR(WINDOW *) newscr; + +extern NCURSES_EXPORT_VAR(int) LINES; +extern NCURSES_EXPORT_VAR(int) COLS; +extern NCURSES_EXPORT_VAR(int) TABSIZE; + +/* + * This global was an undocumented feature under AIX curses. + */ +extern NCURSES_EXPORT_VAR(int) ESCDELAY; /* ESC expire time in milliseconds */ + +extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compatibility */ + +/* + * These functions are extensions - not in XSI Curses. + */ +#if 1 +extern NCURSES_EXPORT(bool) is_term_resized (int, int); +extern NCURSES_EXPORT(char *) keybound (int, int); +extern NCURSES_EXPORT(const char *) curses_version (void); +extern NCURSES_EXPORT(int) assume_default_colors (int, int); +extern NCURSES_EXPORT(int) define_key (const char *, int); +extern NCURSES_EXPORT(int) key_defined (const char *); +extern NCURSES_EXPORT(int) keyok (int, bool); +extern NCURSES_EXPORT(int) resize_term (int, int); +extern NCURSES_EXPORT(int) resizeterm (int, int); +extern NCURSES_EXPORT(int) use_default_colors (void); +extern NCURSES_EXPORT(int) use_extended_names (bool); +extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); +#else +#define curses_version() NCURSES_VERSION +#endif + +/* + * This is an extension to support events... + */ +#if 1 +#ifdef NCURSES_WGETCH_EVENTS +#if !defined(__BEOS__) /* Fix _nc_timed_wait() on BEOS... */ +# define NCURSES_EVENT_VERSION 1 +#endif /* !defined(__BEOS__) */ + +/* + * Bits to set in _nc_event.data.flags + */ +# define _NC_EVENT_TIMEOUT_MSEC 1 +# define _NC_EVENT_FILE 2 +# define _NC_EVENT_FILE_READABLE 2 +# if 0 /* Not supported yet... */ +# define _NC_EVENT_FILE_WRITABLE 4 +# define _NC_EVENT_FILE_EXCEPTION 8 +# endif + +typedef struct +{ + int type; + union + { + long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ + struct + { + unsigned int flags; + int fd; + unsigned int result; + } fev; /* _NC_EVENT_FILE */ + } data; +} _nc_event; + +typedef struct +{ + int count; + int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ + _nc_event *events[1]; +} _nc_eventlist; + +extern NCURSES_EXPORT(int) wgetch_events(WINDOW *, _nc_eventlist *); /* experimental */ +extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);/* experimental */ + +#endif /* NCURSES_WGETCH_EVENTS */ +#endif /* NCURSES_EXT_FUNCS */ + +/* + * GCC (and some other compilers) define '__attribute__'; we're using this + * macro to alert the compiler to flag inconsistencies in printf/scanf-like + * function calls. Just in case '__attribute__' isn't defined, make a dummy. + * Old versions of G++ do not accept it anyway, at least not consistently with + * GCC. + */ +#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) +#define __attribute__(p) /* nothing */ +#endif + +/* + * We cannot define these in ncurses_cfg.h, since they require parameters to be + * passed (that's non-portable). + */ +#ifndef GCC_PRINTFLIKE +#if defined(GCC_PRINTF) && !defined(printf) +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) +#else +#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ +#endif +#endif + +#ifndef GCC_SCANFLIKE +#if defined(GCC_SCANF) && !defined(scanf) +#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) +#else +#define GCC_SCANFLIKE(fmt,var) /*nothing*/ +#endif +#endif + +#ifndef GCC_NORETURN +#define GCC_NORETURN /* nothing */ +#endif + +#ifndef GCC_UNUSED +#define GCC_UNUSED /* nothing */ +#endif + +/* + * Function prototypes. This is the complete XSI Curses list of required + * functions. Those marked `generated' will have sources generated from the + * macro definitions later in this file, in order to satisfy XPG4.2 + * requirements. + */ + +extern NCURSES_EXPORT(int) addch (const chtype); /* generated */ +extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); /* generated */ +extern NCURSES_EXPORT(int) addchstr (const chtype *); /* generated */ +extern NCURSES_EXPORT(int) addnstr (const char *, int); /* generated */ +extern NCURSES_EXPORT(int) addstr (const char *); /* generated */ +extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); /* generated */ +extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); /* generated */ +extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); /* generated */ +extern NCURSES_EXPORT(int) attr_get (attr_t *, short *, void *); /* generated */ +extern NCURSES_EXPORT(int) attr_off (attr_t, void *); /* generated */ +extern NCURSES_EXPORT(int) attr_on (attr_t, void *); /* generated */ +extern NCURSES_EXPORT(int) attr_set (attr_t, short, void *); /* generated */ +extern NCURSES_EXPORT(int) baudrate (void); /* implemented */ +extern NCURSES_EXPORT(int) beep (void); /* implemented */ +extern NCURSES_EXPORT(int) bkgd (chtype); /* generated */ +extern NCURSES_EXPORT(void) bkgdset (chtype); /* generated */ +extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */ +extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */ +extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */ +extern NCURSES_EXPORT(int) cbreak (void); /* implemented */ +extern NCURSES_EXPORT(int) chgat (int, attr_t, short, const void *); /* generated */ +extern NCURSES_EXPORT(int) clear (void); /* generated */ +extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(int) clrtobot (void); /* generated */ +extern NCURSES_EXPORT(int) clrtoeol (void); /* generated */ +extern NCURSES_EXPORT(int) color_content (short,short*,short*,short*); /* implemented */ +extern NCURSES_EXPORT(int) color_set (short,void*); /* generated */ +extern NCURSES_EXPORT(int) COLOR_PAIR (int); /* generated */ +extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) curs_set (int); /* implemented */ +extern NCURSES_EXPORT(int) def_prog_mode (void); /* implemented */ +extern NCURSES_EXPORT(int) def_shell_mode (void); /* implemented */ +extern NCURSES_EXPORT(int) delay_output (int); /* implemented */ +extern NCURSES_EXPORT(int) delch (void); /* generated */ +extern NCURSES_EXPORT(void) delscreen (SCREEN *); /* implemented */ +extern NCURSES_EXPORT(int) delwin (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) deleteln (void); /* generated */ +extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) doupdate (void); /* implemented */ +extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) echo (void); /* implemented */ +extern NCURSES_EXPORT(int) echochar (const chtype); /* generated */ +extern NCURSES_EXPORT(int) erase (void); /* generated */ +extern NCURSES_EXPORT(int) endwin (void); /* implemented */ +extern NCURSES_EXPORT(char) erasechar (void); /* implemented */ +extern NCURSES_EXPORT(void) filter (void); /* implemented */ +extern NCURSES_EXPORT(int) flash (void); /* implemented */ +extern NCURSES_EXPORT(int) flushinp (void); /* implemented */ +extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) getch (void); /* generated */ +extern NCURSES_EXPORT(int) getnstr (char *, int); /* generated */ +extern NCURSES_EXPORT(int) getstr (char *); /* generated */ +extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); /* implemented */ +extern NCURSES_EXPORT(int) halfdelay (int); /* implemented */ +extern NCURSES_EXPORT(bool) has_colors (void); /* implemented */ +extern NCURSES_EXPORT(bool) has_ic (void); /* implemented */ +extern NCURSES_EXPORT(bool) has_il (void); /* implemented */ +extern NCURSES_EXPORT(int) hline (chtype, int); /* generated */ +extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); /* implemented */ +extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); /* implemented */ +extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); /* implemented */ +extern NCURSES_EXPORT(chtype) inch (void); /* generated */ +extern NCURSES_EXPORT(int) inchnstr (chtype *, int); /* generated */ +extern NCURSES_EXPORT(int) inchstr (chtype *); /* generated */ +extern NCURSES_EXPORT(WINDOW *) initscr (void); /* implemented */ +extern NCURSES_EXPORT(int) init_color (short,short,short,short); /* implemented */ +extern NCURSES_EXPORT(int) init_pair (short,short,short); /* implemented */ +extern NCURSES_EXPORT(int) innstr (char *, int); /* generated */ +extern NCURSES_EXPORT(int) insch (chtype); /* generated */ +extern NCURSES_EXPORT(int) insdelln (int); /* generated */ +extern NCURSES_EXPORT(int) insertln (void); /* generated */ +extern NCURSES_EXPORT(int) insnstr (const char *, int); /* generated */ +extern NCURSES_EXPORT(int) insstr (const char *); /* generated */ +extern NCURSES_EXPORT(int) instr (char *); /* generated */ +extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(bool) isendwin (void); /* implemented */ +extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); /* implemented */ +extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */ +extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(char) killchar (void); /* implemented */ +extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(char *) longname (void); /* implemented */ +extern NCURSES_EXPORT(int) meta (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(int) move (int, int); /* generated */ +extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); /* generated */ +extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* generated */ +extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); /* generated */ +extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); /* generated */ +extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, short, const void *); /* generated */ +extern NCURSES_EXPORT(int) mvcur (int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) mvdelch (int, int); /* generated */ +extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); /* implemented */ +extern NCURSES_EXPORT(int) mvgetch (int, int); /* generated */ +extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); /* generated */ +extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); /* generated */ +extern NCURSES_EXPORT(chtype) mvinch (int, int); /* generated */ +extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); /* generated */ +extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); /* generated */ +extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); /* generated */ +extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */ +extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */ +extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */ + GCC_PRINTFLIKE(3,4); +extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */ + GCC_SCANFLIKE(3,4); +extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */ +extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */ +extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);/* generated */ +extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); /* generated */ +extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); /* generated */ +extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, short, const void *);/* generated */ +extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); /* generated */ +extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); /* generated */ +extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); /* generated */ +extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); /* generated */ +extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); /* implemented */ +extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); /* generated */ +extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); /* generated */ +extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* generated */ +extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); /* generated */ +extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); /* generated */ +extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* generated */ +extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */ +extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */ + GCC_PRINTFLIKE(4,5); +extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */ + GCC_SCANFLIKE(4,5); +extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */ +extern NCURSES_EXPORT(int) napms (int); /* implemented */ +extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */ +extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */ +extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) nl (void); /* implemented */ +extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */ +extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(int) noecho (void); /* implemented */ +extern NCURSES_EXPORT(int) nonl (void); /* implemented */ +extern NCURSES_EXPORT(void) noqiflush (void); /* implemented */ +extern NCURSES_EXPORT(int) noraw (void); /* implemented */ +extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) pair_content (short,short*,short*); /* implemented */ +extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* generated */ +extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* implemented */ +extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/* implemented */ +extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) printw (const char *,...) /* implemented */ + GCC_PRINTFLIKE(1,2); +extern NCURSES_EXPORT(int) putp (const char *); /* implemented */ +extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* implemented */ +extern NCURSES_EXPORT(void) qiflush (void); /* implemented */ +extern NCURSES_EXPORT(int) raw (void); /* implemented */ +extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) refresh (void); /* generated */ +extern NCURSES_EXPORT(int) resetty (void); /* implemented */ +extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */ +extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */ +extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */ +extern NCURSES_EXPORT(int) savetty (void); /* implemented */ +extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */ + GCC_SCANFLIKE(1,2); +extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */ +extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */ +extern NCURSES_EXPORT(int) scrl (int); /* generated */ +extern NCURSES_EXPORT(int) scroll (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); /* implemented */ +extern NCURSES_EXPORT(int) scr_restore (const char *); /* implemented */ +extern NCURSES_EXPORT(int) scr_set (const char *); /* implemented */ +extern NCURSES_EXPORT(int) setscrreg (int,int); /* generated */ +extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); /* implemented */ +extern NCURSES_EXPORT(int) slk_attroff (const chtype); /* implemented */ +extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); /* generated:WIDEC */ +extern NCURSES_EXPORT(int) slk_attron (const chtype); /* implemented */ +extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); /* generated:WIDEC */ +extern NCURSES_EXPORT(int) slk_attrset (const chtype); /* implemented */ +extern NCURSES_EXPORT(attr_t) slk_attr (void); /* implemented */ +extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,short,void*); /* implemented */ +extern NCURSES_EXPORT(int) slk_clear (void); /* implemented */ +extern NCURSES_EXPORT(int) slk_color (short); /* implemented */ +extern NCURSES_EXPORT(int) slk_init (int); /* implemented */ +extern NCURSES_EXPORT(char *) slk_label (int); /* implemented */ +extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */ +extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */ +extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */ +extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */ +extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */ +extern NCURSES_EXPORT(int) standout (void); /* generated */ +extern NCURSES_EXPORT(int) standend (void); /* generated */ +extern NCURSES_EXPORT(int) start_color (void); /* implemented */ +extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* implemented */ +extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *,int,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* implemented */ +extern NCURSES_EXPORT(chtype) termattrs (void); /* implemented */ +extern NCURSES_EXPORT(char *) termname (void); /* implemented */ +extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ +extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */ +extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */ +extern NCURSES_EXPORT(void) timeout (int); /* generated */ +extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* generated */ +extern NCURSES_EXPORT(int) touchwin (WINDOW *); /* generated */ +extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* implemented */ +extern NCURSES_EXPORT(int) typeahead (int); /* implemented */ +extern NCURSES_EXPORT(int) ungetch (int); /* implemented */ +extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */ +extern NCURSES_EXPORT(void) use_env (bool); /* implemented */ +extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ +extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); /* implemented */ +extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ +extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */ +extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */ +extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */ +extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */ +extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ +extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ +extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */ +extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */ +extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); /* generated */ +extern NCURSES_EXPORT(int) wattron (WINDOW *, int); /* generated */ +extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); /* generated */ +extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); /* generated */ +extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, short *, void *); /* generated */ +extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); /* implemented */ +extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); /* implemented */ +extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, short, void *); /* generated */ +extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); /* implemented */ +extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); /* implemented */ +extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* implemented */ +extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, short, const void *);/* implemented */ +extern NCURSES_EXPORT(int) wclear (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,short,void*); /* implemented */ +extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wdelch (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); /* implemented */ +extern NCURSES_EXPORT(int) werase (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); /* implemented */ +extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); /* generated */ +extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); /* implemented */ +extern NCURSES_EXPORT(chtype) winch (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); /* implemented */ +extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); /* generated */ +extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); /* implemented */ +extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); /* implemented */ +extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); /* implemented */ +extern NCURSES_EXPORT(int) winsertln (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); /* implemented */ +extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); /* generated */ +extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); /* generated */ +extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); /* implemented */ +extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented */ + GCC_PRINTFLIKE(2,3); +extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */ +extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */ + GCC_SCANFLIKE(2,3); +extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */ +extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */ +extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* generated */ +extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* generated */ +extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(void) wsyncup (WINDOW *); /* implemented */ +extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* implemented */ +extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* implemented */ +extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */ + +/* + * vid_attr() was implemented originally based on the draft of XSI curses. + */ +#ifndef _XOPEN_SOURCE_EXTENDED +#define vid_attr(a,pair,opts) vidattr(a) +#endif + +/* attributes */ + +#define NCURSES_ATTR_SHIFT 8 +#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT)) + +#define A_NORMAL 0L +#define A_ATTRIBUTES NCURSES_BITS(~(1UL - 1UL),0) +#define A_CHARTEXT (NCURSES_BITS(1UL,0) - 1UL) +#define A_COLOR NCURSES_BITS(((1UL) << 8) - 1UL,0) +#define A_STANDOUT NCURSES_BITS(1UL,8) +#define A_UNDERLINE NCURSES_BITS(1UL,9) +#define A_REVERSE NCURSES_BITS(1UL,10) +#define A_BLINK NCURSES_BITS(1UL,11) +#define A_DIM NCURSES_BITS(1UL,12) +#define A_BOLD NCURSES_BITS(1UL,13) +#define A_ALTCHARSET NCURSES_BITS(1UL,14) +#define A_INVIS NCURSES_BITS(1UL,15) +#define A_PROTECT NCURSES_BITS(1UL,16) +#define A_HORIZONTAL NCURSES_BITS(1UL,17) +#define A_LEFT NCURSES_BITS(1UL,18) +#define A_LOW NCURSES_BITS(1UL,19) +#define A_RIGHT NCURSES_BITS(1UL,20) +#define A_TOP NCURSES_BITS(1UL,21) +#define A_VERTICAL NCURSES_BITS(1UL,22) + +#define COLOR_PAIR(n) NCURSES_BITS(n, 0) +#define PAIR_NUMBER(a) ((int)(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)) + +/* + * pseudo functions + */ +#define wgetstr(w, s) wgetnstr(w, s, -1) +#define getnstr(s, n) wgetnstr(stdscr, s, n) + +#define setterm(term) setupterm(term, 1, (int *)0) + +#define fixterm() reset_prog_mode() +#define resetterm() reset_shell_mode() +#define saveterm() def_prog_mode() +#define crmode() cbreak() +#define nocrmode() nocbreak() +#define gettmode() + +#define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) +#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) +#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) +#define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) + +#define getsyx(y,x) do { if(newscr->_leaveok) (y)=(x)=-1; \ + else getyx(newscr,(y),(x)); \ + } while(0) +#define setsyx(y,x) do { if((y)==-1 && (x)==-1) newscr->_leaveok=TRUE; \ + else {newscr->_leaveok=FALSE;wmove(newscr,(y),(x));} \ + } while(0) + +/* It seems older SYSV curses versions define these */ +#define getattrs(win) ((win)?(win)->_attrs:A_NORMAL) +#define getcurx(win) ((win)?(win)->_curx:ERR) +#define getcury(win) ((win)?(win)->_cury:ERR) +#define getbegx(win) ((win)?(win)->_begx:ERR) +#define getbegy(win) ((win)?(win)->_begy:ERR) +#define getmaxx(win) ((win)?((win)->_maxx + 1):ERR) +#define getmaxy(win) ((win)?((win)->_maxy + 1):ERR) +#define getparx(win) ((win)?(win)->_parx:ERR) +#define getpary(win) ((win)?(win)->_pary:ERR) + +#define wstandout(win) (wattrset(win,A_STANDOUT)) +#define wstandend(win) (wattrset(win,A_NORMAL)) +#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK) + +#define wattron(win,at) wattr_on(win, (attr_t) at, (void *)0) +#define wattroff(win,at) wattr_off(win, (attr_t) at, (void *)0) +#define wattrset(win,at) ((win)->_attrs = (at)) + +#define scroll(win) wscrl(win,1) + +#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) +#define touchline(win, s, c) wtouchln((win), s, c, 1) +#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0) + +#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0) +#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br) +#define hline(ch, n) whline(stdscr, ch, n) +#define vline(ch, n) wvline(stdscr, ch, n) + +#define winstr(w, s) winnstr(w, s, -1) +#define winchstr(w, s) winchnstr(w, s, -1) +#define winsstr(w, s) winsnstr(w, s, -1) + +#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1) +#define waddstr(win,str) waddnstr(win,str,-1) +#define waddchstr(win,str) waddchnstr(win,str,-1) + +/* + * pseudo functions for standard screen + */ + +#define addch(ch) waddch(stdscr,ch) +#define addchnstr(str,n) waddchnstr(stdscr,str,n) +#define addchstr(str) waddchstr(stdscr,str) +#define addnstr(str,n) waddnstr(stdscr,str,n) +#define addstr(str) waddnstr(stdscr,str,-1) +#define attroff(at) wattroff(stdscr,at) +#define attron(at) wattron(stdscr,at) +#define attrset(at) wattrset(stdscr,at) +#define attr_get(ap,cp,o) wattr_get(stdscr,ap,cp,o) +#define attr_off(a,o) wattr_off(stdscr,a,o) +#define attr_on(a,o) wattr_on(stdscr,a,o) +#define attr_set(a,c,o) wattr_set(stdscr,a,c,o) +#define bkgd(ch) wbkgd(stdscr,ch) +#define bkgdset(ch) wbkgdset(stdscr,ch) +#define chgat(n,a,c,o) wchgat(stdscr,n,a,c,o) +#define clear() wclear(stdscr) +#define clrtobot() wclrtobot(stdscr) +#define clrtoeol() wclrtoeol(stdscr) +#define color_set(c,o) wcolor_set(stdscr,c,o) +#define delch() wdelch(stdscr) +#define deleteln() winsdelln(stdscr,-1) +#define echochar(c) wechochar(stdscr,c) +#define erase() werase(stdscr) +#define getch() wgetch(stdscr) +#define getstr(str) wgetstr(stdscr,str) +#define inch() winch(stdscr) +#define inchnstr(s,n) winchnstr(stdscr,s,n) +#define inchstr(s) winchstr(stdscr,s) +#define innstr(s,n) winnstr(stdscr,s,n) +#define insch(c) winsch(stdscr,c) +#define insdelln(n) winsdelln(stdscr,n) +#define insertln() winsdelln(stdscr,1) +#define insnstr(s,n) winsnstr(stdscr,s,n) +#define insstr(s) winsstr(stdscr,s) +#define instr(s) winstr(stdscr,s) +#define move(y,x) wmove(stdscr,y,x) +#define refresh() wrefresh(stdscr) +#define scrl(n) wscrl(stdscr,n) +#define setscrreg(t,b) wsetscrreg(stdscr,t,b) +#define standend() wstandend(stdscr) +#define standout() wstandout(stdscr) +#define timeout(delay) wtimeout(stdscr,delay) +#define wdeleteln(win) winsdelln(win,-1) +#define winsertln(win) winsdelln(win,1) + +/* + * mv functions + */ + +#define mvwaddch(win,y,x,ch) (wmove(win,y,x) == ERR ? ERR : waddch(win,ch)) +#define mvwaddchnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,n)) +#define mvwaddchstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,-1)) +#define mvwaddnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,n)) +#define mvwaddstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,-1)) +#define mvwdelch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wdelch(win)) +#define mvwchgat(win,y,x,n,a,c,o) (wmove(win,y,x) == ERR ? ERR : wchgat(win,n,a,c,o)) +#define mvwgetch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wgetch(win)) +#define mvwgetnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : wgetnstr(win,str,n)) +#define mvwgetstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : wgetstr(win,str)) +#define mvwhline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline(win,c,n)) +#define mvwinch(win,y,x) (wmove(win,y,x) == ERR ? (chtype)ERR : winch(win)) +#define mvwinchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winchnstr(win,s,n)) +#define mvwinchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winchstr(win,s)) +#define mvwinnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winnstr(win,s,n)) +#define mvwinsch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winsch(win,c)) +#define mvwinsnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winsnstr(win,s,n)) +#define mvwinsstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winsstr(win,s)) +#define mvwinstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winstr(win,s)) +#define mvwvline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline(win,c,n)) + +#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch) +#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,y,x,str,n) +#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,y,x,str) +#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,y,x,str,n) +#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str) +#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,y,x,n,a,c,o) +#define mvdelch(y,x) mvwdelch(stdscr,y,x) +#define mvgetch(y,x) mvwgetch(stdscr,y,x) +#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,y,x,str,n) +#define mvgetstr(y,x,str) mvwgetstr(stdscr,y,x,str) +#define mvhline(y,x,c,n) mvwhline(stdscr,y,x,c,n) +#define mvinch(y,x) mvwinch(stdscr,y,x) +#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,y,x,s,n) +#define mvinchstr(y,x,s) mvwinchstr(stdscr,y,x,s) +#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,s,n) +#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c) +#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n) +#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s) +#define mvinstr(y,x,s) mvwinstr(stdscr,y,x,s) +#define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n) + +/* + * Some wide-character functions do not depend on the extensions. + */ +#define getbkgd(win) ((win)->_bkgd) + +#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) +#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) + +#define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) = (win)->_attrs)), \ + (void)((p) != 0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \ + OK) + +/* + * XSI curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use + * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to + * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already + * use stdarg.h, so... + */ +#define vw_printw vwprintw +#define vw_scanw vwscanw + +/* + * Export fallback function for use in C++ binding. + */ +#if !1 +#define vsscanf(a,b,c) _nc_vsscanf(a,b,c) +NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); +#endif + +/* + * Pseudo-character tokens outside ASCII range. The curses wgetch() function + * will return any given one of these only if the corresponding k- capability + * is defined in your terminal's terminfo entry. + * + * Some keys (KEY_A1, etc) are arranged like this: + * a1 up a3 + * left b2 right + * c1 down c3 + * + * A few key codes do not depend upon the terminfo entry. + */ +#define KEY_CODE_YES 0400 /* A wchar_t contains a key code */ +#define KEY_MIN 0401 /* Minimum curses key */ +#define KEY_BREAK 0401 /* Break key (unreliable) */ +#define KEY_SRESET 0530 /* Soft (partial) reset (unreliable) */ +#define KEY_RESET 0531 /* Reset or hard reset (unreliable) */ diff --git a/lib/libncurses/ncurses_cfg.h b/lib/libncurses/include/ncurses_cfg.h similarity index 83% rename from lib/libncurses/ncurses_cfg.h rename to lib/libncurses/include/ncurses_cfg.h index 4bd2f14798..d4972245de 100644 --- a/lib/libncurses/ncurses_cfg.h +++ b/lib/libncurses/include/ncurses_cfg.h @@ -31,7 +31,7 @@ * Author: Thomas E. Dickey 1997 * ****************************************************************************/ /* - * $Id: ncurses_cfg.hin,v 1.3 2000/09/02 17:13:32 tom Exp $ + * $Id: ncurses_cfg.hin,v 1.4 2002/09/07 16:55:14 tom Exp $ * * This is a template-file used to generate the "ncurses_cfg.h" file. * @@ -40,103 +40,114 @@ * 971222) to autoconf 2.12 or 2.13 to do this. * * See: - * http://dickey.his.com/autoconf/ - * ftp://dickey.his.com/autoconf/ + * http://invisible-island.net/autoconf/ + * ftp://invisible-island.net/autoconf/ */ - -/* $FreeBSD: src/lib/libncurses/ncurses_cfg.h,v 1.1.2.2 2000/10/12 18:41:06 peter Exp $ */ -/* $DragonFly: src/lib/libncurses/Attic/ncurses_cfg.h,v 1.2 2003/06/17 04:26:50 dillon Exp $ */ - +/* $DragonFly: src/lib/libncurses/include/ncurses_cfg.h,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ #ifndef NC_CONFIG_H #define NC_CONFIG_H -#define BSD_TPUTS 1 -#define CC_HAS_INLINE_FUNCS 1 +#define SYSTEM_NAME "dragonfly1.1" #define CC_HAS_PROTOS 1 -#define GCC_NORETURN __dead2 -#define GCC_PRINTF 1 -#define GCC_SCANF 1 -#define GCC_UNUSED __unused +#define HAVE_LONG_FILE_NAMES 1 +#define MIXEDCASE_FILENAMES 1 +#define USE_SYSMOUSE 1 +#define USE_DATABASE 1 +#define TERMINFO_DIRS "/usr/local/share/terminfo" +#define TERMINFO "/usr/local/share/terminfo" #define HAVE_BIG_CORE 1 -#define HAVE_BSD_CGETENT 1 +#define USE_TERMCAP 1 +#define TERMPATH "/etc/termcap:/usr/share/misc/termcap" +#define USE_HOME_TERMINFO 1 +#define HAVE_REMOVE 1 +#define HAVE_UNLINK 1 +#define HAVE_LINK 1 +#define HAVE_SYMLINK 1 #define HAVE_CURSES_VERSION 1 +#define HAVE_HAS_KEY 1 +#define HAVE_RESIZETERM 1 +#define HAVE_RESIZE_TERM 1 +#define HAVE_USE_DEFAULT_COLORS 1 +#define HAVE_WRESIZE 1 +#define NCURSES_EXT_FUNCS 1 +#define NCURSES_NO_PADDING 1 +#define USE_SIGWINCH 1 +#define USE_ROOT_ENVIRON 1 +#define USE_ASSUMED_COLOR 1 +#define USE_HASHMAP 1 +#define GCC_SCANF 1 +#define GCC_PRINTF 1 +#define GCC_UNUSED __attribute__((unused)) +#define GCC_NORETURN __attribute__((noreturn)) +#define NDEBUG 1 +#define HAVE_NC_ALLOC_H 1 +#define HAVE_GETTIMEOFDAY 1 +#define STDC_HEADERS 1 #define HAVE_DIRENT_H 1 -#define HAVE_ERRNO 1 +#define TIME_WITH_SYS_TIME 1 +#define HAVE_REGEX_H_FUNCS 1 #define HAVE_FCNTL_H 1 -#define HAVE_FORM_H 1 +#define HAVE_GETOPT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALE_H 1 +#define HAVE_POLL_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_TTYENT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_SYS_TIME_SELECT 1 +#define CC_HAS_INLINE_FUNCS 1 +#define TYPEOF_CHTYPE long +#define HAVE_ERRNO 1 #define HAVE_GETCWD 1 #define HAVE_GETEGID 1 #define HAVE_GETEUID 1 -#define HAVE_GETTIMEOFDAY 1 #define HAVE_GETTTYNAM 1 -#define HAVE_HAS_KEY 1 -#define HAVE_ISASCII 1 #define HAVE_ISSETUGID 1 -#define HAVE_LIBFORM 1 -#define HAVE_LIBMENU 1 -#define HAVE_LIBPANEL 1 -#define HAVE_LIMITS_H 1 -#define HAVE_LINK 1 -#define HAVE_LOCALE_H 1 -#define HAVE_LONG_FILE_NAMES 1 #define HAVE_MEMCCPY 1 -#define HAVE_MENU_H 1 -#define HAVE_MKSTEMP 1 #define HAVE_NANOSLEEP 1 -#define HAVE_NC_ALLOC_H 1 -#define HAVE_PANEL_H 1 #define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_REGEX_H_FUNCS 1 -#define HAVE_REMOVE 1 #define HAVE_REMOVE 1 -#define HAVE_RESIZETERM 1 #define HAVE_SELECT 1 #define HAVE_SETBUF 1 #define HAVE_SETBUFFER 1 #define HAVE_SETVBUF 1 #define HAVE_SIGACTION 1 #define HAVE_SIGVEC 1 -#define HAVE_SIZECHANGE 1 #define HAVE_STRDUP 1 #define HAVE_STRSTR 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_TIMES_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TIME_SELECT 1 -#define HAVE_TCGETATTR 1 #define HAVE_TCGETPGRP 1 -#define HAVE_TERMIOS_H 1 #define HAVE_TIMES 1 -#define HAVE_TTYENT_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNLINK 1 -#define HAVE_USE_DEFAULT_COLORS 1 #define HAVE_VSNPRINTF 1 +#define HAVE_ISASCII 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_TCGETATTR 1 #define HAVE_VSSCANF 1 -#define HAVE_WORKING_POLL 1 -#define HAVE_WRESIZE 1 -#define MIXEDCASE_FILENAMES 1 -#define NCURSES_EXT_FUNCS 1 -#define NCURSES_NO_PADDING 1 -#define NDEBUG 1 +#define HAVE_MKSTEMP 1 #define RETSIGTYPE void -#define STDC_HEADERS 1 -#define SYSTEM_NAME "FreeBSD" -#define TERMINFO "/usr/share/misc/terminfo" -#define TERMINFO_DIRS "/usr/share/misc/terminfo" -#define TYPEOF_CHTYPE long -#define USE_ASSUMED_COLOR 1 -#define USE_COLORFGBG 1 -#define USE_DATABASE 1 -#define USE_GETCAP 1 -#define USE_HASHMAP 1 -#define USE_SIGWINCH 1 +#define HAVE_SIZECHANGE 1 +#define HAVE_WORKING_POLL 1 +#define HAVE_TYPEINFO 1 +#define ETIP_NEEDS_MATH_H 1 +#define CPP_HAS_PARAM_INIT 1 +#define HAVE_STRSTREAM_H 1 +#define CPP_HAS_VSCAN_FUNC 1 +#define USE_STRSTREAM_VSCAN 1 +#define HAVE_SLK_COLOR 1 +#define HAVE_PANEL_H 1 +#define HAVE_LIBPANEL 1 +#define HAVE_MENU_H 1 +#define HAVE_LIBMENU 1 +#define HAVE_FORM_H 1 +#define HAVE_LIBFORM 1 +#define NCURSES_PATHSEP ':' +#define NCURSES_VERSION_STRING "5.4.20040208" #include diff --git a/lib/libncurses/pathnames.h b/lib/libncurses/include/pathnames.h similarity index 95% rename from lib/libncurses/pathnames.h rename to lib/libncurses/include/pathnames.h index 690d436868..7929e31835 100644 --- a/lib/libncurses/pathnames.h +++ b/lib/libncurses/include/pathnames.h @@ -32,7 +32,7 @@ * * @(#)pathnames.h 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libncurses/pathnames.h,v 1.1 1999/08/30 07:57:50 peter Exp $ - * $DragonFly: src/lib/libncurses/Attic/pathnames.h,v 1.2 2003/06/17 04:26:50 dillon Exp $ + * $DragonFly: src/lib/libncurses/include/pathnames.h,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ #define _PATH_DEF ".termcap /usr/share/misc/termcap" diff --git a/lib/libncurses/include/termcap.h b/lib/libncurses/include/termcap.h new file mode 100644 index 0000000000..45704cdc44 --- /dev/null +++ b/lib/libncurses/include/termcap.h @@ -0,0 +1,95 @@ +/**************************************************************************** + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim 1992,1995 * + * and: Eric S. Raymond * + ****************************************************************************/ + +/* $Id: termcap.h.in,v 1.16 2001/03/24 21:53:27 tom Exp $ */ +/* $DragonFly: src/lib/libncurses/include/termcap.h,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ + +#ifndef NCURSES_TERMCAP_H_incl +#define NCURSES_TERMCAP_H_incl 1 + +#undef NCURSES_VERSION +#define NCURSES_VERSION "5.4" + +#if 0 +#include +#else +/* From ncurses_dll.h */ +/* This is copied so we don't need to install ncurses_dll.h as well */ +/* Take care of non-cygwin platforms */ +#if !defined(NCURSES_IMPEXP) +# define NCURSES_IMPEXP /* nothing */ +#endif +#if !defined(NCURSES_API) +# define NCURSES_API /* nothing */ +#endif +#if !defined(NCURSES_EXPORT) +# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API +#endif +#if !defined(NCURSES_EXPORT_VAR) +# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type +#endif +#endif + + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include + +#undef NCURSES_CONST +#define NCURSES_CONST /*nothing*/ + +#undef NCURSES_OSPEED +#define NCURSES_OSPEED short + +extern NCURSES_EXPORT_VAR(char) PC; +extern NCURSES_EXPORT_VAR(char *) UP; +extern NCURSES_EXPORT_VAR(char *) BC; +extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed; + +#if !defined(NCURSES_TERM_H_incl) +extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **); +extern NCURSES_EXPORT(char *) tgoto (const char *, int, int); +extern NCURSES_EXPORT(int) tgetent (char *, const char *); +extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *); +extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *); +extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* NCURSES_TERMCAP_H_incl */ diff --git a/lib/libncurses/include/unctrl.h b/lib/libncurses/include/unctrl.h new file mode 100644 index 0000000000..1339e006aa --- /dev/null +++ b/lib/libncurses/include/unctrl.h @@ -0,0 +1,64 @@ +/**************************************************************************** + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim 1992,1995 * + * and: Eric S. Raymond * + ****************************************************************************/ + +/* + * unctrl.h + * + * Display a printable version of a control character. + * Control characters are displayed in caret notation (^x), DELETE is displayed + * as ^?. Printable characters are displayed as is. + */ + +/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */ +/* $DragonFly: src/lib/libncurses/include/unctrl.h,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ + +#ifndef NCURSES_UNCTRL_H_incl +#define NCURSES_UNCTRL_H_incl 1 + +#undef NCURSES_VERSION +#define NCURSES_VERSION "5.4" + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#undef unctrl +NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype); + +#ifdef __cplusplus +} +#endif + +#endif /* NCURSES_UNCTRL_H_incl */ diff --git a/lib/libncurses/libform/Makefile b/lib/libncurses/libform/Makefile new file mode 100644 index 0000000000..7e030e8782 --- /dev/null +++ b/lib/libncurses/libform/Makefile @@ -0,0 +1,76 @@ +# $DragonFly: src/lib/libncurses/libform/Makefile,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +LIB= form +SHLIB_MAJOR=5 +SHLIB_MINOR=4 + +.include "../Makefile.inc" + +NCURSESFORMDIR= ${NCURSESDIR}/form ${.OBJDIR} + +.PATH: ${NCURSESFORMDIR} + +CFLAGS= -I${NCURSESDIR}/menu +CFLAGS+= -I${NCURSESDIR}/include/ +CFLAGS+= -I${.CURDIR}/../include/ +CFLAGS+= -I${.CURDIR} + +TERMINFO_CAPS= ${NCURSESDIR}/include/Caps + +ncurses_def.h: + ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} +curses.h: + cat ${.CURDIR}/../include/curses.head >$@ + ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@ + cat ${NCURSESDIR}/include/curses.tail >>$@ + +CLEANFILES= curses.h ncurses_def.h + +SRCS= \ + ncurses_def.h \ + curses.h + +SRCS+= \ + fld_arg.c \ + fld_attr.c \ + fld_current.c \ + fld_def.c \ + fld_dup.c \ + fld_ftchoice.c \ + fld_ftlink.c \ + fld_info.c \ + fld_just.c \ + fld_link.c \ + fld_max.c \ + fld_move.c \ + fld_newftyp.c \ + fld_opts.c \ + fld_pad.c \ + fld_page.c \ + fld_stat.c \ + fld_type.c \ + fld_user.c \ + frm_cursor.c \ + frm_data.c \ + frm_def.c \ + frm_driver.c \ + frm_hook.c \ + frm_opts.c \ + frm_page.c \ + frm_post.c \ + frm_req_name.c \ + frm_scale.c \ + frm_sub.c \ + frm_user.c \ + frm_win.c \ + fty_alnum.c \ + fty_alpha.c \ + fty_enum.c \ + fty_int.c \ + fty_ipv4.c \ + fty_num.c \ + fty_regex.c + +INCS= form.h + +.include diff --git a/lib/libncurses/libmenu/Makefile b/lib/libncurses/libmenu/Makefile new file mode 100644 index 0000000000..28f092c7fa --- /dev/null +++ b/lib/libncurses/libmenu/Makefile @@ -0,0 +1,63 @@ +# $DragonFly: src/lib/libncurses/libmenu/Makefile,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +LIB= menu +SHLIB_MAJOR=5 +SHLIB_MINOR=4 + +.include "../Makefile.inc" + +NCURSESMENUDIR= ${NCURSESDIR}/menu ${.OBJDIR} + +.PATH: ${NCURSESMENUDIR} + +CFLAGS= -I${NCURSESDIR}/menu +CFLAGS+= -I${NCURSESDIR}/include/ +CFLAGS+= -I${.CURDIR}/../include/ +CFLAGS+= -I${.CURDIR} + +TERMINFO_CAPS= ${NCURSESDIR}/include/Caps + +ncurses_def.h: + ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} +curses.h: + cat ${.CURDIR}/../include/curses.head >$@ + ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@ + cat ${NCURSESDIR}/include/curses.tail >>$@ + +CLEANFILES= curses.h ncurses_def.h + +SRCS= \ + ncurses_def.h \ + curses.h + +SRCS+= \ + m_attribs.c \ + m_cursor.c \ + m_driver.c \ + m_format.c \ + m_global.c \ + m_hook.c \ + m_item_cur.c \ + m_item_nam.c \ + m_item_new.c \ + m_item_opt.c \ + m_item_top.c \ + m_item_use.c \ + m_item_val.c \ + m_item_vis.c \ + m_items.c \ + m_new.c \ + m_opts.c \ + m_pad.c \ + m_pattern.c \ + m_post.c \ + m_req_name.c \ + m_scale.c \ + m_spacing.c \ + m_sub.c \ + m_userptr.c \ + m_win.c + +INCS= menu.h eti.h + +.include diff --git a/lib/libncurses/libncurses/Makefile b/lib/libncurses/libncurses/Makefile new file mode 100644 index 0000000000..5070deb08b --- /dev/null +++ b/lib/libncurses/libncurses/Makefile @@ -0,0 +1,265 @@ +# $DragonFly: src/lib/libncurses/libncurses/Makefile,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +LIB= ncurses +SHLIB_MAJOR=5 +SHLIB_MINOR=4 + +.include "../Makefile.inc" + +NCURSESBASEDIR=${NCURSESDIR}/ncurses/base +NCURSESSERIALDIR=${NCURSESDIR}/ncurses/tty +NCURSESTINFODIR=${NCURSESDIR}/ncurses/tinfo +NCURSESTRACEDIR=${NCURSESDIR}/ncurses/trace +.PATH: ${NCURSESBASEDIR} ${NCURSESSERIALDIR} ${NCURSESTINFODIR} \ + ${NCURSESTRACEDIR} ${.OBJDIR} ${NCURSESDIR}/include/ + +CFLAGS= -I${NCURSESDIR}/ncurses/ +CFLAGS+= -I${NCURSESDIR}/include/ +CFLAGS+= -I${.CURDIR}/../include/ +CFLAGS+= -I${.OBJDIR}/ +CFLAGS+= -DTRACE + +TERMINFO_CAPS= ${NCURSESDIR}/include/Caps +ncurses_def.h: + ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} +curses.h: + cat ${.CURDIR}/../include/curses.head >$@ + ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@ + cat ${NCURSESDIR}/include/curses.tail >>$@ +term.h: + awk -f ${.CURDIR}/../include/MKterm.h.awk ${TERMINFO_CAPS} > $@ + ${NCURSESDIR}/include/edit_cfg.sh ${.CURDIR}/../include/ncurses_cfg.h $@ +hashsize.h: + ${NCURSESDIR}/include/MKhashsize.sh ${TERMINFO_CAPS} >$@ +parametrized.h: + ${NCURSESDIR}/include/MKparametrized.sh ${TERMINFO_CAPS} >$@ +init_keytry.h: make_keys + ${.OBJDIR}/make_keys keys.list > $@ +keys.list: + ${NCURSESTINFODIR}/MKkeys_list.sh ${TERMINFO_CAPS} | sort > $@ +make_keys: names.c + ${CC} -o $@ ${NCURSESTINFODIR}/make_keys.c ${CFLAGS} +names.c codes.c: + awk -f ${NCURSESTINFODIR}/MKnames.awk ${TERMINFO_CAPS} + cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >names.c + cat namehdr boolcodes numcodes strcodes codeftr >codes.c +comp_captab.c: make_hash + sh ${NCURSESTINFODIR}/MKcaptab.awk awk ${TERMINFO_CAPS} > $@ +make_hash: hashsize.h ncurses_def.h curses.h + ${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM ${NCURSESTINFODIR}/comp_hash.c +expanded.c: + sh ${NCURSESSERIALDIR}/MKexpanded.sh "${CC}" ${CFLAGS} > $@ +fallback.c: + sh ${NCURSESTINFODIR}/MKfallback.sh /usr/share/terminfo ${NCURSESDIR}/misc/terminfo.src >$@ +lib_gen.c: curses.h + sh ${NCURSESBASEDIR}/MKlib_gen.sh "${CC} ${CFLAGS}" awk generated $@ +lib_keyname.c: keys.list + awk -f ${NCURSESBASEDIR}/MKkeyname.awk keys.list > $@ +unctrl.c: + echo | awk -f ${NCURSESBASEDIR}/MKunctrl.awk >$@ + +CLEANFILES= curses.h ncurses_def.h term.h hashsize.h parametrized.h comp_captab.c +CLEANFILES+= namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr +CLEANFILES+= codes.c init_keytry.h numcodes strcodes boolcodes codeftr make_keys names.c +CLEANFILES+= make_hash expanded.c fallback.c lib_gen.c lib_keyname.c unctrl.c keys.list + +SRCS= \ + curses.h \ + ncurses_def.h \ + term.h \ + hashsize.h \ + parametrized.h \ + init_keytry.h + +# Base +SRCS+= \ + define_key.c \ + key_defined.c \ + keybound.c \ + keyok.c \ + lib_addch.c \ + lib_addstr.c \ + lib_beep.c \ + lib_bkgd.c \ + lib_box.c \ + lib_chgat.c \ + lib_clear.c \ + lib_clearok.c \ + lib_clrbot.c \ + lib_clreol.c \ + lib_color.c \ + lib_colorset.c \ + lib_delch.c \ + lib_delwin.c \ + lib_dft_fgbg.c \ + lib_echo.c \ + lib_endwin.c \ + lib_erase.c \ + lib_flash.c \ + lib_freeall.c \ + lib_getch.c \ + lib_getstr.c \ + lib_hline.c \ + lib_immedok.c \ + lib_inchstr.c \ + lib_initscr.c \ + lib_insch.c \ + lib_insdel.c \ + lib_instr.c \ + lib_isendwin.c \ + lib_leaveok.c \ + lib_mouse.c \ + lib_move.c \ + lib_mvwin.c \ + lib_newterm.c \ + lib_newwin.c \ + lib_nl.c \ + lib_overlay.c \ + lib_pad.c \ + lib_printw.c \ + lib_redrawln.c \ + lib_refresh.c \ + lib_restart.c \ + lib_scanw.c \ + lib_screen.c \ + lib_scroll.c \ + lib_scrollok.c \ + lib_scrreg.c \ + lib_set_term.c \ + lib_slk.c \ + lib_slkatr_set.c \ + lib_slkatrof.c \ + lib_slkatron.c \ + lib_slkatrset.c \ + lib_slkattr.c \ + lib_slkclear.c \ + lib_slkcolor.c \ + lib_slkinit.c \ + lib_slklab.c \ + lib_slkrefr.c \ + lib_slkset.c \ + lib_slktouch.c \ + lib_touch.c \ + lib_ungetch.c \ + lib_vline.c \ + lib_wattroff.c \ + lib_wattron.c \ + lib_winch.c \ + lib_window.c \ + memmove.c \ + nc_panel.c \ + resizeterm.c \ + safe_sprintf.c \ + tries.c \ + version.c \ + vsscanf.c \ + wresize.c + +# Serial +SRCS+= \ + hardscroll.c \ + hashmap.c \ + lib_mvcur.c \ + lib_tstp.c \ + lib_twait.c \ + lib_vidattr.c \ + tty_update.c + +# Tinfo +SRCS+= \ + access.c \ + add_tries.c \ + alloc_entry.c \ + alloc_ttype.c \ + captoinfo.c \ + comp_error.c \ + comp_expand.c \ + comp_hash.c \ + comp_parse.c \ + comp_scan.c \ + doalloc.c \ + free_ttype.c \ + getenv_num.c \ + home_terminfo.c \ + init_keytry.c \ + lib_acs.c \ + lib_baudrate.c \ + lib_cur_term.c \ + lib_data.c \ + lib_has_cap.c \ + lib_kernel.c \ + lib_longname.c \ + lib_napms.c \ + lib_options.c \ + lib_print.c \ + lib_raw.c \ + lib_setup.c \ + lib_termcap.c \ + lib_termname.c \ + lib_tgoto.c \ + lib_ti.c \ + lib_tparm.c \ + lib_tputs.c \ + lib_ttyflags.c \ + name_match.c \ + parse_entry.c \ + read_entry.c \ + setbuf.c \ + strings.c \ + write_entry.c + +# Trace +SRCS+= \ + lib_trace.c \ + lib_traceatr.c \ + lib_tracebits.c \ + lib_tracechr.c \ + lib_tracedmp.c \ + lib_tracemse.c \ + trace_buf.c \ + trace_tries.c \ + trace_xnames.c \ + varargs.c \ + visbuf.c \ + +# Generated +SRCS+= \ + codes.c \ + comp_captab.c \ + expanded.c \ + fallback.c \ + lib_gen.c \ + lib_keyname.c \ + names.c \ + unctrl.c + +# Use instead of read_termcap.c. +# From our old libtermcap. +SRCS+= termcap.c + +SYMLINKS+=libncurses.a ${LIBDIR}/libcurses.a +SYMLINKS+=libncurses.a ${LIBDIR}/libtinfo.a +SYMLINKS+=libncurses.a ${LIBDIR}/libmytinfo.a +SYMLINKS+=libncurses.a ${LIBDIR}/libtermlib.a +SYMLINKS+=libncurses.a ${LIBDIR}/libtermcap.a +.if !defined(NOPIC) +# no need for major at all, it's an ld-time redirection only +SYMLINKS+=libncurses.so ${SHLIBDIR}/libcurses.so +SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermcap.so +SYMLINKS+=libncurses.so ${SHLIBDIR}/libtermlib.so +SYMLINKS+=libncurses.so ${SHLIBDIR}/libmytinfo.so +SYMLINKS+=libncurses.so ${SHLIBDIR}/libtinfo.so +.endif +.if !defined(NOPROFILE) +SYMLINKS+=libncurses_p.a ${LIBDIR}/libcurses_p.a +SYMLINKS+=libncurses_p.a ${LIBDIR}/libtermcap_p.a +SYMLINKS+=libncurses_p.a ${LIBDIR}/libtermlib_p.a +SYMLINKS+=libncurses_p.a ${LIBDIR}/libmytinfo_p.a +SYMLINKS+=libncurses_p.a ${LIBDIR}/libtinfo_p.a +.endif + +INCS= term.h ${.CURDIR}/../include/termcap.h \ + ${.CURDIR}/../include/unctrl.h curses.h +INCSLINKS=curses.h ${INCLUDEDIR}/ncurses.h + +.include diff --git a/lib/libncurses/termcap.c b/lib/libncurses/libncurses/termcap.c similarity index 98% rename from lib/libncurses/termcap.c rename to lib/libncurses/libncurses/termcap.c index 0e4d56f760..2103e84ce5 100644 --- a/lib/libncurses/termcap.c +++ b/lib/libncurses/libncurses/termcap.c @@ -61,7 +61,7 @@ * * @(#)termcap.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libncurses/termcap.c,v 1.2.2.2 2002/08/15 08:30:26 ru Exp $ - * $DragonFly: src/lib/libncurses/Attic/termcap.c,v 1.3 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libncurses/libncurses/termcap.c,v 1.1 2005/03/12 19:13:54 eirikn Exp $ */ #include diff --git a/lib/libncurses/libpanel/Makefile b/lib/libncurses/libpanel/Makefile new file mode 100644 index 0000000000..fd2cdf1a15 --- /dev/null +++ b/lib/libncurses/libpanel/Makefile @@ -0,0 +1,53 @@ +# $DragonFly: src/lib/libncurses/libpanel/Makefile,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +LIB= panel +SHLIB_MAJOR=5 +SHLIB_MINOR=4 + +.include "../Makefile.inc" + +NCURSESPANELDIR=${NCURSESDIR}/panel ${.OBJDIR} + +.PATH: ${NCURSESPANELDIR} + +CFLAGS= -I${NCURSESDIR}/menu +CFLAGS+= -I${NCURSESDIR}/include/ +CFLAGS+= -I${NCURSESDIR}/ncurses/ +CFLAGS+= -I${.CURDIR}/../include/ +CFLAGS+= -I${.CURDIR} + +TERMINFO_CAPS= ${NCURSESDIR}/include/Caps + +ncurses_def.h: + ${NCURSESDIR}/include/MKncurses_def.sh ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} +curses.h: + cat ${.CURDIR}/../include/curses.head >$@ + ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >>$@ + cat ${NCURSESDIR}/include/curses.tail >>$@ + +CLEANFILES= curses.h ncurses_def.h +SRCS= \ + ncurses_def.h \ + curses.h + +SRCS+= \ + panel.c \ + p_above.c \ + p_below.c \ + p_bottom.c \ + p_delete.c \ + p_hide.c \ + p_hidden.c \ + p_move.c \ + p_new.c \ + p_replace.c \ + p_show.c \ + p_top.c \ + p_update.c \ + p_user.c \ + p_win.c + +INCS= panel.h + +.include + diff --git a/lib/libncurses/man/Makefile b/lib/libncurses/man/Makefile new file mode 100644 index 0000000000..18961611c7 --- /dev/null +++ b/lib/libncurses/man/Makefile @@ -0,0 +1,669 @@ +# $DragonFly: src/lib/libncurses/man/Makefile,v 1.1 2005/03/12 19:13:54 eirikn Exp $ + +MAN= \ + clear.1 \ + curs_add_wch.3 \ + curs_add_wchstr.3 \ + curs_addch.3 \ + curs_addchstr.3 \ + curs_addstr.3 \ + curs_addwstr.3 \ + curs_attr.3 \ + curs_beep.3 \ + curs_bkgd.3 \ + curs_bkgrnd.3 \ + curs_border.3 \ + curs_border_set.3 \ + curs_clear.3 \ + curs_color.3 \ + curs_delch.3 \ + curs_deleteln.3 \ + curs_extend.3 \ + curs_get_wch.3 \ + curs_get_wstr.3 \ + curs_getcchar.3 \ + curs_getch.3 \ + curs_getstr.3 \ + curs_getyx.3 \ + curs_in_wch.3 \ + curs_in_wchstr.3 \ + curs_inch.3 \ + curs_inchstr.3 \ + curs_initscr.3 \ + curs_inopts.3 \ + curs_ins_wch.3 \ + curs_ins_wstr.3 \ + curs_insch.3 \ + curs_insstr.3 \ + curs_instr.3 \ + curs_inwstr.3 \ + curs_kernel.3 \ + curs_mouse.3 \ + curs_move.3 \ + curs_outopts.3 \ + curs_overlay.3 \ + curs_pad.3 \ + curs_print.3 \ + curs_printw.3 \ + curs_refresh.3 \ + curs_scanw.3 \ + curs_scr_dump.3 \ + curs_scroll.3 \ + curs_slk.3 \ + curs_termattrs.3 \ + curs_termcap.3 \ + curs_terminfo.3 \ + curs_touch.3 \ + curs_trace.3 \ + curs_util.3 \ + curs_window.3 \ + default_colors.3 \ + define_key.3 \ + form.3 \ + form_cursor.3 \ + form_data.3 \ + form_driver.3 \ + form_field.3 \ + form_field_attributes.3 \ + form_field_buffer.3 \ + form_field_info.3 \ + form_field_just.3 \ + form_field_new.3 \ + form_field_opts.3 \ + form_field_userptr.3 \ + form_field_validation.3 \ + form_fieldtype.3 \ + form_hook.3 \ + form_new.3 \ + form_new_page.3 \ + form_opts.3 \ + form_page.3 \ + form_post.3 \ + form_requestname.3 \ + form_userptr.3 \ + form_win.3 \ + key_defined.3 \ + keybound.3 \ + keyok.3 \ + menu.3 \ + menu_attributes.3 \ + menu_cursor.3 \ + menu_driver.3 \ + menu_format.3 \ + menu_hook.3 \ + menu_items.3 \ + menu_mark.3 \ + menu_new.3 \ + menu_opts.3 \ + menu_pattern.3 \ + menu_post.3 \ + menu_requestname.3 \ + menu_spacing.3 \ + menu_userptr.3 \ + menu_win.3 \ + mitem_current.3 \ + mitem_name.3 \ + mitem_new.3 \ + mitem_opts.3 \ + mitem_userptr.3 \ + mitem_value.3 \ + mitem_visible.3 \ + ncurses.3 \ + panel.3 \ + resizeterm.3 \ + term.5 \ + term.7 \ + terminfo.5 \ + tput.1 \ + tset.1 \ + wresize.3 + +MLINKS+= curs_add_wch.3 add_wch.3 +MLINKS+= curs_add_wch.3 echo_wchar.3 +MLINKS+= curs_add_wch.3 mvadd_wch.3 +MLINKS+= curs_add_wch.3 mvwadd_wch.3 +MLINKS+= curs_add_wch.3 wadd_wch.3 +MLINKS+= curs_add_wch.3 wecho_wchar.3 +MLINKS+= curs_add_wchstr.3 add_wchnstr.3 +MLINKS+= curs_add_wchstr.3 add_wchstr.3 +MLINKS+= curs_add_wchstr.3 mvadd_wchnstr.3 +MLINKS+= curs_add_wchstr.3 mvadd_wchstr.3 +MLINKS+= curs_add_wchstr.3 mvwadd_wchnstr.3 +MLINKS+= curs_add_wchstr.3 mvwadd_wchstr.3 +MLINKS+= curs_add_wchstr.3 wadd_wchnstr.3 +MLINKS+= curs_add_wchstr.3 wadd_wchstr.3 +MLINKS+= curs_addch.3 addch.3 +MLINKS+= curs_addch.3 echochar.3 +MLINKS+= curs_addch.3 mvaddch.3 +MLINKS+= curs_addch.3 mvwaddch.3 +MLINKS+= curs_addch.3 waddch.3 +MLINKS+= curs_addch.3 wechochar.3 +MLINKS+= curs_addchstr.3 addchnstr.3 +MLINKS+= curs_addchstr.3 addchstr.3 +MLINKS+= curs_addchstr.3 mvaddchnstr.3 +MLINKS+= curs_addchstr.3 mvaddchstr.3 +MLINKS+= curs_addchstr.3 mvwaddchnstr.3 +MLINKS+= curs_addchstr.3 mvwaddchstr.3 +MLINKS+= curs_addchstr.3 waddchnstr.3 +MLINKS+= curs_addchstr.3 waddchstr.3 +MLINKS+= curs_addstr.3 addnstr.3 +MLINKS+= curs_addstr.3 addstr.3 +MLINKS+= curs_addstr.3 mvaddnstr.3 +MLINKS+= curs_addstr.3 mvaddstr.3 +MLINKS+= curs_addstr.3 mvwaddnstr.3 +MLINKS+= curs_addstr.3 mvwaddstr.3 +MLINKS+= curs_addstr.3 waddnstr.3 +MLINKS+= curs_addstr.3 waddstr.3 +MLINKS+= curs_addwstr.3 addnwstr.3 +MLINKS+= curs_addwstr.3 addwstr.3 +MLINKS+= curs_addwstr.3 mvaddnwstr.3 +MLINKS+= curs_addwstr.3 mvaddwstr.3 +MLINKS+= curs_addwstr.3 mvwaddnwstr.3 +MLINKS+= curs_addwstr.3 mvwaddwstr.3 +MLINKS+= curs_addwstr.3 waddnwstr.3 +MLINKS+= curs_addwstr.3 waddwstr.3 +MLINKS+= curs_attr.3 PAIR_NUMBER.3 +MLINKS+= curs_attr.3 attr_get.3 +MLINKS+= curs_attr.3 attr_off.3 +MLINKS+= curs_attr.3 attr_on.3 +MLINKS+= curs_attr.3 attr_set.3 +MLINKS+= curs_attr.3 attroff.3 +MLINKS+= curs_attr.3 attron.3 +MLINKS+= curs_attr.3 attrset.3 +MLINKS+= curs_attr.3 chgat.3 +MLINKS+= curs_attr.3 color_set.3 +MLINKS+= curs_attr.3 mvchgat.3 +MLINKS+= curs_attr.3 mvwchgat.3 +MLINKS+= curs_attr.3 standend.3 +MLINKS+= curs_attr.3 standout.3 +MLINKS+= curs_attr.3 wattr_get.3 +MLINKS+= curs_attr.3 wattr_off.3 +MLINKS+= curs_attr.3 wattr_on.3 +MLINKS+= curs_attr.3 wattr_set.3 +MLINKS+= curs_attr.3 wattroff.3 +MLINKS+= curs_attr.3 wattron.3 +MLINKS+= curs_attr.3 wattrset.3 +MLINKS+= curs_attr.3 wchgat.3 +MLINKS+= curs_attr.3 wcolor_set.3 +MLINKS+= curs_attr.3 wstandend.3 +MLINKS+= curs_attr.3 wstandout.3 +MLINKS+= curs_beep.3 beep.3 +MLINKS+= curs_beep.3 flash.3 +MLINKS+= curs_bkgd.3 bkgd.3 +MLINKS+= curs_bkgd.3 bkgdset.3 +MLINKS+= curs_bkgd.3 getbkgd.3 +MLINKS+= curs_bkgd.3 wbkgd.3 +MLINKS+= curs_bkgd.3 wbkgdset.3 +MLINKS+= curs_bkgrnd.3 bkgrnd.3 +MLINKS+= curs_bkgrnd.3 bkgrndset.3 +MLINKS+= curs_bkgrnd.3 getbkgrnd.3 +MLINKS+= curs_bkgrnd.3 wbkgrnd.3 +MLINKS+= curs_bkgrnd.3 wbkgrndset.3 +MLINKS+= curs_bkgrnd.3 wgetbkgrnd.3 +MLINKS+= curs_border.3 border.3 +MLINKS+= curs_border.3 box.3 +MLINKS+= curs_border.3 hline.3 +MLINKS+= curs_border.3 mvhline.3 +MLINKS+= curs_border.3 mvvline.3 +MLINKS+= curs_border.3 mvwhline.3 +MLINKS+= curs_border.3 mvwvline.3 +MLINKS+= curs_border.3 vline.3 +MLINKS+= curs_border.3 wborder.3 +MLINKS+= curs_border.3 whline.3 +MLINKS+= curs_border.3 wvline.3 +MLINKS+= curs_border_set.3 border_set.3 +MLINKS+= curs_border_set.3 box_set.3 +MLINKS+= curs_border_set.3 hline_set.3 +MLINKS+= curs_border_set.3 mvhline_set.3 +MLINKS+= curs_border_set.3 mvvline_set.3 +MLINKS+= curs_border_set.3 mvwhline_set.3 +MLINKS+= curs_border_set.3 mvwvline_set.3 +MLINKS+= curs_border_set.3 vline_set.3 +MLINKS+= curs_border_set.3 wborder_set.3 +MLINKS+= curs_border_set.3 whline_set.3 +MLINKS+= curs_border_set.3 wvline_set.3 +MLINKS+= curs_clear.3 clear.3 +MLINKS+= curs_clear.3 clrtobot.3 +MLINKS+= curs_clear.3 clrtoeol.3 +MLINKS+= curs_clear.3 erase.3 +MLINKS+= curs_clear.3 wclear.3 +MLINKS+= curs_clear.3 wclrtobot.3 +MLINKS+= curs_clear.3 wclrtoeol.3 +MLINKS+= curs_clear.3 werase.3 +MLINKS+= curs_color.3 COLOR_PAIR.3 +MLINKS+= curs_color.3 can_change_color.3 +MLINKS+= curs_color.3 color_content.3 +MLINKS+= curs_color.3 has_colors.3 +MLINKS+= curs_color.3 init_color.3 +MLINKS+= curs_color.3 init_pair.3 +MLINKS+= curs_color.3 pair_content.3 +MLINKS+= curs_color.3 start_color.3 +MLINKS+= curs_delch.3 delch.3 +MLINKS+= curs_delch.3 mvdelch.3 +MLINKS+= curs_delch.3 mvwdelch.3 +MLINKS+= curs_delch.3 wdelch.3 +MLINKS+= curs_deleteln.3 deleteln.3 +MLINKS+= curs_deleteln.3 insdelln.3 +MLINKS+= curs_deleteln.3 insertln.3 +MLINKS+= curs_deleteln.3 wdeleteln.3 +MLINKS+= curs_deleteln.3 winsdelln.3 +MLINKS+= curs_deleteln.3 winsertln.3 +MLINKS+= curs_extend.3 curses_version.3 +MLINKS+= curs_extend.3 use_extended_names.3 +MLINKS+= curs_get_wch.3 get_wch.3 +MLINKS+= curs_get_wch.3 mvget_wch.3 +MLINKS+= curs_get_wch.3 mvwget_wch.3 +MLINKS+= curs_get_wch.3 unget_wch.3 +MLINKS+= curs_get_wch.3 wget_wch.3 +MLINKS+= curs_get_wstr.3 get_wstr.3 +MLINKS+= curs_get_wstr.3 getn_wstr.3 +MLINKS+= curs_get_wstr.3 mvget_wstr.3 +MLINKS+= curs_get_wstr.3 mvgetn_wstr.3 +MLINKS+= curs_get_wstr.3 mvwget_wstr.3 +MLINKS+= curs_get_wstr.3 mvwgetn_wstr.3 +MLINKS+= curs_get_wstr.3 wget_wstr.3 +MLINKS+= curs_get_wstr.3 wgetn_wstr.3 +MLINKS+= curs_getcchar.3 getcchar.3 +MLINKS+= curs_getcchar.3 setcchar.3 +MLINKS+= curs_getch.3 getch.3 +MLINKS+= curs_getch.3 has_key.3 +MLINKS+= curs_getch.3 mvgetch.3 +MLINKS+= curs_getch.3 mvwgetch.3 +MLINKS+= curs_getch.3 ungetch.3 +MLINKS+= curs_getch.3 wgetch.3 +MLINKS+= curs_getstr.3 getnstr.3 +MLINKS+= curs_getstr.3 getstr.3 +MLINKS+= curs_getstr.3 mvgetnstr.3 +MLINKS+= curs_getstr.3 mvgetstr.3 +MLINKS+= curs_getstr.3 mvwgetnstr.3 +MLINKS+= curs_getstr.3 mvwgetstr.3 +MLINKS+= curs_getstr.3 wgetnstr.3 +MLINKS+= curs_getstr.3 wgetstr.3 +MLINKS+= curs_getyx.3 getbegyx.3 +MLINKS+= curs_getyx.3 getmaxyx.3 +MLINKS+= curs_getyx.3 getparyx.3 +MLINKS+= curs_getyx.3 getyx.3 +MLINKS+= curs_in_wch.3 in_wch.3 +MLINKS+= curs_in_wch.3 mvin_wch.3 +MLINKS+= curs_in_wch.3 mvwin_wch.3 +MLINKS+= curs_in_wch.3 win_wch.3 +MLINKS+= curs_in_wchstr.3 in_wchnstr.3 +MLINKS+= curs_in_wchstr.3 in_wchstr.3 +MLINKS+= curs_in_wchstr.3 mvin_wchnstr.3 +MLINKS+= curs_in_wchstr.3 mvin_wchstr.3 +MLINKS+= curs_in_wchstr.3 mvwin_wchnstr.3 +MLINKS+= curs_in_wchstr.3 mvwin_wchstr.3 +MLINKS+= curs_in_wchstr.3 win_wchnstr.3 +MLINKS+= curs_in_wchstr.3 win_wchstr.3 +MLINKS+= curs_inch.3 inch.3 +MLINKS+= curs_inch.3 mvinch.3 +MLINKS+= curs_inch.3 mvwinch.3 +MLINKS+= curs_inch.3 winch.3 +MLINKS+= curs_inchstr.3 inchnstr.3 +MLINKS+= curs_inchstr.3 inchstr.3 +MLINKS+= curs_inchstr.3 mvinchnstr.3 +MLINKS+= curs_inchstr.3 mvinchstr.3 +MLINKS+= curs_inchstr.3 mvwinchnstr.3 +MLINKS+= curs_inchstr.3 mvwinchstr.3 +MLINKS+= curs_inchstr.3 winchnstr.3 +MLINKS+= curs_inchstr.3 winchstr.3 +MLINKS+= curs_initscr.3 delscreen.3 +MLINKS+= curs_initscr.3 endwin.3 +MLINKS+= curs_initscr.3 initscr.3 +MLINKS+= curs_initscr.3 isendwin.3 +MLINKS+= curs_initscr.3 newterm.3 +MLINKS+= curs_initscr.3 set_term.3 +MLINKS+= curs_inopts.3 cbreak.3 +MLINKS+= curs_inopts.3 echo.3 +MLINKS+= curs_inopts.3 halfdelay.3 +MLINKS+= curs_inopts.3 intrflush.3 +MLINKS+= curs_inopts.3 keypad.3 +MLINKS+= curs_inopts.3 meta.3 +MLINKS+= curs_inopts.3 nocbreak.3 +MLINKS+= curs_inopts.3 nodelay.3 +MLINKS+= curs_inopts.3 noecho.3 +MLINKS+= curs_inopts.3 noqiflush.3 +MLINKS+= curs_inopts.3 noraw.3 +MLINKS+= curs_inopts.3 notimeout.3 +MLINKS+= curs_inopts.3 qiflush.3 +MLINKS+= curs_inopts.3 raw.3 +MLINKS+= curs_inopts.3 timeout.3 +MLINKS+= curs_inopts.3 typeahead.3 +MLINKS+= curs_inopts.3 wtimeout.3 +MLINKS+= curs_ins_wch.3 ins_wch.3 +MLINKS+= curs_ins_wch.3 mvins_wch.3 +MLINKS+= curs_ins_wch.3 mvwins_wch.3 +MLINKS+= curs_ins_wch.3 wins_wch.3 +MLINKS+= curs_ins_wstr.3 ins_nwstr.3 +MLINKS+= curs_ins_wstr.3 ins_wstr.3 +MLINKS+= curs_ins_wstr.3 mvins_nwstr.3 +MLINKS+= curs_ins_wstr.3 mvins_wstr.3 +MLINKS+= curs_ins_wstr.3 mvwins_nwstr.3 +MLINKS+= curs_ins_wstr.3 mvwins_wstr.3 +MLINKS+= curs_ins_wstr.3 wins_nwstr.3 +MLINKS+= curs_ins_wstr.3 wins_wstr.3 +MLINKS+= curs_insch.3 insch.3 +MLINKS+= curs_insch.3 mvinsch.3 +MLINKS+= curs_insch.3 mvwinsch.3 +MLINKS+= curs_insch.3 winsch.3 +MLINKS+= curs_insstr.3 insnstr.3 +MLINKS+= curs_insstr.3 insstr.3 +MLINKS+= curs_insstr.3 mvinsnstr.3 +MLINKS+= curs_insstr.3 mvinsstr.3 +MLINKS+= curs_insstr.3 mvwinsnstr.3 +MLINKS+= curs_insstr.3 mvwinsstr.3 +MLINKS+= curs_insstr.3 winsnstr.3 +MLINKS+= curs_insstr.3 winsstr.3 +MLINKS+= curs_instr.3 innstr.3 +MLINKS+= curs_instr.3 instr.3 +MLINKS+= curs_instr.3 mvinnstr.3 +MLINKS+= curs_instr.3 mvinstr.3 +MLINKS+= curs_instr.3 mvwinnstr.3 +MLINKS+= curs_instr.3 mvwinstr.3 +MLINKS+= curs_instr.3 winnstr.3 +MLINKS+= curs_instr.3 winstr.3 +MLINKS+= curs_inwstr.3 innwstr.3 +MLINKS+= curs_inwstr.3 inwstr.3 +MLINKS+= curs_inwstr.3 mvinnwstr.3 +MLINKS+= curs_inwstr.3 mvinwstr.3 +MLINKS+= curs_inwstr.3 mvwinnwstr.3 +MLINKS+= curs_inwstr.3 mvwinwstr.3 +MLINKS+= curs_inwstr.3 winnwstr.3 +MLINKS+= curs_inwstr.3 winwstr.3 +MLINKS+= curs_kernel.3 curs_set.3 +MLINKS+= curs_kernel.3 def_prog_mode.3 +MLINKS+= curs_kernel.3 def_shell_mode.3 +MLINKS+= curs_kernel.3 getsyx.3 +MLINKS+= curs_kernel.3 napms.3 +MLINKS+= curs_kernel.3 reset_prog_mode.3 +MLINKS+= curs_kernel.3 reset_shell_mode.3 +MLINKS+= curs_kernel.3 resetty.3 +MLINKS+= curs_kernel.3 ripoffline.3 +MLINKS+= curs_kernel.3 savetty.3 +MLINKS+= curs_kernel.3 setsyx.3 +MLINKS+= curs_mouse.3 getmouse.3 +MLINKS+= curs_mouse.3 mouse_trafo.3 +MLINKS+= curs_mouse.3 mouseinterval.3 +MLINKS+= curs_mouse.3 mousemask.3 +MLINKS+= curs_mouse.3 ungetmouse.3 +MLINKS+= curs_mouse.3 wenclose.3 +MLINKS+= curs_mouse.3 wmouse_trafo.3 +MLINKS+= curs_move.3 move.3 +MLINKS+= curs_move.3 wmove.3 +MLINKS+= curs_outopts.3 clearok.3 +MLINKS+= curs_outopts.3 idcok.3 +MLINKS+= curs_outopts.3 idlok.3 +MLINKS+= curs_outopts.3 immedok.3 +MLINKS+= curs_outopts.3 leaveok.3 +MLINKS+= curs_outopts.3 nl.3 +MLINKS+= curs_outopts.3 nonl.3 +MLINKS+= curs_outopts.3 scrollok.3 +MLINKS+= curs_outopts.3 setscrreg.3 +MLINKS+= curs_outopts.3 wsetscrreg.3 +MLINKS+= curs_overlay.3 copywin.3 +MLINKS+= curs_overlay.3 overlay.3 +MLINKS+= curs_overlay.3 overwrite.3 +MLINKS+= curs_pad.3 newpad.3 +MLINKS+= curs_pad.3 pecho_wchar.3 +MLINKS+= curs_pad.3 pechochar.3 +MLINKS+= curs_pad.3 pnoutrefresh.3 +MLINKS+= curs_pad.3 prefresh.3 +MLINKS+= curs_pad.3 subpad.3 +MLINKS+= curs_print.3 mcprint.3 +MLINKS+= curs_printw.3 mvprintw.3 +MLINKS+= curs_printw.3 mvwprintw.3 +MLINKS+= curs_printw.3 printw.3 +MLINKS+= curs_printw.3 vw_printw.3 +MLINKS+= curs_printw.3 vwprintw.3 +MLINKS+= curs_printw.3 wprintw.3 +MLINKS+= curs_refresh.3 doupdate.3 +MLINKS+= curs_refresh.3 redrawwin.3 +MLINKS+= curs_refresh.3 refresh.3 +MLINKS+= curs_refresh.3 wnoutrefresh.3 +MLINKS+= curs_refresh.3 wredrawln.3 +MLINKS+= curs_refresh.3 wrefresh.3 +MLINKS+= curs_scanw.3 mvscanw.3 +MLINKS+= curs_scanw.3 mvwscanw.3 +MLINKS+= curs_scanw.3 scanw.3 +MLINKS+= curs_scanw.3 vw_scanw.3 +MLINKS+= curs_scanw.3 vwscanw.3 +MLINKS+= curs_scanw.3 wscanw.3 +MLINKS+= curs_scr_dump.3 scr_dump.3 +MLINKS+= curs_scr_dump.3 scr_init.3 +MLINKS+= curs_scr_dump.3 scr_restore.3 +MLINKS+= curs_scr_dump.3 scr_set.3 +MLINKS+= curs_scroll.3 scrl.3 +MLINKS+= curs_scroll.3 scroll.3 +MLINKS+= curs_scroll.3 wscrl.3 +MLINKS+= curs_slk.3 slk_attr.3 +MLINKS+= curs_slk.3 slk_attr_off.3 +MLINKS+= curs_slk.3 slk_attr_on.3 +MLINKS+= curs_slk.3 slk_attr_set.3 +MLINKS+= curs_slk.3 slk_attroff.3 +MLINKS+= curs_slk.3 slk_attron.3 +MLINKS+= curs_slk.3 slk_attrset.3 +MLINKS+= curs_slk.3 slk_clear.3 +MLINKS+= curs_slk.3 slk_color.3 +MLINKS+= curs_slk.3 slk_init.3 +MLINKS+= curs_slk.3 slk_label.3 +MLINKS+= curs_slk.3 slk_noutrefresh.3 +MLINKS+= curs_slk.3 slk_refresh.3 +MLINKS+= curs_slk.3 slk_restore.3 +MLINKS+= curs_slk.3 slk_set.3 +MLINKS+= curs_slk.3 slk_touch.3 +MLINKS+= curs_termattrs.3 baudrate.3 +MLINKS+= curs_termattrs.3 erasechar.3 +MLINKS+= curs_termattrs.3 erasewchar.3 +MLINKS+= curs_termattrs.3 has_ic.3 +MLINKS+= curs_termattrs.3 has_il.3 +MLINKS+= curs_termattrs.3 killchar.3 +MLINKS+= curs_termattrs.3 killwchar.3 +MLINKS+= curs_termattrs.3 longname.3 +MLINKS+= curs_termattrs.3 term_attrs.3 +MLINKS+= curs_termattrs.3 termattrs.3 +MLINKS+= curs_termattrs.3 termname.3 +MLINKS+= curs_termcap.3 tgetent.3 +MLINKS+= curs_termcap.3 tgetflag.3 +MLINKS+= curs_termcap.3 tgetnum.3 +MLINKS+= curs_termcap.3 tgetstr.3 +MLINKS+= curs_termcap.3 tgoto.3 +MLINKS+= curs_termcap.3 tputs.3 +MLINKS+= curs_terminfo.3 del_curterm.3 +MLINKS+= curs_terminfo.3 mvcur.3 +MLINKS+= curs_terminfo.3 putp.3 +MLINKS+= curs_terminfo.3 restartterm.3 +MLINKS+= curs_terminfo.3 set_curterm.3 +MLINKS+= curs_terminfo.3 setterm.3 +MLINKS+= curs_terminfo.3 setupterm.3 +MLINKS+= curs_terminfo.3 tigetflag.3 +MLINKS+= curs_terminfo.3 tigetnum.3 +MLINKS+= curs_terminfo.3 tigetstr.3 +MLINKS+= curs_terminfo.3 tparm.3 +MLINKS+= curs_terminfo.3 tputs.3 +MLINKS+= curs_terminfo.3 vid_attr.3 +MLINKS+= curs_terminfo.3 vid_puts.3 +MLINKS+= curs_terminfo.3 vidattr.3 +MLINKS+= curs_terminfo.3 vidputs.3 +MLINKS+= curs_touch.3 is_linetouched.3 +MLINKS+= curs_touch.3 is_wintouched.3 +MLINKS+= curs_touch.3 touchline.3 +MLINKS+= curs_touch.3 touchwin.3 +MLINKS+= curs_touch.3 untouchwin.3 +MLINKS+= curs_touch.3 wtouchln.3 +MLINKS+= curs_trace.3 _nc_tracebits.3 +MLINKS+= curs_trace.3 _traceattr.3 +MLINKS+= curs_trace.3 _traceattr2.3 +MLINKS+= curs_trace.3 _tracechar.3 +MLINKS+= curs_trace.3 _tracechtype.3 +MLINKS+= curs_trace.3 _tracechtype2.3 +MLINKS+= curs_trace.3 _tracedump.3 +MLINKS+= curs_trace.3 _tracef.3 +MLINKS+= curs_trace.3 _tracemouse.3 +MLINKS+= curs_trace.3 trace.3 +MLINKS+= curs_util.3 delay_output.3 +MLINKS+= curs_util.3 filter.3 +MLINKS+= curs_util.3 flushinp.3 +MLINKS+= curs_util.3 getwin.3 +MLINKS+= curs_util.3 key_name.3 +MLINKS+= curs_util.3 keyname.3 +MLINKS+= curs_util.3 putwin.3 +MLINKS+= curs_util.3 unctrl.3 +MLINKS+= curs_util.3 use_env.3 +MLINKS+= curs_util.3 wunctrl.3 +MLINKS+= curs_window.3 delwin.3 +MLINKS+= curs_window.3 derwin.3 +MLINKS+= curs_window.3 dupwin.3 +MLINKS+= curs_window.3 mvderwin.3 +MLINKS+= curs_window.3 mvwin.3 +MLINKS+= curs_window.3 newwin.3 +MLINKS+= curs_window.3 subwin.3 +MLINKS+= curs_window.3 syncok.3 +MLINKS+= curs_window.3 wcursyncup.3 +MLINKS+= curs_window.3 wsyncdown.3 +MLINKS+= curs_window.3 wsyncup.3 +MLINKS+= default_colors.3 assume_default_colors.3 +MLINKS+= default_colors.3 use_default_colors.3 +MLINKS+= form_cursor.3 pos_form_cursor.3 +MLINKS+= form_data.3 data_ahead.3 +MLINKS+= form_data.3 data_behind.3 +MLINKS+= form_field.3 field_count.3 +MLINKS+= form_field.3 form_fields.3 +MLINKS+= form_field.3 move_field.3 +MLINKS+= form_field.3 set_form_fields.3 +MLINKS+= form_field_attributes.3 field_back.3 +MLINKS+= form_field_attributes.3 field_fore.3 +MLINKS+= form_field_attributes.3 field_pad.3 +MLINKS+= form_field_attributes.3 set_field_back.3 +MLINKS+= form_field_attributes.3 set_field_fore.3 +MLINKS+= form_field_attributes.3 set_field_pad.3 +MLINKS+= form_field_buffer.3 field_buffer.3 +MLINKS+= form_field_buffer.3 field_status.3 +MLINKS+= form_field_buffer.3 set_field_buffer.3 +MLINKS+= form_field_buffer.3 set_field_status.3 +MLINKS+= form_field_buffer.3 set_max_field.3 +MLINKS+= form_field_info.3 dynamic_field_info.3 +MLINKS+= form_field_info.3 field_info.3 +MLINKS+= form_field_just.3 field_just.3 +MLINKS+= form_field_just.3 set_field_just.3 +MLINKS+= form_field_new.3 dup_field.3 +MLINKS+= form_field_new.3 free_field.3 +MLINKS+= form_field_new.3 link_field.3 +MLINKS+= form_field_new.3 new_field.3 +MLINKS+= form_field_opts.3 field_opts.3 +MLINKS+= form_field_opts.3 field_opts_off.3 +MLINKS+= form_field_opts.3 field_opts_on.3 +MLINKS+= form_field_opts.3 set_field_opts.3 +MLINKS+= form_field_userptr.3 field_userptr.3 +MLINKS+= form_field_userptr.3 set_field_userptr.3 +MLINKS+= form_field_validation.3 field_arg.3 +MLINKS+= form_field_validation.3 field_type.3 +MLINKS+= form_field_validation.3 set_field_type.3 +MLINKS+= form_fieldtype.3 free_fieldtype.3 +MLINKS+= form_fieldtype.3 link_fieldtype.3 +MLINKS+= form_fieldtype.3 new_fieldtype.3 +MLINKS+= form_fieldtype.3 set_fieldtype_arg.3 +MLINKS+= form_fieldtype.3 set_fieldtype_choice.3 +MLINKS+= form_hook.3 field_init.3 +MLINKS+= form_hook.3 field_term.3 +MLINKS+= form_hook.3 form_init.3 +MLINKS+= form_hook.3 form_term.3 +MLINKS+= form_hook.3 set_field_init.3 +MLINKS+= form_hook.3 set_field_term.3 +MLINKS+= form_hook.3 set_form_init.3 +MLINKS+= form_hook.3 set_form_term.3 +MLINKS+= form_new.3 free_form.3 +MLINKS+= form_new.3 new_form.3 +MLINKS+= form_new_page.3 new_page.3 +MLINKS+= form_new_page.3 set_new_page.3 +MLINKS+= form_opts.3 form_opts_off.3 +MLINKS+= form_opts.3 form_opts_on.3 +MLINKS+= form_opts.3 set_form_opts.3 +MLINKS+= form_page.3 current_field.3 +MLINKS+= form_page.3 field_index.3 +MLINKS+= form_page.3 set_current_field.3 +MLINKS+= form_page.3 set_form_page.3 +MLINKS+= form_post.3 post_form.3 +MLINKS+= form_post.3 unpost_form.3 +MLINKS+= form_requestname.3 form_request_by_name.3 +MLINKS+= form_requestname.3 form_request_name.3 +MLINKS+= form_userptr.3 set_form_userptr.3 +MLINKS+= form_win.3 form_sub.3 +MLINKS+= form_win.3 scale_form.3 +MLINKS+= form_win.3 set_form_sub.3 +MLINKS+= form_win.3 set_form_win.3 +MLINKS+= key_defined.3 define_key.3 +MLINKS+= menu_attributes.3 menu_back.3 +MLINKS+= menu_attributes.3 menu_fore.3 +MLINKS+= menu_attributes.3 menu_grey.3 +MLINKS+= menu_attributes.3 menu_pad.3 +MLINKS+= menu_attributes.3 set_menu_back.3 +MLINKS+= menu_attributes.3 set_menu_fore.3 +MLINKS+= menu_attributes.3 set_menu_grey.3 +MLINKS+= menu_attributes.3 set_menu_pad.3 +MLINKS+= menu_cursor.3 pos_menu_cursor.3 +MLINKS+= menu_format.3 set_menu_format.3 +MLINKS+= menu_hook.3 item_init.3 +MLINKS+= menu_hook.3 item_term.3 +MLINKS+= menu_hook.3 menu_init.3 +MLINKS+= menu_hook.3 menu_term.3 +MLINKS+= menu_hook.3 set_item_init.3 +MLINKS+= menu_hook.3 set_item_term.3 +MLINKS+= menu_hook.3 set_menu_init.3 +MLINKS+= menu_hook.3 set_menu_term.3 +MLINKS+= menu_items.3 item_count.3 +MLINKS+= menu_items.3 set_menu_items.3 +MLINKS+= menu_mark.3 set_menu_mark.3 +MLINKS+= menu_new.3 free_menu.3 +MLINKS+= menu_new.3 new_menu.3 +MLINKS+= menu_opts.3 menu_opts_off.3 +MLINKS+= menu_opts.3 menu_opts_on.3 +MLINKS+= menu_opts.3 set_menu_opts.3 +MLINKS+= menu_pattern.3 set_menu_pattern.3 +MLINKS+= menu_post.3 post_menu.3 +MLINKS+= menu_post.3 unpost_menu.3 +MLINKS+= menu_requestname.3 menu_request_by_name.3 +MLINKS+= menu_requestname.3 menu_request_name.3 +MLINKS+= menu_spacing.3 set_menu_spacing.3 +MLINKS+= menu_userptr.3 set_menu_userptr.3 +MLINKS+= menu_win.3 menu_sub.3 +MLINKS+= menu_win.3 scale_menu.3 +MLINKS+= menu_win.3 set_menu_sub.3 +MLINKS+= menu_win.3 set_menu_win.3 +MLINKS+= mitem_current.3 current_item.3 +MLINKS+= mitem_current.3 item_index.3 +MLINKS+= mitem_current.3 set_current_item.3 +MLINKS+= mitem_current.3 set_top_row.3 +MLINKS+= mitem_current.3 top_row.3 +MLINKS+= mitem_name.3 item_description.3 +MLINKS+= mitem_name.3 item_name.3 +MLINKS+= mitem_new.3 free_item.3 +MLINKS+= mitem_new.3 new_item.3 +MLINKS+= mitem_opts.3 item_opts.3 +MLINKS+= mitem_opts.3 item_opts_off.3 +MLINKS+= mitem_opts.3 item_opts_on.3 +MLINKS+= mitem_opts.3 set_item_opts.3 +MLINKS+= mitem_userptr.3 item_userptr.3 +MLINKS+= mitem_userptr.3 set_item_userptr.3 +MLINKS+= mitem_value.3 item_value.3 +MLINKS+= mitem_value.3 set_item_value.3 +MLINKS+= mitem_visible.3 item_visible.3 +MLINKS+= panel.3 bottom_panel.3 +MLINKS+= panel.3 del_panel.3 +MLINKS+= panel.3 hide_panel.3 +MLINKS+= panel.3 move_panel.3 +MLINKS+= panel.3 new_panel.3 +MLINKS+= panel.3 panel_above.3 +MLINKS+= panel.3 panel_below.3 +MLINKS+= panel.3 panel_hidden.3 +MLINKS+= panel.3 panel_userptr.3 +MLINKS+= panel.3 panel_window.3 +MLINKS+= panel.3 replace_panel.3 +MLINKS+= panel.3 set_panel_userptr.3 +MLINKS+= panel.3 show_panel.3 +MLINKS+= panel.3 top_panel.3 +MLINKS+= panel.3 update_panels.3 +MLINKS+= resizeterm.3 is_term_resized.3 +MLINKS+= resizeterm.3 resize_term.3 +MLINKS+= tput.1 reset.1 + +.include diff --git a/lib/libncurses/man/clear.1 b/lib/libncurses/man/clear.1 new file mode 100644 index 0000000000..ce4d049e5c --- /dev/null +++ b/lib/libncurses/man/clear.1 @@ -0,0 +1,49 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $ +.\" $DragonFly: src/lib/libncurses/man/clear.1,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH clear 1 "" +.ds n 5 +.SH NAME +\fBclear\fR - clear the terminal screen +.SH SYNOPSIS +\fBclear\fR +.br +.SH DESCRIPTION +\fBclear\fR clears your screen if this is possible. It looks in the +environment for the terminal type and then in the \fBterminfo\fR database to +figure out how to clear the screen. +.SH SEE ALSO +\fBtput\fR(1), \fBterminfo\fR(\*n) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_add_wch.3 b/lib/libncurses/man/curs_add_wch.3 new file mode 100644 index 0000000000..4533524e05 --- /dev/null +++ b/lib/libncurses/man/curs_add_wch.3 @@ -0,0 +1,135 @@ +.\"*************************************************************************** +.\" Copyright (c) 2001,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_add_wch.3x,v 1.4 2002/02/16 22:28:43 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_add_wch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_add_wch 3X "" +.SH NAME +\fBadd_wch\fP, +\fBwadd_wch\fP, +\fBmvadd_wch\fP, +\fBmvwadd_wch\fP, +\fBecho_wchar\fP, +\fBwecho_wchar\fP - add a complex character and rendition to a \fBcurses\fR window, then advance the cursor +.SH SYNOPSIS +.PP +\fB#include \fP +.sp +.B "int add_wch( const cchar_t *\fIwch\fB );" +.br +.B "int wadd_wch( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" +.br +.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" +.br +.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" +.br +.B "int echo_wchar( const cchar_t *\fIwch\fB );" +.br +.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" +.br +.SH DESCRIPTION +.PP +The +\fBadd_wch\fP, +\fBwadd_wch\fP, +\fBmvadd_wch\fP, and +\fBmvwadd_wch\fP +functions put the complex character \fIwch\fP into the given +window at its current position, +which is then advanced. +These functions perform +wrapping and special-character processing as follows: +.TP 5 +- +If \fIwch\fP refers to a spacing character, +then any previous character at that location is removed. +A new character specified by \fIwch\fP is +placed at that location with rendition specified by \fIwch\fP. +The cursor then advances to +the next spacing character on the screen. +.TP 5 +- +If \fIwch\fP refers to a non-spacing character, +all previous characters at that location are preserved. +The non-spacing characters of \fIwch\fP +are added to the spacing complex character, +and the rendition specified by \fIwch\fP is ignored. +.TP 5 +- +If the character part of \fIwch\fP is +a tab, newline, backspace or other control character, +the window is updated and the cursor moves as if \fBaddch\fR(3X) were called. +.PP +The \fBecho_wchar\fP +function is functionally equivalent to a call to +\fBadd_wch\fP +followed by a call to +\fBrefresh\fP. +Similarly, the +\fBwecho_wchar\fP +is functionally equivalent to a call to +\fBwadd_wch\fP +followed by a call to +\fBwrefresh\fP. +The knowledge +that only a single character is being output is taken into consideration and, +for non-control characters, a considerable performance gain might be seen +by using the *\fBecho\fP* functions instead of their equivalents. +.SH RETURN VALUES +.PP +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.SH NOTES +.PP +Note that +\fBadd_wch\fP, +\fBmvadd_wch\fP, +\fBmvwadd_wch\fP, and +\fBecho_wchar\fP +may be macros. +.SH PORTABILITY +.PP +All these functions are described in the XSI Curses standard, Issue 4. +The defaults specified for forms-drawing characters apply in the POSIX locale. +.PP +XSI documents constants beginning with \fBWACS_\fP which are used for +line-drawing. +Those are not currently implemented in \fBncurses\fP. +.SH SEE ALSO +.PP +\fBcurses\fR(3X), +\fBcurs_attr_get\fR(3X), +\fBcurs_clear\fR(3X), +\fBcurs_outopts\fR(3X), +\fBcurs_refresh\fR(3X), +\fBputwc\fR(3) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_add_wchstr.3 b/lib/libncurses/man/curs_add_wchstr.3 new file mode 100644 index 0000000000..371e7db21a --- /dev/null +++ b/lib/libncurses/man/curs_add_wchstr.3 @@ -0,0 +1,99 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_add_wchstr.3x,v 1.2 2003/12/27 18:53:41 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_add_wchstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_add_wchstr 3X "" +.SH NAME +.PP +\fBadd_wchstr\fR, +\fBadd_wchnstr\fR, +\fBwadd_wchstr\fR, +\fBwadd_wchnstr\fR, +\fBmvadd_wchstr\fR, +\fBmvadd_wchnstr\fR, +\fBmvwadd_wchstr\fR, +\fBmvwadd_wchnstr\fR \- add an array of complex characters (and attributes) to a curses window +.SH SYNOPSIS +.B #include +.PP +.nf +\fBint add_wchstr(const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint add_wchnstr(const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wadd_wchstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint wadd_wchnstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvadd_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvadd_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwadd_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvwadd_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines copy the array of complex characters \fIwchstr\fR +into the window image structure at and after the current cursor position. +The four routines with \fIn\fR as the last +argument copy at most \fIn\fR elements, but no more than will fit on the line. +If \fBn\fR=\fB-1\fR then the whole array is copied, +to the maximum number of characters that will fit on the line. +.PP +The window cursor is \fInot\fR advanced. +These routines work faster than \fBwaddnstr\fR. +On the other hand, they do not perform checking +(such as for the newline, backspace, or carriage return characters), +they do not advance the current cursor position, +they do not expand other control characters to ^-escapes, +and they truncate the string if it crosses the right margin, +rather then wrapping it around to the new line. +.PP +These routines end successfully +on encountering a null \fIcchar_t\fR, or +when they have filled the current line. +If a complex character cannot completely fit at the end of the current line, +the remaining columns are filled with the background character and rendition. +.SH NOTES +All functions except \fBwadd_wchnstr\fR may be macros. +.SH RETURN VALUES +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.SH PORTABILITY +All these entry points are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_addchstr\fR(3X) +\fBcurs_addwstr\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_addch.3 b/lib/libncurses/man/curs_addch.3 new file mode 100644 index 0000000000..a11a76c82e --- /dev/null +++ b/lib/libncurses/man/curs_addch.3 @@ -0,0 +1,174 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addch.3x,v 1.23 2004/01/31 13:16:21 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_addch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_addch 3X "" +.SH NAME +\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, +\fBechochar\fR, +\fBwechochar\fR - add a character (with attributes) to a \fBcurses\fR window, then advance the cursor +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint addch(const chtype ch);\fR +.br +\fBint waddch(WINDOW *win, const chtype ch);\fR +.br +\fBint mvaddch(int y, int x, const chtype ch);\fR +.br +\fBint mvwaddch(WINDOW *win, int y, int x, const chtype ch);\fR +.br +\fBint echochar(const chtype ch);\fR +.br +\fBint wechochar(WINDOW *win, const chtype ch);\fR +.br +.SH DESCRIPTION +The \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR and \fBmvwaddch\fR routines put +the character \fIch\fR into the given window at its current window position, +which is then advanced. They are analogous to \fBputchar\fR in \fBstdio\fR(3). +If the advance is at the right margin, the cursor automatically wraps to the +beginning of the next line. At the bottom of the current scrolling region, if +\fBscrollok\fR is enabled, the scrolling region is scrolled up one line. +.PP +If \fIch\fR is a tab, newline, or backspace, +the cursor is moved appropriately within the window. +Backspace moves the cursor one character left; at the left +edge of a window it does nothing. +Newline does a \fBclrtoeol\fR, +then moves the cursor to the window left margin on the next line, +scrolling the window if on the last line. +Tabs are considered to be at every eighth column. +The tab interval may be altered by setting the \fBTABSIZE\fR variable. +.PP +If \fIch\fR is any control character other than tab, newline, or backspace, it +is drawn in \fB^\fR\fIX\fR notation. Calling \fBwinch\fR after adding a +control character does not return the character itself, but instead returns +the ^-representation of the control character. +.PP +Video attributes can be combined with a character argument passed to +\fBaddch\fR or related functions by logical-ORing them into the character. +(Thus, text, including attributes, can be copied from one place to another +using \fBinch\fR and \fBaddch\fR.) See the \fBcurs_attr\fR(3X) page for +values of predefined video attribute constants that can be usefully OR'ed +into characters. +.PP +The \fBechochar\fR and \fBwechochar\fR routines are equivalent to a call to +\fBaddch\fR followed by a call to \fBrefresh\fR, or a call to \fBwaddch\fR +followed by a call to \fBwrefresh\fR. The knowledge that only a single +character is being output is used and, for non-control characters, a +considerable performance gain may be seen by using these routines instead of +their equivalents. +.SS Line Graphics +The following variables may be used to add line drawing characters to the +screen with routines of the \fBaddch\fR family. The default character listed +below is used if the \fBacsc\fR capability doesn't define a terminal-specific +replacement for it (but see the EXTENSIONS section below). The names are +taken from VT100 nomenclature. +.PP +.TS +l l l +_ _ _ +l l l. +\fIName\fR \fIDefault\fR \fIDescription\fR +ACS_BLOCK # solid square block +ACS_BOARD # board of squares +ACS_BTEE + bottom tee +ACS_BULLET o bullet +ACS_CKBOARD : checker board (stipple) +ACS_DARROW v arrow pointing down +ACS_DEGREE ' degree symbol +ACS_DIAMOND + diamond +ACS_GEQUAL > greater-than-or-equal-to +ACS_HLINE - horizontal line +ACS_LANTERN # lantern symbol +ACS_LARROW < arrow pointing left +ACS_LEQUAL < less-than-or-equal-to +ACS_LLCORNER + lower left-hand corner +ACS_LRCORNER + lower right-hand corner +ACS_LTEE + left tee +ACS_NEQUAL ! not-equal +ACS_PI * greek pi +ACS_PLMINUS # plus/minus +ACS_PLUS + plus +ACS_RARROW > arrow pointing right +ACS_RTEE + right tee +ACS_S1 - scan line 1 +ACS_S3 - scan line 3 +ACS_S7 - scan line 7 +ACS_S9 \&_ scan line 9 +ACS_STERLING f pound-sterling symbol +ACS_TTEE + top tee +ACS_UARROW ^ arrow pointing up +ACS_ULCORNER + upper left-hand corner +ACS_URCORNER + upper right-hand corner +ACS_VLINE | vertical line +.TE +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success +(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon +successful completion, unless otherwise noted in the preceding routine +descriptions. +.SH NOTES +Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and +\fBechochar\fR may be macros. +.SH PORTABILITY +All these functions are described in the XSI Curses standard, Issue 4. +The defaults specified for forms-drawing characters apply in the POSIX locale. +.LP +Some ACS symbols +(ACS_S3, +ACS_S7, +ACS_LEQUAL, +ACS_GEQUAL, +ACS_PI, +ACS_NEQUAL, +ACS_STERLING) +were not documented in +any publicly released System V. However, many publicly available terminfos +include \fBacsc\fR strings in which their key characters (pryz{|}) are +embedded, and a second-hand list of their character descriptions has come +to light. The ACS-prefixed names for them were invented for \fBncurses\fR(3X). +.LP +The \fBTABSIZE\fR variable is implemented in some versions of curses, +but is not part of X/Open curses. +.LP +If \fIch\fR is a carriage return, +the cursor is moved to the beginning of the current row of the window. +This is true of other implementations, but is not documented. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_attr\fR(3X), \fBcurs_clear\fR(3X), +\fBcurs_inch\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X), +\fBputc\fR(3S). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_addchstr.3 b/lib/libncurses/man/curs_addchstr.3 new file mode 100644 index 0000000000..6f2fd6a2f9 --- /dev/null +++ b/lib/libncurses/man/curs_addchstr.3 @@ -0,0 +1,83 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addchstr.3x,v 1.8 2003/12/27 18:51:24 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_addchstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_addchstr 3X "" +.SH NAME +\fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR, +\fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR, +\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint addchstr(const chtype *chstr);\fR +.br +\fBint addchnstr(const chtype *chstr, int n);\fR +.br +\fBint waddchstr(WINDOW *win, const chtype *chstr);\fR +.br +\fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR +.br +\fBint mvaddchstr(int y, int x, const chtype *chstr);\fR +.br +\fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR +.br +\fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR +.br +\fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR +.SH DESCRIPTION +These routines copy \fIchstr\fR into the window image structure at and after +the current cursor position. The four routines with \fIn\fR as the last +argument copy at most \fIn\fR elements, but no more than will fit on the line. +If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of +characters that will fit on the line. +.PP +The window cursor is \fInot\fR advanced, and these routines work faster than +\fBwaddnstr\fR. On the other hand, they don't perform any kind of checking +(such as for the newline, backspace, or carriage return characters), they don't +advance the current cursor position, they don't expand other control characters +to ^-escapes, and they truncate the string if it crosses the right margin, +rather then wrapping it around to the new line. +.SH RETURN VALUES +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success +(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon +successful completion, unless otherwise noted in the preceding routine +descriptions. +.SH NOTES +Note that all routines except \fBwaddchnstr\fR may be macros. +.SH PORTABILITY +All these entry points are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_addstr.3 b/lib/libncurses/man/curs_addstr.3 new file mode 100644 index 0000000000..86685ddbbf --- /dev/null +++ b/lib/libncurses/man/curs_addstr.3 @@ -0,0 +1,88 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addstr.3x,v 1.11 2003/12/27 18:51:15 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_addstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_addstr 3X "" +.SH NAME +\fBaddstr\fR, +\fBaddnstr\fR, +\fBwaddstr\fR, +\fBwaddnstr\fR, +\fBmvaddstr\fR, +\fBmvaddnstr\fR, +\fBmvwaddstr\fR, +\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint addstr(const char *\fR\fIstr\fR\fB);\fR +.br +\fBint addnstr(const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint waddstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint waddnstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvaddstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint mvaddnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwaddstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint mvwaddnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines write the characters of the (null-terminated) character string +\fIstr\fR on the given window. +It is similar to calling \fBwaddch\fR once for each character in the string. +The four routines with \fIn\fR as the last argument +write at most \fIn\fR characters. +If \fIn\fR is -1, then the entire string will be added, +up to the maximum number of characters that will fit on the line, +or until a terminating null is reached. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success +(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon +successful completion. +.SH NOTES +Note that all of these routines except \fBwaddstr\fR and \fBwaddnstr\fR may be +macros. +.SH PORTABILITY +All these entry points are described in the XSI Curses standard, Issue 4. The +XSI errors EILSEQ and EOVERFLOW, associated with extended-level conformance, +are not yet detected. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_addch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_addwstr.3 b/lib/libncurses/man/curs_addwstr.3 new file mode 100644 index 0000000000..9211de6cf9 --- /dev/null +++ b/lib/libncurses/man/curs_addwstr.3 @@ -0,0 +1,92 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addwstr.3x,v 1.3 2003/12/27 18:51:01 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_addwstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_addwstr 3X "" +.SH NAME +\fBaddwstr\fR, +\fBaddnwstr\fR, +\fBwaddwstr\fR, +\fBwaddnwstr\fR, +\fBmvaddwstr\fR, +\fBmvaddnwstr\fR, +\fBmvwaddwstr\fR, +\fBmvwaddnwstr\fR \- add a string of wide characters to a \fBcurses\fR window and advance cursor +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint addwstr(const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint addnwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint waddwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint waddnwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvaddwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvaddnwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwaddwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwaddnwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines write the characters of the (null-terminated) \fBwchar_t\fRcharacter string +\fIwstr\fR on the given window. +It is similar to constructing a \fBcchar_t\fR for each wchar_t in the string, +then calling \fBwadd_wch\fR for the resulting \fBcchar_t\fR. +.PP +The \fImv\fR routines perform cursor movement once, before writing any +characters. +Thereafter, the cursor is advanced as a side-effect of writing to the window. +.PP +The four routines with \fIn\fR as the last argument +write at most \fIn\fR \fBwchar_t\fR characters. +If \fIn\fR is -1, then the entire string will be added, +up to the maximum number of characters that will fit on the line, +or until a terminating null is reached. +.SH RETURN VALUES +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.SH NOTES +Note that all of these routines except \fBwaddnwstr\fR may be macros. +.SH PORTABILITY +All these entry points are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +.PP +Functions: +\fBcurses\fR(3X), +\fBcurs_add_wch\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_attr.3 b/lib/libncurses/man/curs_attr.3 new file mode 100644 index 0000000000..898d3f1310 --- /dev/null +++ b/lib/libncurses/man/curs_attr.3 @@ -0,0 +1,233 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_attr.3x,v 1.27 2003/12/27 18:50:51 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_attr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_attr 3X "" +.SH NAME +\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, +\fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR, +\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR, +\fBattr_get\fR, \fBwattr_get\fR, +\fBattr_off\fR, \fBwattr_off\fR, +\fBattr_on\fR, \fBwattr_on\fR, +\fBattr_set\fR, \fBwattr_set\fR, +\fBchgat\fR, \fBwchgat\fR, +\fBmvchgat\fR, \fBmvwchgat\fR, +\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines +.SH SYNOPSIS +\fB#include \fR +.br +\fBint attroff(int attrs);\fR +.br +\fBint wattroff(WINDOW *win, int attrs);\fR +.br +\fBint attron(int attrs);\fR +.br +\fBint wattron(WINDOW *win, int attrs);\fR +.br +\fBint attrset(int attrs);\fR +.br +\fBint wattrset(WINDOW *win, int attrs);\fR +.br +\fBint color_set(short color_pair_number, void* opts);\fR +.br +\fBint wcolor_set(WINDOW *win, short color_pair_number,\fR + \fBvoid* opts);\fR +.br +\fBint standend(void);\fR +.br +\fBint wstandend(WINDOW *win);\fR +.br +\fBint standout(void);\fR +.br +\fBint wstandout(WINDOW *win);\fR +.br +\fBint attr_get(attr_t *attrs, short *pair, void *opts);\fR +.br +\fBint wattr_get(WINDOW *win, attr_t *attrs, short *pair,\fR + \fBvoid *opts);\fR +.br +\fBint attr_off(attr_t attrs, void *opts);\fR +.br +\fBint wattr_off(WINDOW *win, attr_t attrs, void *opts);\fR +.br +\fBint attr_on(attr_t attrs, void *opts);\fR +.br +\fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR +.br +\fBint attr_set(attr_t attrs, short pair, void *opts);\fR +.br +\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR +.br +\fBint chgat(int n, attr_t attr, short color,\fR + \fBconst void *opts)\fR +.br +\fBint wchgat(WINDOW *win, int n, attr_t attr,\fR + \fBshort color, const void *opts)\fR +.br +\fBint mvchgat(int y, int x, int n, attr_t attr,\fR + \fBshort color, const void *opts)\fR +.br +\fBint mvwchgat(WINDOW *win, int y, int x, int n,\fR + \fBattr_t attr, short color, const void *opts)\fR +.br +.SH DESCRIPTION +These routines manipulate the current attributes of the named window. The +current attributes of a window apply to all characters that are written into +the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. Attributes are +a property of the character, and move with the character through any scrolling +and insert/delete line/character operations. To the extent possible, they are +displayed as appropriate modifications to the graphic rendition of characters +put on the screen. +.PP +The routine \fBattrset\fR sets the current attributes of the given window to +\fIattrs\fR. The routine \fBattroff\fR turns off the named attributes without +turning any other attributes on or off. The routine \fBattron\fR turns on the +named attributes without affecting any others. The routine \fBstandout\fR is +the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same +as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all +attributes. +.PP +The \fBattrset\fR and related routines do not affect the attributes used +when erasing portions of the window. +See \fBcurs_bkgd\fR(3X) for functions which modify the attributes used for +erasing and clearing. +.PP +The routine \fBcolor_set\fR sets the current color of the given window to the +foreground/background combination described by the color_pair_number. The +parameter opts is reserved for future use, applications must supply a null +pointer. +.PP +The routine \fBwattr_get\fR returns the current attribute and color pair for +the given window; \fBattr_get\fR returns the current attribute and color pair +for \fBstdscr\fR. +The remaining \fBattr_\fR* functions operate exactly like the corresponding +\fBattr\fR* functions, except that they take arguments of type \fBattr_t\fR +rather than \fBint\fR. +.PP +The routine \fBchgat\fR changes the attributes of a given number of characters +starting at the current cursor location of \fBstdscr\fR. It does not update +the cursor and does not perform wrapping. A character count of -1 or greater +than the remaining window width means to change attributes all the way to the +end of the current line. The \fBwchgat\fR function generalizes this to any +window; the \fBmvwchgat\fR function does a cursor move before acting. In these +functions, the color argument is a color-pair index (as in the first argument +of \fIinit_pair\fR, see \fBcurs_color\fR(3X)). The \fBopts\fR argument is not +presently used, but is reserved for the future (leave it \fBNULL\fR). +Note that changing the attributes does not imply +that a subsequent \fBrefresh\fR will update the screen to match, +since the character values are not modified. +Use \fBtouchwin\fR to force the screen to match the updated attributes. +.SS Attributes +The following video attributes, defined in \fB\fR, can be passed to +the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR'ed with the +characters passed to \fBaddch\fR. +.PP +.TS +center ; +l l . +\fBA_NORMAL\fR Normal display (no highlight) +\fBA_STANDOUT\fR Best highlighting mode of the terminal. +\fBA_UNDERLINE\fR Underlining +\fBA_REVERSE\fR Reverse video +\fBA_BLINK\fR Blinking +\fBA_DIM\fR Half bright +\fBA_BOLD\fR Extra bright or bold +\fBA_PROTECT\fR Protected mode +\fBA_INVIS\fR Invisible or blank mode +\fBA_ALTCHARSET\fR Alternate character set +\fBA_CHARTEXT\fR Bit-mask to extract a character +\fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR Color-pair number \fIn\fR +.TE +.PP +The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR: +.PP +.br +\fBPAIR_NUMBER(\fR\fIattrs\fR) Returns the pair number associated + with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute. +.br +.PP +The return values of many of these routines are not meaningful (they are +implemented as macro-expanded assignments and simply return their argument). +The SVr4 manual page claims (falsely) that these routines always return \fB1\fR. +.SH NOTES +Note that \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, +\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR may be macros. +.SH PORTABILITY +All these functions are supported in the XSI Curses standard, Issue 4. The +standard defined the dedicated type for highlights, \fBattr_t\fR, which is not +defined in SVr4 curses. The functions taking \fBattr_t\fR arguments are +not supported under SVr4. +.PP +The XSI Curses standard states that whether the traditional functions +\fBattron\fR/\fBattroff\fR/\fBattrset\fR can manipulate attributes other than +\fBA_BLINK\fR, \fBA_BOLD\fR, \fBA_DIM\fR, \fBA_REVERSE\fR, \fBA_STANDOUT\fR, or +\fBA_UNDERLINE\fR is "unspecified". Under this implementation as well as +SVr4 curses, these functions correctly manipulate all other highlights +(specifically, \fBA_ALTCHARSET\fR, \fBA_PROTECT\fR, and \fBA_INVIS\fR). +.PP +XSI Curses added the new entry points, \fBattr_get\fR, \fBattr_on\fR, +\fBattr_off\fR, \fBattr_set\fR, \fBwattr_on\fR, \fBwattr_off\fR, +\fBwattr_get\fR, \fBwattr_set\fR. These are intended to work with +a new series of highlight macros prefixed with \fBWA_\fR. +.PP +.TS +center ; +l l . +\fBWA_NORMAL\fR Normal display (no highlight) +\fBWA_STANDOUT\fR Best highlighting mode of the terminal. +\fBWA_UNDERLINE\fR Underlining +\fBWA_REVERSE\fR Reverse video +\fBWA_BLINK\fR Blinking +\fBWA_DIM\fR Half bright +\fBWA_BOLD\fR Extra bright or bold +\fBWA_ALTCHARSET\fR Alternate character set +.TE +.PP +The XSI curses standard specifies that each pair of corresponding \fBA_\fR +and \fBWA_\fR-using functions operates on the same current-highlight +information. +.PP +The XSI standard extended conformance level adds new highlights +\fBA_HORIZONTAL\fR, \fBA_LEFT\fR, \fBA_LOW\fR, \fBA_RIGHT\fR, \fBA_TOP\fR, +\fBA_VERTICAL\fR (and corresponding \fBWA_\fR macros for each) which this +curses does not yet support. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_addch\fR(3X), +\fBcurs_addstr\fR(3X), +\fBcurs_bkgd\fR(3X), +\fBcurs_printw\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_beep.3 b/lib/libncurses/man/curs_beep.3 new file mode 100644 index 0000000000..606d7d4ff3 --- /dev/null +++ b/lib/libncurses/man/curs_beep.3 @@ -0,0 +1,64 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_beep.3x,v 1.9 2003/12/27 18:44:30 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_beep.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_beep 3X "" +.SH NAME +\fBbeep\fR, \fBflash\fR - \fBcurses\fR bell and screen flash routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint beep(void);\fR +.br +\fBint flash(void);\fR +.br +.SH DESCRIPTION +The \fBbeep\fR and \fBflash\fR routines are used to alert the terminal user. +The routine \fBbeep\fR sounds an audible alarm on the terminal, if possible; +otherwise it flashes the screen (visible bell). The routine \fBflash\fR +flashes the screen, and if that is not possible, sounds the alert. If neither +alert is possible, nothing happens. Nearly all terminals have an audible alert +(bell or beep), but only some can flash the screen. +.SH RETURN VALUE +These routines return \fBOK\fR if they succeed in beeping or flashing, +\fBERR\fR otherwise. +.SH EXTENSIONS +SVr4's beep and flash routines always returned \fBOK\fR, so it was not +possible to tell when the beep or flash failed. +.SH PORTABILITY +These functions are defined in the XSI Curses standard, Issue 4. Like SVr4, it +specifies that they always return \fBOK\fR. +.SH SEE ALSO +\fBcurses\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_bkgd.3 b/lib/libncurses/man/curs_bkgd.3 new file mode 100644 index 0000000000..6f9d15993d --- /dev/null +++ b/lib/libncurses/man/curs_bkgd.3 @@ -0,0 +1,99 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_bkgd.3x,v 1.19 2003/12/27 18:50:40 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_bkgd.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_bkgd 3X "" +.SH NAME +\fBbkgdset\fR, \fBwbkgdset\fR, +\fBbkgd\fR, \fBwbkgd\fR, +\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBvoid bkgdset(chtype ch);\fR +.br +\fBvoid wbkgdset(WINDOW *win, chtype ch);\fR +.br +\fBint bkgd(chtype ch);\fR +.br +\fBint wbkgd(WINDOW *win, chtype ch);\fR +.br +\fBchtype getbkgd(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the +background of the named window. +The window background is a \fBchtype\fR consisting of +any combination of attributes (i.e., rendition) and a character. +The attribute part of the background is combined (OR'ed) with all non-blank +characters that are written into the window with \fBwaddch\fR. Both +the character and attribute parts of the background are combined with +the blank characters. The background becomes a property of the +character and moves with the character through any scrolling and +insert/delete line/character operations. +.PP +To the extent possible on a particular terminal, +the attribute part of the background is displayed +as the graphic rendition of the character put on the screen. +.PP +The \fBbkgd\fR and \fBwbkgd\fR functions +set the background property of the current or specified window +and then apply this setting to every character position in that window: +.PP +.RS +The rendition of every character on the screen is changed to +the new background rendition. +.PP +Wherever the former background character +appears, it is changed to the new background character. +.RE +.PP +The \fBgetbkgd\fR function returns the given window's current background +character/attribute pair. +.SH RETURN VALUE +The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR. +The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set", +but this appears to be an error. +.SH NOTES +Note that \fBbkgdset\fR and \fBbkgd\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure. +but gives no failure conditions. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_addch\fR(3X), +\fBcurs_attr\fR(3X), +\fBcurs_outopts\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_bkgrnd.3 b/lib/libncurses/man/curs_bkgrnd.3 new file mode 100644 index 0000000000..3d5e2cbff3 --- /dev/null +++ b/lib/libncurses/man/curs_bkgrnd.3 @@ -0,0 +1,108 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_bkgrnd.3x,v 1.1 2002/02/23 23:23:42 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_bkgrnd.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_bkgrnd 3X "" +.SH NAME +.PP +\fBbkgrnd\fR, +\fBwbkgrnd\fR, +\fBbkgrndset\fR, +\fBwbkgrndset\fR, +\fBgetbkgrnd\fR, +\fBwgetbkgrnd\fR \- \fBcurses\fR window complex background manipulation routines +.SH SYNOPSIS +.PP +.B #include + +\fBint bkgrnd(\fR\fB const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wbkgrnd(\fR\fB WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBvoid bkgrndset(const cchar_t *\fR\fIwch\fR \fB);\fR +.br +\fBvoid wbkgrndset(WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint getbkgrnd(cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR +.br +.SH DESCRIPTION +The \fBbkgrndset\fR and \fBwbkgrndset\fR routines manipulate the +background of the named window. +The window background is a \fBcchar_t\fR consisting of +any combination of attributes (i.e., rendition) and a complex character. +The attribute part of the background is combined (OR'ed) with all non-blank +characters that are written into the window with \fBwaddch\fR. Both +the character and attribute parts of the background are combined with +the blank characters. +The background becomes a property of the +character and moves with the character through any scrolling and +insert/delete line/character operations. + +To the extent possible on a +particular terminal, the attribute part of the background is displayed +as the graphic rendition of the character put on the screen. + +The \fBbkgrnd\fR and \fBwbkgrnd\fR functions +set the background property of the current or specified window +and then apply this setting to every character position in that window: + +.RS +The rendition of every character on the screen is changed to +the new background rendition. + +Wherever the former background character +appears, it is changed to the new background character. +.RE + +The \fBgetbkgrnd\fR function returns the given window's current background +character/attribute pair via the \fBwch\fR pointer. + +.SH NOTES +Note that +\fBbkgrnd\fR, +\fBbkgrndset\fR, and +\fBgetbkgrnd\fR +may be macros. +.SH RETURN VALUES +The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value. +.PP +Upon successful completion, the other functions return \fBOK\fR. +Otherwise, they return \fBERR\fR. +A null window pointer is treated as an error. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_bkgd\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_border.3 b/lib/libncurses/man/curs_border.3 new file mode 100644 index 0000000000..b4fbb43d55 --- /dev/null +++ b/lib/libncurses/man/curs_border.3 @@ -0,0 +1,139 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_border.3x,v 1.15 2002/02/16 22:21:47 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_border.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_border 3X "" +.SH NAME +\fBborder\fR, \fBwborder\fR, \fBbox\fR, +\fBhline\fR, \fBwhline\fR, +\fBvline\fR, \fBwvline\fR, +\fBmvhline\fR, \fBmvwhline\fR, +\fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines +.SH SYNOPSIS +\fB#include \fR +.br +\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR + \fBchtype tl, chtype tr, chtype bl, chtype br);\fR +.br +\fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR + \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR + \fBchtype bl, chtype br);\fR +.br +\fBint box(WINDOW *win, chtype verch, chtype horch);\fR +.br +\fBint hline(chtype ch, int n);\fR +.br +\fBint whline(WINDOW *win, chtype ch, int n);\fR +.br +\fBint vline(chtype ch, int n);\fR +.br +\fBint wvline(WINDOW *win, chtype ch, int n);\fR +.br +\fBmvhline(int y, int x, chtype ch, int n);\fR +.br +\fBmvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR +.br +\fBint mvvline(int y, int x, chtype ch, int n);\fR +.br +\fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR +.br +.SH DESCRIPTION +The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines +draw a box around the edges of a window. +Other than the window, each argument is a character with attributes: +.RS +\fIls\fR - left side, +.br +\fIrs\fR - right side, +.br +\fIts\fR - top side, +.br +\fIbs\fR - bottom side, +.br +\fItl\fR - top left-hand corner, +.br +\fItr\fR - top right-hand corner, +.br +\fIbl\fR - bottom left-hand corner, and +.br +\fIbr\fR - bottom right-hand corner. +.RE +If any of these arguments is zero, then the corresponding +default values (defined in \fBcurses.h\fR) are used instead: +.RS +\fBACS_VLINE\fR, +.br +\fBACS_VLINE\fR, +.br +\fBACS_HLINE\fR, +.br +\fBACS_HLINE\fR, +.br +\fBACS_ULCORNER\fR, +.br +\fBACS_URCORNER\fR, +.br +\fBACS_LLCORNER\fR, +.br +\fBACS_LRCORNER\fR. +.RE + +\fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand +for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR +\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR. + +The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right) +line using \fIch\fR starting at the current cursor position in the window. The +current cursor position is not changed. The line is at most \fIn\fR characters +long, or as many as fit into the window. + +The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line +using \fIch\fR starting at the current cursor position in the window. The +current cursor position is not changed. The line is at most \fIn\fR characters +long, or as many as fit into the window. +.SH RETURN VALUE +All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a +non-negative integer if \fBimmedok\fR is set", but this appears to be an error. +.SH NOTES +The borders generated by these functions are \fIinside\fR borders (this +is also true of SVr4 curses, though the fact is not documented). + +Note that \fBborder\fR and \fBbox\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +The standard specifies that they return \fBERR\fR on failure, +but specifies no error conditions. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_outopts\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_border_set.3 b/lib/libncurses/man/curs_border_set.3 new file mode 100644 index 0000000000..809cedd1ec --- /dev/null +++ b/lib/libncurses/man/curs_border_set.3 @@ -0,0 +1,203 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_border_set.3x,v 1.3 2002/04/20 16:49:13 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_border_set.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_border_set 3X "" +.SH NAME +.PP +\fBborder_set\fR, +\fBwborder_set\fR, +\fBbox_set\fR, +\fBhline_set\fR, +\fBwhline_set\fR, +\fBmvhline_set\fR, +\fBmvwhline_set\fR, +\fBvline_set\fR, +\fBwvline_set\fR, +\fBmvvline_set\fR, +\fBmvwvline_set\fR \- create \fBcurses\fR borders or lines using complex characters and renditions +.SH SYNOPSIS +.PP +\fB#include \fR +.sp +\fBint border_set(\fR + \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR, + \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR, + \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR, + \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR +\fB);\fR +.br +\fBint wborder_set(\fR + \fBWINDOW *win\fR, + \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR, + \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR, + \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR, + \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR +.br +\fBint box_set(\fR + \fBWINDOW *win\fR, + \fBconst cchar_t *\fR\fIverch\fR, + \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR +.br +\fBint hline_set(\fR + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint whline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvhline_set(\fR + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvwhline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint vline_set(\fR + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint wvline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvvline_set(\fR + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvwvline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +.SH DESCRIPTION +.PP +The +\fBborder_set\fR +and +\fBwborder_set\fR +functions draw a border around the edges of the current or specified window. +These functions do not change the cursor position, and do not wrap. +.PP +Other than the window, each argument is a complex character with attributes: +.RS +\fIls\fR - left side, +.br +\fIrs\fR - right side, +.br +\fIts\fR - top side, +.br +\fIbs\fR - bottom side, +.br +\fItl\fR - top left-hand corner, +.br +\fItr\fR - top right-hand corner, +.br +\fIbl\fR - bottom left-hand corner, and +.br +\fIbr\fR - bottom right-hand corner. +.RE +.PP +If any of these arguments is zero, then the corresponding +default values (defined in \fBcurses.h\fR) are used instead: +.RS +\fBWACS_VLINE\fR, +.br +\fBWACS_VLINE\fR, +.br +\fBWACS_HLINE\fR, +.br +\fBWACS_HLINE\fR, +.br +\fBWACS_ULCORNER\fR, +.br +\fBWACS_URCORNER\fR, +.br +\fBWACS_LLCORNER\fR, and +.br +\fBWACS_LRCORNER\fR. +.RE +.PP +\fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR +is a shorthand for the following call: +.PP +\fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR + \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR +.PP +The +\fB*line_set\fR +functions use +\fIwch\fR +to draw a line starting at the current cursor position in the window. +The line is at most \fIn\fR characters long or as many as fit into the window. +The current cursor position is not changed. +.PP +The +\fBhline_set\fR, +\fBmvhline_set\fR, +\fBmvwhline_set\fR, and +\fBwhline_set\fR +functions draw a line proceeding toward the last column of the same line. +.PP +The +\fBvline_set\fR, +\fBmvvline_set\fR, +\fBmvwvline_set\fR, and +\fBwvline_set\fR +functions draw a line proceeding toward the last line of the window. +.br +.SH NOTES +.PP +Note that +\fBborder_set\fR, +\fBhline_set\fR, +\fBmvhline_set\fR, +\fBmvvline_set\fR, +\fBmvwhline_set\fR, +\fBmvwvline_set\fR, and +\fBvline_set\fR +may be macros. +.br +.SH RETURN VALUES +.PP +Upon successful completion, these functions return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.SH SEE ALSO +\fBncurses\fR(3X), +\fBcurs_border\fR(3X), +\fBcurs_outopts\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_clear.3 b/lib/libncurses/man/curs_clear.3 new file mode 100644 index 0000000000..099c3c798c --- /dev/null +++ b/lib/libncurses/man/curs_clear.3 @@ -0,0 +1,95 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_clear.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_clear 3X "" +.SH NAME +\fBerase\fR, \fBwerase\fR, \fBclear\fR, +\fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR, +\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window +.SH SYNOPSIS +\fB# include \fR + +\fBint erase(void);\fR +.br +\fBint werase(WINDOW *win);\fR +.br +\fBint clear(void);\fR +.br +\fBint wclear(WINDOW *win);\fR +.br +\fBint clrtobot(void);\fR +.br +\fBint wclrtobot(WINDOW *win);\fR +.br +\fBint clrtoeol(void);\fR +.br +\fBint wclrtoeol(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBerase\fR and \fBwerase\fR routines copy blanks to every +position in the window, clearing the screen. + +The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and +\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is +cleared completely on the next call to \fBwrefresh\fR for that window +and repainted from scratch. + +The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the +end of screen. That is, they erase all lines below the cursor in the window. +Also, the current line to the right of the cursor, inclusive, is erased. + +The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line +to the right of the cursor, inclusive, to the end of the current line. + +Blanks created by erasure have the current background rendition (as set +by \fBwbkgdset\fR) merged into them. +.SH RETURN VALUE +All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a +non-negative integer if \fBimmedok\fR is set", but this appears to be an error. +.SH NOTES +Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR, +\fBclrtobot\fR, and \fBclrtoeol\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. + +Some historic curses implementations had, as an undocumented feature, the +ability to do the equivalent of \fBclearok(..., 1)\fR by saying +\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under +ncurses. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_color.3 b/lib/libncurses/man/curs_color.3 new file mode 100644 index 0000000000..eed07fa3e8 --- /dev/null +++ b/lib/libncurses/man/curs_color.3 @@ -0,0 +1,217 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_color.3x,v 1.19 2002/02/16 22:38:32 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_color.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_color 3X "" +.SH NAME +\fBstart_color\fR, +\fBinit_pair\fR, +\fBinit_color\fR, +\fBhas_colors\fR, +\fBcan_change_color\fR, +\fBcolor_content\fR, +\fBpair_content\fR, +\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines +.SH SYNOPSIS +\fB# include \fR +.br +\fBint start_color(void);\fR +.br +\fBint init_pair(short pair, short f, short b);\fR +.br +\fBint init_color(short color, short r, short g, short b);\fR +.br +\fBbool has_colors(void);\fR +.br +\fBbool can_change_color(void);\fR +.br +\fBint color_content(short color, short *r, short *g, short *b);\fR +.br +\fBint pair_content(short pair, short *f, short *b);\fR +.br +.SH DESCRIPTION +.SS Overview +\fBcurses\fR support color attributes on terminals with that capability. To +use these routines \fBstart_color\fR must be called, usually right after +\fBinitscr\fR. Colors are always used in pairs (referred to as color-pairs). +A color-pair consists of a foreground color (for characters) and a background +color (for the blank field on which the characters are displayed). A +programmer initializes a color-pair with the routine \fBinit_pair\fR. After it +has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR), a macro defined in +\fB\fR, can be used as a new video attribute. + +If a terminal is capable of redefining colors, the programmer can use the +routine \fBinit_color\fR to change the definition of a color. The routines +\fBhas_colors\fR and \fBcan_change_color\fR return \fBTRUE\fR or \fBFALSE\fR, +depending on whether the terminal has color capabilities and whether the +programmer can change the colors. The routine \fBcolor_content\fR allows a +programmer to extract the amounts of red, green, and blue components in an +initialized color. The routine \fBpair_content\fR allows a programmer to find +out how a given color-pair is currently defined. +.SS Routine Descriptions +The \fBstart_color\fR routine requires no arguments. It must be +called if the programmer wants to use colors, and before any other +color manipulation routine is called. It is good practice to call +this routine right after \fBinitscr\fR. \fBstart_color\fR initializes +eight basic colors (black, red, green, yellow, blue, magenta, cyan, +and white), and two global variables, \fBCOLORS\fR and +\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors +and color-pairs the terminal can support). It also restores the +colors on the terminal to the values they had when the terminal was +just turned on. + +The \fBinit_pair\fR routine changes the definition of a color-pair. It takes +three arguments: the number of the color-pair to be changed, the foreground +color number, and the background color number. +For portable applications: +.TP 5 +- +The value of the first argument +must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. +.TP 5 +- +The value of the second and +third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired +to white on black and cannot be changed). +.PP +If the color-pair was previously +initialized, the screen is refreshed and all occurrences of that color-pair +are changed to the new definition. + +As an extension, ncurses allows you to set color pair 0 via +the \fBassume_default_colors\fR routine, or to specify the use of +default colors (color number \fB-1\fR) if you first invoke the +\fBuse_default_colors\fR routine. + +The \fBinit_color\fR routine changes the definition of a color. It takes four +arguments: the number of the color to be changed followed by three RGB values +(for the amounts of red, green, and blue components). The value of the first +argument must be between \fB0\fR and \fBCOLORS\fR. (See the section +\fBColors\fR for the default color index.) Each of the last three arguments +must be a value between 0 and 1000. When \fBinit_color\fR is used, all +occurrences of that color on the screen immediately change to the new +definition. + +The \fBhas_colors\fR routine requires no arguments. It returns \fBTRUE\fR if +the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR. This +routine facilitates writing terminal-independent programs. For example, a +programmer can use it to decide whether to use color or some other video +attribute. + +The \fBcan_change_color\fR routine requires no arguments. It returns +\fBTRUE\fR if the terminal supports colors and can change their definitions; +other, it returns \fBFALSE\fR. This routine facilitates writing +terminal-independent programs. + +The \fBcolor_content\fR routine gives programmers a way to find the intensity +of the red, green, and blue (RGB) components in a color. It requires four +arguments: the color number, and three addresses of \fBshort\fRs for storing +the information about the amounts of red, green, and blue components in the +given color. The value of the first argument must be between 0 and +\fBCOLORS\fR. The values that are stored at the addresses pointed to by the +last three arguments are between 0 (no component) and 1000 (maximum amount of +component). + +The \fBpair_content\fR routine allows programmers to find out what colors a +given color-pair consists of. It requires three arguments: the color-pair +number, and two addresses of \fBshort\fRs for storing the foreground and the +background color numbers. The value of the first argument must be between 1 +and \fBCOLOR_PAIRS-1\fR. The values that are stored at the addresses pointed +to by the second and third arguments are between 0 and \fBCOLORS\fR. +.SS Colors +In \fB\fR the following macros are defined. These are the default +colors. \fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default +background color for all terminals. + +.nf + \fBCOLOR_BLACK\fR + \fBCOLOR_RED\fR + \fBCOLOR_GREEN\fR + \fBCOLOR_YELLOW\fR + \fBCOLOR_BLUE\fR + \fBCOLOR_MAGENTA\fR + \fBCOLOR_CYAN\fR + \fBCOLOR_WHITE\fR +.fi +.SH RETURN VALUE +The routines \fBcan_change_color()\fR and \fBhas_colors()\fR return \fBTRUE\fR +or \fBFALSE\fR. + +All other routines return the integer \fBERR\fR upon failure and an \fBOK\fR +(SVr4 specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +In the \fIncurses\fR implementation, there is a separate color activation flag, +color palette, color pairs table, and associated COLORS and COLOR_PAIRS counts +for each screen; the \fBstart_color\fR function only affects the current +screen. The SVr4/XSI interface is not really designed with this in mind, and +historical implementations may use a single shared color palette. + +Note that setting an implicit background color via a color pair affects only +character cells that a character write operation explicitly touches. To change +the background color used when parts of a window are blanked by erasing or +scrolling operations, see \fBcurs_bkgd\fR(3X). + +Several caveats apply on 386 and 486 machines with VGA-compatible graphics: +.TP 5 +- +COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with +the \fBA_BOLD\fR attribute. +.TP 5 +- +The A_BLINK attribute should in theory cause the background to go bright. This +often fails to work, and even some cards for which it mostly works (such as the +Paradise and compatibles) do the wrong thing when you try to set a bright +"yellow" background (you get a blinking yellow foreground instead). +.TP 5 +- +Color RGB values are not settable. +.SH PORTABILITY +This implementation satisfies XSI Curses's minimum maximums +for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR. +.PP +The \fBinit_pair\fP routine accepts negative values of foreground +and background color to support the \fBuse_default_colors\fP extension, +but only if that routine has been first invoked. +.PP +The assumption that \fBCOLOR_BLACK\fR is the default +background color for all terminals can be modified using the +\fBassume_default_colors\fP extension, + +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_initscr\fR(3X), +\fBcurs_attr\fR(3X), +\fBdefault_colors\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_delch.3 b/lib/libncurses/man/curs_delch.3 new file mode 100644 index 0000000000..ea7dfb73cd --- /dev/null +++ b/lib/libncurses/man/curs_delch.3 @@ -0,0 +1,71 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_delch.3x,v 1.7 2000/07/01 19:55:37 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_delch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_delch 3X "" +.SH NAME +\fBdelch\fR, +\fBwdelch\fR, +\fBmvdelch\fR, +\fBmvwdelch\fR - delete character under the cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint delch(void);\fR +.br +\fBint wdelch(WINDOW *win);\fR +.br +\fBint mvdelch(int y, int x);\fR +.br +\fBint mvwdelch(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines delete the character under the cursor; all characters to the +right of the cursor on the same line are moved to the left one position and the +last character on the line is filled with a blank. The cursor position does +not change (after moving to \fIy\fR, \fIx\fR, if specified). (This does not +imply use of the hardware delete character feature.) +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. +.SH SEE ALSO +\fBcurses\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_deleteln.3 b/lib/libncurses/man/curs_deleteln.3 new file mode 100644 index 0000000000..db72fe5ce1 --- /dev/null +++ b/lib/libncurses/man/curs_deleteln.3 @@ -0,0 +1,88 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_deleteln.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_deleteln.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_deleteln 3X "" +.SH NAME +\fBdeleteln\fR, +\fBwdeleteln\fR, +\fBinsdelln\fR, +\fBwinsdelln\fR, +\fBinsertln\fR, +\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint deleteln(void);\fR +.br +\fBint wdeleteln(WINDOW *win);\fR +.br +\fBint insdelln(int n);\fR +.br +\fBint winsdelln(WINDOW *win, int n);\fR +.br +\fBint insertln(void);\fR +.br +\fBint winsertln(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBdeleteln\fR and \fBwdeleteln\fR routines delete the line under the +cursor in the window; all lines below the current line are moved up one line. +The bottom line of the window is cleared. The cursor position does not change. + +The \fBinsdelln\fR and \fBwinsdelln\fR routines, for positive \fIn\fR, insert +\fIn\fR lines into the specified window above the current line. The \fIn\fR +bottom lines are lost. For negative \fIn\fR, delete \fIn\fR lines (starting +with the one under the cursor), and move the remaining lines up. The bottom +\fIn\fR lines are cleared. The current cursor position remains the same. + +The \fBinsertln\fR and \fBwinsertln\fR routines insert a blank line above the +current line and the bottom line is lost. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. +.SH NOTES +Note that all but \fBwinsdelln\fR may be macros. + +These routines do not require a hardware line delete or insert feature in the +terminal. In fact, they won't use hardware line delete/insert unless +\fBidlok(..., TRUE)\fR has been set on the current window. +.SH SEE ALSO +\fBcurses\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_extend.3 b/lib/libncurses/man/curs_extend.3 new file mode 100644 index 0000000000..fc699408ef --- /dev/null +++ b/lib/libncurses/man/curs_extend.3 @@ -0,0 +1,85 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1999 +.\" +.\" $Id: curs_extend.3x,v 1.12 2003/10/25 20:33:16 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_extend.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_extend 3X "" +.SH NAME +\fBcurses_version\fP, +\fBuse_extended_names\fP \- miscellaneous curses extensions + +.SH SYNOPSIS +\fB#include \fP + +\fBconst char * curses_version(void);\fP +.br +\fBint use_extended_names(bool enable);\fP +.SH DESCRIPTION +These functions are extensions to the curses library +which do not fit easily into other categories. +.PP +Use +.I curses_version() +to get the version number, including patch level of the library, e.g., +.B 5.0.19991023 +.PP +The +.I use_extended_names() +function controls whether the calling application +is able to use user-defined or nonstandard names +which may be compiled into the terminfo +description, i.e., via the terminfo or termcap interfaces. +Normally these names are available for use, since the essential decision +is made by using the \fB\-x\fP option of \fItic\fP to compile +extended terminal definitions. +However you can disable this feature +to ensure compatibility with other implementations of curses. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBcurs_getch\fR(3X), +\fBcurs_mouse\fR(3X), +\fBcurs_print\fR(3X), +\fBdefault_colors\fR(3X), +\fBdefine_key\fR(3X), +\fBkeybound\fR(3X), +\fBkeyok\fR(3X), +\fBresizeterm\fR(3X), +\fBwresize\fR(3X). +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_get_wch.3 b/lib/libncurses/man/curs_get_wch.3 new file mode 100644 index 0000000000..05c8042d7c --- /dev/null +++ b/lib/libncurses/man/curs_get_wch.3 @@ -0,0 +1,162 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_get_wch.3x,v 1.5 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_get_wch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_get_wch 3X "" +.SH NAME +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, +\fBmvwget_wch\fR, +\fBunget_wch\fR \- get (or push back) a wide character from curses terminal keyboard +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint get_wch(wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wget_wch(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvget_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvwget_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint unget_wch(const wchar_t \fR\fIwch\fR\fB);\fR +.SH DESCRIPTION +The +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, and +\fBmvwget_wch\fR +functions read a character +from the terminal associated with the current or specified window. +In no-delay mode, +if no input is waiting, the value \fBERR\fR is returned. +In delay mode, +the program waits until the system passes text through to the program. +Depending on the setting of \fBcbreak\fR, +this is after one character (cbreak mode), +or after the first newline (nocbreak mode). +In half-delay mode, +the program waits until the user types a character or the specified +timeout interval has elapsed. + +Unless \fBnoecho\fR has been set, +these routines echo the character into the designated window. + +If the window is not a pad and has been moved or modified since the +last call to \fBwrefresh\fR, +\fBwrefresh\fR will be called before another character is read. + +If \fBkeypad\fR is enabled, +these functions respond to +the pressing of a function key by setting the object pointed to by +\fIwch\fR +to the corresponding +\fBKEY_\fR +value defined +in +\fB\fR +and returning +\fBKEY_CODE_YES\fR. +If a character (such as escape) that could be the +beginning of a function key is received, curses sets a timer. +If the remainder +of the sequence does arrive within the designated time, curses passes through +the character; otherwise, curses returns the function key value. +For this +reason, many terminals experience a delay between the time a user presses +the escape key and the time the escape is returned to the program. +.PP +The +\fBunget_wch\fR +function pushes the wide character +\fIwch\fR +back onto the head of the input queue, so the wide character +is returned by the next call to +\fBget_wch\fR. +The pushback of +one character is guaranteed. +If the program calls +\fBunget_wch\fR +too many times without an intervening call to +\fBget_wch\fR, +the operation may fail. +.SH NOTES +The header file +\fB\fR +automatically +includes the header file +\fB\fR. +.PP +Applications should not define the escape key by itself as a single-character +function. +.PP +When using +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, or +\fBmvwget_wch\fR, applications should +not use +\fBnocbreak\fR +mode and +\fBecho\fR +mode +at the same time. +Depending on the state of the tty driver when each character +is typed, the program may produce undesirable results. +.PP +All functions except \fBwget_wch\fR and \fBunget_wch\fR +may be macros. +.SH RETURN VALUES +When +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, and +\fBmvwget_wch\fR +functions successfully +report the pressing of a function key, they return +\fBKEY_CODE_YES\fR. +When they successfully report a wide character, they return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.PP +Upon successful completion, +\fBunget_wch\fR +returns +\fBOK\fR. +Otherwise, the function returns +\fBERR\fR. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_getch\fR(3X), +\fBcurs_ins_wch\fR(3X), +\fBcurs_inopts\fR(3X), +\fBcurs_move\fR(3X), +\fBcurs_refresh\fR(3X) diff --git a/lib/libncurses/man/curs_get_wstr.3 b/lib/libncurses/man/curs_get_wstr.3 new file mode 100644 index 0000000000..854fd9e5c2 --- /dev/null +++ b/lib/libncurses/man/curs_get_wstr.3 @@ -0,0 +1,168 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_get_wstr.3x,v 1.3 2003/07/05 11:15:28 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_get_wstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_get_wstr 3X "" +.SH NAME +\fBget_wstr\fR, +\fBgetn_wstr\fR, +\fBwget_wstr\fR, +\fBwgetn_wstr\fR, +\fBmvget_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwget_wstr\fR, +\fBmvwgetn_wstr\fR \- get an array of wide characters from a curses terminal keyboard +.SH SYNOPSIS +.nf +\fB#include \fR + +\fBint get_wstr(wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint getn_wstr(wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvgetn_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwget_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwgetn_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +The effect of +\fBget_wstr\fR +is as though a series of calls +to +\fBget_wch\fR +were made, until a newline, other end-of-line, or end-of-file condition is processed. +An end-of-file condition is represented by \fBWEOF\fR, as defined in \fB\fR. +The newline and end-of-line conditions are represented by the \fB\\n\fR \fBwchar_t\fR value. +In all instances, the end of the string is terminated by a null \fBwchar_t\fR. +The routine places resulting values in the area pointed to by \fIwstr\fR. + +The user's erase and kill characters are interpreted. If keypad +mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR +are both considered equivalent to the user's kill character. + +Characters input are echoed only if \fBecho\fR is currently on. In that case, +backspace is echoed as deletion of the previous character (typically a left +motion). + +The effect of +\fBwget_wstr\fR +is as though a series of +calls to +\fBwget_wch\fR +were made. + +The effect of +\fBmvget_wstr\fR +is as though a call to +\fBmove\fR +and then a series of calls to +\fBget_wch\fR +were +made. + +The effect of +\fBmvwget_wstr\fR +is as though a call to +\fBwmove\fR +and then a series of calls to +\fBwget_wch\fR +were made. + +The +\fBgetn_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwgetn_wstr\fR, and +\fBwgetn_wstr\fR +functions are identical +to the +\fBget_wstr\fR, +\fBmvget_wstr\fR, +\fBmvwget_wstr\fR, and +\fBwget_wstr\fR +functions, respectively, +except that the +\fB*n_*\fR +versions read at most +\fIn\fR +characters, letting the application prevent overflow of the +input buffer. +.SH NOTES +Using +\fBget_wstr\fR, +\fBmvget_wstr\fR, +\fBmvwget_wstr\fR, or +\fBwget_wstr\fR +to read a line that +overflows the array pointed to by +\fBwstr\fR +causes undefined +results. +The use of +\fBgetn_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwgetn_wstr\fR, or +\fBwgetn_wstr\fR, respectively, is recommended. + +These functions cannot return \fBKEY_\fR values because there +is no way to distinguish a \fBKEY_\fR value from a valid \fBwchar_t\fR value. + +All of these routines except \fBwgetn_wstr\fR may be macros. +.SH RETURN VALUES +All of these functions return \fBOK\fR upon successful completion. +Otherwise, they return \fBERR\fR. +.SH PORTABILITY +These functions are described in The Single Unix Specification, Version 2. +No error conditions are defined. +This implementation returns ERR if the window pointer is null, +or if the lower-level \fBwget_wch\fR call returns an ERR. +In the latter case, +an ERR return without other data is treated as an end-of-file condition, +and the returned array contains a \fBWEOF\fR followed by a null \fBwchar_t\fR. +.PP +X/Open curses documents these functions to pass an array of \fBwchar_t\fR, +but all of the vendors implement this using \fBwint_t\fR. +.SH SEE ALSO +Functions: +\fBcurses\fR(3X), +\fBcurs_get_wch\fR(3X), +\fBcurs_getstr\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_getcchar.3 b/lib/libncurses/man/curs_getcchar.3 new file mode 100644 index 0000000000..d6df05eb84 --- /dev/null +++ b/lib/libncurses/man/curs_getcchar.3 @@ -0,0 +1,145 @@ +.\"*************************************************************************** +.\" Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getcchar.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_getcchar.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_getcchar 3X "" +.SH NAME +\fBgetcchar\fP, +\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint getcchar(\fP +.br +.B " const cchar_t *\fIwcval\fP," +.br +.B " wchar_t *\fIwch\fP," +.br +.B " attr_t *\fIattrs\fP," +.br +.B " short *\fIcolor_pair\fP," +.br +.B " void *\fIopts\fP );" +.sp +.B "int setcchar(" +.br +.B " cchar_t *\fIwcval\fP," +.br +.B " const wchar_t *\fIwch\fP," +.br +.B " const attr_t \fIattrs\fP," +.br +.B " short \fIcolor_pair\fP," +.br +.B " void *\fIopts\fP );" +.SH DESCRIPTION +.PP +The \fBgetcchar\fP function gets a wide-character string +and rendition from a \fBcchar_t\fP argument. +When \fIwch\fP is not a null pointer, +the \fBgetcchar\fP function does the following: +.TP 5 +- +Extracts information from a \fBcchar_t\fP value \fIwcval\fP +.TP 5 +- +Stores the character attributes in the location pointed to by \fIattrs\fP +.TP 5 +- +Stores the color-pair in the location pointed to by \fIcolor_pair\fP +.TP 5 +- +Stores the wide-character string, +characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP. +.PP +When +\fIwch\fP +is a null pointer, the +\fBgetcchar\fP +function does the following: +.TP 5 +- +Obtains the number of wide characters pointed to by \fIwcval\fP +.TP 5 +- +Does not change the data referenced by +\fIattrs\fP +or +\fIcolor_pair\fP +.PP +The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP +by using: +.TP 5 +- +The character attributes in +\fIattrs\fP +.TP 5 +- +The color pair in +\fIcolor_pair\fP +.TP 5 +- +The wide-character string pointed to by \fIwch\fP. +The string must be L'\\0' terminated, +contain at most one character with strictly positive width, +which must be the first, +and contain no characters of negative width. +.SH NOTES +.PP +The \fIopts\fP argument is reserved for future use. +Currently, an application must provide a null pointer as \fIopts\fP. +.PP +The \fIwcval\fP argument may be a value generated by a call to +\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument. +If \fIwcval\fP is constructed by any other means, the effect is unspecified. +.SH RETURN VALUES +.PP +When \fIwch\fP is a null pointer, +\fBgetcchar\fP returns the number of wide characters referenced by +\fIwcval\fP, including the null terminator. +.PP +When \fIwch\fP is not a null pointer, +\fBgetcchar\fP returns \fBOK\fP upon successful completion, +and \fBERR\fP otherwise. +.PP +Upon successful completion, \fBsetcchar\fP returns \fBOK\fP. +Otherwise, it returns \fBERR\fP. +.SH SEE ALSO +.PP +Functions: +\fBcurses\fR(3X), +\fBwcwidth\fR(3X), +\fBcurs_attr_get\fR(3X), +\fBcan_change_color\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_getch.3 b/lib/libncurses/man/curs_getch.3 new file mode 100644 index 0000000000..d1fc9590a7 --- /dev/null +++ b/lib/libncurses/man/curs_getch.3 @@ -0,0 +1,308 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getch.3x,v 1.24 2003/12/27 18:46:06 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_getch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_getch 3X "" +.SH NAME +\fBgetch\fR, +\fBwgetch\fR, +\fBmvgetch\fR, +\fBmvwgetch\fR, +\fBungetch\fR, +\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint getch(void);\fR +.br +\fBint wgetch(WINDOW *win);\fR +.br +\fBint mvgetch(int y, int x);\fR +.br +\fBint mvwgetch(WINDOW *win, int y, int x);\fR +.br +\fBint ungetch(int ch);\fR +.br +\fBint has_key(int ch);\fR +.br +.SH DESCRIPTION +The \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR and \fBmvwgetch\fR, routines read +a character from the window. +In no-delay mode, if no input is waiting, the value \fBERR\fR is returned. +In delay mode, the program waits until the system +passes text through to the program. +Depending on the setting of \fBcbreak\fR, +this is after one character (cbreak mode), +or after the first newline (nocbreak mode). +In half-delay mode, +the program waits until a character is typed or the +specified timeout has been reached. +.PP +Unless \fBnoecho\fR has been set, +then the character will also be echoed into the +designated window according to the following rules: +If the character is the current erase character, left arrow, or backspace, +the cursor is moved one space to the left and that screen position is erased +as if \fBdelch\fR had been called. +If the character value is any other \fBKEY_\fR define, the user is alerted +with a \fBbeep\fR call. +Otherwise the character is simply output to the screen. +.PP +If the window is not a pad, and it has been moved or modified since the last +call to \fBwrefresh\fR, \fBwrefresh\fR will be called before another character +is read. +.PP +If \fBkeypad\fR is \fBTRUE\fR, and a function key is pressed, the token for +that function key is returned instead of the raw characters. +Possible function +keys are defined in \fB\fR as macros with values outside the range +of 8-bit characters whose names begin with \fBKEY_\fR. Thus, a variable +intended to hold the return value of a function key must be of short size or +larger. +.PP +When a character that could be the beginning of a function key is received +(which, on modern terminals, means an escape character), +\fBcurses\fR sets a timer. +If the remainder of the sequence does not come in within the designated +time, the character is passed through; +otherwise, the function key value is returned. +For this reason, many terminals experience a delay between the time +a user presses the escape key and the escape is returned to the program. +.PP +The \fBungetch\fR routine places \fIch\fR back onto the input queue to be +returned by the next call to \fBwgetch\fR. +There is just one input queue for all windows. +.PP +.SS Function Keys +The following function keys, defined in \fB\fR, might be returned by +\fBgetch\fR if \fBkeypad\fR has been enabled. +Note that not all of these are +necessarily supported on any particular terminal. +.sp +.TS +center tab(/) ; +l l +l l . +\fIName\fR/\fIKey\fR \fIname\fR +.PP +KEY_BREAK/Break key +KEY_DOWN/The four arrow keys ... +KEY_UP +KEY_LEFT +KEY_RIGHT +KEY_HOME/Home key (upward+left arrow) +KEY_BACKSPACE/Backspace +KEY_F0/T{ +Function keys; space for 64 keys is reserved. +T} +KEY_F(\fIn\fR)/T{ +For 0 \(<= \fIn\fR \(<= 63 +T} +KEY_DL/Delete line +KEY_IL/Insert line +KEY_DC/Delete character +KEY_IC/Insert char or enter insert mode +KEY_EIC/Exit insert char mode +KEY_CLEAR/Clear screen +KEY_EOS/Clear to end of screen +KEY_EOL/Clear to end of line +KEY_SF/Scroll 1 line forward +KEY_SR/Scroll 1 line backward (reverse) +KEY_NPAGE/Next page +KEY_PPAGE/Previous page +KEY_STAB/Set tab +KEY_CTAB/Clear tab +KEY_CATAB/Clear all tabs +KEY_ENTER/Enter or send +KEY_SRESET/Soft (partial) reset +KEY_RESET/Reset or hard reset +KEY_PRINT/Print or copy +KEY_LL/Home down or bottom (lower left) +KEY_A1/Upper left of keypad +KEY_A3/Upper right of keypad +KEY_B2/Center of keypad +KEY_C1/Lower left of keypad +KEY_C3/Lower right of keypad +KEY_BTAB/Back tab key +KEY_BEG/Beg(inning) key +KEY_CANCEL/Cancel key +KEY_CLOSE/Close key +KEY_COMMAND/Cmd (command) key +KEY_COPY/Copy key +KEY_CREATE/Create key +KEY_END/End key +KEY_EXIT/Exit key +KEY_FIND/Find key +KEY_HELP/Help key +KEY_MARK/Mark key +KEY_MESSAGE/Message key +KEY_MOUSE/Mouse event read +KEY_MOVE/Move key +KEY_NEXT/Next object key +KEY_OPEN/Open key +KEY_OPTIONS/Options key +KEY_PREVIOUS/Previous object key +KEY_REDO/Redo key +KEY_REFERENCE/Ref(erence) key +KEY_REFRESH/Refresh key +KEY_REPLACE/Replace key +KEY_RESIZE/Screen resized +KEY_RESTART/Restart key +KEY_RESUME/Resume key +KEY_SAVE/Save key +KEY_SBEG/Shifted beginning key +KEY_SCANCEL/Shifted cancel key +KEY_SCOMMAND/Shifted command key +KEY_SCOPY/Shifted copy key +KEY_SCREATE/Shifted create key +KEY_SDC/Shifted delete char key +KEY_SDL/Shifted delete line key +KEY_SELECT/Select key +KEY_SEND/Shifted end key +KEY_SEOL/Shifted clear line key +KEY_SEXIT/Shifted exit key +KEY_SFIND/Shifted find key +KEY_SHELP/Shifted help key +KEY_SHOME/Shifted home key +KEY_SIC/Shifted input key +KEY_SLEFT/Shifted left arrow key +KEY_SMESSAGE/Shifted message key +KEY_SMOVE/Shifted move key +KEY_SNEXT/Shifted next key +KEY_SOPTIONS/Shifted options key +KEY_SPREVIOUS/Shifted prev key +KEY_SPRINT/Shifted print key +KEY_SREDO/Shifted redo key +KEY_SREPLACE/Shifted replace key +KEY_SRIGHT/Shifted right arrow +KEY_SRSUME/Shifted resume key +KEY_SSAVE/Shifted save key +KEY_SSUSPEND/Shifted suspend key +KEY_SUNDO/Shifted undo key +KEY_SUSPEND/Suspend key +KEY_UNDO/Undo key +.TE +.PP +Keypad is arranged like this: +.sp +.TS +center allbox tab(/) ; +c c c . +\fBA1\fR/\fBup\fR/\fBA3\fR +\fBleft\fR/\fBB2\fR/\fBright\fR +\fBC1\fR/\fBdown\fR/\fBC3\fR +.TE +.sp +The \fBhas_key\fR routine takes a key value from the above list, and +returns TRUE or FALSE according to whether +the current terminal type recognizes a key with that value. +Note that a few values do not correspond to a real key, +e.g., KEY_RESIZE and KEY_MOUSE. +.PP +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR (\fBOK\fR in the case of ungetch()) upon successful +completion. +.SH NOTES +Use of the escape key by a programmer for a single character function is +discouraged, as it will cause a delay of up to one second while the +keypad code looks for a following function-key sequence. +.PP +Note that some keys may be the same as commonly used control +keys, e.g., KEY_ENTER versus control/M, KEY_BACKSPACE versus control/H. +Some curses implementations may differ according to whether they +treat these control keys specially (and ignore the terminfo), or +use the terminfo definitions. +\fBNcurses\fR uses the terminfo definition. +If it says that KEY_ENTER is control/M, \fBgetch\fR will return KEY_ENTER +when you press control/M. +.PP +When using \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, or +\fBmvwgetch\fR, nocbreak mode (\fBnocbreak\fR) and echo mode +(\fBecho\fR) should not be used at the same time. +Depending on the +state of the tty driver when each character is typed, the program may +produce undesirable results. +.PP +Note that \fBgetch\fR, \fBmvgetch\fR, and \fBmvwgetch\fR may be macros. +.PP +Historically, the set of keypad macros was largely defined by the extremely +function-key-rich keyboard of the AT&T 7300, aka 3B1, aka Safari 4. +Modern +personal computers usually have only a small subset of these. +IBM PC-style +consoles typically support little more than \fBKEY_UP\fR, \fBKEY_DOWN\fR, +\fBKEY_LEFT\fR, \fBKEY_RIGHT\fR, \fBKEY_HOME\fR, \fBKEY_END\fR, +\fBKEY_NPAGE\fR, \fBKEY_PPAGE\fR, and function keys 1 through 12. +The Ins key +is usually mapped to \fBKEY_IC\fR. +.SH PORTABILITY +The *get* functions are described in the XSI Curses standard, Issue 4. +They +read single-byte characters only. +The standard specifies that they return +\fBERR\fR on failure, but specifies no error conditions. +.PP +The echo behavior of these functions on input of \fBKEY_\fR or backspace +characters was not specified in the SVr4 documentation. +This description is +adopted from the XSI Curses standard. +.PP +The behavior of \fBgetch\fR and friends in the presence of handled signals is +unspecified in the SVr4 and XSI Curses documentation. +Under historical curses +implementations, it varied depending on whether the operating system's +implementation of handled signal receipt interrupts a \fBread\fR(2) call in +progress or not, and also (in some implementations) depending on whether an +input timeout or non-blocking mode has been set. +.PP +Programmers concerned about portability should be prepared for either of two +cases: (a) signal receipt does not interrupt \fBgetch\fR; (b) signal receipt +interrupts \fBgetch\fR and causes it to return ERR with \fBerrno\fR set to +\fBEINTR\fR. +Under the \fBncurses\fR implementation, handled signals never +interrupt \fBgetch\fR. +.PP +The \fBhas_key\fR function is unique to \fBncurses\fR. +We recommend that +any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_inopts\fR(3X), +\fBcurs_mouse\fR(3X), +\fBcurs_move\fR(3X), +\fBcurs_refresh\fR(3X). +\fBresizeterm\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_getstr.3 b/lib/libncurses/man/curs_getstr.3 new file mode 100644 index 0000000000..243eb2294e --- /dev/null +++ b/lib/libncurses/man/curs_getstr.3 @@ -0,0 +1,108 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getstr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_getstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_getstr 3X "" +.SH NAME +\fBgetstr\fR, +\fBgetnstr\fR, +\fBwgetstr\fR, +\fBwgetnstr\fR, +\fBmvgetstr\fR, +\fBmvgetnstr\fR, +\fBmvwgetstr\fR, +\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard +.SH SYNOPSIS +\fB#include \fR + +\fBint getstr(char *str);\fR +.br +\fBint getnstr(char *str, int n);\fR +.br +\fBint wgetstr(WINDOW *win, char *str);\fR +.br +\fBint wgetnstr(WINDOW *win, char *str, int n);\fR +.br +\fBint mvgetstr(int y, int x, char *str);\fR +.br +\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR +.br +\fBint mvgetnstr(int y, int x, char *str, int n);\fR +.br +\fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR +.br +.SH DESCRIPTION +The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR, +until a newline or carriage return is received (the terminating character is +not included in the returned string). The resulting value is placed in the +area pointed to by the character pointer \fIstr\fR. + +\fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible +overflow of the input buffer. Any attempt to enter more characters (other +than the terminating newline or carriage return) causes a beep. Function +keys also cause a beep and are ignored. The \fBgetnstr\fR function reads +from the \fIstdscr\fR default window. + +The user's erase and kill characters are interpreted. If keypad +mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR +are both considered equivalent to the user's kill character. + +Characters input are echoed only if \fBecho\fR is currently on. In that case, +backspace is echoed as deletion of the previous character (typically a left +motion). +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +They read single-byte characters only. +The standard does not define any error conditions. +This implementation returns ERR if the window pointer is null, +or if the lower-level \fBwgetch\fR call returns an ERR. + +SVr3 and early SVr4 curses implementations did not reject function keys; +the SVr4.0 documentation claimed that "special keys" (such as function +keys, "home" key, "clear" key, \fIetc\fR.) are "interpreted", without +giving details. It lied. In fact, the `character' value appended to the +string by those implementations was predictable but not useful +(being, in fact, the low-order eight bits of the key's KEY_ value). + +The functions \fBgetnstr\fR, \fBmvgetnstr\fR, and \fBmvwgetnstr\fR were +present but not documented in SVr4. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_getch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_getyx.3 b/lib/libncurses/man/curs_getyx.3 new file mode 100644 index 0000000000..3ec72995cc --- /dev/null +++ b/lib/libncurses/man/curs_getyx.3 @@ -0,0 +1,90 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getyx.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_getyx.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_getyx 3X "" +.SH NAME +\fBgetyx\fR, +\fBgetparyx\fR, +\fBgetbegyx\fR, +\fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates +.SH SYNOPSIS +\fB#include \fR + +\fBvoid getyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getparyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getbegyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +The \fBgetyx\fR macro places the current cursor position of the given window in +the two integer variables \fIy\fR and \fIx\fR. + +If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning +coordinates of the subwindow relative to the parent window into two integer +variables \fIy\fR and \fIx\fR. +Otherwise, \fB-1\fR is placed into \fIy\fR and \fIx\fR. + +Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store +the current beginning coordinates and size of the specified window. +.SH RETURN VALUE +The return values of these macros are undefined (i.e., +they should not be used as the right-hand side of assignment statements). +.SH NOTES +All of these interfaces are macros. +A "\fB&\fR" is not necessary before the variables \fIy\fR and \fIx\fR. +.SH PORTABILITY +The +\fBgetyx\fR, +\fBgetparyx\fR, +\fBgetbegyx\fR and +\fBgetmaxyx\fR +functions are described in the XSI Curses standard, Issue 4. +.PP +This implementation also provides +\fBgetbegx\fR, +\fBgetbegy\fR, +\fBgetcurx\fR, +\fBgetcury\fR, +\fBgetmaxx\fR, +\fBgetmaxy\fR, +\fBgetparx\fR and +\fBgetpary\fR +for compatibility with older versions of curses. +.SH SEE ALSO +\fBcurses\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_in_wch.3 b/lib/libncurses/man/curs_in_wch.3 new file mode 100644 index 0000000000..1ef20a658b --- /dev/null +++ b/lib/libncurses/man/curs_in_wch.3 @@ -0,0 +1,69 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_in_wch.3x,v 1.1 2002/03/10 15:08:57 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_in_wch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_in_wch 3X "" +.SH NAME +\fBin_wch\fR, +\fBmvin_wch\fR, +\fBmvwin_wch\fR, +\fBwin_wch\fR - extract a complex character and rendition from a window +.SH SYNOPSIS +\fB#include \fR + +\fBint in_wch(cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint mvin_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint mvwin_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint win_wch(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.SH DESCRIPTION +These functions extract the complex character and rendition from +the current position in the named window into the \fBcchar_t\fR object +referenced by wcval. +.SH RETURN VALUE +No errors are defined in the XSI Curses standard. +This implementation checks for null pointers, returns ERR in that case. +Also, the \fImv\fR routines check for error moving the cursor, returning ERR +in that case. +Otherwise they return OK +.SH NOTES +Note that all of these routines may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_inch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_in_wchstr.3 b/lib/libncurses/man/curs_in_wchstr.3 new file mode 100644 index 0000000000..69a432d6b4 --- /dev/null +++ b/lib/libncurses/man/curs_in_wchstr.3 @@ -0,0 +1,118 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_in_wchstr.3x,v 1.2 2002/05/18 21:48:30 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_in_wchstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_in_wchstr 3X "" +.SH NAME +\fBin_wchstr\fR, +\fBin_wchnstr\fR, +\fBwin_wchstr\fR, +\fBwin_wchnstr\fR, +\fBmvin_wchstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchstr\fR, +\fBmvwin_wchnstr\fR \- get an array of complex characters and renditions from a curses window +.SH SYNOPSIS +.nf +\fB#include \fR + +\fBint in_wchstr(cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint in_wchnstr(cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint win_wchstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint win_wchnstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvin_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvin_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwin_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvwin_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR, int \fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These functions return an array of complex characters in \fIwchstr\fR, +starting at the current cursor position in the named window. +Attributes (rendition) are stored with the characters. +.PP +The +\fBin_wchnstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchnstr\fR +and +\fBwin_wchnstr\fR +fill the array +with at most +\fIn\fR +\fBcchar_t\fR +elements. +.br +.SH NOTES +Note that all routines except +\fBwin_wchnstr\fR +may be +macros. +.PP +Reading a line that overflows the array pointed to by +\fIwchstr\fR +with +\fBin_wchstr\fR, +\fBmvin_wchstr\fR, +\fBmvwin_wchstr\fR +or +\fBwin_wchstr\fR +causes undefined results. Therefore, the use of +\fBin_wchnstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchnstr\fR, or +\fBwin_wchnstr\fR +is recommended. +.SH RETURN VALUES +Upon successful completion, these functions return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.SH PORTABILITY +The XSI Curses defines no error conditions. +This implementation checks for null pointers, +returning ERR in that case. +.SH SEE ALSO +Functions: +\fBcurses\fR(3X), +\fBcurs_in_wch\fR(3X) +\fBcurs_instr\fR(3X), +\fBcurs_inwstr\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_inch.3 b/lib/libncurses/man/curs_inch.3 new file mode 100644 index 0000000000..b74391c29a --- /dev/null +++ b/lib/libncurses/man/curs_inch.3 @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inch.3x,v 1.11 1998/11/29 01:04:34 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_inch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_inch 3X "" +.SH NAME +\fBinch\fR, \fBwinch\fR, \fBmvinch\fR, \fBmvwinch\fR +- get a character and attributes from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBchtype inch(void);\fR +.br +\fBchtype winch(WINDOW *win);\fR +.br +\fBchtype mvinch(int y, int x);\fR +.br +\fBchtype mvwinch(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines return the character, of type \fBchtype\fR, at the current +position in the named window. If any attributes are set for that position, +their values are OR'ed into the value returned. Constants defined in +\fB\fR can be used with the \fB&\fR (logical AND) operator to +extract the character or attributes alone. + +.SS Attributes +The following bit-masks may be AND-ed with characters returned by \fBwinch\fR. + +.TS +l l . +\fBA_CHARTEXT\fR Bit-mask to extract character +\fBA_ATTRIBUTES\fR Bit-mask to extract attributes +\fBA_COLOR\fR Bit-mask to extract color-pair field information +.TE +.SH NOTES +Note that all of these routines may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_inchstr.3 b/lib/libncurses/man/curs_inchstr.3 new file mode 100644 index 0000000000..034cad2d61 --- /dev/null +++ b/lib/libncurses/man/curs_inchstr.3 @@ -0,0 +1,89 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inchstr.3x,v 1.8 2000/07/01 20:16:18 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_inchstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_inchstr 3X "" +.SH NAME +\fBinchstr\fR, +\fBinchnstr\fR, +\fBwinchstr\fR, +\fBwinchnstr\fR, +\fBmvinchstr\fR, +\fBmvinchnstr\fR, +\fBmvwinchstr\fR, +\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint inchstr(chtype *chstr);\fR +.br +\fBint inchnstr(chtype *chstr, int n);\fR +.br +\fBint winchstr(WINDOW *win, chtype *chstr);\fR +.br +\fBint winchnstr(WINDOW *win, chtype *chstr, int n);\fR +.br +\fBint mvinchstr(int y, int x, chtype *chstr);\fR +.br +\fBint mvinchnstr(int y, int x, chtype *chstr, int n);\fR +.br +\fBint mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);\fR +.br +\fBint mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR +.br +.SH DESCRIPTION +These routines return a NULL-terminated array of \fBchtype\fR quantities, +starting at the current cursor position in the named window and ending at the +right margin of the window. The four functions with \fIn\fR as +the last argument, return a leading substring at most \fIn\fR characters long +(exclusive of the trailing (chtype)0). +Constants defined in \fB\fR can be used with the \fB&\fR (logical +AND) operator to extract the character or the attribute alone from any position +in the \fIchstr\fR [see \fBcurs_inch\fR(3X)]. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR upon successful completion (the number of characters +retrieved, exclusive of the trailing 0). +.SH NOTES +Note that all routines except \fBwinchnstr\fR may be macros. SVr4 does not +document whether the result string is 0-terminated; it does not document +whether a length limit argument includes any trailing 0; and it does not +document the meaning of the return value. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. It is no +more specific than the SVr4 documentation on the trailing 0. It does specify +that the successful return of the functions is \fBOK\fR. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_inch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_initscr.3 b/lib/libncurses/man/curs_initscr.3 new file mode 100644 index 0000000000..6ba5483940 --- /dev/null +++ b/lib/libncurses/man/curs_initscr.3 @@ -0,0 +1,125 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_initscr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_initscr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_initscr 3X "" +.SH NAME +\fBinitscr\fR, +\fBnewterm\fR, +\fBendwin\fR, +\fBisendwin\fR, +\fBset_term\fR, +\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines +.SH SYNOPSIS +\fB#include \fR + +\fBWINDOW *initscr(void);\fR +.br +\fBint endwin(void);\fR +.br +\fBbool isendwin(void);\fR +.br +\fBSCREEN *newterm(char *type, FILE *outfd, FILE *infd);\fR +.br +\fBSCREEN *set_term(SCREEN *new);\fR +.br +\fBvoid delscreen(SCREEN* sp);\fR +.br +.SH DESCRIPTION +\fBinitscr\fR is normally the first \fBcurses\fR routine to call when +initializing a program. A few special routines sometimes need to be +called before it; these are \fBslk_init\fR, \fBfilter\fR, \fBripoffline\fR, +\fBuse_env\fR. For multiple-terminal applications, \fBnewterm\fR may be +called before \fBinitscr\fR. + +The initscr code determines the terminal type and initializes all \fBcurses\fR +data structures. \fBinitscr\fR also causes the first call to \fBrefresh\fR to +clear the screen. If errors occur, \fBinitscr\fR writes an appropriate error +message to standard error and exits; otherwise, a pointer is returned to +\fBstdscr\fR. + +A program that outputs to more than one terminal should use the \fBnewterm\fR +routine for each terminal instead of \fBinitscr\fR. A program that needs to +inspect capabilities, so it can continue to run in a line-oriented mode if the +terminal cannot support a screen-oriented program, would also use +\fBnewterm\fR. The routine \fBnewterm\fR should be called once for each +terminal. It returns a variable of type \fBSCREEN *\fR which should be saved +as a reference to that terminal. The arguments are the \fItype\fR of the +terminal to be used in place of \fB$TERM\fR, a file pointer for output to the +terminal, and another file pointer for input from the terminal (if \fItype\fR +is \fBNULL\fR, \fB$TERM\fR will be used). The program must also call +\fBendwin\fR for each terminal being used before exiting from \fBcurses\fR. +If \fBnewterm\fR is called more than once for the same terminal, the first +terminal referred to must be the last one for which \fBendwin\fR is called. + +A program should always call \fBendwin\fR before exiting or escaping from +\fBcurses\fR mode temporarily. This routine restores tty modes, moves the +cursor to the lower left-hand corner of the screen and resets the terminal into +the proper non-visual mode. Calling \fBrefresh\fR or \fBdoupdate\fR after a +temporary escape causes the program to resume visual mode. + +The \fBisendwin\fR routine returns \fBTRUE\fR if \fBendwin\fR has been +called without any subsequent calls to \fBwrefresh\fR, and \fBFALSE\fR +otherwise. + +The \fBset_term\fR routine is used to switch between different +terminals. The screen reference \fBnew\fR becomes the new current +terminal. The previous terminal is returned by the routine. This is +the only routine which manipulates \fBSCREEN\fR pointers; all other +routines affect only the current terminal. + +The \fBdelscreen\fR routine frees storage associated with the +\fBSCREEN\fR data structure. The \fBendwin\fR routine does not do +this, so \fBdelscreen\fR should be called after \fBendwin\fR if a +particular \fBSCREEN\fR is no longer needed. +.SH RETURN VALUE +\fBendwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR +upon successful completion. + +Routines that return pointers always return \fBNULL\fR on error. +.SH NOTES +Note that \fBinitscr\fR and \fBnewterm\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. It +specifies that portable applications must not call \fBinitscr\fR more than +once. + +Old versions of curses, e.g., BSD 4.4, may have returned a null pointer +from \fBinitscr\fR when an error is detected, rather than exiting. +It is safe but redundant to check the return value of \fBinitscr\fR +in XSI Curses. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_kernel\fR(3X), \fBcurs_refresh\fR(3X), +\fBcurs_slk\fR(3X), \fBcurs_util\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_inopts.3 b/lib/libncurses/man/curs_inopts.3 new file mode 100644 index 0000000000..fac9c46c88 --- /dev/null +++ b/lib/libncurses/man/curs_inopts.3 @@ -0,0 +1,215 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inopts.3x,v 1.11 2003/12/27 18:45:42 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_inopts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_inopts 3X "" +.SH NAME +\fBcbreak\fR, \fBnocbreak\fR, \fBecho\fR, +\fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR, \fBkeypad\fR, +\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBraw\fR, \fBnoraw\fR, +\fBnoqiflush\fR, \fBqiflush\fR, \fBtimeout\fR, \fBwtimeout\fR, +\fBtypeahead\fR - \fBcurses\fR input options +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint cbreak(void);\fR +.br +\fBint nocbreak(void);\fR +.br +\fBint echo(void);\fR +.br +\fBint noecho(void);\fR +.br +\fBint halfdelay(int tenths);\fR +.br +\fBint intrflush(WINDOW *win, bool bf);\fR +.br +\fBint keypad(WINDOW *win, bool bf);\fR +.br +\fBint meta(WINDOW *win, bool bf);\fR +.br +\fBint nodelay(WINDOW *win, bool bf);\fR +.br +\fBint raw(void);\fR +.br +\fBint noraw(void);\fR +.br +\fBvoid noqiflush(void);\fR +.br +\fBvoid qiflush(void);\fR +.br +\fBint notimeout(WINDOW *win, bool bf);\fR +.br +\fBvoid timeout(int delay);\fR +.br +\fBvoid wtimeout(WINDOW *win, int delay);\fR +.br +\fBint typeahead(int fd);\fR +.br +.SH DESCRIPTION +Normally, the tty driver buffers typed characters until a newline or carriage +return is typed. The \fBcbreak\fR routine disables line buffering and +erase/kill character-processing (interrupt and flow control characters are +unaffected), making characters typed by the user immediately available to the +program. The \fBnocbreak\fR routine returns the terminal to normal (cooked) +mode. +.PP +Initially the terminal may or may not be in \fBcbreak\fR mode, as the mode is +inherited; therefore, a program should call \fBcbreak\fR or \fBnocbreak\fR +explicitly. Most interactive programs using \fBcurses\fR set the \fBcbreak\fR +mode. Note that \fBcbreak\fR overrides \fBraw\fR. +[See \fBcurs_getch\fR(3X) for a +discussion of how these routines interact with \fBecho\fR and \fBnoecho\fR.] +.PP +The \fBecho\fR and \fBnoecho\fR routines control whether characters typed by +the user are echoed by \fBgetch\fR as they are typed. Echoing by the tty +driver is always disabled, but initially \fBgetch\fR is in echo mode, so +characters typed are echoed. Authors of most interactive programs prefer to do +their own echoing in a controlled area of the screen, or not to echo at all, so +they disable echoing by calling \fBnoecho\fR. +[See \fBcurs_getch\fR(3X) for a +discussion of how these routines interact with \fBcbreak\fR and +\fBnocbreak\fR.] +.PP +The \fBhalfdelay\fR routine is used for half-delay mode, which is similar to +\fBcbreak\fR mode in that characters typed by the user are immediately +available to the program. However, after blocking for \fItenths\fR tenths of +seconds, ERR is returned if nothing has been typed. The value of \fBtenths\fR +must be a number between 1 and 255. Use \fBnocbreak\fR to leave half-delay +mode. +.PP +If the \fBintrflush\fR option is enabled, (\fIbf\fR is \fBTRUE\fR), when an +interrupt key is pressed on the keyboard (interrupt, break, quit) all output in +the tty driver queue will be flushed, giving the effect of faster response to +the interrupt, but causing \fBcurses\fR to have the wrong idea of what is on +the screen. Disabling (\fIbf\fR is \fBFALSE\fR), the option prevents the +flush. The default for the option is inherited from the tty driver settings. +The window argument is ignored. +.PP +The \fBkeypad\fR option enables the keypad of the user's terminal. If +enabled (\fIbf\fR is \fBTRUE\fR), the user can press a function key +(such as an arrow key) and \fBwgetch\fR returns a single value +representing the function key, as in \fBKEY_LEFT\fR. If disabled +(\fIbf\fR is \fBFALSE\fR), \fBcurses\fR does not treat function keys +specially and the program has to interpret the escape sequences +itself. If the keypad in the terminal can be turned on (made to +transmit) and off (made to work locally), turning on this option +causes the terminal keypad to be turned on when \fBwgetch\fR is +called. The default value for keypad is false. +.PP +Initially, whether the terminal returns 7 or 8 significant bits on +input depends on the control mode of the tty driver [see termio(7)]. +To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR, +\fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag +on the terminal. To force 7 bits to be returned, invoke +\fBmeta\fR(\fIwin\fR, \fBFALSE\fR); this is equivalent, under POSIX, +to setting the CS7 flag on the terminal. The window argument, +\fIwin\fR, is always ignored. If the terminfo capabilities \fBsmm\fR +(meta_on) and \fBrmm\fR (meta_off) are defined for the terminal, +\fBsmm\fR is sent to the terminal when \fBmeta\fR(\fIwin\fR, +\fBTRUE\fR) is called and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR, +\fBFALSE\fR) is called. +.PP +The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call. +If no input is ready, \fBgetch\fR returns \fBERR\fR. If disabled +(\fIbf\fR is \fBFALSE\fR), \fBgetch\fR waits until a key is pressed. +.PP +While interpreting an input escape sequence, \fBwgetch\fR sets a timer +while waiting for the next character. If \fBnotimeout(\fR\fIwin\fR, +\fBTRUE\fR) is called, then \fBwgetch\fR does not set a timer. The +purpose of the timeout is to differentiate between sequences received +from a function key and those typed by a user. +.PP +The \fBraw\fR and \fBnoraw\fR routines place the terminal into or out of raw +mode. Raw mode is similar to \fBcbreak\fR mode, in that characters typed are +immediately passed through to the user program. The differences are that in +raw mode, the interrupt, quit, suspend, and flow control characters are all +passed through uninterpreted, instead of generating a signal. The behavior of +the BREAK key depends on other bits in the tty driver that are not set by +\fBcurses\fR. +.PP +When the \fBnoqiflush\fR routine is used, normal flush of input and +output queues associated with the \fBINTR\fR, \fBQUIT\fR and +\fBSUSP\fR characters will not be done [see termio(7)]. When +\fBqiflush\fR is called, the queues will be flushed when these control +characters are read. You may want to call \fBnoqiflush()\fR in a signal +handler if you want output to continue as though the interrupt +had not occurred, after the handler exits. +.PP +The \fBtimeout\fR and \fBwtimeout\fR routines set blocking or +non-blocking read for a given window. If \fIdelay\fR is negative, +blocking read is used (i.e., waits indefinitely for +input). If \fIdelay\fR is zero, then non-blocking read is used +(i.e., read returns \fBERR\fR if no input is waiting). If +\fIdelay\fR is positive, then read blocks for \fIdelay\fR +milliseconds, and returns \fBERR\fR if there is still no input. +Hence, these routines provide the same functionality as \fBnodelay\fR, +plus the additional capability of being able to block for only +\fIdelay\fR milliseconds (where \fIdelay\fR is positive). +.PP +The \fBcurses\fR library does ``line-breakout optimization'' by looking for +typeahead periodically while updating the screen. If input is found, +and it is coming from a tty, the current update is postponed until +\fBrefresh\fR or \fBdoupdate\fR is called again. This allows faster +response to commands typed in advance. Normally, the input FILE +pointer passed to \fBnewterm\fR, or \fBstdin\fR in the case that +\fBinitscr\fR was used, will be used to do this typeahead checking. +The \fBtypeahead\fR routine specifies that the file descriptor +\fIfd\fR is to be used to check for typeahead instead. If \fIfd\fR is +-1, then no typeahead checking is done. +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and OK (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion, unless otherwise noted in the preceding routine descriptions. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.PP +The ncurses library obeys the XPG4 standard and the historical practice of the +AT&T curses implementations, in that the echo bit is cleared when curses +initializes the terminal state. BSD curses differed from this slightly; it +left the echo bit on at initialization, but the BSD \fBraw\fR call turned it +off as a side-effect. For best portability, set echo or noecho explicitly +just after initialization, even if your program remains in cooked mode. +.SH NOTES +Note that \fBecho\fR, \fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR, +\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBnoqiflush\fR, +\fBqiflush\fR, \fBtimeout\fR, and \fBwtimeout\fR may be macros. +.PP +The \fBnoraw\fR and \fBnocbreak\fR calls follow historical practice in that +they attempt to restore to normal (`cooked') mode from raw and cbreak modes +respectively. Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver +control states that are hard to predict or understand; it is not recommended. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_getch\fR(3X), \fBcurs_initscr\fR(3X), \fBtermio\fR(7) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_ins_wch.3 b/lib/libncurses/man/curs_ins_wch.3 new file mode 100644 index 0000000000..29213faf4f --- /dev/null +++ b/lib/libncurses/man/curs_ins_wch.3 @@ -0,0 +1,66 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_ins_wch.3x,v 1.2 2002/03/10 23:43:27 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_ins_wch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_ins_wch 3X "" +.SH NAME +\fBins_wch\fR, +\fBmvins_wch\fR, +\fBmvwins_wch\fR, +\fBwins_wch\fR \- insert a complex character and rendition into a window +.SH SYNOPSIS +#include + +\fBint ins_wch(const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wins_wch(WINDOW *\fR\fIwin, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvins_wch(int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvwins_wch(WINDOW *\fR\fIwin, int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR +.SH DESCRIPTION +These routines, insert the complex character \fIwch\fR with rendition +before the character under the cursor. +All characters to the right of the cursor are moved one space to the right, +with the possibility of the rightmost character on the line being lost. +The insertion operation does not change the cursor position. +.SH RETURN VALUE +If successful, these functions return OK. +If not, they return ERR. +.SH ERRORS +No errors are defined. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_insch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_ins_wstr.3 b/lib/libncurses/man/curs_ins_wstr.3 new file mode 100644 index 0000000000..a62b4f71d9 --- /dev/null +++ b/lib/libncurses/man/curs_ins_wstr.3 @@ -0,0 +1,105 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_ins_wstr.3x,v 1.2 2002/03/10 23:43:27 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_ins_wstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_ins_wstr 3X "" +.SH NAME +\fBins_wstr\fR, +\fBins_nwstr\fR, +\fBwins_wstr\fR, +\fBwins_nwstr\fR, +\fBmvins_wstr\fR, +\fBmvins_nwstr\fR, +\fBmvwins_wstr\fR, +\fBmvwins_nwstr\fR \- insert a wide-character string into a curses window +.SH SYNOPSIS +.nf +\fB#include \fR + +\fBint ins_wstr(const wchar_t *\fR\fIwstr);\fR +.br +\fBint ins_nwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wins_wstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint wins_nwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvins_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvins_nwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwins_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwins_nwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines insert a \fBwchar_t\fR character string +(as many characters as will fit on the line) +before the character under the cursor. +All characters to the right of the cursor are shifted right, +with the possibility of the rightmost characters on the line being lost. +No wrapping is performed. +The cursor position does not change +(after moving to \fIy\fR, \fIx\fR, if specified). +The four routines with \fIn\fR as the last argument +insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters. +If \fIn\fR is less than 1, the entire string is inserted. + +If a character in \fIwstr\fR is a tab, newline, carriage return or +backspace, the cursor is moved appropriately within the window. +A newline also does a \fBclrtoeol\fR before moving. +Tabs are considered to be at every eighth column. +If a character in \fIwstr\fR is another control character, +it is drawn in the \fB^\fR\fIX\fR notation. +Calling \fBwin_wch\fR after adding a control character +(and moving to it, if necessary) +does not return the control character, +but instead returns a character in the ^-representation +of the control character. +.SH NOTES +Note that all but wins_nwstr may be macros. + +If the first character in the string is a nonspacing character, these +functions will fail. +XSI does not define what will happen if a nonspacing character follows +a control character. +.SH RETURN VALUES +Upon successful completion, these functions return OK. +Otherwise, they return ERR. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_insstr\fR(3X), +\fBcurs_in_wch\fR(3X), +\fBcurs_ins_wch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_insch.3 b/lib/libncurses/man/curs_insch.3 new file mode 100644 index 0000000000..741d0bb051 --- /dev/null +++ b/lib/libncurses/man/curs_insch.3 @@ -0,0 +1,71 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_insch.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_insch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_insch 3X "" +.SH NAME +\fBinsch\fR, +\fBwinsch\fR, +\fBmvinsch\fR, +\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint insch(chtype ch);\fR +.br +\fBint winsch(WINDOW *win, chtype ch);\fR +.br +\fBint mvinsch(int y, int x, chtype ch);\fR +.br +\fBint mvwinsch(WINDOW *win, int y, int x, chtype ch);\fR +.br +.SH DESCRIPTION +These routines insert the character \fIch\fR before the character under the +cursor. All characters to the right of the cursor are moved one space to the +right, with the possibility of the rightmost character on the line being lost. +The insertion operation does not change the cursor position. +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and OK (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion, unless otherwise noted in the preceding routine descriptions. +.SH NOTES +These routines do not necessarily imply use of a hardware insert character +feature. + +Note that \fBinsch\fR, \fBmvinsch\fR, and \fBmvwinsch\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_insstr.3 b/lib/libncurses/man/curs_insstr.3 new file mode 100644 index 0000000000..faee5bba41 --- /dev/null +++ b/lib/libncurses/man/curs_insstr.3 @@ -0,0 +1,96 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_insstr.3x,v 1.12 2001/11/03 19:59:03 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_insstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_insstr 3X "" +.SH NAME +\fBinsstr\fR, +\fBinsnstr\fR, +\fBwinsstr\fR, +\fBwinsnstr\fR, +\fBmvinsstr\fR, +\fBmvinsnstr\fR, +\fBmvwinsstr\fR, +\fBmvwinsnstr\fR - insert string before cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.br +\fBint insstr(const char *str);\fR +.br +\fBint insnstr(const char *str, int n);\fR +.br +\fBint winsstr(WINDOW *win, const char *str);\fR +.br +\fBint winsnstr(WINDOW *win, const char *str, int n);\fR +.br +\fBint mvinsstr(int y, int x, const char *str);\fR +.br +\fBint mvinsnstr(int y, int x, const char *str, int n);\fR +.br +\fBint mvwinsstr(WINDOW *win, int y, int x, const char *str);\fR +.br +\fBint mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);\fR +.br +.SH DESCRIPTION +These routines insert a character string (as many characters as will fit on the +line) before the character under the cursor. All characters to the right of +the cursor are shifted right, with the possibility of the rightmost characters +on the line being lost. The cursor position does not change (after moving to +\fIy\fR, \fIx\fR, if specified). The four routines with \fIn\fR as the last +argument insert a leading substring of at most \fIn\fR characters. If +\fIn\fR<=0, then the entire string is inserted. + +If a character in \fIstr\fR is a tab, newline, carriage return or +backspace, the cursor is moved appropriately within the window. A +newline also does a \fBclrtoeol\fR before moving. Tabs are considered +to be at every eighth column. If a character in \fIstr\fR is another +control character, it is drawn in the \fB^\fR\fIX\fR notation. +Calling \fBwinch\fR after adding a control character (and moving to +it, if necessary) does not return the control character, but instead +returns a character in the ^-representation of the control character. +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and OK (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion, unless otherwise noted in the preceding routine descriptions. +.SH NOTES +Note that all but \fBwinsnstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4, which adds +const qualifiers to the arguments. The XSI Curses error conditions +\fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with extended-level conformance +are not yet detected (this implementation does not yet support XPG4 multibyte +characters). +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_clear\fR(3X), \fBcurs_inch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_instr.3 b/lib/libncurses/man/curs_instr.3 new file mode 100644 index 0000000000..7593380957 --- /dev/null +++ b/lib/libncurses/man/curs_instr.3 @@ -0,0 +1,90 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_instr.3x,v 1.10 2001/11/03 19:58:56 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_instr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_instr 3X "" +.SH NAME +\fBinstr\fR, +\fBinnstr\fR, +\fBwinstr\fR, +\fBwinnstr\fR, +\fBmvinstr\fR, +\fBmvinnstr\fR, +\fBmvwinstr\fR, +\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint instr(char *str);\fR +.br +\fBint innstr(char *str, int n);\fR +.br +\fBint winstr(WINDOW *win, char *str);\fR +.br +\fBint winnstr(WINDOW *win, char *str, int n);\fR +.br +\fBint mvinstr(int y, int x, char *str);\fR +.br +\fBint mvinnstr(int y, int x, char *str, int n);\fR +.br +\fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR +.br +\fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR +.br +.SH DESCRIPTION +These routines return a string of characters in \fIstr\fR, extracted starting +at the current cursor position in the named window. +Attributes are stripped from the characters. The four +functions with \fIn\fR as the last argument return a leading substring at most +\fIn\fR characters long (exclusive of the trailing NUL). +.SH RETURN VALUE +All of the functions return \fBERR\fR upon failure, +or the number of characters actually read into the string. +.SH NOTES +Note that all routines except \fBwinnstr\fR may be macros. +.SH PORTABILITY +The XSI Curses +error conditions \fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with +extended-level conformance are not yet detected (this implementation does not +yet support XPG4 multibyte characters). +SVr4 does not +document whether a length limit includes or excludes the trailing NUL. +.PP +The ncurses library extends the XSI description by allowing a negative +value for \fIn\fR. +In this case, the functions return the string ending at the right margin. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: + diff --git a/lib/libncurses/man/curs_inwstr.3 b/lib/libncurses/man/curs_inwstr.3 new file mode 100644 index 0000000000..5b0d5beb5e --- /dev/null +++ b/lib/libncurses/man/curs_inwstr.3 @@ -0,0 +1,96 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inwstr.3x,v 1.2 2002/04/13 20:25:35 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_inwstr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_inwstr 3 "" +.SH NAME +.PP +\fBinwstr\fR, +\fBinnwstr\fR, +\fBwinwstr\fR, +\fBwinnwstr\fR, +\fBmvinwstr\fR, +\fBmvinnwstr\fR, +\fBmvwinwstr\fR, +\fBmvwinnwstr\fR \- get a string of \fBwchar_t\fR characters from a curses window +.SH SYNOPSIS +.nf +\fB#include \fR + +\fBint inwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB);\fR +.br +\fBint innwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR +.br +\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR +.br +\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR +.br +\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines return a string of \fBwchar_t\fR characters in \fIwstr\fR, +extracted starting at the current cursor position in the named window. +Attributes are stripped from the characters. +The four functions with \fIn\fR as the last argument return a leading substring at most +\fIn\fR bytes long (exclusive of the trailing NUL). +Transfer stops at the end of the current line, or when \fIn\fR bytes have +been stored at the location referenced by \fIwstr\fR. +.PP +If the size \fIn\fR is not large enough to store a complete character, +an error is generated. +.SH NOTES +Note that all routines except +\fBwinnwstr\fR +may be macros. +.SH RETURN VALUES +All routines return +\fBERR\fR +upon failure. Upon +successful completion, the *\fBinwstr\fR +routines return +\fBOK\fR, and the *\fBinnwstr\fR +routines return the +number of characters read into the string. +.SH SEE ALSO +Functions: +\fBcurses\fR(3X), +\fBcurs_instr\fR(3X), +\fBcurs_in_wchstr\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_kernel.3 b/lib/libncurses/man/curs_kernel.3 new file mode 100644 index 0000000000..192b301184 --- /dev/null +++ b/lib/libncurses/man/curs_kernel.3 @@ -0,0 +1,160 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_kernel.3x,v 1.13 2001/12/08 18:01:25 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_kernel.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_kernel 3X "" +.SH NAME +\fBdef_prog_mode\fR, \fBdef_shell_mode\fR, +\fBreset_prog_mode\fR, \fBreset_shell_mode\fR, \fBresetty\fR, +\fBsavetty\fR, \fBgetsyx\fR, \fBsetsyx\fR, \fBripoffline\fR, +\fBcurs_set\fR, \fBnapms\fR - low-level \fBcurses\fR routines +.SH SYNOPSIS +\fB#include \fR + +\fBint def_prog_mode(void);\fR +.br +\fBint def_shell_mode(void);\fR +.br +\fBint reset_prog_mode(void);\fR +.br +\fBint reset_shell_mode(void);\fR +.br +\fBint resetty(void);\fR +.br +\fBint savetty(void);\fR +.br +\fBvoid getsyx(int y, int x);\fR +.br +\fBvoid setsyx(int y, int x);\fR +.br +\fBint ripoffline(int line, int (*init)(WINDOW *, int));\fR +.br +\fBint curs_set(int visibility);\fR +.br +\fBint napms(int ms);\fR +.br +.SH DESCRIPTION +The following routines give low-level access to various \fBcurses\fR +capabilities. Theses routines typically are used inside library +routines. + +The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the +current terminal modes as the "program" (in \fBcurses\fR) or "shell" +(not in \fBcurses\fR) state for use by the \fBreset_prog_mode\fR and +\fBreset_shell_mode\fR routines. This is done automatically by +\fBinitscr\fR. There is one such save area for each screen context +allocated by \fBnewterm()\fR. + +The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore +the terminal to "program" (in \fBcurses\fR) or "shell" (out of +\fBcurses\fR) state. These are done automatically by \fBendwin\fR +and, after an \fBendwin\fR, by \fBdoupdate\fR, so they normally are +not called. + +The \fBresetty\fR and \fBsavetty\fR routines save and restore the +state of the terminal modes. \fBsavetty\fR saves the current state in +a buffer and \fBresetty\fR restores the state to what it was at the +last call to \fBsavetty\fR. + +The \fBgetsyx\fR routine returns the current coordinates of the virtual screen +cursor in \fIy\fR and \fIx\fR. If \fBleaveok\fR is currently \fBTRUE\fR, then +\fB-1\fR,\fB-1\fR is returned. If lines have been removed from the top of the +screen, using \fBripoffline\fR, \fIy\fR and \fIx\fR include these lines; +therefore, \fIy\fR and \fIx\fR should be used only as arguments for +\fBsetsyx\fR. + +The \fBsetsyx\fR routine sets the virtual screen cursor to +\fIy\fR, \fIx\fR. If \fIy\fR and \fIx\fR are both \fB-1\fR, then +\fBleaveok\fR is set. The two routines \fBgetsyx\fR and \fBsetsyx\fR +are designed to be used by a library routine, which manipulates +\fBcurses\fR windows but does not want to change the current position +of the program's cursor. The library routine would call \fBgetsyx\fR +at the beginning, do its manipulation of its own windows, do a +\fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call +\fBdoupdate\fR. + +The \fBripoffline\fR routine provides access to the same facility that +\fBslk_init\fR [see \fBcurs_slk\fR(3X)] uses to reduce the size of the +screen. \fBripoffline\fR must be called before \fBinitscr\fR or +\fBnewterm\fR is called. If \fIline\fR is positive, a line is removed +from the top of \fBstdscr\fR; if \fIline\fR is negative, a line is +removed from the bottom. When this is done inside \fBinitscr\fR, the +routine \fBinit\fR (supplied by the user) is called with two +arguments: a window pointer to the one-line window that has been +allocated and an integer with the number of columns in the window. +Inside this initialization routine, the integer variables \fBLINES\fR +and \fBCOLS\fR (defined in \fB\fR) are not guaranteed to be +accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called. It +is allowable to call \fBwnoutrefresh\fR during the initialization +routine. + +\fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or +\fBnewterm\fR. + +The \fBcurs_set\fR routine sets the cursor state is set to invisible, +normal, or very visible for \fBvisibility\fR equal to \fB0\fR, +\fB1\fR, or \fB2\fR respectively. If the terminal supports the +\fIvisibility\fR requested, the previous \fIcursor\fR state is +returned; otherwise, \fBERR\fR is returned. + +The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds. +.SH RETURN VALUE +Except for \fBcurs_set\fR, these routines always return \fBOK\fR. +\fBcurs_set\fR returns the previous cursor state, or \fBERR\fR if the +requested \fIvisibility\fR is not supported. +.SH NOTES +Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before +the variables \fIy\fR and \fIx\fR. + +Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently +incorrect". This implementation gets it right, but it may be unwise to count +on the correctness of the return value anywhere else. + +Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR +if \fBcurs_set\fR +has been called to make the cursor other than normal, i.e., either +invisible or very visible. +There is no way for ncurses to determine the initial cursor state to +restore that. +.SH PORTABILITY +The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI +Curses standard, Issue 4. All other functions are as described in XSI Curses. + +The SVr4 documentation describes \fBsetsyx\fR and \fBgetsyx\fR as having return +type int. This is misleading, as they are macros with no documented semantics +for the return value. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X), +\fBcurs_scr_dump\fR(3X), \fBcurs_slk\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_mouse.3 b/lib/libncurses/man/curs_mouse.3 new file mode 100644 index 0000000000..46836dbd96 --- /dev/null +++ b/lib/libncurses/man/curs_mouse.3 @@ -0,0 +1,255 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_mouse.3x,v 1.24 2003/12/27 18:47:54 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_mouse.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_mouse 3X "" +.SH NAME +\fBgetmouse\fR, \fBungetmouse\fR, +\fBmousemask\fR, \fBwenclose\fR, +\fBmouse_trafo\fR, \fBwmouse_trafo\fR, +\fBmouseinterval\fR - mouse interface through curses +.SH SYNOPSIS +.nf +\fB#include +.PP +\fBtypedef unsigned long mmask_t; +.PP +typedef struct +{ + short id; \fI/* ID to distinguish multiple devices */\fB + int x, y, z; \fI/* event coordinates */\fB + mmask_t bstate; \fI/* button state bits */\fB +} +MEVENT;\fR +.fi +.br +\fBint getmouse(MEVENT *event);\fR +.br +\fBint ungetmouse(MEVENT *event);\fR +.br +\fBmmask_t mousemask(mmask_t newmask, mmask_t *oldmask);\fR +.br +\fBbool wenclose(const WINDOW *win, int y, int x);\fR +.br +\fBbool mouse_trafo(int* pY, int* pX, bool to_screen);\fR +.br +\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX,\fR +.br + \fBbool to_screen);\fR +.br +\fBint mouseinterval(int erval);\fR +.br +.SH DESCRIPTION +These functions provide an interface to mouse events from +\fBncurses\fR(3X). +Mouse events are represented by \fBKEY_MOUSE\fR +pseudo-key values in the \fBwgetch\fR input stream. +.PP +To make mouse events visible, use the \fBmousemask\fR function. +This will set +the mouse events to be reported. +By default, no mouse events are reported. +The function will return a mask to indicate which of the specified mouse events +can be reported; on complete failure it returns 0. +If oldmask is non-NULL, +this function fills the indicated location with the previous value of the given +window's mouse event mask. +.PP +As a side effect, setting a zero mousemask may turn off the mouse pointer; +setting a nonzero mask may turn it on. +Whether this happens is device-dependent. +.PP +Here are the mouse event type masks: +.PP +.TS +l l +_ _ +l l. +\fIName\fR \fIDescription\fR +BUTTON1_PRESSED mouse button 1 down +BUTTON1_RELEASED mouse button 1 up +BUTTON1_CLICKED mouse button 1 clicked +BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked +BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked +BUTTON2_PRESSED mouse button 2 down +BUTTON2_RELEASED mouse button 2 up +BUTTON2_CLICKED mouse button 2 clicked +BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked +BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked +BUTTON3_PRESSED mouse button 3 down +BUTTON3_RELEASED mouse button 3 up +BUTTON3_CLICKED mouse button 3 clicked +BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked +BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked +BUTTON4_PRESSED mouse button 4 down +BUTTON4_RELEASED mouse button 4 up +BUTTON4_CLICKED mouse button 4 clicked +BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked +BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked +BUTTON_SHIFT shift was down during button state change +BUTTON_CTRL control was down during button state change +BUTTON_ALT alt was down during button state change +ALL_MOUSE_EVENTS report all button state changes +REPORT_MOUSE_POSITION report mouse movement +.TE +.PP +Once a class of mouse events have been made visible in a window, +calling the \fBwgetch\fR function on that window may return +\fBKEY_MOUSE\fR as an indicator that a mouse event has been queued. +To read the event data and pop the event off the queue, call +\fBgetmouse\fR. +This function will return \fBOK\fR if a mouse event +is actually visible in the given window, \fBERR\fR otherwise. +When \fBgetmouse\fR returns \fBOK\fR, the data deposited as y and +x in the event structure coordinates will be screen-relative character-cell +coordinates. +The returned state mask will have exactly one bit set to +indicate the event type. +.PP +The \fBungetmouse\fR function behaves analogously to \fBungetch\fR. +It pushes +a \fBKEY_MOUSE\fR event onto the input queue, and associates with that event +the given state data and screen-relative character-cell coordinates. +.PP +The \fBwenclose\fR function tests whether a given pair of screen-relative +character-cell coordinates is enclosed by a given window, returning TRUE +if it is and FALSE otherwise. +It is useful for determining what subset of +the screen windows enclose the location of a mouse event. +.PP +The \fBwmouse_trafo\fR function transforms a given pair of coordinates from +stdscr-relative coordinates to screen-relative coordinates or vice versa. +Please remember, that stdscr-relative coordinates are not always identical +to screen-relative coordinates due to the mechanism to reserve lines on top +or bottom of the screen for other purposes (ripoff() call, see also slk_... +functions). +If the parameter \fBto_screen\fR is \fBTRUE\fR, the pointers +\fBpY, pX\fR must reference the coordinates of a location inside the window +\fBwin\fR. +They are converted to screen-relative coordinates and returned +through the pointers. +If the conversion was successful, the function returns \fBTRUE\fR. +If one of the parameters was NULL or the location is +not inside the window, \fBFALSE\fR is returned. +If \fBto_screen\fR is +\fBFALSE\fR, the pointers \fBpY, pX\fR must reference screen-relative +coordinates. +They are converted to stdscr-relative coordinates if the +window \fBwin\fR encloses this point. +In this case the function returns \fBTRUE\fR. +If one of the parameters is NULL or the point is not inside the +window, \fBFALSE\fR is returned. +Please notice, that the referenced coordinates +are only replaced by the converted coordinates if the transformation was +successful. +.PP +The \fBmouseinterval\fR function sets the maximum time (in thousands of a +second) that can elapse between press and release events for them to +be recognized as a click. +Use \fBmouseinterval(-1)\fR to disable click resolution. +This function returns the previous interval value. +The default is one sixth of a second. +.PP +Note that mouse events will be ignored when input is in cooked mode, and will +cause an error beep when cooked mode is being simulated in a window by a +function such as \fBgetstr\fR that expects a linefeed for input-loop +termination. +.SH RETURN VALUE +\fBgetmouse\fR, \fBungetmouse\fR and \fBmouseinterval\fR +return the integer \fBERR\fR upon failure or \fBOK\fR +upon successful completion. +\fBmousemask\fR returns the +mask of reportable events. +\fBwenclose\fR and \fBwmouse_trafo\fR +are boolean functions returning \fBTRUE\fR or \fBFALSE\fR depending +on their test result. +.SH PORTABILITY +These calls were designed for \fBncurses\fR(3X), and are not found in SVr4 +curses, 4.4BSD curses, or any other previous version of curses. +.PP +The feature macro \fBNCURSES_MOUSE_VERSION\fR is provided so the preprocessor +can be used to test whether these features are present (its value is 1). +If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fR will be +incremented. +.PP +The order of the \fBMEVENT\fR structure members is not guaranteed. +Additional fields may be added to the structure in the future. +.PP +Under \fBncurses\fR(3X), these calls are implemented using either +xterm's built-in mouse-tracking API or +platform-specific drivers including +.RS +Alessandro Rubini's gpm server. +.br +FreeBSD sysmouse +.br +OS/2 EMX +.RE +If you are using an unsupported configuration, +mouse events will not be visible to +\fBncurses\fR(3X) (and the \fBwmousemask\fR function will always +return \fB0\fR). +.PP +If the terminfo entry contains a \fBXM\fR string, +this is used in the xterm mouse driver to control the +way the terminal is initialized for mouse operation. +The default, if \fBXM\fR is not found, +corresponds to private mode 1000 of xterm: +.RS +\\E[?1000%?%p1%{1}%=%th%el%; +.RE +The z member in the event structure is not presently used. +It is intended +for use with touch screens (which may be pressure-sensitive) or with +3D-mice/trackballs/power gloves. +.SH BUGS +Mouse events under xterm will not in fact be ignored during cooked mode, +if they have been enabled by \fBwmousemask\fR. +Instead, the xterm mouse +report sequence will appear in the string read. +.PP +Mouse events under xterm will not be detected correctly in a window with +its keypad bit off, since they are interpreted as a variety of function key. +Your terminfo description must have \fBkmous\fR set to "\\E[M" (the beginning +of the response from xterm for mouse clicks). +.PP +Because there are no standard terminal responses that would serve to identify +terminals which support the xterm mouse protocol, \fBncurses\fR assumes that +if your $TERM environment variable contains "xterm", +or \fBkmous\fR is defined in +the terminal description, then the terminal may send mouse events. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_move.3 b/lib/libncurses/man/curs_move.3 new file mode 100644 index 0000000000..55341ee0ff --- /dev/null +++ b/lib/libncurses/man/curs_move.3 @@ -0,0 +1,64 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_move.3x,v 1.7 2001/11/03 19:58:47 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_move.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_move 3X "" +.SH NAME +\fBmove\fR, \fBwmove\fR - move \fBcurses\fR window cursor +.SH SYNOPSIS +\fB#include \fR + +\fBint move(int y, int x);\fR +.br +\fBint wmove(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines move the cursor associated with the window to line \fIy\fR and +column \fIx\fR. This routine does not move the physical cursor of the terminal +until \fBrefresh\fR is called. The position specified is relative to the upper +left-hand corner of the window, which is (0,0). +.SH RETURN VALUE +These routines return \fBERR\fR upon failure and OK (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBmove\fR may be a macro. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that if (y,x) is within a multi-column character, the cursor +is moved to the first column of that character; however, this implementation +does not yet support the extended-level XSI multibyte characters. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_refresh\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_outopts.3 b/lib/libncurses/man/curs_outopts.3 new file mode 100644 index 0000000000..7e8f3e08ad --- /dev/null +++ b/lib/libncurses/man/curs_outopts.3 @@ -0,0 +1,194 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_outopts.3x,v 1.18 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_outopts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_outopts 3X "" +.SH NAME +\fBclearok\fR, \fBidlok\fR, \fBidcok\fR, \fBimmedok\fR, +\fBleaveok\fR, \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBscrollok\fR, +\fBnl\fR, \fBnonl\fR - \fBcurses\fR output options +.SH SYNOPSIS +\fB#include \fR + +\fBint clearok(WINDOW *win, bool bf);\fR +.br +\fBint idlok(WINDOW *win, bool bf);\fR +.br +\fBvoid idcok(WINDOW *win, bool bf);\fR +.br +\fBvoid immedok(WINDOW *win, bool bf);\fR +.br +\fBint leaveok(WINDOW *win, bool bf);\fR +.br +\fBint setscrreg(int top, int bot);\fR +.br +\fBint wsetscrreg(WINDOW *win, int top, int bot);\fR +.br +\fBint scrollok(WINDOW *win, bool bf);\fR +.br +\fBint nl(void);\fR +.br +\fBint nonl(void);\fR +.br +.SH DESCRIPTION +These routines set options that change the style of output within +\fBcurses\fR. +All options are initially \fBFALSE\fR, unless otherwise stated. +It is not necessary to turn these options off before calling \fBendwin\fR. + +If \fBclearok\fR is called with \fBTRUE\fR as argument, the next +call to \fBwrefresh\fR with this window will clear the screen completely and +redraw the entire screen from scratch. +This is useful when the contents of the +screen are uncertain, or in some cases for a more pleasing visual effect. +If +the \fIwin\fR argument to \fBclearok\fR is the global variable \fBcurscr\fR, +the next call to \fBwrefresh\fR with any window causes the screen to be cleared +and repainted from scratch. + +If \fBidlok\fR is called with \fBTRUE\fR as second argument, \fBcurses\fR +considers using the hardware insert/delete line feature of terminals so +equipped. +Calling \fBidlok\fR with \fBFALSE\fR as second argument disables use +of line insertion and deletion. +This option should be enabled only if the +application needs insert/delete line, for example, for a screen editor. +It is +disabled by default because insert/delete line tends to be visually annoying +when used in applications where it isn't really needed. +If insert/delete line +cannot be used, \fBcurses\fR redraws the changed portions of all lines. + +If \fBidcok\fR is called with \fBFALSE\fR as second argument, \fBcurses\fR +no longer considers using the hardware insert/delete character feature of +terminals so equipped. +Use of character insert/delete is enabled by default. +Calling \fBidcok\fR with \fBTRUE\fR as second argument re-enables use +of character insertion and deletion. + +If \fBimmedok\fR is called with \fBTRUE as argument\fR, any change +in the window image, such as the ones caused by \fBwaddch, wclrtobot, wscrl\fR, +etc., automatically cause a call to \fBwrefresh\fR. +However, it may +degrade performance considerably, due to repeated calls to \fBwrefresh\fR. +It is disabled by default. + +Normally, the hardware cursor is left at the location of the window cursor +being refreshed. +The \fBleaveok\fR option allows the cursor to be left +wherever the update happens to leave it. +It is useful for applications where +the cursor is not used, since it reduces the need for cursor motions. + +The \fBsetscrreg\fR and \fBwsetscrreg\fR routines allow the application +programmer to set a software scrolling region in a window. +\fItop\fR and +\fIbot\fR are the line numbers of the top and bottom margin of the scrolling +region. +(Line 0 is the top line of the window.) If this option and +\fBscrollok\fR are enabled, an attempt to move off the bottom margin line +causes all lines in the scrolling region to scroll one line in the direction +of the first line. +Only the text of the window is scrolled. +(Note that this +has nothing to do with the use of a physical scrolling region capability in the +terminal, like that in the VT100. +If \fBidlok\fR is enabled and the terminal +has either a scrolling region or insert/delete line capability, they will +probably be used by the output routines.) + +The \fBscrollok\fR option controls what happens when the cursor of a window is +moved off the edge of the window or scrolling region, either as a result of a +newline action on the bottom line, or typing the last character of the last +line. +If disabled, (\fIbf\fR is \fBFALSE\fR), the cursor is left on the bottom +line. +If enabled, (\fIbf\fR is \fBTRUE\fR), the window is scrolled up one line +(Note that to get the physical scrolling effect on the terminal, it is +also necessary to call \fBidlok\fR). + +The \fBnl\fR and \fBnonl\fR routines control whether the underlying display +device translates the return key into newline on input, and whether it +translates newline into return and line-feed on output (in either case, the +call \fBaddch('\\n')\fR does the equivalent of return and line feed on the +virtual screen). +Initially, these translations do occur. +If you disable them +using \fBnonl\fR, \fBcurses\fR will be able to make better use of the line-feed +capability, resulting in faster cursor motion. +Also, \fBcurses\fR will then be +able to detect the return key. +.SH RETURN VALUE +The functions \fBsetscrreg\fR and \fBwsetscrreg\fR return \fBOK\fR upon success +and \fBERR\fR upon failure. +All other routines that return an integer always +return \fBOK\fR. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. + +The XSI Curses standard is ambiguous on the question of whether \fBraw\fR() +should disable the CRLF translations controlled by \fBnl\fR() and \fBnonl\fR(). +BSD curses did turn off these translations; AT&T curses (at least as late as +SVr1) did not. +We choose to do so, on the theory that a programmer requesting +raw input wants a clean (ideally 8-bit clean) connection that the operating +system does not mess with. + +Some historic curses implementations had, as an undocumented feature, the +ability to do the equivalent of \fBclearok(..., 1)\fR by saying +\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. +This will not work under +ncurses. + +Earlier System V curses implementations specified that with \fBscrollok\fR +enabled, any window modification triggering a scroll also forced a physical +refresh. +XSI Curses does not require this, and \fBncurses\fR avoids doing +it to perform better vertical-motion optimization at \fBwrefresh\fR +time. + +The XSI Curses standard does not mention that the cursor should be +made invisible as a side-effect of \fBleaveok\fR. +SVr4 curses documentation does this, but the code does not. +Use \fBcurs_set\fR to make the cursor invisible. +.SH NOTES +Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR, +\fBnonl\fR and \fBsetscrreg\fR may be macros. + +The \fBimmedok\fR routine is useful for windows that are used as terminal +emulators. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_addch\fR(3X), \fBcurs_clear\fR(3X), +\fBcurs_initscr\fR(3X), \fBcurs_scroll\fR(3X), \fBcurs_refresh\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_overlay.3 b/lib/libncurses/man/curs_overlay.3 new file mode 100644 index 0000000000..4bfde21a70 --- /dev/null +++ b/lib/libncurses/man/curs_overlay.3 @@ -0,0 +1,77 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_overlay.3x,v 1.11 2002/07/20 14:53:00 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_overlay.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_overlay 3X "" +.SH NAME +\fBoverlay\fR, +\fBoverwrite\fR, +\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows +.SH SYNOPSIS +\fB#include \fR + +\fBint overlay(const WINDOW *srcwin, WINDOW *dstwin);\fR +.br +\fBint overwrite(const WINDOW *srcwin, WINDOW *dstwin);\fR +.br +\fBint copywin(const WINDOW *srcwin, WINDOW *dstwin, int sminrow,\fR + \fBint smincol, int dminrow, int dmincol, int dmaxrow,\fR + \fBint dmaxcol, int overlay);\fR +.SH DESCRIPTION +The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on +top of \fIdstwin\fR. \fIscrwin\fR and \fIdstwin\fR are not required +to be the same size; only text where the two windows overlap is +copied. The difference is that \fBoverlay\fR is non-destructive +(blanks are not copied) whereas \fBoverwrite\fR is destructive. + +The \fBcopywin\fR routine provides a finer granularity of control over the +\fBoverlay\fR and \fBoverwrite\fR routines. Like in the \fBprefresh\fR +routine, a rectangle is specified in the destination window, (\fIdminrow\fR, +\fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner +coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR). If the +argument \fIoverlay\fR is \fBtrue\fR, then copying is non-destructive, as in +\fBoverlay\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBoverlay\fR and \fBoverwrite\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions (adding the const +qualifiers). It further specifies their behavior in the presence of characters +with multibyte renditions (not yet supported in this implementation). +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_pad\fR(3X), \fBcurs_refresh\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_pad.3 b/lib/libncurses/man/curs_pad.3 new file mode 100644 index 0000000000..34e5a4e68a --- /dev/null +++ b/lib/libncurses/man/curs_pad.3 @@ -0,0 +1,134 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_pad.3x,v 1.12 2004/01/04 01:36:49 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_pad.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_pad 3X "" +.SH NAME +\fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR, +\fBpnoutrefresh\fR, +\fBpechochar\fR, \fBpecho_wchar\fR - create and display \fBcurses\fR pads +.SH SYNOPSIS +\fB#include \fR +.sp +\fBWINDOW *newpad(int nlines, int ncols);\fR +.br +\fBWINDOW *subpad(WINDOW *orig, int nlines, int ncols,\fR + \fBint begin_y, int begin_x);\fR +.br +\fBint prefresh(WINDOW *pad, int pminrow, int pmincol,\fR + \fBint sminrow, int smincol, int smaxrow, int smaxcol);\fR +.br +\fBint pnoutrefresh(WINDOW *pad, int pminrow, int pmincol,\fR + \fBint sminrow, int smincol, int smaxrow, int smaxcol);\fR +.br +\fBint pechochar(WINDOW *pad, chtype ch);\fR +.br +\fBint pecho_wchar(WINDOW *pad, const cchar_t *wch);\fR +.SH DESCRIPTION +The \fBnewpad\fR routine creates and returns a pointer to a new pad data +structure with the given number of lines, \fInlines\fR, and columns, +\fIncols\fR. +A pad is like a window, except that it is not restricted by the +screen size, and is not necessarily associated with a particular part of the +screen. +Pads can be used when a large window is needed, and only a part of the +window will be on the screen at one time. +Automatic refreshes of pads +(e.g., from scrolling or echoing of input) do not occur. +It is not +legal to call \fBwrefresh\fR with a \fIpad\fR as an argument; the routines +\fBprefresh\fR or \fBpnoutrefresh\fR should be called instead. +Note that these +routines require additional parameters to specify the part of the pad to be +displayed and the location on the screen to be used for the display. +.PP +The \fBsubpad\fR routine creates and returns a pointer to a subwindow within a +pad with the given number of lines, \fInlines\fR, and columns, \fIncols\fR. +Unlike \fBsubwin\fR, which uses screen coordinates, the window is at position +(\fIbegin\fR_\fIx\fR\fB,\fR \fIbegin\fR_\fIy\fR) on the pad. +The window is +made in the middle of the window \fIorig\fR, so that changes made to one window +affect both windows. +During the use of this routine, it will often be +necessary to call \fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before +calling \fBprefresh\fR. +.PP +The \fBprefresh\fR and \fBpnoutrefresh\fR routines are analogous to +\fBwrefresh\fR and \fBwnoutrefresh\fR except that they relate to pads instead +of windows. +The additional parameters are needed to indicate what part of the +pad and screen are involved. +\fIpminrow\fR and \fIpmincol\fR specify the upper +left-hand corner of the rectangle to be displayed in the pad. +\fIsminrow\fR, +\fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol\fR specify the edges of the +rectangle to be displayed on the screen. +The lower right-hand corner of the +rectangle to be displayed in the pad is calculated from the screen coordinates, +since the rectangles must be the same size. +Both rectangles must be entirely +contained within their respective structures. +Negative values of +\fIpminrow\fR, \fIpmincol\fR, \fIsminrow\fR, or \fIsmincol\fR are treated as if +they were zero. +.PP +The \fBpechochar\fR routine is functionally equivalent to a call to \fBaddch\fR +followed by a call to \fBrefresh\fR, a call to \fBwaddch\fR followed by a call +to \fBwrefresh\fR, or a call to \fBwaddch\fR followed by a call to +\fBprefresh\fR. +The knowledge that only a single character is being output is +taken into consideration and, for non-control characters, a considerable +performance gain might be seen by using these routines instead of their +equivalents. +In the case of \fBpechochar\fR, the last location of the pad on +the screen is reused for the arguments to \fBprefresh\fR. +.PP +The \fBpecho_wchar\fR function is the analogous wide-character +form of \fBpechochar\fR. +It outputs one character to a pad and immediately refreshes the pad. +It does this by a call to \fBwadd_wch\fR followed by a call to \fBprefresh\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +Routines that return pointers return \fBNULL\fR on error, and set \fBerrno\fR +to \fBENOMEM\fR. +.SH NOTES +Note that \fBpechochar\fR may be a macro. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_refresh\fR(3X), \fBcurs_touch\fR(3X), \fBcurs_addch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_print.3 b/lib/libncurses/man/curs_print.3 new file mode 100644 index 0000000000..3e58fb8199 --- /dev/null +++ b/lib/libncurses/man/curs_print.3 @@ -0,0 +1,75 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_print.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_print.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_print 3X "" +.SH NAME +\fBmcprint\fR - ship binary data to printer +.SH SYNOPSIS +\fB#include \fR + +\fBint mcprint(char *data, int len);\fR +.SH DESCRIPTION +This function uses the \fBmc5p\fR or \fBmc4\fR and \fBmc5\fR capabilities, +if they are present, to ship given data to a printer attached to the terminal. + +Note that the \fBmcprint\fR code has no way to do flow control with the printer +or to know how much buffering it has. Your application is responsible for +keeping the rate of writes to the printer below its continuous throughput rate +(typically about half of its nominal cps rating). Dot-matrix printers and +6-page-per-minute lasers can typically handle 80cps, so a good conservative +rule of thumb is to sleep for a second after shipping each 80-character line. + +.SH RETURN VALUE +The \fBmcprint\fR function returns \fBERR\fR if the write operation aborted +for some reason. In this case, errno will contain either an error associated +with \fBwrite(2)\fR or one of the following: +.TP 5 +ENODEV +Capabilities for printer redirection don't exist. +.TP 5 +ENOMEM +Couldn't allocate sufficient memory to buffer the printer write. + +When \fBmcprint\fR succeeds, it returns the number of characters actually +sent to the printer. +.SH PORTABILITY +The \fBmcprint\fR call was designed for \fBncurses\fR(3X), and is not found +in SVr4 curses, 4.4BSD curses, or any other previous version of curses. +.SH BUGS +Padding in the \fBmc5p\fR, \fBmc4\fR and \fBmc5\fR capabilities will not be +interpreted. +.SH SEE ALSO +\fBcurses\fR(3X)\fR +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_printw.3 b/lib/libncurses/man/curs_printw.3 new file mode 100644 index 0000000000..25375d1850 --- /dev/null +++ b/lib/libncurses/man/curs_printw.3 @@ -0,0 +1,85 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_printw.3x,v 1.13 2002/11/16 22:28:57 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_printw.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_printw 3X "" +.SH NAME +\fBprintw\fR, +\fBwprintw\fR, +\fBmvprintw\fR, +\fBmvwprintw\fR, +\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows +.SH SYNOPSIS +\fB#include \fR + +\fBint printw(const char *fmt, ...);\fR +.br +\fBint wprintw(WINDOW *win, const char *fmt, ...);\fR +.br +\fBint mvprintw(int y, int x, const char *fmt, ...);\fR +.br +\fBint mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);\fR +.br +\fBint vwprintw(WINDOW *win, const char *fmt, va_list varglist);\fR +.br +\fBint vw_printw(WINDOW *win, const char *fmt, va_list varglist);\fR +.br +.SH DESCRIPTION +The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR +routines are analogous to \fBprintf\fR [see \fBprintf\fR(3S)]. In +effect, the string that would be output by \fBprintf\fR is output +instead as though \fBwaddstr\fR were used on the given window. + +The \fBvwprintw\fR and \fBwv_printw\fR routines are analogous +to \fBvprintf\fR [see \fBprintf\fR(3S)] +and perform a \fBwprintw\fR using a variable argument list. +The third argument is a \fBva_list\fR, a pointer to a +list of arguments, as defined in \fB\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. The function +\fBvwprintw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function +\fBvw_printw\fR using the \fB\fR interface. +The Single Unix Specification, Version 2 states that +\fBvw_printw\fR is preferred to \fBvwprintw\fR since the latter requires +including \fB\fR, which +cannot be used in the same file as \fB\fR. +This implementation uses \fB\fR for both, because that header +is included in \fB. +.SH SEE ALSO +\fBcurses\fR(3X), \fBprintf\fR(3S), \fBvprintf(3S)\fR +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_refresh.3 b/lib/libncurses/man/curs_refresh.3 new file mode 100644 index 0000000000..b1ba007d9c --- /dev/null +++ b/lib/libncurses/man/curs_refresh.3 @@ -0,0 +1,127 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_refresh.3x,v 1.10 2001/11/03 18:57:12 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_refresh.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_refresh 3X "" +.SH NAME +\fBdoupdate\fR, +\fBredrawwin\fR, +\fBrefresh\fR, +\fBwnoutrefresh\fR, +\fBwredrawln\fR, +\fBwrefresh\fR - refresh \fBcurses\fR windows and lines +.SH SYNOPSIS +\fB#include \fR + +\fBint refresh(void);\fR +.br +\fBint wrefresh(WINDOW *win);\fR +.br +\fBint wnoutrefresh(WINDOW *win);\fR +.br +\fBint doupdate(void);\fR +.br +\fBint redrawwin(WINDOW *win);\fR +.br +\fBint wredrawln(WINDOW *win, int beg_line, int num_lines);\fR +.br +.SH DESCRIPTION +The \fBrefresh\fR and \fBwrefresh\fR routines (or \fBwnoutrefresh\fR and +\fBdoupdate\fR) must be called to get actual output to the terminal, as other +routines merely manipulate data structures. +The routine \fBwrefresh\fR copies +the named window to the physical terminal screen, taking into account what is +already there to do optimizations. +The \fBrefresh\fR routine is the +same, using \fBstdscr\fR as the default window. +Unless \fBleaveok\fR has been +enabled, the physical cursor of the terminal is left at the location of the +cursor for that window. + +The \fBwnoutrefresh\fR and \fBdoupdate\fR routines allow multiple updates with +more efficiency than \fBwrefresh\fR alone. +In addition to all the window +structures, \fBcurses\fR keeps two data structures representing the terminal +screen: a physical screen, describing what is actually on the screen, and a +virtual screen, describing what the programmer wants to have on the screen. + +The routine \fBwrefresh\fR works by first calling \fBwnoutrefresh\fR, which +copies the named window to the virtual screen, and then calling \fBdoupdate\fR, +which compares the virtual screen to the physical screen and does the actual +update. +If the programmer wishes to output several windows at once, a series +of calls to \fBwrefresh\fR results in alternating calls to \fBwnoutrefresh\fR +and \fBdoupdate\fR, causing several bursts of output to the screen. +By first +calling \fBwnoutrefresh\fR for each window, it is then possible to call +\fBdoupdate\fR once, resulting in only one burst of output, with fewer total +characters transmitted and less CPU time used. +If the \fIwin\fR argument to +\fBwrefresh\fR is the global variable \fBcurscr\fR, the screen is immediately +cleared and repainted from scratch. + +The phrase "copies the named window to the virtual screen" above is ambiguous. +What actually happens is that all \fItouched\fR (changed) lines in the window +are copied to the virtual screen. +This affects programs that use overlapping +windows; it means that if two windows overlap, you can refresh them in either +order and the overlap region will be modified only when it is explicitly +changed. +(But see the section on \fBPORTABILITY\fR below for a warning about +exploiting this behavior.) + +The \fBwredrawln\fR routine indicates to \fBcurses\fR that some screen lines +are corrupted and should be thrown away before anything is written over them. +It touches the indicated lines (marking them changed). +The routine \fBredrawwin\fR() touches the entire window. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBrefresh\fR and \fBredrawwin\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. + +Whether \fBwnoutrefresh()\fR copies to the virtual screen the entire contents +of a window or just its changed portions has never been well-documented in +historic curses versions (including SVr4). +It might be unwise to rely on +either behavior in programs that might have to be linked with other curses +implementations. +Instead, you can do an explicit \fBtouchwin()\fR before the +\fBwnoutrefresh()\fR call to guarantee an entire-contents copy anywhere. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_outopts\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_scanw.3 b/lib/libncurses/man/curs_scanw.3 new file mode 100644 index 0000000000..5f15044d3b --- /dev/null +++ b/lib/libncurses/man/curs_scanw.3 @@ -0,0 +1,98 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scanw.3x,v 1.12 2002/07/20 15:48:09 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_scanw.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_scanw 3X "" +.SH NAME +\fBscanw\fR, +\fBwscanw\fR, +\fBmvscanw\fR, +\fBmvwscanw\fR, +\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint scanw(char *fmt, ...);\fR +.br +\fBint wscanw(WINDOW *win, char *fmt, ...);\fR +.br +\fBint mvscanw(int y, int x, char *fmt, ...);\fR +.br +\fBint mvwscanw(WINDOW *win, int y, int x, char *fmt, ...);\fR +.br +\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR +.br +\fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR +.SH DESCRIPTION +The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to +\fBscanf\fR [see \fBscanf\fR(3S)]. The effect of these routines is as though +\fBwgetstr\fR were called on the window, and the resulting line used as input +for \fBsscanf\fR(3). Fields which do not map to a variable in the \fIfmt\fR +field are lost. + +The \fBvwscanw\fR and \fBvw_scanw\fR routines are analogous to \fBvscanf\fR. +They perform a \fBwscanw\fR using a variable argument list. +The third argument is a \fIva_list\fR, +a pointer to a list of arguments, as defined in \fB\fR. +.SH RETURN VALUE +\fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the +number of fields scanned on success. + +Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR, +\fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields +which were mapped in the call. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. The function +\fBvwscanw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function +\fBvw_scanw\fR using the \fB\fR interface. +The Single Unix Specification, Version 2 states that +\fBvw_scanw\fR is preferred to \fBvwscanw\fR since the latter requires +including \fB\fR, which +cannot be used in the same file as \fB\fR. +This implementation uses \fB\fR for both, because that header +is included in \fB. +.LP +Both XSI and The Single Unix Specification, Version 2 state that these +functions return ERR or OK. +Since the underlying \fBscanf\fR can return the number of items scanned, +and the SVr4 code was documented to use this feature, +this is probably an editing error which was introduced in XSI, +rather than being done intentionally. +Portable applications should only test if the return value is ERR, +since the OK value (zero) is likely to be misleading. +One possible way to get useful results would be to use a "%n" conversion +at the end of the format string to ensure that something was processed. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_getstr\fR(3X), \fBcurs_printw\fR(3X), \fBscanf\fR(3S) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_scr_dump.3 b/lib/libncurses/man/curs_scr_dump.3 new file mode 100644 index 0000000000..ceec28c449 --- /dev/null +++ b/lib/libncurses/man/curs_scr_dump.3 @@ -0,0 +1,95 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scr_dump.3x,v 1.3 2003/10/25 20:34:06 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_scr_dump.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_scr_dump 3X "" +.SH NAME +\fBscr_dump\fR, +\fBscr_restore\fR, +\fBscr_init\fR, +\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file +.SH SYNOPSIS +\fB#include \fR + +\fBint scr_dump(const char *filename);\fR +.br +\fBint scr_restore(const char *filename);\fR +.br +\fBint scr_init(const char *filename);\fR +.br +\fBint scr_set(const char *filename);\fR +.br +.SH DESCRIPTION +The \fBscr_dump\fR routine dumps the current contents of the virtual screen +to the file \fIfilename\fR. + +The \fBscr_restore\fR routine sets the virtual screen to the contents +of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next +call to \fBdoupdate\fR restores the screen to the way it looked in the dump +file. + +The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses +them to initialize the \fBcurses\fR data structures about what the terminal +currently has on its screen. If the data is determined to be valid, +\fBcurses\fR bases its next update of the screen on this information rather +than clearing the screen and starting from scratch. \fBscr_init\fR is used +after \fBinitscr\fR or a \fBsystem\fR call to share +the screen with another process which has done a \fBscr_dump\fR after its +\fBendwin\fR call. The data is declared invalid if the terminfo capabilities +\fBrmcup\fR and \fBnrrmc\fR exist; also if the terminal has been written to +since the preceding \fBscr_dump\fR call. + +The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and +\fBscr_init\fR. It tells the program that the information in \fIfilename\fR is +what is currently on the screen, and also what the program wants on the screen. +This can be thought of as a screen inheritance function. + +To read (write) a window from (to) a file, use the \fBgetwin\fR and +\fBputwin\fR routines [see \fBcurs_util\fR(3X)]. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and \fBOK\fR +upon success. +.SH NOTES +Note that \fBscr_init\fR, \fBscr_set\fR, and \fBscr_restore\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4, describes these functions (adding the const +qualifiers). + +The SVr4 docs merely say under \fBscr_init\fR that the dump data is also +considered invalid "if the time-stamp of the tty is old" but don't define +"old". +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X), +\fBcurs_util\fR(3X), \fBsystem\fR(3S) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_scroll.3 b/lib/libncurses/man/curs_scroll.3 new file mode 100644 index 0000000000..64e9edf344 --- /dev/null +++ b/lib/libncurses/man/curs_scroll.3 @@ -0,0 +1,85 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scroll.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_scroll.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_scroll 3X "" +.SH NAME +\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR + +\fBint scroll(WINDOW *win);\fR +.br +\fBint scrl(int n);\fR +.br +\fBint wscrl(WINDOW *win, int n);\fR +.br +.SH DESCRIPTION +The \fBscroll\fR routine scrolls the window up one line. +This involves moving +the lines in the window data structure. +As an optimization, if the scrolling +region of the window is the entire screen, the physical screen may be scrolled +at the same time. + +For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the +window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise +scroll the window down \fIn\fR lines. +This involves moving the lines in the +window character image structure. +The current cursor position is not changed. + +For these functions to work, scrolling must be enabled via \fBscrollok\fR. +.SH RETURN VALUE +These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies +"an integer value other than \fBERR\fR") upon successful completion. +.SH NOTES +Note that \fBscrl\fR and \fBscroll\fR may be macros. + +The SVr4 documentation says that the optimization of physically scrolling +immediately if the scroll region is the entire screen "is" performed, not +"may be" performed. +This implementation deliberately does not guarantee +that this will occur, to leave open the possibility of smarter +optimization of multiple scroll actions on the next update. + +Neither the SVr4 nor the XSI documentation specify whether the current +attribute or +current color-pair of blanks generated by the scroll function is zeroed. +Under this implementation it is. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_outopts\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_slk.3 b/lib/libncurses/man/curs_slk.3 new file mode 100644 index 0000000000..bca1383104 --- /dev/null +++ b/lib/libncurses/man/curs_slk.3 @@ -0,0 +1,150 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_slk.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_slk.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_slk 3X "" +.SH NAME +\fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR, +\fBslk_noutrefresh\fR, \fBslk_label\fR, +\fBslk_clear\fR, \fBslk_restore\fR, \fBslk_touch\fR, +\fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, +\fBslk_attr_on\fR, \fBslk_attr_set\fR, \fBslk_attr_off\fR, +\fBslk_attr\fR, \fBslk_color\fR - \fBcurses\fR soft label routines +.SH SYNOPSIS +\fB#include \fR + +\fBint slk_init(int fmt);\fR +.br +\fBint slk_set(int labnum, const char *label, int fmt);\fR +.br +\fBint slk_refresh(void);\fR +.br +\fBint slk_noutrefresh(void);\fR +.br +\fBchar *slk_label(int labnum);\fR +.br +\fBint slk_clear(void);\fR +.br +\fBint slk_restore(void);\fR +.br +\fBint slk_touch(void);\fR +.br +\fBint slk_attron(const chtype attrs);\fR +.br +\fBint slk_attroff(const chtype attrs);\fR +.br +\fBint slk_attrset(const chtype attrs);\fR +.br +\fBint slk_attr_on(attr_t attrs, void* opts);\fR +.br +\fBint slk_attr_off(const attr_t attrs, void * opts);\fR +.br +\fBint slk_attr_set(const attr_t attrs,\fR +.br + \fBshort color_pair_number, void* opts);\fR +.br +\fBattr_t slk_attr(void);\fR +.br +\fBint slk_color(short color_pair_number);\fR +.br +.SH DESCRIPTION +The slk* functions manipulate the set of soft function-key labels that exist on +many terminals. For those terminals that do not have soft labels, +\fBcurses\fR takes over the bottom line of \fBstdscr\fR, reducing the size of +\fBstdscr\fR and the variable \fBLINES\fR. \fBcurses\fR standardizes on eight +labels of up to eight characters each. In addition to this, the ncurses +implementation supports a mode where it simulates 12 labels of up to five +characters each. This is most common for todays PC like enduser devices. +Please note that ncurses simulates this mode by taking over up to two lines at +the bottom of the screen, it doesn't try to use any hardware support for this +mode. + +The \fBslk_init\fR routine must be called before \fBinitscr\fR or \fBnewterm\fR +is called. If \fBinitscr\fR eventually uses a line from \fBstdscr\fR to +emulate the soft labels, then \fIfmt\fR determines how the labels are arranged +on the screen. Setting \fIfmt\fR to \fB0\fR indicates a 3-2-3 arrangement of +the labels, \fB1\fR indicates a 4-4 arrangement and \fB2\fR indicates the +PC like 4-4-4 mode. If \fBfmt\fR is set to \fB3\fR, it is again the PC like +4-4-4 mode, but in addition an index line is generated, helping the user to +identify the key numbers easily. + +The \fBslk_set\fR routine requires \fIlabnum\fR to be a label number, +from \fB1\fR to \fB8\fR (resp. \fB12\fR); \fIlabel\fR must be the string +to be put on the label, up to eight (resp. five) characters in length. +A null string or a null pointer sets up a blank label. \fIfmt\fR is either +\fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the label is to be +left-justified, centered, or right-justified, respectively, within the +label. + +The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to +the \fBwrefresh\fR and \fBwnoutrefresh\fR routines. + +The \fBslk_label\fR routine returns the current label for label number +\fIlabnum\fR, with leading and trailing blanks stripped. + +The \fBslk_clear\fR routine clears the soft labels from the screen. + +The \fBslk_restore\fR routine restores the soft labels to the screen +after a \fBslk_clear\fR has been performed. + +The \fBslk_touch\fR routine forces all the soft labels to be output +the next time a \fBslk_noutrefresh\fR is performed. + +The \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR and \fBslk_attr\fR +routines correspond to \fBattron\fR, \fBattrset\fR, \fBattroff\fR and \fBattr_get\fR. +They have an effect only if soft labels are simulated on the bottom line of +the screen. The default highlight for soft keys is A_STANDOUT (as in +System V curses, which does not document this fact). + +The \fBslk_color\fR routine corresponds to \fBcolor_set\fR. It has an effect only +if soft labels are simulated on the bottom line of the screen. + +.SH RETURN VALUE +These routines return \fBERR\fR upon failure and OK (SVr4 specifies only "an +integer value other than \fBERR\fR") upon successful completion. \fBslk_attr\fR +returns the attribute used for the soft keys. + +\fBslk_label\fR returns \fBNULL\fR on error. +.SH NOTES +Most applications would use \fBslk_noutrefresh\fR because a +\fBwrefresh\fR is likely to follow soon. +.SH PORTABILITY +The XSI Curses standard, Issue 4, describes these functions. It changes the +argument type of the attribute-manipulation functions \fBslk_attron\fR, +\fBslk_attroff\fR, \fBslk_attrset\fR to be \fBattr_t\fR, and adds \fBconst\fR +qualifiers. The format codes \fB2\fR and \fB3\fR for \fBslk_init()\fR and the +function \fBslk_attr\fR are specific to ncurses. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_attr\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_termattrs.3 b/lib/libncurses/man/curs_termattrs.3 new file mode 100644 index 0000000000..e24ad4abed --- /dev/null +++ b/lib/libncurses/man/curs_termattrs.3 @@ -0,0 +1,135 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_termattrs.3x,v 1.9 2003/12/27 18:37:47 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_termattrs.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_termattrs 3X "" +.SH NAME +\fBbaudrate\fR, +\fBerasechar\fR, +\fBerasewchar\fR, +\fBhas_ic\fR, +\fBhas_il\fR, +\fBkillchar\fR, +\fBkillwchar\fR, +\fBlongname\fR, +\fBterm_attrs\fR, +\fBtermattrs\fR, +\fBtermname\fR - \fBcurses\fR environment query routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint baudrate(void);\fR +.br +\fBchar erasechar(void);\fR +.br +\fBint erasewchar(wchar_t *\fR\fIch\fR\fB);\fR +.br +\fBbool has_ic(void);\fR +.br +\fBbool has_il(void);\fR +.br +\fBchar killchar(void);\fR +.br +\fBint killwchar(wchar_t *\fR\fIch\fR\fB);\fR +.br +\fBchar *longname(void);\fR +.br +\fBattr_t term_attrs(void);\fR +.br +\fBchtype termattrs(void);\fR +.br +\fBchar *termname(void);\fR +.br +.SH DESCRIPTION +The \fBbaudrate\fR routine returns the output speed of the terminal. The +number returned is in bits per second, for example \fB9600\fR, and is an +integer. +.PP +The \fBerasechar\fR routine returns the user's current erase character. +.PP +The \fBerasewchar\fR routine stores the current erase character +in the location referenced by \fIch\fR. +If no erase character has been defined, the routine fails +and the location referenced by \fIch\fR is not changed. +.PP +The \fBhas_ic\fR routine is true if the terminal has insert- and delete- +character capabilities. +.PP +The \fBhas_il\fR routine is true if the terminal has insert- and delete-line +capabilities, or can simulate them using scrolling regions. This might +be used to determine if it would be appropriate to turn on physical +scrolling using \fBscrollok\fR. +.PP +The \fBkillchar\fR routine returns the user's current line kill character. +.PP +The \fBkillwchar\fR routine stores the current line-kill character +in the location referenced by \fIch\fR. +If no line-kill character has been defined, +the routine fails and the location referenced by \fIch\fR is not changed. +.PP +The \fBlongname\fR routine returns a pointer to a static area +containing a verbose description of the current terminal. The maximum +length of a verbose description is 128 characters. It is defined only +after the call to \fBinitscr\fR or \fBnewterm\fR. The area is +overwritten by each call to \fBnewterm\fR and is not restored by +\fBset_term\fR, so the value should be saved between calls to +\fBnewterm\fR if \fBlongname\fR is going to be used with multiple +terminals. +.PP +If a given terminal doesn't support a video attribute that an +application program is trying to use, \fBcurses\fR may substitute a +different video attribute for it. +The \fBtermattrs\fR and \fBterm_attrs\fR functions +return a logical \fBOR\fR of all video attributes supported by the +terminal using \fIA_\fR and \fIWA_\fR constants respectively. +This information is useful when a \fBcurses\fR program +needs complete control over the appearance of the screen. +.PP +The \fBtermname\fR routine returns the terminal name used by \fBsetupterm\fR. +.SH RETURN VALUE +\fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error. +.PP +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBtermattrs\fR may be a macro. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. It changes the +return type of \fBtermattrs\fR to the new type \fBattr_t\fR. +Most versions of curses truncate the result returned by \fBtermname\fR to +14 characters. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_termcap.3 b/lib/libncurses/man/curs_termcap.3 new file mode 100644 index 0000000000..3fd61553da --- /dev/null +++ b/lib/libncurses/man/curs_termcap.3 @@ -0,0 +1,165 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_termcap.3x,v 1.18 2003/02/08 22:25:47 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_termcap.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_termcap 3X "" +.ds n 5 +.SH NAME +\fBtgetent\fR, +\fBtgetflag\fR, +\fBtgetnum\fR, +\fBtgetstr\fR, +\fBtgoto\fR, +\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database +.SH SYNOPSIS +\fB#include \fR +.br +\fB#include \fR +.br +\fBextern char PC;\fR +\fBextern char * UP;\fR +\fBextern char * BC;\fR +\fBextern short ospeed;\fR +.br +\fBint tgetent(char *bp, const char *name);\fR +.br +\fBint tgetflag(char *id);\fR +.br +\fBint tgetnum(char *id);\fR +.br +\fBchar *tgetstr(char *id, char **area);\fR +.br +\fBchar *tgoto(const char *cap, int col, int row);\fR +.br +\fBint tputs(const char *str, int affcnt, int (*putc)(int));\fR +.br +.SH DESCRIPTION +These routines are included as a conversion aid for programs that use +the \fItermcap\fR library. Their parameters are the same and the +routines are emulated using the \fIterminfo\fR database. Thus, they +can only be used to query the capabilities of entries for which a +terminfo entry has been compiled. + +The \fBtgetent\fR routine loads the entry for \fIname\fR. +It returns 1 on success, 0 if there is no such entry, and -1 if the +terminfo database could not be found. +The emulation ignores the buffer pointer \fIbp\fR. + +The \fBtgetflag\fR routine gets the boolean entry for \fIid\fR, +or zero if it is not available. + +The \fBtgetnum\fR routine gets the numeric entry for \fIid\fR, +or -1 if it is not available. + +The \fBtgetstr\fR routine returns the string entry for \fIid\fR, +or zero if it is not available. +Use \fBtputs\fR to output the returned string. +The return value will also be copied to the buffer pointed to by \fIarea\fR, +and the \fIarea\fR value will be updated to point past the null ending +this value. + +Only the first two characters of the \fBid\fR parameter of +\fBtgetflag\fR, +\fBtgetnum\fR and +\fBtgetstr\fR are compared in lookups. + +The \fBtgoto\fR routine instantiates the parameters into the given capability. +The output from this routine is to be passed to \fBtputs\fR. + +The \fBtputs\fR routine is described on the \fBcurs_terminfo\fR(3X) manual +page. It can retrieve capabilities by either termcap or terminfo name. + +The variables +\fBPC\fR, +\fBUP\fR and +\fBBC\fR +are set by \fBtgetent\fR to the terminfo entry's data for +\fBpad_char\fR, +\fBcursor_up\fR and +\fBbackspace_if_not_bs\fR, +respectively. +\fBUP\fR is not used by ncurses. +\fBPC\fR is used in the \fBtdelay_output\fR function. +\fBBC\fR is used in the \fBtgoto\fR emulation. +The variable \fBospeed\fR is set by ncurses in a system-specific coding +to reflect the terminal speed. + +.SH RETURN VALUE +Except where explicitly noted, +routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. + +Routines that return pointers return \fBNULL\fR on error. +.SH BUGS +If you call \fBtgetstr\fR to fetch \fBca\fR or any other parameterized string, +be aware that it will be returned in terminfo notation, not the older and +not-quite-compatible termcap notation. This won't cause problems if all +you do with it is call \fBtgoto\fR or \fBtparm\fR, which both expand +terminfo-style strings as terminfo. +(The \fBtgoto\fR function, if configured to support termcap, will check +if the string is indeed terminfo-style by looking for "%p" parameters or +"$<..>" delays, and invoke a termcap-style parser if the string does not +appear to be terminfo). + +Because terminfo conventions for representing padding in string capabilities +differ from termcap's, \fBtputs("50");\fR will put out a literal "50" rather +than busy-waiting for 50 milliseconds. Cope with it. + +Note that termcap has nothing analogous to terminfo's \fBsgr\fR string. +One consequence of this is that termcap applications assume \fRme\fR +(terminfo \fBsgr0\fR) does not reset the alternate character set. +This implementation checks for, and modifies the data shown to the +termcap interface to accommodate termcap's limitation in this respect. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. However, they +are marked TO BE WITHDRAWN and may be removed in future versions. + +Neither the XSI Curses standard nor the SVr4 man pages documented the return +values of \fBtgetent\fR correctly, though all three were in fact returned ever +since SVr1. +In particular, an omission in the XSI Curses documentation has been +misinterpreted to mean that \fBtgetent\fR returns \fBOK\fR or \fBERR\fR. +Because the purpose of these functions is to provide compatibility with +the \fItermcap\fR library, that is a defect in XCurses, Issue 4, Version 2 +rather than in ncurses. + +External variables are provided for support of certain termcap applications. +However, termcap applications' use of those variables is poorly documented, +e.g., not distinguishing between input and output. +In particular, some applications are reported to declare and/or +modify \fBospeed\fR. +.SH SEE ALSO +\fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBputc\fR(3S). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_terminfo.3 b/lib/libncurses/man/curs_terminfo.3 new file mode 100644 index 0000000000..6541529a14 --- /dev/null +++ b/lib/libncurses/man/curs_terminfo.3 @@ -0,0 +1,295 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_terminfo.3x,v 1.18 2003/12/27 18:48:59 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_terminfo.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_terminfo 3X "" +.ds n 5 +.SH NAME +\fBdel_curterm\fR, +\fBmvcur\fR, +\fBputp\fR, +\fBrestartterm\fR, +\fBset_curterm\fR, +\fBsetterm\fR, +\fBsetupterm\fR, +\fBtigetflag\fR, +\fBtigetnum\fR, +\fBtigetstr\fR, +\fBtparm\fR, +\fBtputs\fR, +\fBvid_attr\fR, +\fBvid_puts\fR, +\fBvidattr\fR, +\fBvidputs\fR - \fBcurses\fR interfaces to terminfo database +.SH SYNOPSIS +.nf +\fB#include \fR +.br +\fB#include \fR +.PP +\fBint setupterm(char *\fR\fIterm\fR\fB, int \fR\fIfildes\fR\fB, int *\fR\fIerrret\fR\fB);\fR +.br +\fBint setterm(char *\fR\fIterm\fR\fB);\fR +.br +\fBTERMINAL *set_curterm(TERMINAL *\fR\fInterm\fR\fB);\fR +.br +\fBint del_curterm(TERMINAL *\fR\fIoterm\fR\fB);\fR +.br +\fBint restartterm(const char *\fR\fIterm\fR\fB, int \fR\fIfildes\fR\fB, int *\fR\fIerrret\fR\fB);\fR +.br +\fBchar *tparm(char *\fR\fIstr\fR\fB, ...);\fR +.br +\fBint tputs(const char *\fR\fIstr\fR\fB, int \fR\fIaffcnt\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR +.br +\fBint putp(const char *\fR\fIstr\fR\fB);\fR +.br +\fBint vidputs(chtype \fR\fIattrs\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR +.br +\fBint vidattr(chtype \fR\fIattrs\fR\fB);\fR +.br +\fBint vid_puts(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB, int (*\fR\fIputc\fR\fB)(char));\fR +.br +\fBint vid_attr(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB);\fR +.br +\fBint mvcur(int \fR\fIoldrow\fR\fB, int \fR\fIoldcol\fR\fB, int \fR\fInewrow\fR, int \fR\fInewcol\fR\fB);\fR +.br +\fBint tigetflag(char *\fR\fIcapname\fR\fB);\fR +.br +\fBint tigetnum(char *\fR\fIcapname\fR\fB);\fR +.br +\fBchar *tigetstr(char *\fR\fIcapname\fR\fB);\fR +.br +.fi +.SH DESCRIPTION +These low-level routines must be called by programs that have to deal +directly with the \fBterminfo\fR database to handle certain terminal +capabilities, such as programming function keys. For all other +functionality, \fBcurses\fR routines are more suitable and their use is +recommended. +.PP +Initially, \fBsetupterm\fR should be called. Note that +\fBsetupterm\fR is automatically called by \fBinitscr\fR and +\fBnewterm\fR. This defines the set of terminal-dependent variables +[listed in \fBterminfo\fR(\*n)]. The \fBterminfo\fR variables +\fBlines\fR and \fBcolumns\fR are initialized by \fBsetupterm\fR as +follows: If \fBuse_env(FALSE)\fR has been called, values for +\fBlines\fR and \fBcolumns\fR specified in \fBterminfo\fR are used. +Otherwise, if the environment variables \fBLINES\fR and \fBCOLUMNS\fR +exist, their values are used. If these environment variables do not +exist and the program is running in a window, the current window size +is used. Otherwise, if the environment variables do not exist, the +values for \fBlines\fR and \fBcolumns\fR specified in the +\fBterminfo\fR database are used. +.PP +The header files \fBcurses.h\fR and \fBterm.h\fR should be included (in this +order) to get the definitions for these strings, numbers, and flags. +Parameterized strings should be passed through \fBtparm\fR to instantiate them. +All \fBterminfo\fR strings [including the output of \fBtparm\fR] should be printed +with \fBtputs\fR or \fBputp\fR. Call the \fBreset_shell_mode\fR to restore the +tty modes before exiting [see \fBcurs_kernel\fR(3X)]. Programs which use +cursor addressing should output \fBenter_ca_mode\fR upon startup and should +output \fBexit_ca_mode\fR before exiting. Programs desiring shell escapes +should call +.PP +\fBreset_shell_mode\fR and output \fBexit_ca_mode\fR before the shell +is called and should output \fBenter_ca_mode\fR and call +\fBreset_prog_mode\fR after returning from the shell. +.PP +The \fBsetupterm\fR routine reads in the \fBterminfo\fR database, +initializing the \fBterminfo\fR structures, but does not set up the +output virtualization structures used by \fBcurses\fR. The terminal +type is the character string \fIterm\fR; if \fIterm\fR is null, the +environment variable \fBTERM\fR is used. +All output is to file descriptor \fBfildes\fR which is initialized for output. +If \fIerrret\fR is not null, +then \fBsetupterm\fR returns \fBOK\fR or +\fBERR\fR and stores a status value in the integer pointed to by +\fIerrret\fR. +A return value of \fBOK\fR combined with status of \fB1\fR in \fIerrret\fR +is normal. +If \fBERR\fR is returned, examine \fIerrret\fR: +.RS +.TP 5 +.B 1 +means that the terminal is hardcopy, cannot be used for curses applications. +.TP 5 +.B 0 +means that the terminal could not be found, +or that it is a generic type, +having too little information for curses applications to run. +.TP 5 +.B -1 +means that the \fBterminfo\fR database could not be found. +.RE +.PP +If \fIerrret\fR is +null, \fBsetupterm\fR prints an error message upon finding an error +and exits. Thus, the simplest call is: + + \fBsetupterm((char *)0, 1, (int *)0);\fR, + +which uses all the defaults and sends the output to \fBstdout\fR. +.PP +The \fBsetterm\fR routine is being replaced by \fBsetupterm\fR. The call: + + \fBsetupterm(\fR\fIterm\fR\fB, 1, (int *)0)\fR + +provides the same functionality as \fBsetterm(\fR\fIterm\fR\fB)\fR. +The \fBsetterm\fR routine is included here for BSD compatibility, and +is not recommended for new programs. +.PP +The \fBset_curterm\fR routine sets the variable \fBcur_term\fR to +\fInterm\fR, and makes all of the \fBterminfo\fR boolean, numeric, and +string variables use the values from \fInterm\fR. It returns the old value +of \fBcur_term\fR. +.PP +The \fBdel_curterm\fR routine frees the space pointed to by +\fIoterm\fR and makes it available for further use. If \fIoterm\fR is +the same as \fBcur_term\fR, references to any of the \fBterminfo\fR +boolean, numeric, and string variables thereafter may refer to invalid +memory locations until another \fBsetupterm\fR has been called. +.PP +The \fBrestartterm\fR routine is similar to \fBsetupterm\fR and \fBinitscr\fR, +except that it is called after restoring memory to a previous state (for +example, when reloading a game saved as a core image dump). It assumes that +the windows and the input and output options are the same as when memory was +saved, but the terminal type and baud rate may be different. Accordingly, +it saves various tty state bits, does a setupterm, and then restores the bits. +.PP +The \fBtparm\fR routine instantiates the string \fIstr\fR with +parameters \fIpi\fR. A pointer is returned to the result of \fIstr\fR +with the parameters applied. +.PP +The \fBtputs\fR routine applies padding information to the string +\fIstr\fR and outputs it. The \fIstr\fR must be a terminfo string +variable or the return value from \fBtparm\fR, \fBtgetstr\fR, or +\fBtgoto\fR. \fIaffcnt\fR is the number of lines affected, or 1 if +not applicable. \fIputc\fR is a \fBputchar\fR-like routine to which +the characters are passed, one at a time. +.PP +The \fBputp\fR routine calls \fBtputs(\fR\fIstr\fR\fB, 1, putchar)\fR. +Note that the output of \fBputp\fR always goes to \fBstdout\fR, not to +the \fIfildes\fR specified in \fBsetupterm\fR. +.PP +The \fBvidputs\fR routine displays the string on the terminal in the +video attribute mode \fIattrs\fR, which is any combination of the +attributes listed in \fBcurses\fR(3X). The characters are passed to +the \fBputchar\fR-like routine \fIputc\fR. +.PP +The \fBvidattr\fR routine is like the \fBvidputs\fR routine, except +that it outputs through \fBputchar\fR. +.PP +The \fBvid_attr\fR and \fBvid_puts\fR routines correspond to vidattr and vidputs, +respectively. +They use a set of arguments for representing the video attributes plus color, +i.e., +one of type attr_t for the attributes and one of short for +the color_pair number. +The \fBvid_attr\fR and \fBvid_puts\fR routines +are designed to use the attribute constants with the \fIWA_\fR prefix. +The opts argument is reserved for future use. +Currently, applications must provide a null pointer for that argument. +.PP +The \fBmvcur\fR routine provides low-level cursor motion. It takes +effect immediately (rather than at the next refresh). +.PP +The \fBtigetflag\fR, \fBtigetnum\fR and \fBtigetstr\fR routines return +the value of the capability corresponding to the \fBterminfo\fR +\fIcapname\fR passed to them, such as \fBxenl\fR. +.PP +The \fBtigetflag\fR routine returns the value \fB-1\fR if +\fIcapname\fR is not a boolean capability, +or \fB0\fR if it is canceled or absent from the terminal description. +.PP +The \fBtigetnum\fR routine returns the value \fB-2\fR if +\fIcapname\fR is not a numeric capability, +or \fB-1\fR if it is canceled or absent from the terminal description. +.PP +The \fBtigetstr\fR routine returns the value \fB(char *)-1\fR +if \fIcapname\fR is not a string capability, +or \fB0\fR if it is canceled or absent from the terminal description. +.PP +The \fIcapname\fR for each capability is given in the table column entitled +\fIcapname\fR code in the capabilities section of \fBterminfo\fR(\*n). + +\fBchar *boolnames\fR, \fB*boolcodes\fR, \fB*boolfnames\fR + +\fBchar *numnames\fR, \fB*numcodes\fR, \fB*numfnames\fR + +\fBchar *strnames\fR, \fB*strcodes\fR, \fB*strfnames\fR + +These null-terminated arrays contain the \fIcapnames\fR, the +\fBtermcap\fR codes, and the full C names, for each of the +\fBterminfo\fR variables. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion, unless otherwise noted in the preceding routine descriptions. +.PP +Routines that return pointers always return \fBNULL\fR on error. +.SH NOTES +The \fBsetupterm\fR routine should be used in place of \fBsetterm\fR. +It may be useful when you want to test for terminal capabilities without +committing to the allocation of storage involved in \fBinitscr\fR. +.PP +Note that \fBvidattr\fR and \fBvidputs\fR may be macros. +.SH PORTABILITY +The function \fBsetterm\fR is not described in the XSI Curses standard and must +be considered non-portable. All other functions are as described in the XSI +curses standard. +.PP +In System V Release 4, \fBset_curterm\fR has an \fBint\fR return type and +returns \fBOK\fR or \fBERR\fR. We have chosen to implement the XSI Curses +semantics. +.PP +In System V Release 4, the third argument of \fBtputs\fR has the type +\fBint (*putc)(char)\fR. +.PP +The XSI Curses standard prototypes \fBtparm\fR with a fixed number of parameters, +rather than a variable argument list. +This implementation uses a variable argument list. +Portable applications should provide 9 parameters after the format; +zeroes are fine for this purpose. +.PP +XSI notes that after calling \fBmvcur\fR, the curses state may not match the +actual terminal state, and that an application should touch and refresh +the window before resuming normal curses calls. +Both ncurses and System V Release 4 curses implement \fBmvcur\fR using +the SCREEN data allocated in either \fBinitscr\fR or \fBnewterm\fR. +So though it is documented as a terminfo function, +\fBmvcur\fR is really a curses function which is not well specified. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_kernel\fR(3X), \fBcurs_termcap\fR(3X), +\fBputc\fR(3S), \fBterminfo\fR(\*n) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_touch.3 b/lib/libncurses/man/curs_touch.3 new file mode 100644 index 0000000000..415ff08abb --- /dev/null +++ b/lib/libncurses/man/curs_touch.3 @@ -0,0 +1,97 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_touch.3x,v 1.8 2000/07/08 11:07:57 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_touch.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_touch 3X "" +.SH NAME +\fBtouchwin\fR, +\fBtouchline\fR, +\fBuntouchwin\fR, +\fBwtouchln\fR, +\fBis_linetouched\fR, +\fBis_wintouched\fR - \fBcurses\fR refresh control routines +.SH SYNOPSIS +\fB#include \fR +.br +\fBint touchwin(WINDOW *win);\fR +.br +\fBint touchline(WINDOW *win, int start, int count);\fR +.br +\fBint untouchwin(WINDOW *win);\fR +.br +\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR +.br +\fBbool is_linetouched(WINDOW *win, int line);\fR +.br +\fBbool is_wintouched(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBtouchwin\fR and \fBtouchline\fR routines throw away all +optimization information about which parts of the window have been +touched, by pretending that the entire window has been drawn on. This +is sometimes necessary when using overlapping windows, since a change +to one window affects the other window, but the records of which lines +have been changed in the other window do not reflect the change. The +routine \fBtouchline\fR only pretends that \fIcount\fR lines have been +changed, beginning with line \fIstart\fR. + +The \fBuntouchwin\fR routine marks all lines in the window as unchanged since +the last call to \fBwrefresh\fR. + +The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting +at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have +not (\fIchanged\fR\fB=0\fR) been changed since the last call to +\fBwrefresh\fR. + +The \fBis_linetouched\fR and \fBis_wintouched\fR routines return +\fBTRUE\fR if the specified line/window was modified since the last +call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In +addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not +valid for the given window. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR upon successful completion, unless otherwise noted in the +preceding routine descriptions. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. + +Some historic curses implementations had, as an undocumented feature, the +ability to do the equivalent of \fBclearok(..., 1)\fR by saying +\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under +ncurses. +.SH NOTES +Note that all routines except \fBwtouchln\fR may be macros. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_refresh\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_trace.3 b/lib/libncurses/man/curs_trace.3 new file mode 100644 index 0000000000..5f8bff33f1 --- /dev/null +++ b/lib/libncurses/man/curs_trace.3 @@ -0,0 +1,150 @@ +.\"*************************************************************************** +.\" Copyright (c) 2000,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_trace.3x,v 1.5 2002/02/16 22:39:52 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_trace.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_trace 3X "" +.SH NAME +\fB_tracef\fR, +\fB_tracedump\fR, +\fB_traceattr\fR, +\fB_traceattr2\fR, +\fB_nc_tracebits\fR, +\fB_tracechar\fR, +\fB_tracechtype\fR, +\fB_tracechtype2\fR, +\fB_tracemouse\fR, +\fBtrace\fR - \fBcurses\fR debugging routines +.SH SYNOPSIS +\fB#include \fR +.br +\fBvoid _tracef(const char *format, ...);\fR +.br +\fBvoid _tracedump(const char *label, WINDOW *win);\fR +.br +\fBchar *_traceattr(attr_t attr);\fR +.br +\fBchar *_traceattr2(int buffer, chtype ch);\fR +.br +\fBchar *_nc_tracebits(void);\fR +.br +\fBchar *_tracechar(const unsigned char ch);\fR +.br +\fBchar *_tracechtype(chtype ch);\fR +.br +\fBchar *_tracechtype2(int buffer, chtype ch);\fR +.br +\fBchar *_tracemouse(const MEVENT *event);\fR +.br +\fBvoid trace(const unsigned int param);\fR +.SH DESCRIPTION +The \fBtrace\fR routines are used for debugging the ncurses libraries, +as well as applications which use the ncurses libraries. +These functions are normally available only with the debugging library +\fIlibncurses_g.a\fR, but may be compiled into any model (shared, static, +profile) by defining the symbol \fBTRACE\fR. + +The principal parts of this interface are the \fBtrace\fR routine which +selectively enables different tracing features, and the \fB_tracef\fR +routine which writes formatted data to the \fItrace\fR file. + +Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR +in the current directory for output. The parameter is formed by OR'ing +values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB\fR. +These include: +.TP 5 +TRACE_DISABLE +turn off tracing. +.TP 5 +TRACE_TIMES +trace user and system times of updates. +.TP 5 +TRACE_TPUTS +trace tputs calls. +.TP 5 +TRACE_UPDATE +trace update actions, old & new screens. +.TP 5 +TRACE_MOVE +trace cursor movement and scrolling. +.TP 5 +TRACE_CHARPUT +trace all character outputs. +.TP 5 +TRACE_ORDINARY +trace all update actions. +The old and new screen contents are written to the trace file +for each refresh. +.TP 5 +TRACE_CALLS +trace all curses calls. +The parameters for each call are traced, as well as return values. +.TP 5 +TRACE_VIRTPUT +trace virtual character puts, i.e., calls to \fBaddch\fR. +.TP 5 +TRACE_IEVENT +trace low-level input processing, including timeouts. +.TP 5 +TRACE_BITS +trace state of TTY control bits. +.TP 5 +TRACE_ICALLS +trace internal/nested calls. +.TP 5 +TRACE_CCALLS +trace per-character calls. +.TP 5 +TRACE_DATABASE +trace read/write of terminfo/termcap data. +.TP 5 +TRACE_ATTRS +trace changes to video attributes and colors. +.TP 5 +TRACE_MAXIMUM +maximum trace level, enables all of the separate trace features. + +Some tracing features are enabled whenever the \fBtrace\fR parameter +is nonzero. Some features overlap. +The specific names are used as a guideline. +.SH RETURN VALUE +Routines which return a value are designed to be used as parameters +to the \fB_tracef\fR routine. +.SH PORTABILITY +These functions are not part of the XSI interface. +Some other curses implementations are known to +have similar, undocumented features, +but they are not compatible with ncurses. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_util.3 b/lib/libncurses/man/curs_util.3 new file mode 100644 index 0000000000..476e4b40c7 --- /dev/null +++ b/lib/libncurses/man/curs_util.3 @@ -0,0 +1,147 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_util.3x,v 1.12 2004/01/31 17:24:53 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_util.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_util 3X "" +.SH NAME +\fBdelay_output\fR, +\fBfilter\fR, +\fBflushinp\fR, +\fBgetwin\fR, +\fBkey_name\fR, +\fBkeyname\fR, +\fBputwin\fR, +\fBunctrl\fR, +\fBuse_env\fR, +\fBwunctrl\fR - miscellaneous \fBcurses\fR utility routines +.SH SYNOPSIS +\fB#include \fR +.sp +\fBchar *unctrl(chtype c);\fR +.br +\fBchar *wunctrl(cchar_t *c);\fR +.br +\fBchar *keyname(int c);\fR +.br +\fBchar *key_name(wchar_t w);\fR +.br +\fBvoid filter(void);\fR +.br +\fBvoid use_env(bool f);\fR +.br +\fBint putwin(WINDOW *win, FILE *filep);\fR +.br +\fBWINDOW *getwin(FILE *filep);\fR +.br +\fBint delay_output(int ms);\fR +.br +\fBint flushinp(void);\fR +.br +.SH DESCRIPTION +The \fBunctrl\fR routine returns a character string which is a printable +representation of the character \fIc\fR, ignoring attributes. +Control characters are displayed in the \fB^\fR\fIX\fR notation. +Printing characters are displayed as is. +The corresponding \fBwunctrl\fR returns a printable representation of +a wide-character. +.PP +The \fBkeyname\fR routine returns a character string corresponding to the key \fIc\fR. +Control characters are displayed in the \fB^\fR\fIX\fR notation. +Values above 128 are either meta characters, shown in the \fBM-\fR\fIX\fR notation, +or the names of function keys, or null. +The corresponding \fBkey_name\fR returns a character string corresponding +to the wide-character value \fIw\fR. +The two functions do not return the same set of strings; +the latter returns null where the former would display a meta character. +.PP +The \fBfilter\fR routine, if used, must be called before \fBinitscr\fR or +\fBnewterm\fR are called. The effect is that, during those calls, \fBLINES\fR +is set to 1; the capabilities \fBclear\fR, \fBcup\fR, \fBcud\fR, \fBcud1\fR, +\fBcuu1\fR, \fBcuu\fR, \fBvpa\fR are disabled; and the \fBhome\fR string is +set to the value of \fBcr\fR. +.PP +The \fBuse_env\fR routine, if used, is called before \fBinitscr\fR or +\fBnewterm\fR are called. When called with \fBFALSE\fR as an +argument, the values of \fBlines\fR and \fBcolumns\fR specified in the +\fIterminfo\fR database will be used, even if environment variables +\fBLINES\fR and \fBCOLUMNS\fR (used by default) are set, or if +\fBcurses\fR is running in a window (in which case default behavior +would be to use the window size if \fBLINES\fR and \fBCOLUMNS\fR are +not set). +.PP +The \fBputwin\fR routine writes all data associated with window \fIwin\fR into +the file to which \fIfilep\fR points. This information can be later retrieved +using the \fBgetwin\fR function. +.PP +The \fBgetwin\fR routine reads window related data stored in the file by +\fBputwin\fR. The routine then creates and initializes a new window using that +data. It returns a pointer to the new window. +.PP +The \fBdelay_output\fR routine inserts an \fIms\fR millisecond pause +in output. This routine should not be used extensively because +padding characters are used rather than a CPU pause. +If no padding character is specified, this uses \fBnapms\fR to perform the delay. +.PP +The \fBflushinp\fR routine throws away any typeahead that has been typed by the +user and has not yet been read by the program. +.SH RETURN VALUE +Except for \fBflushinp\fR, routines that return an integer return \fBERR\fR +upon failure and \fBOK\fR (SVr4 specifies only "an integer value other than +\fBERR\fR") upon successful completion. +.PP +\fBflushinp\fR always returns \fBOK\fR. +.PP +Routines that return pointers return \fBNULL\fR on error. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +It states that \fBunctrl\fR and \fBwunctrl\fR will return a null pointer if +unsuccessful, but does not define any error conditions. +.PP +The SVr4 documentation describes the action of \fBfilter\fR only in the vaguest +terms. The description here is adapted from the XSI Curses standard (which +erroneously fails to describe the disabling of \fBcuu\fR). +.PP +The strings returned by \fBunctrl\fR in this implementation are determined +at compile time, showing C1 controls from the upper-128 codes with a `~' +prefix rather than `^'. +Other implementations typically show both sets of control characters with `^', +and may strip the parameter to 7 bits. +This implementation uses 8 bits but does not modify the string to reflect +locale. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBcurs_initscr\fR(3X), +\fBcurs_kernel\fR(3X), +\fBcurs_scr_dump\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/curs_window.3 b/lib/libncurses/man/curs_window.3 new file mode 100644 index 0000000000..6f416bf67e --- /dev/null +++ b/lib/libncurses/man/curs_window.3 @@ -0,0 +1,160 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_window.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/curs_window.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH curs_window 3X "" +.SH NAME +\fBnewwin\fR, +\fBdelwin\fR, +\fBmvwin\fR, +\fBsubwin\fR, +\fBderwin\fR, +\fBmvderwin\fR, +\fBdupwin\fR, +\fBwsyncup\fR, +\fBsyncok\fR, +\fBwcursyncup\fR, +\fBwsyncdown\fR - create \fBcurses\fR windows +.SH SYNOPSIS +\fB#include \fR + +\fBWINDOW *newwin(int nlines, int ncols, int begin_y,\fR + \fBint begin_x);\fR +.br +\fBint delwin(WINDOW *win);\fR +.br +\fBint mvwin(WINDOW *win, int y, int x);\fR +.br +\fBWINDOW *subwin(WINDOW *orig, int nlines, int ncols,\fR + \fBint begin_y, int begin_x);\fR +.br +\fBWINDOW *derwin(WINDOW *orig, int nlines, int ncols,\fR + \fBint begin_y, int begin_x);\fR +.br +\fBint mvderwin(WINDOW *win, int par_y, int par_x);\fR +.br +\fBWINDOW *dupwin(WINDOW *win);\fR +.br +\fBvoid wsyncup(WINDOW *win);\fR +.br +\fBint syncok(WINDOW *win, bool bf);\fR +.br +\fBvoid wcursyncup(WINDOW *win);\fR +.br +\fBvoid wsyncdown(WINDOW *win);\fR +.br +.SH DESCRIPTION +Calling \fBnewwin\fR creates and returns a pointer to a new window with the +given number of lines and columns. The upper left-hand corner of the window is +at line \fIbegin\fR_\fIy\fR, column \fIbegin\fR_\fIx\fR. If either +\fInlines\fR or \fIncols\fR is zero, they default to \fBLINES -\fR +\fIbegin\fR_\fIy\fR and \fBCOLS -\fR \fIbegin\fR_\fIx\fR. A new full-screen +window is created by calling \fBnewwin(0,0,0,0)\fR. + +Calling \fBdelwin\fR deletes the named window, freeing all memory +associated with it (it does not actually erase the window's screen +image). Subwindows must be deleted before the main window can be +deleted. + +Calling \fBmvwin\fR moves the window so that the upper left-hand +corner is at position (\fIx\fR, \fIy\fR). If the move would cause the +window to be off the screen, it is an error and the window is not +moved. Moving subwindows is allowed, but should be avoided. + +Calling \fBsubwin\fR creates and returns a pointer to a new window +with the given number of lines, \fInlines\fR, and columns, +\fIncols\fR. The window is at position (\fIbegin\fR_\fIy\fR, +\fIbegin\fR_\fIx\fR) on the screen. (This position is relative to the +screen, and not to the window \fIorig\fR.) The window is made in the +middle of the window \fIorig\fR, so that changes made to one window +will affect both windows. The subwindow shares memory with the window +\fIorig\fR. When using this routine, it is necessary to call +\fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before calling +\fBwrefresh\fR on the subwindow. + +Calling \fBderwin\fR is the same as calling \fBsubwin,\fR except that +\fIbegin\fR_\fIy\fR and \fIbegin\fR_\fIx\fR are relative to the origin +of the window \fIorig\fR rather than the screen. There is no +difference between the subwindows and the derived windows. + +Calling \fBmvderwin\fR moves a derived window (or subwindow) +inside its parent window. The screen-relative parameters of the +window are not changed. This routine is used to display different +parts of the parent window at the same physical position on the +screen. + +Calling \fBdupwin\fR creates an exact duplicate of the window \fIwin\fR. + +Calling \fBwsyncup\fR touches all locations in ancestors of \fIwin\fR that are +changed in \fIwin\fR. If \fBsyncok\fR is called with second argument +\fBTRUE\fR then \fBwsyncup\fR is called automatically whenever there is a +change in the window. + +The \fBwsyncdown\fR routine touches each location in \fIwin\fR that has been +touched in any of its ancestor windows. This routine is called by +\fBwrefresh\fR, so it should almost never be necessary to call it manually. + +The routine \fBwcursyncup\fR updates the current cursor position of all the +ancestors of the window to reflect the current cursor position of the +window. +.SH RETURN VALUE +Routines that return an integer return the integer \fBERR\fR upon failure and +\fBOK\fR (SVr4 only specifies "an integer value other than \fBERR\fR") upon +successful completion. + +\fBdelwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR +upon successful completion. + +Routines that return pointers return \fBNULL\fR on error. +.SH NOTES +If many small changes are made to the window, the \fBwsyncup\fR option could +degrade performance. + +Note that \fBsyncok\fR may be a macro. +.SH BUGS +The subwindow functions (\fIsubwin\fR, \fIderwin\fR, \fImvderwin\fR, +\fBwsyncup\fR, \fBwsyncdown\fR, \fBwcursyncup\fR, \fBsyncok\fR) are flaky, +incompletely implemented, and not well tested. + +The System V curses documentation is very unclear about what \fBwsyncup\fR +and \fBwsyncdown\fR actually do. It seems to imply that they are only +supposed to touch exactly those lines that are affected by ancestor changes. +The language here, and the behavior of the \fBcurses\fR implementation, +is patterned on the XPG4 curses standard. The weaker XPG4 spec may result +in slower updates. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.SH SEE ALSO +\fBcurses\fR(3X), \fBcurs_refresh\fR(3X), \fBcurs_touch\fR(3X) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/default_colors.3 b/lib/libncurses/man/default_colors.3 new file mode 100644 index 0000000000..1e2dc17f36 --- /dev/null +++ b/lib/libncurses/man/default_colors.3 @@ -0,0 +1,126 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1997,1999,2000 +.\" +.\" $Id: default_colors.3x,v 1.17 2003/10/25 20:41:08 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/default_colors.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH default_colors 3X "" +.SH NAME +\fBuse_default_colors\fR, +\fBassume_default_colors\fR \- use terminal's default colors +.SH SYNOPSIS +\fB#include \fP + +\fBint use_default_colors(void);\fP +.br +\fBint assume_default_colors(int fg, int bg);\fP +.SH DESCRIPTION +The +.I use_default_colors() +and +.I assume_default_colors() +functions are extensions to the curses library. +They are used with terminals that support ISO 6429 color, or equivalent. +These terminals allow the application to reset color to an unspecified +default value (e.g., with SGR 39 or SGR 49). +.PP +Applications that paint a colored background over the whole screen +do not take advantage of SGR 39 and SGR 49. +Some applications are designed to work with the default background, +using colors only for text. +For example, there are several implementations of the \fBls\fP program +which use colors to denote different file types or permissions. +These "color ls" programs do not necessarily modify the background color, +typically using only the \fIsetaf\fP terminfo capability to set the +foreground color. +Full-screen applications that use default colors can achieve similar +visual effects. +.PP +The first function, +.I use_default_colors() +tells the curses library to assign terminal default +foreground/background colors to color number -1. So init_pair(x,COLOR_RED,-1) +will initialize pair x as red on default background and init_pair(x,-1,COLOR_BLUE) will +initialize pair x as default foreground on blue. +.PP +The other, +.I assume_default_colors() +is a refinement which tells which colors to paint for color pair 0. +This function recognizes a special color number -1, +which denotes the default terminal color. +.PP +The following are equivalent: +.RS +.br +.I use_default_colors(); +.br +.I assume_default_colors(-1,-1); +.RE +.PP +These are ncurses extensions. +For other curses implementations, color +number -1 does not mean anything, just as for ncurses before a +successful call of \fIuse_default_colors()\fP or \fIassume_default_colors()\fP. +.PP +Other curses implementations do not allow an application to modify color pair 0. +They assume that the background is COLOR_BLACK, +but do not ensure that the color pair 0 is painted to match the +assumption. +If your application does not use either +.I use_default_colors() +or +.I assume_default_colors() +ncurses will paint a white foreground (text) with black background +for color pair 0. +.SH RETURN VALUE +These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +They will fail if either the terminal does not support +the \fIorig_pair\fP or \fIorig_colors\fP capability. +If the \fIinitialize_pair\fP capability is found, this causes an +error as well. +.SH NOTES +Associated with this extension, the \fBinit_pair\fR(3X) function accepts +negative arguments to specify default foreground or background +colors. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBcurs_color\fR(3X), +\fBded\fP(1). +.SH AUTHOR +Thomas Dickey (from an analysis of the requirements for color xterm +for XFree86 3.1.2C, February 1996). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/define_key.3 b/lib/libncurses/man/define_key.3 new file mode 100644 index 0000000000..940d2a7ddf --- /dev/null +++ b/lib/libncurses/man/define_key.3 @@ -0,0 +1,61 @@ +.\"*************************************************************************** +.\" Copyright (c) 2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 2003 +.\" +.\" $Id: key_defined.3x,v 1.2 2003/05/17 23:24:45 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/define_key.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH key_defined 3X "" +.SH NAME +\fBdefine_key\fP \- define a keycode +.SH SYNOPSIS +\fB#include \fP + +\fBint key_defined(const char *definition);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to determine if a string is currently bound +to any keycode. +.SH RETURN VALUE +If the string is bound to a keycode, its value (greater than zero) is returned. +If no keycode is bound, zero is returned. +If the string conflicts with longer strings which are bound to keys, -1 is returned. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3X). +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form.3 b/lib/libncurses/man/form.3 new file mode 100644 index 0000000000..833764edaf --- /dev/null +++ b/lib/libncurses/man/form.3 @@ -0,0 +1,201 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form.3x,v 1.15 2002/01/19 22:48:05 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form 3X "" +.SH NAME +\fBform\fR - curses extension for programming forms +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBform\fR library provides terminal-independent facilities for composing +form screens on character-cell terminals. The library includes: field +routines, which create and modify form fields; and form routines, which group +fields into forms, display forms on the screen, and handle interaction with the +user. + +The \fBform\fR library uses the \fBcurses\fR libraries, and a curses +initialization routine such as \fBinitscr\fR must be called before using any of +these functions. To use the \fBform\fR library, link with the options +\fB-lform -lcurses\fR. + +.SS Current Default Values for Field Attributes + +The \fBform\fR library maintains a default value for field attributes. You +can get or set this default by calling the appropriate \fBset_\fR +or retrieval +routine with a \fBNULL\fR field pointer. Changing this default with a +\fBset_\fR function affects future field creations, but does not change the +rendering of fields already created. + +.SS Routine Name Index + +The following table lists each \fBform\fR routine and the name of +the manual page on which it is described. + +.TS +l l +l l . +\fBcurses\fR Routine Name Manual Page Name += +current_field \fBform_page\fR(3X) +data_ahead \fBform_data\fR(3X) +data_behind \fBform_data\fR(3X) +dup_field \fBform_field_new\fR(3X) +dynamic_fieldinfo \fBform_field_info\fR(3X) +field_arg \fBform_field_validation\fR(3X) +field_back \fBform_field_attributes\fR(3X) +field_buffer \fBform_field_buffer\fR(3X) +field_count \fBform_field\fR(3X) +field_fore \fBform_field_attributes\fR(3X) +field_index \fBform_page\fR(3X) +field_info \fBform_field_info\fR(3X) +field_init \fBform_hook\fR(3X) +field_just \fBform_field_just\fR(3X) +field_opts \fBform_field_opts\fR(3X) +field_opts_off \fBform_field_opts\fR(3X) +field_opts_on \fBform_field_opts\fR(3X) +field_pad \fBform_field_attributes\fR(3X) +field_status \fBform_field_buffer\fR(3X) +field_term \fBform_hook\fR(3X) +field_type \fBform_field_validation\fR(3X) +field_userptr \fBform_field_userptr\fR(3X) +form_driver \fBform_driver\fR(3X) +form_fields \fBform_field\fR(3X) +form_init \fBform_hook\fR(3X) +form_opts \fBform_opts\fR(3X) +form_opts_off \fBform_opts\fR(3X) +form_opts_on \fBform_opts\fR(3X) +form_page \fBform_page\fR(3X) +form_request_by_name \fBform_requestname\fR(3X) +form_request_name \fBform_requestname\fR(3X) +form_sub \fBform_win\fR(3X) +form_term \fBform_hook\fR(3X) +form_userptr \fBform_userptr\fR(3X) +form_win \fBform_win\fR(3X) +free_field \fBform_field_new\fR(3X) +free_form \fBform_new\fR(3X) +link_field \fBform_field_new\fR(3X) +link_fieldtype \fBform_fieldtype\fR(3X) +move_field \fBform_field\fR(3X) +new_field \fBform_field_new\fR(3X) +new_form \fBform_new\fR(3X) +new_page \fBform_new_page\fR(3X) +pos_form_cursor \fBform_cursor\fR(3X) +post_form \fBform_post\fR(3X) +scale_form \fBform_win\fR(3X) +set_current_field \fBform_page\fR(3X) +set_field_back \fBform_field_attributes\fR(3X) +set_field_buffer \fBform_field_buffer\fR(3X) +set_field_fore \fBform_field_attributes\fR(3X) +set_field_init \fBform_hook\fR(3X) +set_field_just \fBform_field_just\fR(3X) +set_field_opts \fBform_field_opts\fR(3X) +set_field_pad \fBform_field_attributes\fR(3X) +set_field_status \fBform_field_buffer\fR(3X) +set_field_term \fBform_hook\fR(3X) +set_field_type \fBform_field_validation\fR(3X) +set_field_userptr \fBform_field_userptr\fR(3X) +set_fieldtype_arg \fBform_fieldtype\fR(3X) +set_fieldtype_choice \fBform_fieldtype\fR(3X) +set_form_fields \fBform_field\fR(3X) +set_form_init \fBform_hook\fR(3X) +set_form_opts \fBform_field_opts\fR(3X) +set_form_page \fBform_page\fR(3X) +set_form_sub \fBform_win\fR(3X) +set_form_term \fBform_hook\fR(3X) +set_form_userptr \fBform_userptr\fR(3X) +set_form_win \fBform_win\fR(3X) +set_max_field \fBform_field_buffer\fR(3X) +set_new_page \fBform_new_page\fR(3X) +unpost_form \fBform_post\fR(3X) +.TE +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_CONNECTED\fR +The field is already connected to a form. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The form is already posted. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NO_ROOM\fR +Form is too large for its window. +.TP 5 +\fBE_NOT_POSTED\fR +The form has not been posted. +.TP 5 +\fBE_UNKNOWN_COMMAND\fR +The form driver code saw an unknown request code. +.TP 5 +\fBE_INVALID_FIELD\fR +Contents of a field are not valid. +.TP 5 +\fBE_NOT_CONNECTED\fR +No fields are connected to the form. +.TP 5 +\fBE_REQUEST_DENIED\fR +The form driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. + +In your library list, libform.a should be before libncurses.a; that is, +you want to say `-lform -lncurses', not the other way around (which would +give you a link error using GNU \fBld\fR(1) and many other linkers). +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_cursor.3 b/lib/libncurses/man/form_cursor.3 new file mode 100644 index 0000000000..bbce881317 --- /dev/null +++ b/lib/libncurses/man/form_cursor.3 @@ -0,0 +1,75 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_cursor.3x,v 1.4 1998/11/29 01:05:43 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_cursor.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_cursor 3X "" +.SH NAME +\fBform_cursor\fR - position a form window cursor +.SH SYNOPSIS +\fB#include \fR +.br +int pos_form_cursor(FORM *form); +.br +.SH DESCRIPTION +The function \fBpos_form_cursor\fR restores the cursor to the position required +for the forms driver to continue processing requests. This is useful after +\fBcurses\fR routines have been called to do screen-painting in response to a +form operation. +.SH RETURN VALUE +This routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_NOT_POSTED\fR +The form has not been posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_data.3 b/lib/libncurses/man/form_data.3 new file mode 100644 index 0000000000..afe33f8c4f --- /dev/null +++ b/lib/libncurses/man/form_data.3 @@ -0,0 +1,64 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_data.3x,v 1.7 1998/11/29 01:13:22 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_data.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_data 3X "" +.SH NAME +\fBform_data\fR - test for off-screen data in given forms +.SH SYNOPSIS +\fB#include \fR +.br +bool data_ahead(const FORM *form); +.br +bool data_behind(const FORM *form); +.br +.SH DESCRIPTION +The function \fBdata_ahead\fR tests whether there is off-screen data +ahead in the given form. It returns TRUE (1) or FALSE (0). + +The function \fBdata_behind\fR tests whether there is off-screen data +behind in the given form. It returns TRUE (1) or FALSE (0). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_driver.3 b/lib/libncurses/man/form_driver.3 new file mode 100644 index 0000000000..05fed0b5f1 --- /dev/null +++ b/lib/libncurses/man/form_driver.3 @@ -0,0 +1,273 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_driver.3x,v 1.9 2002/02/16 22:39:52 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_driver.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_driver 3X "" +.SH NAME +\fBform_driver\fR - command-processing loop of the form system +.SH SYNOPSIS +\fB#include \fR +.br +int form_driver(FORM *form, int c); +.br +.SH DESCRIPTION +Once a form has been posted (displayed), you should funnel input events to it +through \fBform_driver\fR. This routine has two major input cases; either +the input is a form navigation request or it's a printable ASCII character. +The form driver requests are as follows: +.TP 5 +REQ_NEXT_PAGE +Move to the next page. +.TP 5 +REQ_PREV_PAGE +Move to the previous page. +.TP 5 +REQ_FIRST_PAGE +Move to the first page. +.TP 5 +REQ_LAST_PAGE +Move to the last field. + +.TP 5 +REQ_NEXT_FIELD +Move to the next field. +.TP 5 +REQ_PREV_FIELD +Move to the previous field. +.TP 5 +REQ_FIRST_FIELD +Move to the first field. +.TP 5 +REQ_LAST_FIELD +Move to the last field. +.TP 5 +REQ_SNEXT_FIELD +Move to the sorted next field. +.TP 5 +REQ_SPREV_FIELD +Move to the sorted previous field. +.TP 5 +REQ_SFIRST_FIELD +Move to the sorted first field. +.TP 5 +REQ_SLAST_FIELD +Move to the sorted last field. +.TP 5 +REQ_LEFT_FIELD +Move left to a field. +.TP 5 +REQ_RIGHT_FIELD +Move right to a field. +.TP 5 +REQ_UP_FIELD +Move up to a field. +.TP 5 +REQ_DOWN_FIELD +Move down to a field. + +.TP 5 +REQ_NEXT_CHAR +Move to the next char. +.TP 5 +REQ_PREV_CHAR +Move to the previous char. +.TP 5 +REQ_NEXT_LINE +Move to the next line. +.TP 5 +REQ_PREV_LINE +Move to the previous line. +.TP 5 +REQ_NEXT_WORD +Move to the next word. +.TP 5 +REQ_PREV_WORD +Move to the previous word. +.TP 5 +REQ_BEG_FIELD +Move to the beginning of the field. +.TP 5 +REQ_END_FIELD +Move to the end of the field. +.TP 5 +REQ_BEG_LINE +Move to the beginning of the line. +.TP 5 +REQ_END_LINE +Move to the end of the line. +.TP 5 +REQ_LEFT_CHAR +Move left in the field. +.TP 5 +REQ_RIGHT_CHAR +Move right in the field. +.TP 5 +REQ_UP_CHAR +Move up in the field. +.TP 5 +REQ_DOWN_CHAR +Move down in the field. + +.TP 5 +REQ_NEW_LINE +Insert or overlay a new line. +.TP 5 +REQ_INS_CHAR +Insert a blank at the cursor. +.TP 5 +REQ_INS_LINE +Insert a blank line at the cursor. +.TP 5 +REQ_DEL_CHAR +Delete character at the cursor. +.TP 5 +REQ_DEL_PREV +Delete character before the cursor. +.TP 5 +REQ_DEL_LINE +Delete line at the cursor. +.TP 5 +REQ_DEL_WORD +Delete blank-delimited word at the cursor. +.TP 5 +REQ_CLR_EOL +Clear to end of line from cursor. +.TP 5 +REQ_CLR_EOF +Clear to end of field from cursor. +.TP 5 +REQ_CLR_FIELD +Clear the entire field. +.TP 5 +REQ_OVL_MODE +Enter overlay mode. +.TP 5 +REQ_INS_MODE +Enter insert mode. + +.TP 5 +REQ_SCR_FLINE +Scroll the field forward a line. +.TP 5 +REQ_SCR_BLINE +Scroll the field backward a line. +.TP 5 +REQ_SCR_FPAGE +Scroll the field forward a page. +.TP 5 +REQ_SCR_BPAGE +Scroll the field backward a page. +.TP 5 +REQ_SCR_FHPAGE +Scroll the field forward half a page. +.TP 5 +REQ_SCR_BHPAGE +Scroll the field backward half a page. + +.TP 5 +REQ_SCR_FCHAR +Scroll the field forward a character. +.TP 5 +REQ_SCR_BCHAR +Scroll the field backward a character. +.TP 5 +REQ_SCR_HFLINE +Horizontal scroll the field forward a line. +.TP 5 +REQ_SCR_HBLINE +Horizontal scroll the field backward a line. +.TP 5 +REQ_SCR_HFHALF +Horizontal scroll the field forward half a line. +.TP 5 +REQ_SCR_HBHALF +Horizontal scroll the field backward half a line. + +.TP +REQ_VALIDATION +Validate field. +.TP +REQ_NEXT_CHOICE +Display next field choice. +.TP +REQ_PREV_CHOICE +Display previous field choice. +.PP +If the second argument is a printable ASCII character, the driver places it +in the current position in the current field. If it is one of the forms +requests listed above, that request is executed. +.PP +If the second argument is neither printable ASCII nor one of the above +pre-defined form requests, the driver assumes it is an application-specific +command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands +should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these +pre-defined requests. +.SH RETURN VALUE +\fBform_driver\fR return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NOT_POSTED\fR +The form has not been posted. +.TP 5 +\fBE_UNKNOWN_COMMAND\fR +The form driver code saw an unknown request code. +.TP 5 +\fBE_INVALID_FIELD\fR +Contents of field is invalid. +.TP 5 +\fBE_REQUEST_DENIED\fR +The form driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field.3 b/lib/libncurses/man/form_field.3 new file mode 100644 index 0000000000..c9918198e6 --- /dev/null +++ b/lib/libncurses/man/form_field.3 @@ -0,0 +1,98 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field 3X "" +.SH NAME +\fBform_field\fR - make and break connections between fields and forms +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_fields(FORM *form, FIELD **fields); +.br +FIELD **form_fields(const FORM *form); +.br +int field_count(const FORM *form); +.br +int move_field(FIELD *field, int frow, int fcol); +.br +.SH DESCRIPTION +The function \fBset_form_fields\fR changes the field pointer array of +the given \fIform\fR. The array must be terminated by a \fBNULL\fR. + +The function \fBform_fields\fR returns the field array of the given form. + +The function \fBfield_count\fR returns the count of fields in \fIform\fR. + +The function \fBmove_field\fR moves the given field (which must be disconnected) +to a specified location on the screen. +.SH RETURN VALUES +The function \fBform_fields\fR returns \fBNULL\fR on error. + +The function \fBfield_count\fR returns \fBERR\fR (the general +\fBcurses\fR error return value) on error. + +The functions \fBset_form_fields\fR and \fBmove_field\fR return one of +the following codes on error: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The form is already posted. +.TP 5 +\fBE_CONNECTED\fR +The field is already connected to a form. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. + +The SVr4 forms library documentation specifies the \fBfield_count\fR error value +as -1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_attributes.3 b/lib/libncurses/man/form_field_attributes.3 new file mode 100644 index 0000000000..4d0e7c7a9c --- /dev/null +++ b/lib/libncurses/man/form_field_attributes.3 @@ -0,0 +1,92 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2001,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_attributes.3x,v 1.7 2002/01/19 22:48:14 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_attributes.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_attributes 3X "" +.SH NAME +\fBform_field_attributes\fR - color and attribute control for form fields +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_fore(FIELD *field, chtype attr); +.br +chtype field_fore(const FIELD *field); +.br +int set_field_back(FIELD *field, chtype attr); +.br +chtype field_back(const FIELD *field); +.br +int set_field_pad(FIELD *field, int pad); +.br +int field_pad(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_fore\fR sets the foreground attribute of +\fIfield\fR. This is the highlight used to display the field contents. The +function \fBfield_fore\fR returns the foreground attribute. The default is +\fBA_STANDOUT\fR. + +The function \fBset_field_back\fR sets the background attribute of +\fIform\fR. This is the highlight used to display the extent fields in the +form. The function \fBfield_back\fR returns the background attribute. The +default is \fBA_NORMAL\fR. + +The function \fBset_field_pad\fR sets the character used to fill the field. +The function \fBfield_pad\fR returns the given form's pad character. The +default is a blank. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_buffer.3 b/lib/libncurses/man/form_field_buffer.3 new file mode 100644 index 0000000000..3ff6876b3a --- /dev/null +++ b/lib/libncurses/man/form_field_buffer.3 @@ -0,0 +1,100 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_buffer.3x,v 1.10 2003/05/10 20:22:01 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_buffer.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_buffer 3X "" +.SH NAME +\fBform_field_buffer\fR - field buffer control +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_buffer(FIELD *field, int buf, const char *value); +.br +char *field_buffer(const FIELD *field, int buffer); +.br +int set_field_status(FIELD *field, bool status); +.br +bool field_status(const FIELD *field); +.br +int set_max_field(FIELD *field, int max); +.br +.SH DESCRIPTION +The function \fBset_field_buffer\fR sets the numbered buffer of the given field +to contain a given string. Buffer 0 is the displayed value of the field; other +numbered buffers may be allocated by applications through the \fBnbuf\fR +argument of (see \fBform_field_new\fR(3X)) but are not manipulated by the forms +library. The function \fBfield_buffer\fR returns the address of the buffer. +Please note that this buffer has always the length of the buffer, that means +that it may typically contain trailing spaces. If you entered leading spaces +the buffer may also contain them. If you want the raw data, you must write your +own routine that copies the value out of the buffer and removes the leading +and trailing spaces. Please note also, that subsequent operations on the form +will probably change the content of the buffer. So don't use it for long term +storage of the entered form data. + +The function \fBset_field_status\fR sets the associated status flag of +\fIfield\fR; \fBfield_status\fR gets the current value. The status flag +is set to a nonzero value whenever the field changes. + +The function \fBset_max_field\fR sets the maximum size for a dynamic field. +An argument of 0 turns off any maximum size threshold for that field. +.SH RETURN VALUE +The \fBfield_buffer\fR function returns NULL on error. + +The \fBfield_status\fR function returns \fBTRUE\fR or \fBFALSE\fR. + +The remaining routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_info.3 b/lib/libncurses/man/form_field_info.3 new file mode 100644 index 0000000000..7aa4398d53 --- /dev/null +++ b/lib/libncurses/man/form_field_info.3 @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2001,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_info.3x,v 1.8 2002/01/19 22:48:32 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_info.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_info 3X "" +.SH NAME +\fBform_field_info\fR - retrieve field characteristics +.SH SYNOPSIS +\fB#include \fR +.br +int field_info(const FIELD *field, int *rows, int *cols, + int *frow, int *fcol, int *nrow, int *nbuf); +.br +int dynamic_field_info(const FIELD *field, int *rows, int *cols, int *max); +.br +.SH DESCRIPTION +The function \fBfield_info\fR returns the sizes and other attributes passed in +to the field at its creation time. The attributes are: height, width, row of +upper-left corner, column of upper-left corner, number off-screen rows, and +number of working buffers. + +The function \fBdynamic_field_info\fR returns the actual size of the field, and +its maximum possible size. If the field has no size limit, the location +addressed by the third argument will be set to 0. (A field can be made dynamic +by turning off the \fBO_STATIC\fR). +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +A null (zero pointer) is accepted for any of the return values, +to ignore that value. +Not all implementations allow this, e.g., Solaris 2.7 does not. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_just.3 b/lib/libncurses/man/form_field_just.3 new file mode 100644 index 0000000000..79e9804cc8 --- /dev/null +++ b/lib/libncurses/man/form_field_just.3 @@ -0,0 +1,79 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_just.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_just.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_just 3X "" +.SH NAME +\fBform_field_just\fR - retrieve field characteristics +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_just(FIELD *field, int justification); +.br +int field_just(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_just\fR sets the justification attribute of +a field; \fBfield_just\fR returns a field's justification attribute. +The attribute may be one of NO_JUSTIFICATION, JUSTIFY_RIGHT, +JUSTIFY_LEFT, or JUSTIFY_CENTER. + +.SH RETURN VALUE +The function \fBfield_just\fR returns one of: NO_JUSTIFICATION, +JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. + +The function \fBset_field_just\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_new.3 b/lib/libncurses/man/form_field_new.3 new file mode 100644 index 0000000000..33b8b43483 --- /dev/null +++ b/lib/libncurses/man/form_field_new.3 @@ -0,0 +1,97 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_new.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_new.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_new 3X "" +.SH NAME +\fBform_field_new\fR - create and destroy form fields +.SH SYNOPSIS +\fB#include \fR +.br +FIELD *new_field(int height, int width, + int toprow, int leftcol, + int offscreen, int nbuffers); +.br +FIELD *dup_field(FIELD *field, int toprow, int leftcol); +.br +FIELD *link_field(FIELD *field, int toprow, int leftcol); +.br +int free_field(FIELD *field); +.br +.SH DESCRIPTION +The function \fBnew_field\fR allocates a new field and initializes it from the +parameters given: height, width, row of upper-left corner, column of upper-left +corner, number off-screen rows, and number of additional working buffers. + +The function \fBdup_field\fR duplicates a field at a new location. Most +attributes (including current contents, size, validation type, buffer count, +growth threshold, justification, foreground, background, pad character, +options, and user pointer) are copied. Field status and the field page bit are +not copied. + +The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field +shares buffers with its parent. Attribute data is separate. + +The function \fBfree_field\fR de-allocates storage associated with a field. +.SH RETURN VALUE +The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return +\fBNULL\fR on error. + +The function \fBfree_field\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. + +It may be unwise to count on the set of attributes copied by +\fBdup_field\fR(3X) being portable; the System V forms library documents are +not very explicit about what gets copied and what doesn't. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_opts.3 b/lib/libncurses/man/form_field_opts.3 new file mode 100644 index 0000000000..7d0089b92a --- /dev/null +++ b/lib/libncurses/man/form_field_opts.3 @@ -0,0 +1,121 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_opts.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_opts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_opts 3X "" +.SH NAME +\fBform_field_opts\fR - set and get field options +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_opts(FIELD *field, OPTIONS opts); +.br +int field_opts_on(FIELD *field, OPTIONS opts); +.br +int field_opts_off(FIELD *field, OPTIONS opts); +.br +OPTIONS field_opts(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_opts\fR sets all the given field's option bits (field +option bits may be logically-OR'ed together). + +The function \fBfield_opts_on\fR turns on the given option bits, and leaves +others alone. + +The function \fBfield_opts_off\fR turns off the given option bits, and leaves +others alone. + +The function \fBfield_opts\fR returns the field's current option bits. + +The following options are defined (all are on by default): +.TP 5 +O_VISIBLE +The field is displayed. If this option is off, display of the field is +suppressed. +.TP 5 +O_ACTIVE +The field is visited during processing. If this option is off, the field will +not be reachable by navigation keys. Please notice that an invisible field +appears to be inactive also. +.TP 5 +O_PUBLIC +The field contents are displayed as data is entered. +.TP 5 +O_EDIT +The field can be edited. +.TP 5 +O_WRAP +Words that don't fit on a line are wrapped to the next line. Words are +blank-separated. +.TP 5 +O_BLANK +The field is cleared whenever a character is entered at the first position. +.TP 5 +O_AUTOSKIP +Skip to the next field when this one fills. +.TP 5 +O_NULLOK +Allow a blank field. +.TP 5 +O_STATIC +Field buffers are fixed to field's original size. +.TP 5 +O_PASSOK +Validate field only if modified by user. +.SH RETURN VALUE +Except for \fBfield_opts\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_CURRENT\fR +The field is the current field. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.TP 5 +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_userptr.3 b/lib/libncurses/man/form_field_userptr.3 new file mode 100644 index 0000000000..e2adcbeba8 --- /dev/null +++ b/lib/libncurses/man/form_field_userptr.3 @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_userptr.3x,v 1.6 1998/11/29 01:07:05 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_userptr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_userptr 3X "" +.SH NAME +\fBform_field_userptr\fR - associate application data with a form field +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_userptr(FIELD *field, void*userptr); +.br +void *field_userptr(const FIELD *field); +.br +.SH DESCRIPTION +Every form field has a field that can be used to hold application-specific data +(that is, the form-driver code leaves it alone). These functions get and set +that field. +.SH RETURN VALUE +The function \fBfield_userptr\fR returns \fBNULL\fR on error. The function +\fBset_field_userptr\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. + +The user pointer should be a void pointer. We leave it as a char pointer for +SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_field_validation.3 b/lib/libncurses/man/form_field_validation.3 new file mode 100644 index 0000000000..32f71b8df5 --- /dev/null +++ b/lib/libncurses/man/form_field_validation.3 @@ -0,0 +1,145 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_validation.3x,v 1.14 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_field_validation.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_field_validation 3X "" +.SH NAME +\fBform_field_validation\fR - data type validation for fields +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_type(FIELD *field, FIELDTYPE *type, ...); +.br +FIELDTYPE *field_type(const FIELD *field); +.br +void *field_arg(const FIELD *field); +.sp +FIELDTYPE *TYPE_ALNUM; +.br +FIELDTYPE *TYPE_ALPHA; +.br +FIELDTYPE *TYPE_ENUM; +.br +FIELDTYPE *TYPE_INTEGER; +.br +FIELDTYPE *TYPE_NUMERIC; +.br +FIELDTYPE *TYPE_REGEXP; +.br +FIELDTYPE *TYPE_IPV4; +.br +.SH DESCRIPTION +The function \fBset_field_type\fR declares a data type for a given form field. +This is the type checked by validation functions. +The predefined types are as follows: +.TP 5 +TYPE_ALNUM +Alphanumeric data. Requires a third \fBint\fR argument, a minimum field width. +.TP 5 +TYPE_ALPHA +Character data. Requires a third \fBint\fR argument, a minimum field width. +.TP 5 +TYPE_ENUM +Accept one of a specified set of strings. Requires a third \fB(char **)\fR +argument pointing to a string list; a fourth \fBint\fR flag argument to enable +case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a partial +match must be a unique one (if this flag is off, a prefix matches the first +of any set of more than one list elements with that prefix). Please notice +that the string list is not copied, only a reference to it is stored in the +field. So you should avoid using a list that lives in automatic variables +on the stack. +.TP 5 +TYPE_INTEGER +Integer data, parsable to an integer by \fBatoi(3)\fR. Requires a third +\fBint\fR argument controlling the precision, a fourth \fBlong\fR argument +constraining minimum value, and a fifth \fBlong\fR constraining maximum value. +If the maximum value is less than or equal to the minimum value, the range is +simply ignored. On return the field buffer is formatted according to the +\fBprintf\fR format specification ".*ld", where the '*' is replaced by the +precision argument. +For details of the precision handling see \fBprintf's\fR man-page. +.TP 5 +TYPE_NUMERIC +Numeric data (may have a decimal-point part). Requires a third +\fBint\fR argument controlling the precision, a fourth \fBdouble\fR +argument constraining minimum value, and a fifth \fBdouble\fR constraining +maximum value. If your system supports locales, the decimal point character +to be used must be the one specified by your locale. +If the maximum value is less than or equal to the minimum value, the range is +simply ignored. On return the field buffer is formatted according to the +\fBprintf\fR format specification ".*f", where the '*' is replaced by the +precision argument. +For details of the precision handling see \fBprintf's\fR man-page. +.TP 5 +TYPE_REGEXP +Regular expression data. Requires a regular expression \fB(char *)\fR third argument; +the data is valid if the regular expression matches it. Regular expressions +are in the format of \fBregcomp\fR(3X) and \fBregexec\fR(3X). Please notice +that the regular expression must match the whole field. If you have for +example an eight character wide field, a regular expression "^[0-9]*$" always +means that you have to fill all eight positions with digits. If you want to +allow fewer digits, you may use for example "^[0-9]* *$" which is good for +trailing spaces (up to an empty field), or "^ *[0-9]* *$" which is good for +leading and trailing spaces around the digits. +.TP 5 +TYPE_IPV4 +An Internet Protocol Version 4 address. This requires no additional argument. It +is checked whether or not the buffer has the form a.b.c.d, where a,b,c and d are +numbers between 0 and 255. Trailing blanks in the buffer are ignored. The address +itself is not validated. Please note that this is an ncurses extension. This +field type may not be available in other curses implementations. +.PP +It is possible to set up new programmer-defined field types. See the +\fBform_fieldtype\fR(3X) manual page. +.SH RETURN VALUE +The functions \fBfield_type\fR and \fBfield_arg\fR return \fBNULL\fR on +error. The function \fBset_field_type\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_fieldtype.3 b/lib/libncurses/man/form_fieldtype.3 new file mode 100644 index 0000000000..60e3a8cdd7 --- /dev/null +++ b/lib/libncurses/man/form_fieldtype.3 @@ -0,0 +1,136 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_fieldtype.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_fieldtype.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_fieldtype 3X "" +.SH NAME +\fBform_fieldtype\fR - define validation-field types +.SH SYNOPSIS +\fB#include \fR +.br +FIELDTYPE *new_fieldtype( + bool (* const field_check)(FIELD *, const void *), + bool (* const char_check)(int, const void *)); +.br +int free_fieldtype(FIELDTYPE *fieldtype); +.br +int set_fieldtype_arg( + FIELDTYPE *fieldtype, + void *(* const make_arg)(va_list *), + void *(* const copy_arg)(const void *), + void (* const free_arg)(void *)); +.br +int set_fieldtype_choice( + FIELDTYPE *fieldtype, + bool (* const next_choice)(FIELD *, const void *), + bool (* const prev_choice)(FIELD *, const void *)); +.br +FIELDTYPE *link_fieldtype(FIELDTYPE *type1, + FIELDTYPE *type2); +.br +.SH DESCRIPTION +The function \fBnew_fieldtype\fR creates a new field type usable for data +validation. You supply it with \fIfield_check\fR, a predicate to check the +validity of an entered data string whenever the user attempts to leave a field. +The (FIELD *) argument is passed in so the validation predicate can see the +field's buffer, sizes and other attributes; the second argument is an +argument-block structure, about which more below. + +You also supply \fBnew_fieldtype\fR with \fIchar_check\fR, +a function to validate input characters as they are entered; it will be passed +the character to be checked and a pointer to an argument-block structure. + +The function \fBfree_fieldtype\fR frees the space allocated for a given +validation type. + +The function \fBset_fieldtype_arg\fR associates three storage-management functions +with a field type. +The \fImake_arg\fR function is automatically applied to the +list of arguments you give \fBset_field_type\fR when attaching validation +to a field; its job is to bundle these into an allocated argument-block +object which can later be passed to validation predicated. +The other two hook arguments should copy and free argument-block structures. +They will be used by the forms-driver code. +You must supply the \fImake_arg\fR function, +the other two are optional, you may supply NULL for them. +In this case it is assumed +that \fImake_arg\fR does not allocate memory but simply loads the +argument into a single scalar value. + +The function \fBlink_fieldtype\fR creates +a new field type from the two given types. +They are connected by an logical 'OR'. + +The form driver requests \fBREQ_NEXT_CHOICE\fR and \fBREQ_PREV_CHOICE\fR assume +that the possible values of a field form an ordered set, and provide the forms +user with a way to move through the set. +The \fBset_fieldtype_choice\fR +function allows forms programmers to define successor and predecessor functions +for the field type. +These functions take the field pointer and an +argument-block structure as arguments. +.SH RETURN VALUE +The pointer-valued routines return NULL on error. + +The integer-valued routines return one of the following codes on +error: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_CONNECTED\fR +The field is already connected to a form. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. + +All of the \fB(char *)\fR arguments of these functions should actually be +\fB(void *)\fR. The type has been left uncorrected for strict compatibility +with System V. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_hook.3 b/lib/libncurses/man/form_hook.3 new file mode 100644 index 0000000000..1579b8cca5 --- /dev/null +++ b/lib/libncurses/man/form_hook.3 @@ -0,0 +1,101 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_hook.3x,v 1.6 1999/03/20 22:37:15 Todd.Miller Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_hook.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_hook 3X "" +.SH NAME +\fBform_hook\fR - set hooks for automatic invocation by applications +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_init(FORM *form, void (*func)(FORM *)); +.br +void (*)(FORM *) field_init(const FORM *form); +.br +int set_field_term(FORM *form, void (*func)(FORM *)); +.br +void (*)(FORM *) field_term(const FORM *form); +.br +int set_form_init(FORM *form, void (*func)(FORM *)); +.br +void (*)(FORM *) form_init(const FORM *form); +.br +int set_form_term(FORM *form, void (*func)(FORM *)); +.br +void (*)(FORM *) form_term(const FORM *form); +.br +.SH DESCRIPTION +These functions make it possible to set hook functions to be called at various +points in the automatic processing of input event codes by \fBform_driver\fR. + +The function \fBset_field_init\fR sets a hook to be called at form-post time +and each time the selected field changes (after the change). \fBfield_init\fR +returns the current field init hook, if any (\fBNULL\fR if there is no such +hook). + +The function \fBset_field_term\fR sets a hook to be called at form-unpost time +and each time the selected field changes (before the change). \fBfield_term\fR +returns the current field term hook, if any (\fBNULL\fR if there is no such +hook). + +The function \fBset_form_init\fR sets a hook to be called at form-post time and +just after a page change once it is posted. \fBform_init\fR returns the +current form init hook, if any (\fBNULL\fR if there is no such hook). + +The function \fBset_form_term\fR sets a hook to be called at form-unpost time +and just before a page change once it is posted. \fBform_init\fR +returns the current form term hook, if any (\fBNULL\fR if there is no such +hook). +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Other routines +return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_new.3 b/lib/libncurses/man/form_new.3 new file mode 100644 index 0000000000..1dc78b3f0e --- /dev/null +++ b/lib/libncurses/man/form_new.3 @@ -0,0 +1,80 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_new.3x,v 1.5 1998/11/29 01:07:37 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_new.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_new 3X "" +.SH NAME +\fBform_new\fR - create and destroy forms +.SH SYNOPSIS +\fB#include \fR +.br +FORM *new_form(FIELD **fields); +.br +int free_form(FORM *form); +.br +.SH DESCRIPTION +The function \fBnew_form\fR creates a new form connected to a specified field +pointer array (which must be \fBNULL\fR-terminated). + +The function \fBfree_form\fR disconnects \fIform\fR from its field array +and frees the storage allocated for the form. +.SH RETURN VALUE +The function \fBnew_form\fR returns \fBNULL\fR on error. + +The function \fBfree_form\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The form has already been posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_new_page.3 b/lib/libncurses/man/form_new_page.3 new file mode 100644 index 0000000000..742fbf90dc --- /dev/null +++ b/lib/libncurses/man/form_new_page.3 @@ -0,0 +1,78 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_new_page.3x,v 1.6 2002/01/19 22:48:51 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_new_page.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_new_page 3X "" +.SH NAME +\fBform_new_page\fR - form pagination functions +.SH SYNOPSIS +\fB#include \fR +.br +int set_new_page(FIELD *field, bool new_page_flag); +.br +bool new_page(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_new_page\fR sets or resets a flag marking the given field +as the beginning of a new page on its form. + +The function \fBnew_page\fR is a predicate which tests if a given field marks +a page beginning on its form. +.SH RETURN VALUE +The function \fBnew_page\fR returns \fBTRUE\fR or \fBFALSE\fR. + +The function \fBset_new_page\fR return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_CONNECTED\fR +The given field is already connected to a form. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_opts.3 b/lib/libncurses/man/form_opts.3 new file mode 100644 index 0000000000..4e749902bc --- /dev/null +++ b/lib/libncurses/man/form_opts.3 @@ -0,0 +1,91 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_opts.3x,v 1.6 1998/11/29 01:07:53 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_opts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_opts 3X "" +.SH NAME +\fBform_opts\fR - set and get form options +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_opts(FORM *form, OPTIONS opts); +.br +int form_opts_on(FORM *form, OPTIONS opts); +.br +int form_opts_off(FORM *form, OPTIONS opts); +.br +OPTIONS form_opts(const FORM *form); +.br +.SH DESCRIPTION +The function \fBset_form_opts\fR sets all the given form's option bits (form +option bits may be logically-OR'ed together). + +The function \fBform_opts_on\fR turns on the given option bits, and leaves +others alone. + +The function \fBform_opts_off\fR turns off the given option bits, and leaves +others alone. + +The function \fBform_opts\fR returns the form's current option bits. + +The following options are defined (all are on by default): +.TP 5 +O_NL_OVERLOAD +Overload the \fBREQ_NEW_LINE\fR forms driver request so that calling it at the +end of a field goes to the next field. +.TP 5 +O_BS_OVERLOAD +Overload the \fBREQ_DEL_PREV\fR forms driver request so that calling it at the +beginning of a field goes to the previous field. +.SH RETURN VALUE +Except for \fBform_opts\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_page.3 b/lib/libncurses/man/form_page.3 new file mode 100644 index 0000000000..b70605b6d3 --- /dev/null +++ b/lib/libncurses/man/form_page.3 @@ -0,0 +1,96 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_page.3x,v 1.8 1998/11/29 01:08:02 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_page.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_page 3X "" +.SH NAME +\fBform_page\fR - set and get form page number +.SH SYNOPSIS +\fB#include \fR +.br +int set_current_field(FORM *form, FIELD *field); +.br +FIELD *current_field(const FORM *); +.br +int set_form_page(FORM *form, int n); +.br +int form_page(const FORM *form); +.br +int field_index(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_current field\fR sets the current field of the given +form; \fBcurrent_field\fR returns the current field of the given form. +.PP +The function \fBset_form_page\fR sets the form's page number (goes to page +\fIn\fR of the form). +.PP +The function \fBform_page\fR returns the form's current page number. +.PP +The function \fBfield_index\fR returns the index of the field in the +field array of the form it is connected to. It returns \fBERR\fR if +the argument is the null pointer or the field is not connected. +.SH RETURN VALUE +Except for \fBform_page\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_INVALID_FIELD\fR +Contents of a field are not valid. +.TP 5 +\fBE_REQUEST_DENIED\fR +The form driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_post.3 b/lib/libncurses/man/form_post.3 new file mode 100644 index 0000000000..5d0173eeae --- /dev/null +++ b/lib/libncurses/man/form_post.3 @@ -0,0 +1,91 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_post.3x,v 1.4 1998/11/29 01:08:10 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_post.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_post 3X "" +.SH NAME +\fBform_post\fR - write or erase forms from associated subwindows +.SH SYNOPSIS +\fB#include \fR +.br +int post_form(FORM *form); +.br +int unpost_form(FORM *form); +.br +.SH DESCRIPTION +The function \fBpost_form\fR displays a form to its associated subwindow. To +trigger physical display of the subwindow, use \fBrefresh\fR or some equivalent +\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR +input request will do). + +The function \fBunpost_form\fR erases form from its associated subwindow. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The form has already been posted. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NO_ROOM\fR +Form is too large for its window. +.TP 5 +\fBE_NOT_POSTED\fR +The form has not been posted. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the form. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_requestname.3 b/lib/libncurses/man/form_requestname.3 new file mode 100644 index 0000000000..2ffb2d6e5d --- /dev/null +++ b/lib/libncurses/man/form_requestname.3 @@ -0,0 +1,70 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_requestname.3x,v 1.6 1998/11/29 01:08:18 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_requestname.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_requestname 3X "" +.SH NAME +\fBform_requestname\fR - handle printable form request names +.SH SYNOPSIS +\fB#include \fR +.br +const char *form_request_name(int request); +.br +int form_request_by_name(const char *name); +.br +.SH DESCRIPTION +The function \fBform_request_name\fR returns the printable name of a form +request code. +.br +The function \fBform_request_by_name\fR searches in the name-table for a request +with the given name and returns its request code. Otherwise E_NO_MATCH is returned. +.SH RETURN VALUE +\fBform_request_name\fR returns \fBNULL\fR on error and sets errno +to \fBE_BAD_ARGUMENT\fR. +.br +\fBform_request_by_name\fR returns \fBE_NO_MATCH\fR on error. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_userptr.3 b/lib/libncurses/man/form_userptr.3 new file mode 100644 index 0000000000..ac598e8541 --- /dev/null +++ b/lib/libncurses/man/form_userptr.3 @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_userptr.3x,v 1.9 1998/11/29 01:08:39 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_userptr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_userptr 3X "" +.SH NAME +\fBform_userptr\fR - associate application data with a form item +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_userptr(FORM *form, void *userptr); +.br +void* form_userptr(const FORM *form); +.br +.SH DESCRIPTION +Every form and every form item has a field that can be used to hold +application-specific data (that is, the form-driver code leaves it alone). +These functions get and set the form user pointer field. +.SH RETURN VALUE +The function \fBform_userptr\fR returns \fBNULL\fR on error. +The function \fBset_form_userptr\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. + +The user pointer should be a void pointer. We leave it as a char pointer for +SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/form_win.3 b/lib/libncurses/man/form_win.3 new file mode 100644 index 0000000000..641e4249c3 --- /dev/null +++ b/lib/libncurses/man/form_win.3 @@ -0,0 +1,96 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_win.3x,v 1.8 1999/04/10 23:36:08 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/form_win.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH form_win 3X "" +.SH NAME +\fBform_win\fR - make and break form window and subwindow associations +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_win(FORM *form, WINDOW *win); +.br +WINDOW *form_win(const FORM *form); +.br +int set_form_sub(FORM *form, WINDOW *sub); +.br +WINDOW *form_sub(const FORM *form); +.br +int scale_form(const FORM *form, int *rows, int *columns); +.br +.SH DESCRIPTION +Every form has an associated pair of \fBcurses\fR windows. The form window +displays any title and border associated with the window; the form subwindow +displays the items of the form that are currently available for selection. + +The first four functions get and set those windows. It is not necessary to set +either window; by default, the driver code uses \fBstdscr\fR for both. + +In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though +it were \fBstsdcr\fR. A form argument of \fBNULL\fR is treated as a request +to change the system default form window or subwindow. + +The function \fBscale_form\fR returns the minimum size required for the +subwindow of \fIform\fR. +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The form has already been posted. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the form. +.SH SEE ALSO +\fBcurses\fR(3X), \fBform\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/key_defined.3 b/lib/libncurses/man/key_defined.3 new file mode 100644 index 0000000000..f0c562976a --- /dev/null +++ b/lib/libncurses/man/key_defined.3 @@ -0,0 +1,61 @@ +.\"*************************************************************************** +.\" Copyright (c) 2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 2003 +.\" +.\" $Id: key_defined.3x,v 1.2 2003/05/17 23:24:45 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/key_defined.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH key_defined 3X "" +.SH NAME +\fBdefine_key\fP \- define a keycode +.SH SYNOPSIS +\fB#include \fP + +\fBint key_defined(const char *definition);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to determine if a string is currently bound +to any keycode. +.SH RETURN VALUE +If the string is bound to a keycode, its value (greater than zero) is returned. +If no keycode is bound, zero is returned. +If the string conflicts with longer strings which are bound to keys, -1 is returned. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3X). +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/keybound.3 b/lib/libncurses/man/keybound.3 new file mode 100644 index 0000000000..baa8f7d5e2 --- /dev/null +++ b/lib/libncurses/man/keybound.3 @@ -0,0 +1,65 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1999 +.\" +.\" $Id: keybound.3x,v 1.5 2003/10/25 20:33:16 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/keybound.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH keyok 3X "" +.SH NAME +\fBkeybound\fP \- return definition of keycode +.SH SYNOPSIS +\fB#include \fP + +\fBchar * keybound(int keycode, int count);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to determine the string which is defined +in the terminfo for specific keycodes. +.SH RETURN VALUE +The \fIkeycode\fP parameter must be greater than zero, else NULL is returned. +If it does not correspond to a defined key, then NULL is returned. +The \fIcount\fP parameter is used to allow the application to iterate +through multiple definitions, counting from zero. +When successful, +the function returns a string which must be freed by the caller. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3X), +\fBkeyok\fR(3X). +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/keyok.3 b/lib/libncurses/man/keyok.3 new file mode 100644 index 0000000000..593659a58c --- /dev/null +++ b/lib/libncurses/man/keyok.3 @@ -0,0 +1,64 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1997 +.\" +.\" $Id: keyok.3x,v 1.8 2003/10/25 20:41:08 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/keyok.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH keyok 3X "" +.SH NAME +\fBkeyok\fP \- enable or disable a keycode +.SH SYNOPSIS +\fB#include \fP + +\fBint keyok(int keycode, bool enable);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to disable specific keycodes, rather than +use the \fIkeypad\fP function to disable all keycodes. +Keys that have been disabled can be reenabled. +.SH RETURN VALUE +The keycode must be greater than zero, else ERR is returned. +If it does not correspond to a defined key, then ERR is returned. +If the \fIenable\fP parameter is true, then the key must have been disabled, +and vice versa. +Otherwise, the function returns OK. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3X). +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu.3 b/lib/libncurses/man/menu.3 new file mode 100644 index 0000000000..620835a224 --- /dev/null +++ b/lib/libncurses/man/menu.3 @@ -0,0 +1,191 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2000,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu.3x,v 1.15 2002/01/19 22:48:58 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu 3X "" +.SH NAME +\fBmenu\fR - curses extension for programming menus +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBmenu\fR library provides terminal-independent facilities for composing +menu systems on character-cell terminals. The library includes: item routines, +which create and modify menu items; and menu routines, which group items into +menus, display menus on the screen, and handle interaction with the user. + +The \fBmenu\fR library uses the \fBcurses\fR libraries, and a curses +initialization routine such as \fBinitscr\fR must be called before using any of +these functions. To use the \fBmenu\fR library, link with the options +\fB-lmenu -lcurses\fR. + +.SS Current Default Values for Item Attributes + +The \fBmenu\fR library maintains a default value for item attributes. You can +get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR +routine with a \fBNULL\fR item pointer. Changing this default with a +\fBset_\fR function affects future item creations, but does not change the +rendering of items already created. + +.SS Routine Name Index + +The following table lists each \fBmenu\fR routine and the name of +the manual page on which it is described. + +.TS +l l . +\fBcurses\fR Routine Name Manual Page Name += +current_item \fBmitem_current\fR(3X) +free_item \fBmitem_new\fR(3X) +free_menu \fBmenu_new\fR(3X) +item_count \fBmenu_items\fR(3X) +item_description \fBmitem_name\fR(3X) +item_index \fBmitem_current\fR(3X) +item_init \fBmenu_hook\fR(3X) +item_name \fBmitem_name\fR(3X) +item_opts \fBmitem_opts\fR(3X) +item_opts_off \fBmitem_opts\fR(3X) +item_opts_on \fBmitem_opts\fR(3X) +item_term \fBmenu_hook\fR(3X) +item_userptr \fBmitem_userptr\fR(3X) +item_value \fBmitem_value\fR(3X) +item_visible \fBmitem_visible\fR(3X) +menu_back \fBmenu_attributes\fR(3X) +menu_driver \fBmenu_driver\fR(3X) +menu_fore \fBmenu_attributes\fR(3X) +menu_format \fBmenu_format\fR(3X) +menu_grey \fBmenu_attributes\fR(3X) +menu_init \fBmenu_hook\fR(3X) +menu_items \fBmenu_items\fR(3X) +menu_mark \fBmenu_mark\fR(3X) +menu_opts \fBmenu_opts\fR(3X) +menu_opts_off \fBmenu_opts\fR(3X) +menu_opts_on \fBmenu_opts\fR(3X) +menu_pad \fBmenu_attributes\fR(3X) +menu_pattern \fBmenu_pattern\fR(3X) +menu_request_by_name \fBmenu_requestname\fR(3X) +menu_request_name \fBmenu_requestname\fR(3X) +menu_spacing \fBmenu_spacing\fR(3X) +menu_sub \fBmenu_win\fR(3X) +menu_term \fBmenu_hook\fR(3X) +menu_userptr \fBmenu_userptr\fR(3X) +menu_win \fBmenu_win\fR(3X) +new_item \fBmitem_new\fR(3X) +new_menu \fBmenu_new\fR(3X) +pos_menu_cursor \fBmenu_cursor\fR(3X) +post_menu \fBmenu_post\fR(3X) +scale_menu \fBmenu_win\fR(3X) +set_current_item \fBmitem_current\fR(3X) +set_item_init \fBmenu_hook\fR(3X) +set_item_opts \fBmitem_opts\fR(3X) +set_item_term \fBmenu_hook\fR(3X) +set_item_userptr \fBmitem_userptr\fR(3X) +set_item_value \fBmitem_value\fR(3X) +set_menu_back \fBmenu_attributes\fR(3X) +set_menu_fore \fBmenu_attributes\fR(3X) +set_menu_format \fBmenu_format\fR(3X) +set_menu_grey \fBmenu_attributes\fR(3X) +set_menu_init \fBmenu_hook\fR(3X) +set_menu_items \fBmenu_items\fR(3X) +set_menu_mark \fBmenu_mark\fR(3X) +set_menu_opts \fBmitem_opts\fR(3X) +set_menu_pad \fBmenu_attributes\fR(3X) +set_menu_pattern \fBmenu_pattern\fR(3X) +set_menu_spacing \fBmenu_spacing\fR(3X) +set_menu_sub \fBmenu_win\fR(3X) +set_menu_term \fBmenu_hook\fR(3X) +set_menu_userptr \fBmenu_userptr\fR(3X) +set_menu_win \fBmenu_win\fR(3X) +set_top_row \fBmitem_current\fR(3X) +top_row \fBmitem_current\fR(3X) +unpost_menu \fBmenu_post\fR(3X) +.TE +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu is already posted. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NO_ROOM\fR +Menu is too large for its window. +.TP 5 +\fBE_NOT_POSTED\fR +The menu has not been posted. +.TP 5 +\fBE_UNKNOWN_COMMAND\fR +The menu driver code saw an unknown request code. +.TP 5 +\fBE_NO_MATCH\fR +Character failed to match. +.TP 5 +\fBE_NOT_SELECTABLE\fR +The designated item cannot be selected. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.TP 5 +\fBE_REQUEST_DENIED\fR +The menu driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "menu_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. + +In your library list, libmenu.a should be before libncurses.a; that is, +you want to say `-lmenu -lncurses', not the other way around (which would +give you a link error using GNU \fBld\fR(1) and many other linkers). +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_attributes.3 b/lib/libncurses/man/menu_attributes.3 new file mode 100644 index 0000000000..d92b3868c8 --- /dev/null +++ b/lib/libncurses/man/menu_attributes.3 @@ -0,0 +1,101 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_attributes.3x,v 1.7 2002/01/19 22:49:06 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_attributes.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_attributes 3X "" +.SH NAME +\fBmenu_attributes\fR - color and attribute control for menus +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_fore(MENU *menu, chtype attr); +.br +chtype menu_fore(const MENU *menu); +.br +int set_menu_back(MENU *menu, chtype attr); +.br +chtype menu_back(const MENU *menu); +.br +int set_menu_grey(MENU *menu, chtype attr); +.br +chtype menu_grey(const MENU *menu); +.br +int set_menu_pad(MENU *menu, int pad); +.br +int menu_pad(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_fore\fR sets the foreground attribute of +\fImenu\fR. This is the highlight used for selected menu items. +\fBmenu_fore\fR returns the foreground attribute. The default +is \fBA_STANDOUT\fR. + +The function \fBset_menu_back\fR sets the background attribute of +\fImenu\fR. This is the highlight used for selectable (but not currently +selected) menu items. The function \fBmenu_back\fR returns the background +attribute. The default is \fBA_NORMAL\fR. + +The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is +the highlight used for un-selectable menu items in menus that permit more than +one selection. The function \fBmenu_grey\fR returns the grey attribute. +The default is \fBA_UNDERLINE\fR. + +The function \fBset_menu_pad\fR sets the character used to fill the space +between the name and description parts of a menu item. \fBmenu_pad\fR returns +the given menu's pad character. The default is a blank. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X) and related pages whose names begin "menu_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_cursor.3 b/lib/libncurses/man/menu_cursor.3 new file mode 100644 index 0000000000..9c3f9a5902 --- /dev/null +++ b/lib/libncurses/man/menu_cursor.3 @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_cursor.3x,v 1.5 1998/11/29 01:09:30 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_cursor.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_cursor 3X "" +.SH NAME +\fBmenu_cursor\fR - position a menu's cursor +.SH SYNOPSIS +\fB#include \fR +.br +int pos_menu_cursor(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBpos_menu_cursor\fR restores the cursor to the current position +associated with the menu's selected item. This is useful after \fBcurses\fR +routines have been called to do screen-painting in response to a menu select. +.SH RETURN VALUE +This routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_NOT_POSTED\fR +The menu has not been posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_driver.3 b/lib/libncurses/man/menu_driver.3 new file mode 100644 index 0000000000..ba0a90d41f --- /dev/null +++ b/lib/libncurses/man/menu_driver.3 @@ -0,0 +1,171 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_driver.3x,v 1.11 2003/05/10 20:22:01 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_driver.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_driver 3X "" +.SH NAME +\fBmenu_driver\fR - command-processing loop of the menu system +.SH SYNOPSIS +\fB#include \fR +.br +int menu_driver(MENU *menu, int c); +.br +.SH DESCRIPTION +Once a menu has been posted (displayed), you should funnel input events to it +through \fBmenu_driver\fR. This routine has three major input cases; either +the input is a menu navigation request, it's a printable ASCII character or it +is the KEY_MOUSE special key associated with an mouse event. +The menu driver requests are as follows: +.TP 5 +REQ_LEFT_ITEM +Move left to an item. +.TP 5 +REQ_RIGHT_ITEM +Move right to an item. +.TP 5 +REQ_UP_ITEM +Move up to an item. +.TP 5 +REQ_DOWN_ITEM +Move down to an item. +.TP 5 +REQ_SCR_ULINE +Scroll up a line. +.TP 5 +REQ_SCR_DLINE +Scroll down a line. +.TP 5 +REQ_SCR_DPAGE +Scroll down a page. +.TP 5 +REQ_SCR_UPAGE +Scroll up a page. +.TP 5 +REQ_FIRST_ITEM +Move to the first item. +.TP 5 +REQ_LAST_ITEM +Move to the last item. +.TP 5 +REQ_NEXT_ITEM +Move to the next item. +.TP 5 +REQ_PREV_ITEM +Move to the previous item. +.TP 5 +REQ_TOGGLE_ITEM +Select/deselect an item. +.TP 5 +REQ_CLEAR_PATTERN +Clear the menu pattern buffer. +.TP 5 +REQ_BACK_PATTERN +Delete the previous character from the pattern buffer. +.TP 5 +REQ_NEXT_MATCH +Move to the next item matching the pattern match. +.TP 5 +REQ_PREV_MATCH +Move to the previous item matching the pattern match. +.PP +If the second argument is a printable ASCII character, the code appends +it to the pattern buffer and attempts to move to the next item matching +the new pattern. If there is no such match, \fBmenu_driver\fR returns +\fBE_NO_MATCH\fR and deletes the appended character from the buffer. +.PP +If the second argument is one of the above pre-defined requests, the +corresponding action is performed. +.PP +If the second argument is the KEY_MOUSE special key, the associated +mouse event is translated into one of the above pre-defined requests. +Currently only clicks in the user window (e.g. inside the menu display +area or the decoration window) are handled. If you click above the +display region of the menu, a REQ_SCR_ULINE is generated, if you +doubleclick a REQ_SCR_UPAGE is generated and if you tripleclick a +REQ_FIRST_ITEM is generated. If you click below the display region of +the menu, a REQ_SCR_DLINE is generated, if you doubleclick a REQ_SCR_DPAGE +is generated and if you tripleclick a REQ_LAST_ITEM is generated. If you +click at an item inside the display area of the menu, the menu cursor +is positioned to that item. If you double-click at an item a REQ_TOGGLE_ITEM +is generated and \fBE_UNKNOWN_COMMAND\fR is returned. This return value makes +sense, because a double click usually means that an item-specific action should +be returned. It's exactly the purpose of this return value to signal that an +application specific command should be executed. If a translation +into a request was done, \fBmenu_driver\fR returns the result of this request. +If you clicked outside the user window or the mouse event couldn't be translated +into a menu request an \fBE_REQUEST_DENIED\fR is returned. +.PP +If the second argument is neither printable ASCII nor one of the above +pre-defined menu requests or KEY_MOUSE, the drive assumes it is an application-specific +command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands +should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these +pre-defined requests. +.SH RETURN VALUE +\fBmenu_driver\fR return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NOT_POSTED\fR +The menu has not been posted. +.TP 5 +\fBE_UNKNOWN_COMMAND\fR +The menu driver code saw an unknown request code. +.TP 5 +\fBE_NO_MATCH\fR +Character failed to match. +.TP 5 +\fBE_REQUEST_DENIED\fR +The menu driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. The support for mouse events is ncurses specific. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_format.3 b/lib/libncurses/man/menu_format.3 new file mode 100644 index 0000000000..4d0e199c69 --- /dev/null +++ b/lib/libncurses/man/menu_format.3 @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_format.3x,v 1.8 2001/08/04 20:36:19 William.Setzer Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_format.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_format 3X "" +.SH NAME +\fBmenu_format\fR - set and get menu sizes +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_format(MENU *menu, int rows, int cols); +.br +void menu_format(const MENU *menu, int *rows, int *cols); +.br +.SH DESCRIPTION +The function \fBset_menu_format\fR sets the maximum display size of the given +menu. If this size is too small to display all menu items, the menu will be +made scrollable. If this size is larger than the menus subwindow and the +subwindow is too small to display all menu items, \fBpost_menu()\fR will fail. + +The default format is 16 rows, 1 column. Calling \fBset_menu_format\fR with a +null menu pointer will change this default. A zero row or column argument to +\fBset_menu_format\fR is interpreted as a request not to change the current +value. + +The function \fBmenu_format\fR returns the maximum-size constraints for the +given menu into the storage addressed by \fBrows\fR and \fBcols\fR. +.SH RETURN VALUE +These routines returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu is already posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_hook.3 b/lib/libncurses/man/menu_hook.3 new file mode 100644 index 0000000000..39f28014c6 --- /dev/null +++ b/lib/libncurses/man/menu_hook.3 @@ -0,0 +1,102 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_hook.3x,v 1.6 1998/11/29 01:09:47 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_hook.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_hook 3X "" +.SH NAME +\fBmenu_hook\fR - set hooks for automatic invocation by applications +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_init(MENU *menu, void (*func)(MENU *)); +.br +void (*)(MENU *) item_init(const MENU *menu); +.br +int set_item_term(MENU *menu, void (*func)(MENU *)); +.br +void (*)(MENU *) item_term(const MENU *menu); +.br +int set_menu_init(MENU *menu, void (*func)(MENU *)); +.br +void (*)(MENU *) menu_init(const MENU *menu); +.br +int set_menu_term(MENU *menu, void (*func)(MENU *)); +.br +void (*)(MENU *) menu_term(const MENU *menu); +.br +.SH DESCRIPTION +These functions make it possible to set hook functions to be called at various +points in the automatic processing of input event codes by \fBmenu_driver\fR. + +The function \fBset_item_init\fR sets a hook to be called at menu-post time and +each time the selected item changes (after the change). \fBitem_init\fR +returns the current item init hook, if any (\fBNULL\fR if there is no such +hook). + +The function \fBset_item_term\fR sets a hook to be called at menu-unpost time +and each time the selected item changes (before the change). \fBitem_term\fR +returns the current item term hook, if any (\fBNULL\fR if there is no such +hook). + +The function \fBset_menu_init\fR sets a hook to be called at menu-post time and +just after the top row on the menu changes once it is posted. \fBmenu_init\fR +returns the current menu init hook, if any (\fBNULL\fR if there is no such +hook). + +The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time +and just before the top row on the menu changes once it is posted. +\fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there +is no such hook). +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Other routines +return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_items.3 b/lib/libncurses/man/menu_items.3 new file mode 100644 index 0000000000..eeff164ef8 --- /dev/null +++ b/lib/libncurses/man/menu_items.3 @@ -0,0 +1,92 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_items.3x,v 1.5 1998/11/29 01:09:56 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_items.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_items 3X "" +.SH NAME +\fBmenu_items\fR - make and break connections between items and menus +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_items(MENU *menu, ITEM **items); +.br +ITEM **menu_items(const MENU *menu); +.br +int item_count(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_items\fR changes the item pointer array of the given +\fImenu\fR. The array must be terminated by a \fBNULL\fR. + +The function \fBmenu_items\fR returns the item array of the given menu. + +The function \fBitem_count\fR returns the count of items in \fImenu\fR. +.SH RETURN VALUES +The function \fBmenu_items\fR returns \fBNULL\fR on error. + +The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error +return value) on error. + +The function \fBset_menu_items\fR returns one of the following codes on error: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu is already posted. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The SVr4 menu library documentation specifies the \fBitem_count\fR error value +as -1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_mark.3 b/lib/libncurses/man/menu_mark.3 new file mode 100644 index 0000000000..7983e40c3f --- /dev/null +++ b/lib/libncurses/man/menu_mark.3 @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_mark.3x,v 1.6 1998/11/29 01:10:03 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_mark.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_mark 3X "" +.SH NAME +\fBmenu_mark\fR - get and set the menu mark string +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_mark(MENU *menu, const char *mark); +.br +const char *menu_mark(const MENU *menu); +.br +.SH DESCRIPTION +In order to make menu selections visible on older terminals without +highlighting or color capability, the menu library marks selected items +in a menu with a prefix string. + +The function \fBset_menu_mark\fR sets the mark string for the given menu. +Calling \fBset_menu_mark\fR with a null menu item will abolish the mark string. +Note that changing the length of the mark string for a menu while the +menu is posted is likely to produce unhelpful behavior. + +The default string is "-" (a dash). Calling \fBset_menu_mark\fR with +a \fBNULL\fR menu argument will change this default. + +The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if +there is none). +.SH RETURN VALUE +The function \fBmenu_mark\fR returns \fBNULL\fR on error. The function +\fBset_menu_mark\fR may return the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_new.3 b/lib/libncurses/man/menu_new.3 new file mode 100644 index 0000000000..b8979c51c9 --- /dev/null +++ b/lib/libncurses/man/menu_new.3 @@ -0,0 +1,80 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_new.3x,v 1.7 1998/11/29 01:10:13 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_new.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_new 3X "" +.SH NAME +\fBmenu_new\fR - create and destroy menus +.SH SYNOPSIS +\fB#include \fR +.br +MENU *new_menu(ITEM **items); +.br +int free_menu(MENU *menu); +.br +.SH DESCRIPTION +The function \fBnew_menu\fR creates a new menu connected to a specified item +pointer array (which must be \fBNULL\fR-terminated). + +The function \fBfree_menu\fR disconnects \fImenu\fR from its item array +and frees the storage allocated for the menu. +.SH RETURN VALUE +The function \fBnew_menu\fR returns \fBNULL\fR on error. + +The function \fBfree_menu\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu has already been posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_opts.3 b/lib/libncurses/man/menu_opts.3 new file mode 100644 index 0000000000..da4482f264 --- /dev/null +++ b/lib/libncurses/man/menu_opts.3 @@ -0,0 +1,105 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_opts.3x,v 1.7 1998/11/29 01:10:21 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_opts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_opts 3X "" +.SH NAME +\fBmenu_opts\fR - set and get menu options +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_opts(MENU *menu, OPTIONS opts); +.br +int menu_opts_on(MENU *menu, OPTIONS opts); +.br +int menu_opts_off(MENU *menu, OPTIONS opts); +.br +OPTIONS menu_opts(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_opts\fR sets all the given menu's option bits (menu +option bits may be logically-OR'ed together). + +The function \fBmenu_opts_on\fR turns on the given option bits, and leaves +others alone. + +The function \fBmenu_opts_off\fR turns off the given option bits, and leaves +others alone. + +The function \fBmenu_opts\fR returns the menu's current option bits. + +The following options are defined (all are on by default): +.TP 5 +O_ONEVALUE +Only one item can be selected for this menu. +.TP 5 +O_SHOWDESC +Display the item descriptions when the menu is posted. +.TP 5 +O_ROWMAJOR +Display the menu in row-major order. +.TP 5 +O_IGNORECASE +Ignore the case when pattern-matching. +.TP 5 +O_SHOWMATCH +Move the cursor to within the item name while pattern-matching. +.TP 5 +O_NONCYCLIC +Don't wrap around next-item and previous-item, +requests to the other end of the menu. +.SH RETURN VALUE +Except for \fBmenu_opts\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_POSTED\fR +The menu is already posted. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_pattern.3 b/lib/libncurses/man/menu_pattern.3 new file mode 100644 index 0000000000..1f3da902fe --- /dev/null +++ b/lib/libncurses/man/menu_pattern.3 @@ -0,0 +1,83 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_pattern.3x,v 1.8 2003/05/10 20:22:01 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_pattern.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_pattern 3X "" +.SH NAME +\fBmenu_pattern\fR - get and set a menu's pattern buffer +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_pattern(MENU *menu, const char *pattern); +.br +char *menu_pattern(const MENU *menu); +.br +.SH DESCRIPTION +Every menu has an associated pattern match buffer. As input events that are +printable ASCII characters come in, they are appended to this match buffer +and tested for a match, as described in \fBmenu_driver\fR(3X). + +The function \fBset_menu_pattern\fR sets the pattern buffer for the given menu +and tries to find the first matching item. If it succeeds, that item becomes +current; if not, the current item does not change. + +The function \fBmenu_pattern\fR returns the pattern buffer of the given +\fImenu\fR. +.SH RETURN VALUE +The function \fBmenu_pattern\fR returns \fBNULL\fR on error. The function +\fBset_menu_pattern\fR may return the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_NO_MATCH\fR +Character failed to match. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_post.3 b/lib/libncurses/man/menu_post.3 new file mode 100644 index 0000000000..2660e98ae4 --- /dev/null +++ b/lib/libncurses/man/menu_post.3 @@ -0,0 +1,92 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_post.3x,v 1.7 1998/11/29 01:10:33 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_post.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_post 3X "" +.SH NAME +\fBmenu_post\fR - write or erase menus from associated subwindows +.SH SYNOPSIS +\fB#include \fR +.br +int post_menu(MENU *menu); +.br +int unpost_menu(MENU *menu); +.br +.SH DESCRIPTION +The function \fBpost_menu\fR displays a menu to its associated subwindow. To +trigger physical display of the subwindow, use \fBrefresh\fR or some equivalent +\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR +input request will do). \fBpost_menu\fR resets the selection status of all items. + +The function \fBunpost_menu\fR erases menu from its associated subwindow. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu has already been posted. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NO_ROOM\fR +Menu is too large for its window. You should consider to use +\fBset_menu_format()\fR to solve the problem. +.TP 5 +\fBE_NOT_POSTED\fR +The menu has not been posted. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_requestname.3 b/lib/libncurses/man/menu_requestname.3 new file mode 100644 index 0000000000..9a3b84025d --- /dev/null +++ b/lib/libncurses/man/menu_requestname.3 @@ -0,0 +1,70 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_requestname.3x,v 1.6 1998/11/29 01:10:40 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_requestname.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_requestname 3X "" +.SH NAME +\fBmenu_requestname\fR - handle printable menu request names +.SH SYNOPSIS +\fB#include \fR +.br +const char *menu_request_name(int request); +.br +int menu_request_by_name(const char *name); +.br +.SH DESCRIPTION +The function \fBmenu_request_name\fR returns the printable name of a menu +request code. +.br +The function \fBmenu_request_by_name\fR searches in the name-table for a request +with the given name and returns its request code. Otherwise E_NO_MATCH is returned. +.SH RETURN VALUE +\fBmenu_request_name\fR returns \fBNULL\fR on error and sets errno +to \fBE_BAD_ARGUMENT\fR. +.br +\fBmenu_request_by_name\fR returns \fBE_NO_MATCH\fR on error. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_spacing.3 b/lib/libncurses/man/menu_spacing.3 new file mode 100644 index 0000000000..5c998b72f8 --- /dev/null +++ b/lib/libncurses/man/menu_spacing.3 @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_spacing.3x,v 1.6 2001/08/04 20:36:16 William.Setzer Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_spacing.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_spacing 3X "" +.SH NAME +\fBmenu_spacing\fR - Control spacing between menu items. +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_spacing(MENU *menu, + int spc_description, + int spc_rows, + int spc_columns); +.br +int menu_spacing(const MENU *menu, + int* spc_description, + int* spc_rows, + int* spc_columns); +.br +.SH DESCRIPTION +The function \fBset_menu_spacing\fR sets the spacing informations for the menu. +\fBspc_description\fR controls the number of spaces between an item name and an item +description. It must not be larger than \fBTABSIZE\fR. The menu system puts in the +middle of this spacing area the pad character. The remaining parts are filled with +spaces. +\fBspc_rows\fR controls the number of rows that are used for an item. It must not be +larger than 3. The menu system inserts then blank lines between item rows, these lines +will contain the pad character in the appropriate positions. +\fBspc_columns\fR controls the number of blanks between columns of items. It must not +be larger than TABSIZE. +A value of 0 for all the spacing values resets them to the default, which is 1 for all +of them. +.br +The function \fBmenu_spacing\fR passes back the spacing info for the menu. If a +pointer is NULL, this specific info is simply not returned. +.SH RETURN VALUE +Both routines return \fBE_OK\fR on success. \fBset_menu_spacing\fR may return +\fBE_POSTED\fR if the menu is posted, or \fBE_BAD_ARGUMENT\fR if one of the +spacing values is out of range. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_userptr.3 b/lib/libncurses/man/menu_userptr.3 new file mode 100644 index 0000000000..145e5ad6c1 --- /dev/null +++ b/lib/libncurses/man/menu_userptr.3 @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_userptr.3x,v 1.6 1998/11/29 01:11:02 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_userptr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_userptr 3X "" +.SH NAME +\fBmenu_userptr\fR - associate application data with a menu item +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_userptr(MENU *menu, void *userptr); +.br +void *menu_userptr(const MENU *menu); +.br +.SH DESCRIPTION +Every menu and every menu item has a field that can be used to hold +application-specific data (that is, the menu-driver code leaves it alone). +These functions get and set the menu user pointer field. +.SH RETURN VALUE +Except for \fBmenu_userptr\fR (which returns \fBNULL\fR on error), each +function returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The user pointer should be a void pointer. We leave it as a char pointer for +SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/menu_win.3 b/lib/libncurses/man/menu_win.3 new file mode 100644 index 0000000000..75ac0205c5 --- /dev/null +++ b/lib/libncurses/man/menu_win.3 @@ -0,0 +1,96 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_win.3x,v 1.6 1998/11/29 01:11:11 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/menu_win.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH menu_win 3X "" +.SH NAME +\fBmenu_win\fR - make and break menu window and subwindow associations +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_win(MENU *menu, WINDOW *win); +.br +WINDOW *menu_win(const MENU *menu); +.br +int set_menu_sub(MENU *menu, WINDOW *sub); +.br +WINDOW *menu_sub(const MENU *menu); +.br +int scale_menu(const MENU *menu, int *rows, int *columns); +.br +.SH DESCRIPTION +Every menu has an associated pair of \fBcurses\fR windows. The menu window +displays any title and border associated with the window; the menu subwindow +displays the items of the menu that are currently available for selection. + +The first four functions get and set those windows. It is not necessary to set +either window; by default, the driver code uses \fBstdscr\fR for both. + +In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though +it were \fBstsdcr\fR. A menu argument of \fBNULL\fR is treated as a request +to change the system default menu window or subwindow. + +The function \fBscale_menu\fR returns the minimum size required for the +subwindow of \fImenu\fR. +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu has already been posted. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_current.3 b/lib/libncurses/man/mitem_current.3 new file mode 100644 index 0000000000..f45dcc35b4 --- /dev/null +++ b/lib/libncurses/man/mitem_current.3 @@ -0,0 +1,102 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_current.3x,v 1.9 1998/12/26 19:52:34 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_current.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_current 3X "" +.SH NAME +\fBmitem_current\fR - set and get current_menu_item +.SH SYNOPSIS +\fB#include \fR +.br +int set_current_item(MENU *menu, const ITEM *item); +.br +ITEM *current_item(const MENU *menu); +.br +int set_top_row(MENU *menu, int row); +.br +int top_row(const MENU *menu); +.br +int item_index(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_current_item\fR sets the current item (the item on which +the menu cursor is positioned). \fBcurrent_item\fR returns a pointer to the +current item in the given menu. + +The function \fBset_top_row\fR sets the top row of the menu to show the given +row (the top row is initially 0, and is reset to this value whenever the +\fBO_ROWMAJOR\fR option is toggled). The item leftmost on the given row +becomes current. The function \fBtop_row\fR returns the number of the top menu +row being displayed. + +The function \fBitem_index\fR returns the (zero-origin) index of \fIitem\fR in +the menu's item pointer list. +.SH RETURN VALUE +\fBcurrent_item\fR returns \fBNULL\fR on error. + +\fBtop_row\fR and \fBitem_index\fR return \fBERR\fR (the general \fBcurses\fR +error value) on error. + +\fBset_current_item\fR and \fBset_top_row\fR return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The SVr4 menu library documentation specifies the \fBtop_row\fR and +\fBindex_item\fR error value as -1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_name.3 b/lib/libncurses/man/mitem_name.3 new file mode 100644 index 0000000000..f66c3359d9 --- /dev/null +++ b/lib/libncurses/man/mitem_name.3 @@ -0,0 +1,65 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_name.3x,v 1.5 1998/11/29 01:11:29 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_name.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_name 3X "" +.SH NAME +\fBmitem_name\fR - get menu item name and description fields +.SH SYNOPSIS +\fB#include \fR +.br +const char *item_name(const ITEM *item); +.br +const char *item_description(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBitem_name\fR returns the name part of the given item. +.br +The function \fBitem_description\fR returns the description part of the given +item. +.SH RETURN VALUE +These routines returns \fBNULL\fR on error. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_new.3 b/lib/libncurses/man/mitem_new.3 new file mode 100644 index 0000000000..55931b4681 --- /dev/null +++ b/lib/libncurses/man/mitem_new.3 @@ -0,0 +1,84 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_new.3x,v 1.8 2003/10/25 20:08:57 Jared.Yanovich Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_new.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_new 3X "" +.SH NAME +\fBmitem_new\fR - create and destroy menu items +.SH SYNOPSIS +\fB#include \fR +.br +ITEM *new_item(const char *name, const char *description); +.br +int free_item(ITEM *item); +.br +.SH DESCRIPTION +The function \fBnew_item\fR allocates a new item and initializes it from the +\fBname\fR and \fBdescription\fR pointers. Please notice that the item stores +only the pointers to the name and description. Those pointers must be valid +during the lifetime of the item. So you should be very careful with names +or descriptions allocated on the stack of some routines. +.br +The function \fBfree_item\fR de-allocates an item. Please notice that it +is the responsibility of the application to release the memory for the +name or the description of the item. +.SH RETURN VALUE +The function \fBnew_item\fR returns \fBNULL\fR on error. + +The function \fBfree_item\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_CONNECTED\fR +Item is connected to a menu. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_opts.3 b/lib/libncurses/man/mitem_opts.3 new file mode 100644 index 0000000000..88bbceba54 --- /dev/null +++ b/lib/libncurses/man/mitem_opts.3 @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_opts.3x,v 1.6 1998/11/29 01:12:37 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_opts.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_opts 3X "" +.SH NAME +\fBmitem_opts\fR - set and get menu item options +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_opts(ITEM *item, OPTIONS opts); +.br +int item_opts_on(ITEM *item, OPTIONS opts); +.br +int item_opts_off(ITEM *item, OPTIONS opts); +.br +OPTIONS item_opts(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_item_opts\fR sets all the given item's option bits (menu +option bits may be logically-OR'ed together). + +The function \fBitem_opts_on\fR turns on the given option bits, and leaves +others alone. + +The function \fBitem_opts_off\fR turns off the given option bits, and leaves +others alone. + +The function \fBitem_opts\fR returns the item's current option bits. + +There is only one defined option bit mask, \fBO_SELECTABLE\fR. When this is +on, the item may be selected during menu processing. This option defaults +to on. +.SH RETURN VALUE +Except for \fBitem_opts\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_userptr.3 b/lib/libncurses/man/mitem_userptr.3 new file mode 100644 index 0000000000..9845ca9a64 --- /dev/null +++ b/lib/libncurses/man/mitem_userptr.3 @@ -0,0 +1,73 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_userptr.3x,v 1.6 1998/11/29 01:12:47 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_userptr.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_userptr 3X "" +.SH NAME +\fBmitem_userptr\fR - associate application data with a menu item +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_userptr(ITEM *item, void *userptr); +.br +void *item_userptr(const ITEM *item); +.br +.SH DESCRIPTION +Every menu item has a field that can be used to hold application-specific data +(that is, the menu-driver code leaves it alone). These functions get and set +that field. +.SH RETURN VALUE +Except for \fBitem_userptr\fR (which returns \fBNULL\fR on error), each function returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The user pointer should be a void pointer. We leave it as a char pointer for +SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_value.3 b/lib/libncurses/man/mitem_value.3 new file mode 100644 index 0000000000..f5a7fed060 --- /dev/null +++ b/lib/libncurses/man/mitem_value.3 @@ -0,0 +1,77 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_value.3x,v 1.6 2002/02/16 22:40:59 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_value.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_value 3X "" +.SH NAME +\fBmitem_value\fR - set and get menu item values +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_value(ITEM *item, bool value); +.br +bool item_value(const ITEM *item); +.br +.SH DESCRIPTION +If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with +\fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBmenu_opts\fR(3X)), the menu +becomes multi-valued; that is, more than one item may simultaneously be +selected. + +In a multi_valued menu, you can used \fBset_item_value\fR to select the +given menu item (second argument \fBTRUE\fR) or deselect it (second argument +\fBFALSE\fR). +.SH RETURN VALUE +The function \fBset_item_value\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_REQUEST_DENIED\fR +The menu driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/mitem_visible.3 b/lib/libncurses/man/mitem_visible.3 new file mode 100644 index 0000000000..c75f7c5929 --- /dev/null +++ b/lib/libncurses/man/mitem_visible.3 @@ -0,0 +1,60 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_visible.3x,v 1.5 1998/11/29 01:12:55 Rick.Ohnemus Exp $ +.\" $DragonFly: src/lib/libncurses/man/mitem_visible.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH mitem_visible 3X "" +.SH NAME +\fBmitem_visible\fR - check visibility of a menu item +.SH SYNOPSIS +\fB#include \fR +.br +bool item_visible(const ITEM *item); +.br +.SH DESCRIPTION +A menu item is visible when it is in the portion of a posted menu that +is mapped onto the screen (if the menu is scrollable, in particular, this +portion will be smaller than the whole menu). +.SH SEE ALSO +\fBcurses\fR(3X), \fBmenu\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/ncurses.3 b/lib/libncurses/man/ncurses.3 new file mode 100644 index 0000000000..2d6dbbfea2 --- /dev/null +++ b/lib/libncurses/man/ncurses.3 @@ -0,0 +1,913 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: ncurses.3x,v 1.70 2004/01/11 01:45:54 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/ncurses.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.hy 0 +.TH ncurses 3X "" +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +\fBncurses\fR - CRT screen handling and optimization package +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBncurses\fR library routines give the user a terminal-independent method +of updating character screens with reasonable optimization. This +implementation is ``new curses'' (ncurses) and is the approved replacement for +4.4BSD classic curses, which has been discontinued. +.PP +The \fBncurses\fR routines emulate the \fBcurses\fR(3X) library of System V +Release 4 UNIX, and the XPG4 curses standard (XSI curses) but the \fBncurses\fR +library is freely redistributable in source form. Differences from the SVr4 +curses are summarized under the EXTENSIONS and BUGS sections below and +described in detail in the EXTENSIONS and BUGS sections of individual man +pages. +.PP +A program using these routines must be linked with the \fB-lncurses\fR option, +or (if it has been generated) with the debugging library \fB-lncurses_g\fR. +(Your system integrator may also have installed these libraries under +the names \fB-lcurses\fR and \fB-lcurses_g\fR.) +The ncurses_g library generates trace logs (in a file called 'trace' in the +current directory) that describe curses actions. +.PP +The \fBncurses\fR package supports: overall screen, window and pad +manipulation; output to windows and pads; reading terminal input; control over +terminal and \fBcurses\fR input and output options; environment query +routines; color manipulation; use of soft label keys; terminfo capabilities; +and access to low-level terminal-manipulation routines. +.PP +To initialize the routines, the routine \fBinitscr\fR or \fBnewterm\fR +must be called before any of the other routines that deal with windows +and screens are used. The routine \fBendwin\fR must be called before +exiting. To get character-at-a-time input without echoing (most +interactive, screen oriented programs want this), the following +sequence should be used: +.sp + \fBinitscr(); cbreak(); noecho();\fR +.sp +Most programs would additionally use the sequence: +.sp + \fBnonl();\fR + \fBintrflush(stdscr, FALSE);\fR + \fBkeypad(stdscr, TRUE);\fR +.sp +Before a \fBcurses\fR program is run, the tab stops of the terminal +should be set and its initialization strings, if defined, must be +output. This can be done by executing the \fBtput init\fR command +after the shell environment variable \fBTERM\fR has been exported. +\fBtset(1)\fR is usually responsible for doing this. +[See \fBterminfo\fR(\*n) for further details.] +.PP +The \fBncurses\fR library permits manipulation of data structures, +called \fIwindows\fR, which can be thought of as two-dimensional +arrays of characters representing all or part of a CRT screen. A +default window called \fBstdscr\fR, which is the size of the terminal +screen, is supplied. Others may be created with \fBnewwin\fR. +.PP +Note that \fBcurses\fR does not handle overlapping windows, that's done by +the \fBpanel\fR(3X) library. This means that you can either use +\fBstdscr\fR or divide the screen into tiled windows and not using +\fBstdscr\fR at all. Mixing the two will result in unpredictable, and +undesired, effects. +.PP +Windows are referred to by variables declared as \fBWINDOW *\fR. +These data structures are manipulated with routines described here and +elsewhere in the \fBncurses\fR manual pages. Among which the most basic +routines are \fBmove\fR and \fBaddch\fR. More general versions of +these routines are included with names beginning with \fBw\fR, +allowing the user to specify a window. The routines not beginning +with \fBw\fR affect \fBstdscr\fR.) +.PP +After using routines to manipulate a window, \fBrefresh\fR is called, +telling \fBcurses\fR to make the user's CRT screen look like +\fBstdscr\fR. The characters in a window are actually of type +\fBchtype\fR, (character and attribute data) so that other information +about the character may also be stored with each character. +.PP +Special windows called \fIpads\fR may also be manipulated. These are windows +which are not constrained to the size of the screen and whose contents need not +be completely displayed. See \fBcurs_pad\fR(3X) for more information. +.PP +In addition to drawing characters on the screen, video attributes and colors +may be supported, causing the characters to show up in such modes as +underlined, in reverse video, or in color on terminals that support such +display enhancements. Line drawing characters may be specified to be output. +On input, \fBcurses\fR is also able to translate arrow and function keys that +transmit escape sequences into single values. The video attributes, line +drawing characters, and input values use names, defined in \fB\fR, +such as \fBA_REVERSE\fR, \fBACS_HLINE\fR, and \fBKEY_LEFT\fR. +.PP +If the environment variables \fBLINES\fR and \fBCOLUMNS\fR are set, or if the +program is executing in a window environment, line and column information in +the environment will override information read by \fIterminfo\fR. This would +effect a program running in an AT&T 630 layer, for example, where the size of a +screen is changeable (see \fBENVIRONMENT\fR). +.PP +If the environment variable \fBTERMINFO\fR is defined, any program using +\fBcurses\fR checks for a local terminal definition before checking in the +standard place. For example, if \fBTERM\fR is set to \fBatt4424\fR, then the +compiled terminal definition is found in +.sp + \fB\*d/a/att4424\fR. +.sp +(The \fBa\fR is copied from the first letter of \fBatt4424\fR to avoid +creation of huge directories.) However, if \fBTERMINFO\fR is set to +\fB$HOME/myterms\fR, \fBcurses\fR first checks +.sp + \fB$HOME/myterms/a/att4424\fR, +.sp +and if that fails, it then checks +.sp + \fB\*d/a/att4424\fR. +.sp +This is useful for developing experimental definitions or when write +permission in \fB\*d\fR is not available. +.PP +The integer variables \fBLINES\fR and \fBCOLS\fR are defined in +\fB\fR and will be filled in by \fBinitscr\fR with the size of the +screen. The constants \fBTRUE\fR and \fBFALSE\fR have the values \fB1\fR and +\fB0\fR, respectively. +.PP +The \fBcurses\fR routines also define the \fBWINDOW *\fR variable \fBcurscr\fR +which is used for certain low-level operations like clearing and redrawing a +screen containing garbage. The \fBcurscr\fR can be used in only a few +routines. +. +.SS Routine and Argument Names +Many \fBcurses\fR routines have two or more versions. The routines prefixed +with \fBw\fR require a window argument. The routines prefixed with \fBp\fR +require a pad argument. Those without a prefix generally use \fBstdscr\fR. +.PP +The routines prefixed with \fBmv\fR require a \fIy\fR and \fIx\fR +coordinate to move to before performing the appropriate action. The +\fBmv\fR routines imply a call to \fBmove\fR before the call to the +other routine. The coordinate \fIy\fR always refers to the row (of +the window), and \fIx\fR always refers to the column. The upper +left-hand corner is always (0,0), not (1,1). +.PP +The routines prefixed with \fBmvw\fR take both a window argument and +\fIx\fR and \fIy\fR coordinates. The window argument is always +specified before the coordinates. +.PP +In each case, \fIwin\fR is the window affected, and \fIpad\fR is the +pad affected; \fIwin\fR and \fIpad\fR are always pointers to type +\fBWINDOW\fR. +.PP +Option setting routines require a Boolean flag \fIbf\fR with the value +\fBTRUE\fR or \fBFALSE\fR; \fIbf\fR is always of type \fBbool\fR. The +variables \fIch\fR and \fIattrs\fR below are always of type +\fBchtype\fR. The types \fBWINDOW\fR, \fBSCREEN\fR, \fBbool\fR, and +\fBchtype\fR are defined in \fB\fR. The type \fBTERMINAL\fR +is defined in \fB\fR. All other arguments are integers. +.SS Routine Name Index +The following table lists each \fBcurses\fR routine and the name of +the manual page on which it is described. Routines flagged with `*' +are ncurses-specific, not described by XPG4 or present in SVr4. +.PP +.TS +center tab(/); +l l +l l . +\fBcurses\fR Routine Name/Manual Page Name += +COLOR_PAIR/\fBcurs_color\fR(3X) +PAIR_NUMBER/\fBcurs_attr\fR(3X) +_nc_tracebits/\fBcurs_trace\fR(3X)* +_traceattr/\fBcurs_trace\fR(3X)* +_traceattr2/\fBcurs_trace\fR(3X)* +_tracechar/\fBcurs_trace\fR(3X)* +_tracechtype/\fBcurs_trace\fR(3X)* +_tracechtype2/\fBcurs_trace\fR(3X)* +_tracedump/\fBcurs_trace\fR(3X)* +_tracef/\fBcurs_trace\fR(3X)* +_tracemouse/\fBcurs_trace\fR(3X)* +add_wch/\fBcurs_add_wch\fR(3X) +add_wchnstr/\fBcurs_add_wchstr\fR(3X) +add_wchstr/\fBcurs_add_wchstr\fR(3X) +addch/\fBcurs_addch\fR(3X) +addchnstr/\fBcurs_addchstr\fR(3X) +addchstr/\fBcurs_addchstr\fR(3X) +addnstr/\fBcurs_addstr\fR(3X) +addnwstr/\fBcurs_addwstr\fR(3X) +addstr/\fBcurs_addstr\fR(3X) +addwstr/\fBcurs_addwstr\fR(3X) +assume_default_colors/\fBdefault_colors\fR(3X)* +attr_get/\fBcurs_attr\fR(3X) +attr_off/\fBcurs_attr\fR(3X) +attr_on/\fBcurs_attr\fR(3X) +attr_set/\fBcurs_attr\fR(3X) +attroff/\fBcurs_attr\fR(3X) +attron/\fBcurs_attr\fR(3X) +attrset/\fBcurs_attr\fR(3X) +baudrate/\fBcurs_termattrs\fR(3X) +beep/\fBcurs_beep\fR(3X) +bkgd/\fBcurs_bkgd\fR(3X) +bkgdset/\fBcurs_bkgd\fR(3X) +bkgrnd/\fBcurs_bkgrnd\fR(3X) +bkgrndset/\fBcurs_bkgrnd\fR(3X) +border/\fBcurs_border\fR(3X) +border_set/\fBcurs_border_set\fR(3X) +box/\fBcurs_border\fR(3X) +box_set/\fBcurs_border_set\fR(3X) +can_change_color/\fBcurs_color\fR(3X) +cbreak/\fBcurs_inopts\fR(3X) +chgat/\fBcurs_attr\fR(3X) +clear/\fBcurs_clear\fR(3X) +clearok/\fBcurs_outopts\fR(3X) +clrtobot/\fBcurs_clear\fR(3X) +clrtoeol/\fBcurs_clear\fR(3X) +color_content/\fBcurs_color\fR(3X) +color_set/\fBcurs_attr\fR(3X) +copywin/\fBcurs_overlay\fR(3X) +curs_set/\fBcurs_kernel\fR(3X) +curses_version/\fBcurs_extend\fR(3X)* +def_prog_mode/\fBcurs_kernel\fR(3X) +def_shell_mode/\fBcurs_kernel\fR(3X) +define_key/\fBdefine_key\fR(3X)* +del_curterm/\fBcurs_terminfo\fR(3X) +delay_output/\fBcurs_util\fR(3X) +delch/\fBcurs_delch\fR(3X) +deleteln/\fBcurs_deleteln\fR(3X) +delscreen/\fBcurs_initscr\fR(3X) +delwin/\fBcurs_window\fR(3X) +derwin/\fBcurs_window\fR(3X) +doupdate/\fBcurs_refresh\fR(3X) +dupwin/\fBcurs_window\fR(3X) +echo/\fBcurs_inopts\fR(3X) +echo_wchar/\fBcurs_add_wch\fR(3X) +echochar/\fBcurs_addch\fR(3X) +endwin/\fBcurs_initscr\fR(3X) +erase/\fBcurs_clear\fR(3X) +erasechar/\fBcurs_termattrs\fR(3X) +erasewchar/\fBcurs_termattrs\fR(3X) +filter/\fBcurs_util\fR(3X) +flash/\fBcurs_beep\fR(3X) +flushinp/\fBcurs_util\fR(3X) +get_wch/\fBcurs_get_wch\fR(3X) +get_wstr/\fBcurs_get_wstr\fR(3X) +getbegyx/\fBcurs_getyx\fR(3X) +getbkgd/\fBcurs_bkgd\fR(3X) +getbkgrnd/\fBcurs_bkgrnd\fR(3X) +getcchar/\fBcurs_getcchar\fR(3X) +getch/\fBcurs_getch\fR(3X) +getmaxyx/\fBcurs_getyx\fR(3X) +getmouse/\fBcurs_mouse\fR(3X)* +getn_wstr/\fBcurs_get_wstr\fR(3X) +getnstr/\fBcurs_getstr\fR(3X) +getparyx/\fBcurs_getyx\fR(3X) +getstr/\fBcurs_getstr\fR(3X) +getsyx/\fBcurs_kernel\fR(3X) +getwin/\fBcurs_util\fR(3X) +getyx/\fBcurs_getyx\fR(3X) +halfdelay/\fBcurs_inopts\fR(3X) +has_colors/\fBcurs_color\fR(3X) +has_ic/\fBcurs_termattrs\fR(3X) +has_il/\fBcurs_termattrs\fR(3X) +has_key/\fBcurs_getch\fR(3X)* +hline/\fBcurs_border\fR(3X) +hline_set/\fBcurs_border_set\fR(3X) +idcok/\fBcurs_outopts\fR(3X) +idlok/\fBcurs_outopts\fR(3X) +immedok/\fBcurs_outopts\fR(3X) +in_wch/\fBcurs_in_wch\fR(3X) +in_wchnstr/\fBcurs_in_wchstr\fR(3X) +in_wchstr/\fBcurs_in_wchstr\fR(3X) +inch/\fBcurs_inch\fR(3X) +inchnstr/\fBcurs_inchstr\fR(3X) +inchstr/\fBcurs_inchstr\fR(3X) +init_color/\fBcurs_color\fR(3X) +init_pair/\fBcurs_color\fR(3X) +initscr/\fBcurs_initscr\fR(3X) +innstr/\fBcurs_instr\fR(3X) +innwstr/\fBcurs_inwstr\fR(3X) +ins_nwstr/\fBcurs_ins_wstr\fR(3X) +ins_wch/\fBcurs_ins_wch\fR(3X) +ins_wstr/\fBcurs_ins_wstr\fR(3X) +insch/\fBcurs_insch\fR(3X) +insdelln/\fBcurs_deleteln\fR(3X) +insertln/\fBcurs_deleteln\fR(3X) +insnstr/\fBcurs_insstr\fR(3X) +insstr/\fBcurs_insstr\fR(3X) +instr/\fBcurs_instr\fR(3X) +intrflush/\fBcurs_inopts\fR(3X) +inwstr/\fBcurs_inwstr\fR(3X) +is_linetouched/\fBcurs_touch\fR(3X) +is_wintouched/\fBcurs_touch\fR(3X) +isendwin/\fBcurs_initscr\fR(3X) +key_defined/\fBkey_defined\fR(3X)* +key_name/\fBcurs_util\fR(3X) +keybound/\fBkeybound\fR(3X)* +keyname/\fBcurs_util\fR(3X) +keyok/\fBkeyok\fR(3X)* +keypad/\fBcurs_inopts\fR(3X) +killchar/\fBcurs_termattrs\fR(3X) +killwchar/\fBcurs_termattrs\fR(3X) +leaveok/\fBcurs_outopts\fR(3X) +longname/\fBcurs_termattrs\fR(3X) +mcprint/\fBcurs_print\fR(3X)* +meta/\fBcurs_inopts\fR(3X) +mouse_trafo/\fBcurs_mouse\fR(3X)* +mouseinterval/\fBcurs_mouse\fR(3X)* +mousemask/\fBcurs_mouse\fR(3X)* +move/\fBcurs_move\fR(3X) +mvadd_wch/\fBcurs_add_wch\fR(3X) +mvadd_wchnstr/\fBcurs_add_wchstr\fR(3X) +mvadd_wchstr/\fBcurs_add_wchstr\fR(3X) +mvaddch/\fBcurs_addch\fR(3X) +mvaddchnstr/\fBcurs_addchstr\fR(3X) +mvaddchstr/\fBcurs_addchstr\fR(3X) +mvaddnstr/\fBcurs_addstr\fR(3X) +mvaddnwstr/\fBcurs_addwstr\fR(3X) +mvaddstr/\fBcurs_addstr\fR(3X) +mvaddwstr/\fBcurs_addwstr\fR(3X) +mvchgat/\fBcurs_attr\fR(3X) +mvcur/\fBcurs_terminfo\fR(3X) +mvdelch/\fBcurs_delch\fR(3X) +mvderwin/\fBcurs_window\fR(3X) +mvget_wch/\fBcurs_get_wch\fR(3X) +mvget_wstr/\fBcurs_get_wstr\fR(3X) +mvgetch/\fBcurs_getch\fR(3X) +mvgetn_wstr/\fBcurs_get_wstr\fR(3X) +mvgetnstr/\fBcurs_getstr\fR(3X) +mvgetstr/\fBcurs_getstr\fR(3X) +mvhline/\fBcurs_border\fR(3X) +mvhline_set/\fBcurs_border_set\fR(3X) +mvin_wch/\fBcurs_in_wch\fR(3X) +mvin_wchnstr/\fBcurs_in_wchstr\fR(3X) +mvin_wchstr/\fBcurs_in_wchstr\fR(3X) +mvinch/\fBcurs_inch\fR(3X) +mvinchnstr/\fBcurs_inchstr\fR(3X) +mvinchstr/\fBcurs_inchstr\fR(3X) +mvinnstr/\fBcurs_instr\fR(3X) +mvinnwstr/\fBcurs_inwstr\fR(3X) +mvins_nwstr/\fBcurs_ins_wstr\fR(3X) +mvins_wch/\fBcurs_ins_wch\fR(3X) +mvins_wstr/\fBcurs_ins_wstr\fR(3X) +mvinsch/\fBcurs_insch\fR(3X) +mvinsnstr/\fBcurs_insstr\fR(3X) +mvinsstr/\fBcurs_insstr\fR(3X) +mvinstr/\fBcurs_instr\fR(3X) +mvinwstr/\fBcurs_inwstr\fR(3X) +mvprintw/\fBcurs_printw\fR(3X) +mvscanw/\fBcurs_scanw\fR(3X) +mvvline/\fBcurs_border\fR(3X) +mvvline_set/\fBcurs_border_set\fR(3X) +mvwadd_wch/\fBcurs_add_wch\fR(3X) +mvwadd_wchnstr/\fBcurs_add_wchstr\fR(3X) +mvwadd_wchstr/\fBcurs_add_wchstr\fR(3X) +mvwaddch/\fBcurs_addch\fR(3X) +mvwaddchnstr/\fBcurs_addchstr\fR(3X) +mvwaddchstr/\fBcurs_addchstr\fR(3X) +mvwaddnstr/\fBcurs_addstr\fR(3X) +mvwaddnwstr/\fBcurs_addwstr\fR(3X) +mvwaddstr/\fBcurs_addstr\fR(3X) +mvwaddwstr/\fBcurs_addwstr\fR(3X) +mvwchgat/\fBcurs_attr\fR(3X) +mvwdelch/\fBcurs_delch\fR(3X) +mvwget_wch/\fBcurs_get_wch\fR(3X) +mvwget_wstr/\fBcurs_get_wstr\fR(3X) +mvwgetch/\fBcurs_getch\fR(3X) +mvwgetn_wstr/\fBcurs_get_wstr\fR(3X) +mvwgetnstr/\fBcurs_getstr\fR(3X) +mvwgetstr/\fBcurs_getstr\fR(3X) +mvwhline/\fBcurs_border\fR(3X) +mvwhline_set/\fBcurs_border_set\fR(3X) +mvwin/\fBcurs_window\fR(3X) +mvwin_wch/\fBcurs_in_wch\fR(3X) +mvwin_wchnstr/\fBcurs_in_wchstr\fR(3X) +mvwin_wchstr/\fBcurs_in_wchstr\fR(3X) +mvwinch/\fBcurs_inch\fR(3X) +mvwinchnstr/\fBcurs_inchstr\fR(3X) +mvwinchstr/\fBcurs_inchstr\fR(3X) +mvwinnstr/\fBcurs_instr\fR(3X) +mvwinnwstr/\fBcurs_inwstr\fR(3X) +mvwins_nwstr/\fBcurs_ins_wstr\fR(3X) +mvwins_wch/\fBcurs_ins_wch\fR(3X) +mvwins_wstr/\fBcurs_ins_wstr\fR(3X) +mvwinsch/\fBcurs_insch\fR(3X) +mvwinsnstr/\fBcurs_insstr\fR(3X) +mvwinsstr/\fBcurs_insstr\fR(3X) +mvwinstr/\fBcurs_instr\fR(3X) +mvwinwstr/\fBcurs_inwstr\fR(3X) +mvwprintw/\fBcurs_printw\fR(3X) +mvwscanw/\fBcurs_scanw\fR(3X) +mvwvline/\fBcurs_border\fR(3X) +mvwvline_set/\fBcurs_border_set\fR(3X) +napms/\fBcurs_kernel\fR(3X) +newpad/\fBcurs_pad\fR(3X) +newterm/\fBcurs_initscr\fR(3X) +newwin/\fBcurs_window\fR(3X) +nl/\fBcurs_outopts\fR(3X) +nocbreak/\fBcurs_inopts\fR(3X) +nodelay/\fBcurs_inopts\fR(3X) +noecho/\fBcurs_inopts\fR(3X) +nonl/\fBcurs_outopts\fR(3X) +noqiflush/\fBcurs_inopts\fR(3X) +noraw/\fBcurs_inopts\fR(3X) +notimeout/\fBcurs_inopts\fR(3X) +overlay/\fBcurs_overlay\fR(3X) +overwrite/\fBcurs_overlay\fR(3X) +pair_content/\fBcurs_color\fR(3X) +pechochar/\fBcurs_pad\fR(3X) +pnoutrefresh/\fBcurs_pad\fR(3X) +prefresh/\fBcurs_pad\fR(3X) +printw/\fBcurs_printw\fR(3X) +putp/\fBcurs_terminfo\fR(3X) +putwin/\fBcurs_util\fR(3X) +qiflush/\fBcurs_inopts\fR(3X) +raw/\fBcurs_inopts\fR(3X) +redrawwin/\fBcurs_refresh\fR(3X) +refresh/\fBcurs_refresh\fR(3X) +reset_prog_mode/\fBcurs_kernel\fR(3X) +reset_shell_mode/\fBcurs_kernel\fR(3X) +resetty/\fBcurs_kernel\fR(3X) +resizeterm/\fBresizeterm\fR(3X)* +restartterm/\fBcurs_terminfo\fR(3X) +ripoffline/\fBcurs_kernel\fR(3X) +savetty/\fBcurs_kernel\fR(3X) +scanw/\fBcurs_scanw\fR(3X) +scr_dump/\fBcurs_scr_dump\fR(3X) +scr_init/\fBcurs_scr_dump\fR(3X) +scr_restore/\fBcurs_scr_dump\fR(3X) +scr_set/\fBcurs_scr_dump\fR(3X) +scrl/\fBcurs_scroll\fR(3X) +scroll/\fBcurs_scroll\fR(3X) +scrollok/\fBcurs_outopts\fR(3X) +set_curterm/\fBcurs_terminfo\fR(3X) +set_term/\fBcurs_initscr\fR(3X) +setcchar/\fBcurs_getcchar\fR(3X) +setscrreg/\fBcurs_outopts\fR(3X) +setsyx/\fBcurs_kernel\fR(3X) +setterm/\fBcurs_terminfo\fR(3X) +setupterm/\fBcurs_terminfo\fR(3X) +slk_attr/\fBcurs_slk\fR(3X)* +slk_attr_off/\fBcurs_slk\fR(3X) +slk_attr_on/\fBcurs_slk\fR(3X) +slk_attr_set/\fBcurs_slk\fR(3X) +slk_attroff/\fBcurs_slk\fR(3X) +slk_attron/\fBcurs_slk\fR(3X) +slk_attrset/\fBcurs_slk\fR(3X) +slk_clear/\fBcurs_slk\fR(3X) +slk_color/\fBcurs_slk\fR(3X) +slk_init/\fBcurs_slk\fR(3X) +slk_label/\fBcurs_slk\fR(3X) +slk_noutrefresh/\fBcurs_slk\fR(3X) +slk_refresh/\fBcurs_slk\fR(3X) +slk_restore/\fBcurs_slk\fR(3X) +slk_set/\fBcurs_slk\fR(3X) +slk_touch/\fBcurs_slk\fR(3X) +standend/\fBcurs_attr\fR(3X) +standout/\fBcurs_attr\fR(3X) +start_color/\fBcurs_color\fR(3X) +subpad/\fBcurs_pad\fR(3X) +subwin/\fBcurs_window\fR(3X) +syncok/\fBcurs_window\fR(3X) +term_attrs/\fBcurs_termattrs\fR(3X) +termattrs/\fBcurs_termattrs\fR(3X) +termname/\fBcurs_termattrs\fR(3X) +tgetent/\fBcurs_termcap\fR(3X) +tgetflag/\fBcurs_termcap\fR(3X) +tgetnum/\fBcurs_termcap\fR(3X) +tgetstr/\fBcurs_termcap\fR(3X) +tgoto/\fBcurs_termcap\fR(3X) +tigetflag/\fBcurs_terminfo\fR(3X) +tigetnum/\fBcurs_terminfo\fR(3X) +tigetstr/\fBcurs_terminfo\fR(3X) +timeout/\fBcurs_inopts\fR(3X) +touchline/\fBcurs_touch\fR(3X) +touchwin/\fBcurs_touch\fR(3X) +tparm/\fBcurs_terminfo\fR(3X) +tputs/\fBcurs_termcap\fR(3X) +tputs/\fBcurs_terminfo\fR(3X) +trace/\fBcurs_trace\fR(3X)* +typeahead/\fBcurs_inopts\fR(3X) +unctrl/\fBcurs_util\fR(3X) +unget_wch/\fBcurs_get_wch\fR(3X) +ungetch/\fBcurs_getch\fR(3X) +ungetmouse/\fBcurs_mouse\fR(3X)* +untouchwin/\fBcurs_touch\fR(3X) +use_default_colors/\fBdefault_colors\fR(3X)* +use_env/\fBcurs_util\fR(3X) +use_extended_names/\fBcurs_extend\fR(3X)* +vid_attr/\fBcurs_terminfo\fR(3X) +vid_puts/\fBcurs_terminfo\fR(3X) +vidattr/\fBcurs_terminfo\fR(3X) +vidputs/\fBcurs_terminfo\fR(3X) +vline/\fBcurs_border\fR(3X) +vline_set/\fBcurs_border_set\fR(3X) +vw_printw/\fBcurs_printw\fR(3X) +vw_scanw/\fBcurs_scanw\fR(3X) +vwprintw/\fBcurs_printw\fR(3X) +vwscanw/\fBcurs_scanw\fR(3X) +wadd_wch/\fBcurs_add_wch\fR(3X) +wadd_wchnstr/\fBcurs_add_wchstr\fR(3X) +wadd_wchstr/\fBcurs_add_wchstr\fR(3X) +waddch/\fBcurs_addch\fR(3X) +waddchnstr/\fBcurs_addchstr\fR(3X) +waddchstr/\fBcurs_addchstr\fR(3X) +waddnstr/\fBcurs_addstr\fR(3X) +waddnwstr/\fBcurs_addwstr\fR(3X) +waddstr/\fBcurs_addstr\fR(3X) +waddwstr/\fBcurs_addwstr\fR(3X) +wattr_get/\fBcurs_attr\fR(3X) +wattr_off/\fBcurs_attr\fR(3X) +wattr_on/\fBcurs_attr\fR(3X) +wattr_set/\fBcurs_attr\fR(3X) +wattroff/\fBcurs_attr\fR(3X) +wattron/\fBcurs_attr\fR(3X) +wattrset/\fBcurs_attr\fR(3X) +wbkgd/\fBcurs_bkgd\fR(3X) +wbkgdset/\fBcurs_bkgd\fR(3X) +wbkgrnd/\fBcurs_bkgrnd\fR(3X) +wbkgrndset/\fBcurs_bkgrnd\fR(3X) +wborder/\fBcurs_border\fR(3X) +wborder_set/\fBcurs_border_set\fR(3X) +wchgat/\fBcurs_attr\fR(3X) +wclear/\fBcurs_clear\fR(3X) +wclrtobot/\fBcurs_clear\fR(3X) +wclrtoeol/\fBcurs_clear\fR(3X) +wcolor_set/\fBcurs_attr\fR(3X) +wcursyncup/\fBcurs_window\fR(3X) +wdelch/\fBcurs_delch\fR(3X) +wdeleteln/\fBcurs_deleteln\fR(3X) +wecho_wchar/\fBcurs_add_wch\fR(3X) +wechochar/\fBcurs_addch\fR(3X) +wenclose/\fBcurs_mouse\fR(3X)* +werase/\fBcurs_clear\fR(3X) +wget_wch/\fBcurs_get_wch\fR(3X) +wget_wstr/\fBcurs_get_wstr\fR(3X) +wgetbkgrnd/\fBcurs_bkgrnd\fR(3X) +wgetch/\fBcurs_getch\fR(3X) +wgetn_wstr/\fBcurs_get_wstr\fR(3X) +wgetnstr/\fBcurs_getstr\fR(3X) +wgetstr/\fBcurs_getstr\fR(3X) +whline/\fBcurs_border\fR(3X) +whline_set/\fBcurs_border_set\fR(3X) +win_wch/\fBcurs_in_wch\fR(3X) +win_wchnstr/\fBcurs_in_wchstr\fR(3X) +win_wchstr/\fBcurs_in_wchstr\fR(3X) +winch/\fBcurs_inch\fR(3X) +winchnstr/\fBcurs_inchstr\fR(3X) +winchstr/\fBcurs_inchstr\fR(3X) +winnstr/\fBcurs_instr\fR(3X) +winnwstr/\fBcurs_inwstr\fR(3X) +wins_nwstr/\fBcurs_ins_wstr\fR(3X) +wins_wch/\fBcurs_ins_wch\fR(3X) +wins_wstr/\fBcurs_ins_wstr\fR(3X) +winsch/\fBcurs_insch\fR(3X) +winsdelln/\fBcurs_deleteln\fR(3X) +winsertln/\fBcurs_deleteln\fR(3X) +winsnstr/\fBcurs_insstr\fR(3X) +winsstr/\fBcurs_insstr\fR(3X) +winstr/\fBcurs_instr\fR(3X) +winwstr/\fBcurs_inwstr\fR(3X) +wmouse_trafo/\fBcurs_mouse\fR(3X)* +wmove/\fBcurs_move\fR(3X) +wnoutrefresh/\fBcurs_refresh\fR(3X) +wprintw/\fBcurs_printw\fR(3X) +wredrawln/\fBcurs_refresh\fR(3X) +wrefresh/\fBcurs_refresh\fR(3X) +wresize/\fBwresize\fR(3X)* +wscanw/\fBcurs_scanw\fR(3X) +wscrl/\fBcurs_scroll\fR(3X) +wsetscrreg/\fBcurs_outopts\fR(3X) +wstandend/\fBcurs_attr\fR(3X) +wstandout/\fBcurs_attr\fR(3X) +wsyncdown/\fBcurs_window\fR(3X) +wsyncup/\fBcurs_window\fR(3X) +wtimeout/\fBcurs_inopts\fR(3X) +wtouchln/\fBcurs_touch\fR(3X) +wunctrl/\fBcurs_util\fR(3X) +wvline/\fBcurs_border\fR(3X) +wvline_set/\fBcurs_border_set\fR(3X) +.TE +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and an +integer value other than \fBERR\fR upon successful completion, unless +otherwise noted in the routine descriptions. +.PP +All macros return the value of the \fBw\fR version, except \fBsetscrreg\fR, +\fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and \fBgetmaxyx\fR. The return +values of \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and +\fBgetmaxyx\fR are undefined (i.e., these should not be used as the +right-hand side of assignment statements). +.PP +Routines that return pointers return \fBNULL\fR on error. +.SH ENVIRONMENT +The following environment symbols are useful for customizing the +runtime behavior of the \fBncurses\fR library. The most important +ones have been already discussed in detail. +.TP 5 +BAUDRATE +The debugging library checks this environment symbol when the application +has redirected output to a file. +The symbol's numeric value is used for the baudrate. +If no value is found, \fBncurses\fR uses 9600. +This allows testers to construct repeatable test-cases +that take into account costs that depend on baudrate. +.TP 5 +CC +When set, change occurrences of the command_character +(i.e., the \fBcmdch\fP capability) +of the loaded terminfo entries to the value of this symbol. +Very few terminfo entries provide this feature. +.TP 5 +COLUMNS +Specify the width of the screen in characters. +Applications running in a windowing environment usually are able to +obtain the width of the window in which they are executing. +If neither the $COLUMNS value nor the terminal's screen size is available, +\fBncurses\fR uses the size which may be specified in the terminfo database +(i.e., the \fBcols\fR capability). +.IP +It is important that your application use a correct size for the screen. +However, this is not always possible because your application may be +running on a host which does not honor NAWS (Negotiations About Window +Size), or because you are temporarily running as another user. +.IP +Either COLUMNS or LINES symbols may be specified independently. +This is mainly useful to circumvent legacy misfeatures of terminal descriptions, +e.g., xterm which commonly specifies a 65 line screen. +For best results, \fBlines\fR and \fBcols\fR should not be specified in +a terminal description for terminals which are run as emulations. +.IP +Use the \fBuse_env\fR function to disable this feature. +.TP 5 +ESCDELAY +Specifies the total time, in milliseconds, for which ncurses will +await a character sequence, e.g., a function key. +The default value, 1000 milliseconds, is enough for most uses. +However, it is made a variable to accommodate unusual applications. +.IP +The most common instance where you may wish to change this value +is to work with slow hosts, e.g., running on a network. +If the host cannot read characters rapidly enough, it will have the same +effect as if the terminal did not send characters rapidly enough. +The library will still see a timeout. +.IP +Note that xterm mouse events are built up from character sequences +received from the xterm. +If your application makes heavy use of multiple-clicking, you may +wish to lengthen this default value because the timeout applies +to the composed multi-click event as well as the individual clicks. +.TP 5 +HOME +Tells \fBncurses\fR where your home directory is. +That is where it may read and write auxiliary terminal descriptions: +.IP +$HOME/.termcap +.br +$HOME/.terminfo +.TP 5 +LINES +Like COLUMNS, specify the height of the screen in characters. +See COLUMNS for a detailed description. +.TP 5 +MOUSE_BUTTONS_123 +This applies only to the OS/2 EMX port. +It specifies the order of buttons on the mouse. +OS/2 numbers a 3-button mouse inconsistently from other +platforms: +.sp +1 = left +.br +2 = right +.br +3 = middle. +.sp +This symbol lets you customize the mouse. +The symbol must be three numeric digits 1-3 in any order, e.g., 123 or 321. +If it is not specified, \fBncurses\fR uses 132. +.TP 5 +NCURSES_ASSUMED_COLORS +Override the compiled-in assumption that the +terminal's default colors are white-on-black +(see \fBassume_default_colors\fR(3X)). +You may set the foreground and background color values with this environment +variable by proving a 2-element list: foreground,background. +For example, to tell ncurses to not assume anything +about the colors, set this to "-1,-1". +To make it green-on-black, set it to "2,0". +Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed. +.TP 5 +NCURSES_NO_PADDING +Most of the terminal descriptions in the terminfo database are written +for real "hardware" terminals. +Many people use terminal emulators +which run in a windowing environment and use curses-based applications. +Terminal emulators can duplicate +all of the important aspects of a hardware terminal, but they do not +have the same limitations. +The chief limitation of a hardware terminal from the standpoint +of your application is the management of dataflow, i.e., timing. +Unless a hardware terminal is interfaced into a terminal concentrator +(which does flow control), +it (or your application) must manage dataflow, preventing overruns. +The cheapest solution (no hardware cost) +is for your program to do this by pausing after +operations that the terminal does slowly, such as clearing the display. +.IP +As a result, many terminal descriptions (including the vt100) +have delay times embedded. You may wish to use these descriptions, +but not want to pay the performance penalty. +.IP +Set the NCURSES_NO_PADDING symbol to disable all but mandatory +padding. Mandatory padding is used as a part of special control +sequences such as \fIflash\fR. +.TP 5 +NCURSES_NO_SETBUF +Normally \fBncurses\fR enables buffered output during terminal initialization. +This is done (as in SVr4 curses) for performance reasons. +For testing purposes, both of \fBncurses\fR and certain applications, +this feature is made optional. Setting the NCURSES_NO_SETBUF variable +disables output buffering, leaving the output in the original (usually +line buffered) mode. +.TP 5 +NCURSES_TRACE +During initialization, the \fBncurses\fR debugging library +checks the NCURSES_TRACE symbol. +If it is defined, to a numeric value, \fBncurses\fR calls the \fBtrace\fR +function, using that value as the argument. +.IP +The argument values, which are defined in \fBcurses.h\fR, provide several +types of information. +When running with traces enabled, your application will write the +file \fBtrace\fR to the current directory. +.TP 5 +TERM +Denotes your terminal type. +Each terminal type is distinct, though many are similar. +.TP 5 +TERMCAP +If the \fBncurses\fR library has been configured with \fItermcap\fR +support, \fBncurses\fR will check for a terminal's description in +termcap form if it is not available in the terminfo database. +.IP +The TERMCAP symbol contains either a terminal description (with +newlines stripped out), +or a file name telling where the information denoted by the TERM symbol exists. +In either case, setting it directs \fBncurses\fR to ignore +the usual place for this information, e.g., /etc/termcap. +.TP 5 +TERMINFO +Overrides the directory in which \fBncurses\fR searches for your terminal +description. +This is the simplest, but not the only way to change the list of directories. +The complete list of directories in order follows: +.RS +.TP 3 +- +the last directory to which \fBncurses\fR wrote, if any, is searched first +.TP 3 +- +the directory specified by the TERMINFO symbol +.TP 3 +- +$HOME/.terminfo +.TP 3 +- +directories listed in the TERMINFO_DIRS symbol +.TP 3 +- +one or more directories whose names are configured and compiled into the +ncurses library, e.g., +/usr/share/terminfo +.RE +.TP 5 +TERMINFO_DIRS +Specifies a list of directories to search for terminal descriptions. +The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX. +All of the terminal descriptions are in terminfo form, which makes +a subdirectory named for the first letter of the terminal names therein. +.TP 5 +TERMPATH +If TERMCAP does not hold a file name then \fBncurses\fR checks +the TERMPATH symbol. +This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, semicolons on OS/2 EMX. +If the TERMPATH symbol is not set, \fBncurses\fR looks in the files +/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, in that order. +.PP +The library may be configured to disregard the following variables when the +current user is the superuser (root), or if the application uses setuid or +setgid permissions: +$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME. +.SH FILES +.TP 5 +/usr/share/tabset +directory containing initialization files for the terminal capability database +/usr/share/terminfo +terminal capability database +.SH SEE ALSO +\fBterminfo\fR(\*n) and related pages whose names begin "curs_" for detailed routine +descriptions. +.SH EXTENSIONS +The \fBncurses\fR library can be compiled with an option (\fB\-DUSE_GETCAP\fR) +that falls back to the old-style /etc/termcap file if the terminal setup code +cannot find a terminfo entry corresponding to \fBTERM\fR. Use of this feature +is not recommended, as it essentially includes an entire termcap compiler in +the \fBncurses\fR startup code, at significant cost in core and startup cycles. +.PP +The \fBncurses\fR library includes facilities for capturing mouse events on +certain terminals (including xterm). See the \fBcurs_mouse\fR(3X) +manual page for details. +.PP +The \fBncurses\fR library includes facilities for responding to window +resizing events, e.g., when running in an xterm. +See the \fBresizeterm\fR(3X) +and \fBwresize\fR(3X) manual pages for details. +In addition, the library may be configured with a SIGWINCH handler. +.PP +The \fBncurses\fR library extends the fixed set of function key capabilities +of terminals by allowing the application designer to define additional +key sequences at runtime. +See the \fBdefine_key\fR(3X) +\fBkey_defined\fR(3X), +and \fBkeyok\fR(3X) manual pages for details. +.PP +The \fBncurses\fR library can exploit the capabilities of terminals which +implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an application +to reset the terminal to its original foreground and background colors. +From the users' perspective, the application is able to draw colored +text on a background whose color is set independently, providing better +control over color contrasts. +See the \fBdefault_colors\fR(3X) manual page for details. +.PP +The \fBncurses\fR library includes a function for directing application output +to a printer attached to the terminal device. See the \fBcurs_print\fR(3X) +manual page for details. +.SH PORTABILITY +The \fBncurses\fR library is intended to be BASE-level conformant with the XSI +Curses standard. The EXTENDED XSI Curses functionality +(including color support) is supported. +.PP +A small number of local differences (that is, individual differences between +the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR +sections of the library man pages. +.PP +The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4. See +the \fBcurs_getch\fR(3X) manual page for details. +.PP +The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4. See +the \fBcurs_slk\fR(3X) manual page for details. +.PP +The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR, +\fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not +part of XPG4, nor are they present in SVr4. See the \fBcurs_mouse\fR(3X) +manual page for details. +.PP +The routine \fBmcprint\fR was not present in any previous curses +implementation. See the \fBcurs_print\fR(3X) manual page for details. +.PP +The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4. See +the \fBwresize\fR(3X) manual page for details. +.PP +In historic curses versions, delays embedded in the capabilities \fBcr\fR, +\fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay +bits in the UNIX tty driver. In this implementation, all padding is done by +NUL sends. This method is slightly more expensive, but narrows the interface +to the UNIX kernel significantly and increases the package's portability +correspondingly. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. +.PP +If standard output from a \fBncurses\fR program is re-directed to something +which is not a tty, screen updates will be directed to standard error. This +was an undocumented feature of AT&T System V Release 3 curses. +.SH AUTHORS +Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. +Based on pcurses by Pavel Curtis. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/panel.3 b/lib/libncurses/man/panel.3 new file mode 100644 index 0000000000..fd9eed8f5c --- /dev/null +++ b/lib/libncurses/man/panel.3 @@ -0,0 +1,183 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: panel.3x,v 1.11 2003/05/17 22:44:09 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/panel.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH panel 3X "" +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +panel - panel stack extension for curses +.SH SYNOPSIS +\fB#include \fR +.P +\fBcc [flags] sourcefiles -lpanel -lncurses\fR +.P +\fBPANEL *new_panel(WINDOW *win)\fR +.br +\fBint bottom_panel(PANEL *pan)\fR +.br +\fBint top_panel(PANEL *pan)\fR +.br +\fBint show_panel(PANEL *pan)\fR +.br +\fBvoid update_panels();\fR +.br +\fBint hide_panel(PANEL *pan)\fR +.br +\fBWINDOW *panel_window(const PANEL *pan)\fR +.br +\fBint replace_panel(PANEL *pan, WINDOW *window)\fR +.br +\fBint move_panel(PANEL *pan, int starty, int startx)\fR +.br +\fBint panel_hidden(const PANEL *pan)\fR +.br +\fBPANEL *panel_above(const PANEL *pan)\fR +.br +\fBPANEL *panel_below(const PANEL *pan)\fR +.br +\fBint set_panel_userptr(PANEL *pan, const void *ptr)\fR +.br +\fBconst void *panel_userptr(const PANEL *pan)\fR +.br +\fBint del_panel(PANEL *pan)\fR +.br +.SH DESCRIPTION +Panels are \fBcurses\fR(3X) windows with the added feature of +depth. Panel functions allow the use of stacked windows and ensure +the proper portions of each window and the curses \fBstdscr\fR window are +hidden or displayed when panels are added, moved, modified or removed. +The set of currently visible panels is the stack of panels. The +\fBstdscr\fR window is beneath all panels, and is not considered part +of the stack. +.P +A window is associated with every panel. The panel routines enable +you to create, move, hide, and show panels, as well as position a +panel at any desired location in the stack. +.P +Panel routines are a functional layer added to \fBcurses\fR(3X), make only +high-level curses calls, and work anywhere terminfo curses does. +.SH FUNCTIONS +.TP +\fBnew_panel(win)\fR +allocates a \fBPANEL\fR structure, associates it with +\fBwin\fR, places the panel on the top of the stack (causes it +to be displayed above any other panel) and returns a +pointer to the new panel. +.TP +\fBvoid update_panels()\fR +refreshes the virtual screen to reflect the relations between the +panels in the stack, but does not call doupdate() to refresh the +physical screen. Use this function and not wrefresh or wnoutrefresh. +update_panels() may be called more than once before a call to +doupdate(), but doupdate() is the function responsible for updating +the physical screen. +.TP +\fBdel_panel(pan)\fR +removes the given panel from the stack and deallocates the +\fBPANEL\fR structure (but not its associated window). +.TP +\fBhide_panel(pan)\fR +removes the given panel from the panel stack and thus hides it from +view. The \fBPANEL\fR structure is not lost, merely removed from the stack. +.TP +\fBshow_panel(pan)\fR +makes a hidden panel visible by placing it on top of the panels in the +panel stack. See COMPATIBILITY below. +.TP +\fBtop_panel(pan)\fR +puts the given visible panel on top of all panels in the stack. See +COMPATIBILITY below. +.TP +\fBbottom_panel(pan)\fR +puts panel at the bottom of all panels. +.TP +\fBmove_panel(pan,starty,startx)\fR +moves the given panel window so that its upper-left corner is at +\fBstarty\fR, \fBstartx\fR. It does not change the position of the +panel in the stack. Be sure to use this function, not \fBmvwin()\fR, +to move a panel window. +.TP +\fBreplace_panel(pan,window)\fR +replaces the current window of panel with \fBwindow\fR (useful, for +example if you want to resize a panel; if you're using \fBncurses\fR, +you can call \fBreplace_panel\fR on the output of \fBwresize\fR(3X)). +It does not change the position of the panel in the stack. +.TP +\fBpanel_above(pan)\fR +returns a pointer to the panel above pan. If the panel argument is +\fB(PANEL *)0\fR, it returns a pointer to the bottom panel in the stack. +.TP +\fBpanel_below(pan)\fR +returns a pointer to the panel just below pan. If the panel argument +is \fB(PANEL *)0\fR, it returns a pointer to the top panel in the stack. +.TP +\fBset_panel_userptr(pan,ptr)\fR +sets the panel's user pointer. +.TP +\fBpanel_userptr(pan)\fR +returns the user pointer for a given panel. +.TP +\fBpanel_window(pan)\fR +returns a pointer to the window of the given panel. +.SH DIAGNOSTICS +Each routine that returns a pointer returns \fBNULL\fR if an error +occurs. Each routine that returns an int value returns \fBOK\fR if it +executes successfully and \fBERR\fR if not. +.SH COMPATIBILITY +Reasonable care has been taken to ensure compatibility +with the native panel facility introduced in SVr3.2 (inspection of +the SVr4 manual pages suggests the programming interface is unchanged). +The \fBPANEL\fR data structures are merely similar. The programmer +is cautioned not to directly use \fBPANEL\fR fields. +.P +The functions \fBshow_panel()\fR and \fBtop_panel()\fR are identical +in this implementation, and work equally well with displayed or hidden +panels. In the native System V implementation, \fBshow_panel()\fR is +intended for making a hidden panel visible (at the top of the stack) +and \fBtop_panel()\fR is intended for making an already-visible panel +move to the top of the stack. You are cautioned to use the correct +function to ensure compatibility with native panel libraries. +.SH NOTE +In your library list, libpanel.a should be before libncurses.a; that is, +you want to say `-lpanel -lncurses', not the other way around (which would +give you a link error using GNU \fBld\fR(1) and some other linkers). +.SH FILES +.P +panel.h +interface for the panels library +.P +libpanel.a +the panels library itself +.SH SEE ALSO +\fBcurses\fR(3X) +.SH AUTHOR +Originally written by Warren Tucker , +primarily to assist in porting u386mon to systems without a native +panels library. Repackaged for ncurses by Zeyd ben-Halim. diff --git a/lib/libncurses/man/resizeterm.3 b/lib/libncurses/man/resizeterm.3 new file mode 100644 index 0000000000..d8b83df3b6 --- /dev/null +++ b/lib/libncurses/man/resizeterm.3 @@ -0,0 +1,93 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1996,1997,2002 +.\" +.\" $Id: resizeterm.3x,v 1.10 2003/10/25 20:41:08 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/resizeterm.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH resizeterm 3X "" +.SH NAME +\fBis_term_resized\fR, +\fBresize_term\fR, +\fBresizeterm\fR - change the curses terminal size +.SH SYNOPSIS +\fB#include \fR + +\fBbool is_term_resized(int lines, int columns);\fR +.br +\fBint resize_term(int lines, int columns);\fR +.br +\fBint resizeterm(int lines, int columns);\fR +.SH DESCRIPTION +This is an extension to the curses library. +It provides callers with a hook into the \fBncurses\fR data to resize windows, +primarily for use by programs running in an X Window terminal (e.g., xterm). +The function \fBresizeterm\fR resizes the standard and current windows +to the specified dimensions, and adjusts other bookkeeping data used by +the \fBncurses\fR library that record the window dimensions. + +Most of the work is done by the inner function \fBresize_term\fR. +The outer function \fBresizeterm\fR adds bookkeeping for the SIGWINCH handler. +When resizing the windows, +\fBresize_term\fR blank-fills the areas that are extended. +The calling application should fill in these areas with appropriate data. +The \fBresize_term\fR function attempts to resize all windows. +However, due to the calling convention of pads, +it is not possible to resize these +without additional interaction with the application. + +A support function \fBis_term_resized\fR is provided so that applications +can check if the \fBresize_term\fR function would modify the window structures. +It returns TRUE if the windows would be modified, and FALSE otherwise. +.SH RETURN VALUE +Except as notes, these function return +the integer \fBERR\fR upon failure and \fBOK\fR on success. +They will fail if either of the dimensions are less than or equal to zero, +or if an error occurs while (re)allocating memory for the windows. +.SH NOTES +While these functions are intended to be used to support a signal handler +(i.e., for SIGWINCH), care should be taken to avoid invoking them in a +context where \fBmalloc\fR or \fBrealloc\fR may have been interrupted, +since it uses those functions. +.PP +If ncurses is configured to supply its own SIGWINCH handler, +the \fBresizeterm\fR function ungetch's a \fBKEY_RESIZE\fR which +will be read on the next call to \fBgetch\fR. +This is used to alert an application that the screen size has changed, +and that it should repaint special features such as pads that cannot +be done automatically. +.SH SEE ALSO +\fBwresize\fR(3X). +.SH AUTHOR +Thomas Dickey (from an equivalent function written in 1988 for BSD curses). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/term.5 b/lib/libncurses/man/term.5 new file mode 100644 index 0000000000..96d2bfffb8 --- /dev/null +++ b/lib/libncurses/man/term.5 @@ -0,0 +1,209 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: term.5,v 1.15 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/term.5,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH TERM 5 +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +term \- format of compiled term file. +.SH SYNOPSIS +.B term +.SH DESCRIPTION +.PP +Compiled terminfo descriptions are placed under the directory \fB\*d\fP. +In order to avoid a linear search of a huge \s-1UNIX\s+1 system directory, a +two-level scheme is used: \fB\*d/c/name\fP +where +.I name +is the name of the terminal, and +.I c +is the first character of +.IR name . +Thus, +.I act4 +can be found in the file \fB\*d/a/act4\fP. +Synonyms for the same terminal are implemented by multiple +links to the same compiled file. +.PP +The format has been chosen so that it will be the same on all hardware. +An 8 or more bit byte is assumed, but no assumptions about byte ordering +or sign extension are made. +.PP +The compiled file is created with the +.I tic +program, and read by the routine +.IR setupterm . +The file is divided into six parts: +the header, +terminal names, +boolean flags, +numbers, +strings, +and +string table. +.PP +The header section begins the file. +This section contains six short integers in the format +described below. +These integers are +(1) the magic number (octal 0432); +(2) the size, in bytes, of the names section; +(3) the number of bytes in the boolean section; +(4) the number of short integers in the numbers section; +(5) the number of offsets (short integers) in the strings section; +(6) the size, in bytes, of the string table. +.PP +Short integers are stored in two 8-bit bytes. +The first byte contains the least significant 8 bits of the value, +and the second byte contains the most significant 8 bits. +(Thus, the value represented is 256*second+first.) +The value \-1 is represented by the two bytes 0377, 0377; other negative +values are illegal. This value generally +means that the corresponding capability is missing from this terminal. +Note that this format corresponds to the hardware of the \s-1VAX\s+1 +and \s-1PDP\s+1-11 (that is, little-endian machines). +Machines where this does not correspond to the hardware must read the +integers as two bytes and compute the little-endian value. +.PP +The terminal names section comes next. +It contains the first line of the terminfo description, +listing the various names for the terminal, +separated by the `|' character. +The section is terminated with an \s-1ASCII NUL\s+1 character. +.PP +The boolean flags have one byte for each flag. +This byte is either 0 or 1 as the flag is present or absent. +The capabilities are in the same order as the file . +.PP +Between the boolean section and the number section, +a null byte will be inserted, if necessary, +to ensure that the number section begins on an even byte (this is a +relic of the PDP-11's word-addressed architecture, originally +designed in to avoid IOT traps induced by addressing a word on an +odd byte boundary). +All short integers are aligned on a short word boundary. +.PP +The numbers section is similar to the flags section. +Each capability takes up two bytes, +and is stored as a little-endian short integer. +If the value represented is \-1, the capability is taken to be missing. +.PP +The strings section is also similar. +Each capability is stored as a short integer, in the format above. +A value of \-1 means the capability is missing. +Otherwise, the value is taken as an offset from the beginning +of the string table. +Special characters in ^X or \ec notation are stored in their +interpreted form, not the printing representation. +Padding information $ and parameter information %x are +stored intact in uninterpreted form. +.PP +The final section is the string table. +It contains all the values of string capabilities referenced in +the string section. +Each string is null terminated. +.PP +Note that it is possible for +.I setupterm +to expect a different set of capabilities +than are actually present in the file. +Either the database may have been updated since +.I setupterm +has been recompiled +(resulting in extra unrecognized entries in the file) +or the program may have been recompiled more recently +than the database was updated +(resulting in missing entries). +The routine +.I setupterm +must be prepared for both possibilities \- +this is why the numbers and sizes are included. +Also, new capabilities must always be added at the end of the lists +of boolean, number, and string capabilities. +.PP +Despite the consistent use of little-endian for numbers and the otherwise +self-describing format, it is not wise to count on portability of binary +terminfo entries between commercial UNIX versions. The problem is that there +are at least three versions of terminfo (under HP-UX, AIX, and OSF/1) which +diverged from System V terminfo after SVr1, and have added extension +capabilities to the string table that (in the binary format) collide with +System V and XSI Curses extensions. See \fBterminfo\fR(\*n) for detailed +discussion of terminfo source compatibility issues. +.PP +As an example, here is a hex dump of the description for the Lear-Siegler +ADM-3, a popular though rather stupid early terminal: +.nf +.sp +adm3a|lsi adm3a, + am, + cols#80, lines#24, + bel=^G, clear=\032$<1>, cr=^M, cub1=^H, cud1=^J, + cuf1=^L, cup=\\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, + home=^^, ind=^J, +.sp +.ft CW +\s-20000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3 +0010 61 7c 6c 73 69 20 61 64 6d 33 61 00 00 01 50 00 a|lsi ad m3a...P. +0020 ff ff 18 00 ff ff 00 00 02 00 ff ff ff ff 04 00 ........ ........ +0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.'... +0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..-..... +0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........ +0120 ff ff ff ff ff ff 2f 00 07 00 0d 00 1a 24 3c 31 ....../. .....$<1 +0130 3e 00 1b 3d 25 70 31 25 7b 33 32 7d 25 2b 25 63 >..=%p1% {32}%+%c +0140 25 70 32 25 7b 33 32 7d 25 2b 25 63 00 0a 00 1e %p2%{32} %+%c.... +0150 00 08 00 0c 00 0b 00 0a 00 ........ .\s+2 +.ft R +.fi +.sp +.PP +Some limitations: total compiled entries cannot exceed 4096 bytes. +The name field cannot exceed 128 bytes. +.SH FILES +\*d/*/* compiled terminal capability data base +.SH SEE ALSO +\fBcurses\fR(3X), \fBterminfo\fR(\*n). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/term.7 b/lib/libncurses/man/term.7 new file mode 100644 index 0000000000..24eff8a64b --- /dev/null +++ b/lib/libncurses/man/term.7 @@ -0,0 +1,205 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: term.7,v 1.14 2003/05/10 20:33:49 jmc Exp $ +.\" $DragonFly: src/lib/libncurses/man/term.7,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH TERM 7 +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +term \- conventions for naming terminal types +.SH DESCRIPTION +.PP +The environment variable \fBTERM\fR should normally contain the type name of +the terminal, console or display-device type you are using. This information +is critical for all screen-oriented programs, including your editor and mailer. +.PP +A default \fBTERM\fR value will be set on a per-line basis by either +\fB/etc/inittab\fR (Linux and System-V-like UNIXes) or \fB/etc/ttys\fR (BSD +UNIXes). This will nearly always suffice for workstation and microcomputer +consoles. +.PP +If you use a dialup line, the type of device attached to it may vary. Older +UNIX systems pre-set a very dumb terminal type like `dumb' or `dialup' on +dialup lines. Newer ones may pre-set `vt100', reflecting the prevalence of DEC +VT100-compatible terminals and personal-computer emulators. +.PP +Modern telnets pass your \fBTERM\fR environment variable from the local side to +the remote one. There can be problems if the remote terminfo or termcap entry +for your type is not compatible with yours, but this situation is rare and +can almost always be avoided by explicitly exporting `vt100' (assuming you +are in fact using a VT100-superset console, terminal, or terminal emulator.) +.PP +In any case, you are free to override the system \fBTERM\fR setting to your +taste in your shell profile. The \fBtset\fP(1) utility may be of assistance; +you can give it a set of rules for deducing or requesting a terminal type based +on the tty device and baud rate. +.PP +Setting your own \fBTERM\fR value may also be useful if you have created a +custom entry incorporating options (such as visual bell or reverse-video) +which you wish to override the system default type for your line. +.PP +Terminal type descriptions are stored as files of capability data underneath +\*d. To browse a list of all terminal names recognized by the system, do + + toe | more + +from your shell. These capability files are in a binary format optimized for +retrieval speed (unlike the old text-based \fBtermcap\fR format they replace); +to examine an entry, you must use the \fBinfocmp\fR(1) command. Invoke it as +follows: + + infocmp \fIentry-name\fR + +where \fIentry-name\fR is the name of the type you wish to examine (and the +name of its capability file the subdirectory of \*d named for its first +letter). This command dumps a capability file in the text format described by +\fBterminfo\fR(\*n). +.PP +The first line of a \fBterminfo\fR(\*n) description gives the names by which +terminfo knows a terminal, separated by `|' (pipe-bar) characters with the last +name field terminated by a comma. The first name field is the type's +\fIprimary name\fR, and is the one to use when setting \fBTERM\fR. The last +name field (if distinct from the first) is actually a description of the +terminal type (it may contain blanks; the others must be single words). Name +fields between the first and last (if present) are aliases for the terminal, +usually historical names retained for compatibility. +.PP +There are some conventions for how to choose terminal primary names that help +keep them informative and unique. Here is a step-by-step guide to naming +terminals that also explains how to parse them: +.PP +First, choose a root name. The root will consist of a lower-case letter +followed by up to seven lower-case letters or digits. You need to avoid using +punctuation characters in root names, because they are used and interpreted as +filenames and shell meta-characters (such as !, $, *, ?, etc.) embedded in them +may cause odd and unhelpful behavior. The slash (/), or any other character +that may be interpreted by anyone's file system (\e, $, [, ]), is especially +dangerous (terminfo is platform-independent, and choosing names with special +characters could someday make life difficult for users of a future port). The +dot (.) character is relatively safe as long as there is at most one per root +name; some historical terminfo names use it. +.PP +The root name for a terminal or workstation console type should almost always +begin with a vendor prefix (such as \fBhp\fR for Hewlett-Packard, \fBwy\fR for +Wyse, or \fBatt\fR for AT&T terminals), or a common name of the terminal line +(\fBvt\fR for the VT series of terminals from DEC, or \fBsun\fR for Sun +Microsystems workstation consoles, or \fBregent\fR for the ADDS Regent series. +You can list the terminfo tree to see what prefixes are already in common use. +The root name prefix should be followed when appropriate by a model number; +thus \fBvt100\fR, \fBhp2621\fR, \fBwy50\fR. +.PP +The root name for a PC-Unix console type should be the OS name, +i.e. \fBlinux\fR, \fBbsdos\fR, \fBfreebsd\fR, \fBnetbsd\fR. It should +\fInot\fR be \fBconsole\fR or any other generic that might cause confusion in a +multi-platform environment! If a model number follows, it should indicate +either the OS release level or the console driver release level. +.PP +The root name for a terminal emulator (assuming it doesn't fit one of the +standard ANSI or vt100 types) should be the program name or a readily +recognizable abbreviation of it (i.e. \fBversaterm\fR, \fBctrm\fR). +.PP +Following the root name, you may add any reasonable number of hyphen-separated +feature suffixes. +.TP 5 +2p +Has two pages of memory. Likewise 4p, 8p, etc. +.TP 5 +mc +Magic-cookie. Some terminals (notably older Wyses) can only support one +attribute without magic-cookie lossage. Their base entry is usually paired +with another that has this suffix and uses magic cookies to support multiple +attributes. +.TP 5 +-am +Enable auto-margin (right-margin wraparound). +.TP 5 +-m +Mono mode - suppress color support. +.TP 5 +-na +No arrow keys - termcap ignores arrow keys which are actually there on the +terminal, so the user can use the arrow keys locally. +.TP 5 +-nam +No auto-margin - suppress am capability. +.TP 5 +-nl +No labels - suppress soft labels. +.TP 5 +-nsl +No status line - suppress status line. +.TP 5 +-pp +Has a printer port which is used. +.TP 5 +-rv +Terminal in reverse video mode (black on white). +.TP 5 +-s +Enable status line. +.TP 5 +-vb +Use visible bell (flash) rather than beep. +.TP 5 +-w +Wide; terminal is in 132 column mode. +.PP +Conventionally, if your terminal type is a variant intended to specify a +line height, that suffix should go first. So, for a hypothetical FuBarCo +model 2317 terminal in 30-line mode with reverse video, best form would be +\fBfubar-30-rv\fR (rather than, say, `fubar-rv-30'). +.PP +Terminal types that are written not as standalone entries, but rather as +components to be plugged into other entries via \fBuse\fP capabilities, +are distinguished by using embedded plus signs rather than dashes. +.PP +Commands which use a terminal type to control display often accept a -T +option that accepts a terminal name argument. Such programs should fall back +on the \fBTERM\fR environment variable when no -T option is specified. +.SH PORTABILITY +For maximum compatibility with older System V UNIXes, names and aliases +should be unique within the first 14 characters. +.SH FILES +.TP 5 +\*d/?/* +compiled terminal capability data base +.TP 5 +/etc/inittab +tty line initialization (AT&T-like UNIXes) +.TP 5 +/etc/ttys +tty line initialization (BSD-like UNIXes) +.SH SEE ALSO +\fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBterm\fR(\*n). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/terminfo.5 b/lib/libncurses/man/terminfo.5 new file mode 100644 index 0000000000..7fabf21ab8 --- /dev/null +++ b/lib/libncurses/man/terminfo.5 @@ -0,0 +1,3266 @@ +'\" t +.\" DO NOT EDIT THIS FILE BY HAND! +.\" It is generated from terminfo.head, Caps, and terminfo.tail. +.\" +.\" Note: this must be run through tbl before nroff. +.\" The magic cookie on the first line triggers this under some man programs. +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: terminfo.head,v 1.10 2002/08/17 23:37:10 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/terminfo.5,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH TERMINFO 5 "" "" "File Formats" +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +terminfo \- terminal capability data base +.SH SYNOPSIS +\*d/*/* +.SH DESCRIPTION +.I Terminfo +is a data base describing terminals, used by screen-oriented programs such as +\fBnvi\fR(1), +\fBrogue\fR(1) +and libraries such as +\fBcurses\fR(3X). +.I Terminfo +describes terminals by giving a set of capabilities which they +have, by specifying how to perform screen operations, and by +specifying padding requirements and initialization sequences. +.PP +Entries in +.I terminfo +consist of a sequence of `,' separated fields (embedded commas may be +escaped with a backslash or notated as \e054). +White space after the `,' separator is ignored. +The first entry for each terminal gives the names which are known for the +terminal, separated by `|' characters. +The first name given is the most common abbreviation for the terminal, +the last name given should be a long name fully identifying the terminal, +and all others are understood as synonyms for the terminal name. +All names but the last should be in lower case and contain no blanks; +the last name may well contain upper case and blanks for readability. +.PP +Terminal names (except for the last, verbose entry) should +be chosen using the following conventions. +The particular piece of hardware making up the terminal should +have a root name, thus ``hp2621''. +This name should not contain hyphens. +Modes that the hardware can be in, or user preferences, should +be indicated by appending a hyphen and a mode suffix. +Thus, a vt100 in 132 column mode would be vt100-w. +The following suffixes should be used where possible: +.PP +.TS +center ; +l c l +l l l. +\fBSuffix Meaning Example\fP +-\fInn\fP Number of lines on the screen aaa-60 +-\fIn\fPp Number of pages of memory c100-4p +-am With automargins (usually the default) vt100-am +-m Mono mode; suppress color ansi-m +-mc Magic cookie; spaces when highlighting wy30-mc +-na No arrow keys (leave them in local) c100-na +-nam Without automatic margins vt100-nam +-nl No status line att4415-nl +-ns No status line hp2626-ns +-rv Reverse video c100-rv +-s Enable status line vt100-s +-vb Use visible bell instead of beep wy370-vb +-w Wide mode (> 80 columns, usually 132) vt100-w +.TE +.PP +For more on terminal naming conventions, see the \fBterm(7)\fR manual page. +.SS Capabilities +.\" Head of terminfo man page ends here +.ps -1 +The following is a complete table of the capabilities included in a +terminfo description block and available to terminfo-using code. In each +line of the table, + +The \fBvariable\fR is the name by which the programmer (at the terminfo level) +accesses the capability. + +The \fBcapname\fR is the short name used in the text of the database, +and is used by a person updating the database. +Whenever possible, capnames are chosen to be the same as or similar to +the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses +identical or very similar names). Semantics are also intended to match +those of the specification. + +The termcap code is the old +.B termcap +capability name (some capabilities are new, and have names which termcap +did not originate). +.P +Capability names have no hard length limit, but an informal limit of 5 +characters has been adopted to keep them short and to allow the tabs in +the source file +.B Caps +to line up nicely. + +Finally, the description field attempts to convey the semantics of the +capability. You may find some codes in the description field: +.TP +(P) +indicates that padding may be specified +.TP +#[1-9] +in the description field indicates that the string is passed through tparm with +parms as given (#\fIi\fP). +.TP +(P*) +indicates that padding may vary in proportion to the number of +lines affected +.TP +(#\d\fIi\fP\u) +indicates the \fIi\fP\uth\d parameter. + +.PP +These are the boolean capabilities: + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw20. +\fBVariable Cap- TCap Description\fR +\fBBooleans name Code\fR +auto_left_margin bw bw T{ +cub1 wraps from column 0 to last column +T} +auto_right_margin am am T{ +terminal has automatic margins +T} +back_color_erase bce ut T{ +screen erased with background color +T} +can_change ccc cc T{ +terminal can re-define existing colors +T} +ceol_standout_glitch xhp xs T{ +standout not erased by overwriting (hp) +T} +col_addr_glitch xhpa YA T{ +only positive motion for hpa/mhpa caps +T} +cpi_changes_res cpix YF T{ +changing character pitch changes resolution +T} +cr_cancels_micro_mode crxm YB T{ +using cr turns off micro mode +T} +dest_tabs_magic_smso xt xt T{ +tabs destructive, magic so char (t1061) +T} +eat_newline_glitch xenl xn T{ +newline ignored after 80 cols (concept) +T} +erase_overstrike eo eo T{ +can erase overstrikes with a blank +T} +generic_type gn gn T{ +generic line type +T} +hard_copy hc hc T{ +hardcopy terminal +T} +hard_cursor chts HC T{ +cursor is hard to see +T} +has_meta_key km km T{ +Has a meta key (i.e., sets 8th-bit) +T} +has_print_wheel daisy YC T{ +printer needs operator to change character set +T} +has_status_line hs hs T{ +has extra status line +T} +hue_lightness_saturation hls hl T{ +terminal uses only HLS color notation (Tektronix) +T} +insert_null_glitch in in T{ +insert mode distinguishes nulls +T} +lpi_changes_res lpix YG T{ +changing line pitch changes resolution +T} +memory_above da da T{ +display may be retained above the screen +T} +memory_below db db T{ +display may be retained below the screen +T} +move_insert_mode mir mi T{ +safe to move while in insert mode +T} +move_standout_mode msgr ms T{ +safe to move while in standout mode +T} +needs_xon_xoff nxon nx T{ +padding will not work, xon/xoff required +T} +no_esc_ctlc xsb xb T{ +beehive (f1=escape, f2=ctrl C) +T} +no_pad_char npc NP T{ +pad character does not exist +T} +non_dest_scroll_region ndscr ND T{ +scrolling region is non-destructive +T} +non_rev_rmcup nrrmc NR T{ +smcup does not reverse rmcup +T} +over_strike os os T{ +terminal can overstrike +T} +prtr_silent mc5i 5i T{ +printer will not echo on screen +T} +row_addr_glitch xvpa YD T{ +only positive motion for vpa/mvpa caps +T} +semi_auto_right_margin sam YE T{ +printing in last column causes cr +T} +status_line_esc_ok eslok es T{ +escape can be used on the status line +T} +tilde_glitch hz hz T{ +cannot print ~'s (hazeltine) +T} +transparent_underline ul ul T{ +underline character overstrikes +T} +xon_xoff xon xo T{ +terminal uses xon/xoff handshaking +T} +.TE +.ad + +These are the numeric capabilities: + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw20. +\fBVariable Cap- TCap Description\fR +\fBNumeric name Code\fR +columns cols co T{ +number of columns in a line +T} +init_tabs it it T{ +tabs initially every # spaces +T} +label_height lh lh T{ +rows in each label +T} +label_width lw lw T{ +columns in each label +T} +lines lines li T{ +number of lines on screen or page +T} +lines_of_memory lm lm T{ +lines of memory if > line. 0 means varies +T} +magic_cookie_glitch xmc sg T{ +number of blank characters left by smso or rmso +T} +max_attributes ma ma T{ +maximum combined attributes terminal can handle +T} +max_colors colors Co T{ +maximum number of colors on screen +T} +max_pairs pairs pa T{ +maximum number of color-pairs on the screen +T} +maximum_windows wnum MW T{ +maximum number of defineable windows +T} +no_color_video ncv NC T{ +video attributes that cannot be used with colors +T} +num_labels nlab Nl T{ +number of labels on screen +T} +padding_baud_rate pb pb T{ +lowest baud rate where padding needed +T} +virtual_terminal vt vt T{ +virtual terminal number (CB/unix) +T} +width_status_line wsl ws T{ +number of columns in status line +T} +.TE +.ad + +The following numeric capabilities are present in the SVr4.0 term structure, +but are not yet documented in the man page. They came in with SVr4's +printer support. + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw20. +\fBVariable Cap- TCap Description\fR +\fBNumeric name Code\fR +bit_image_entwining bitwin Yo T{ +number of passes for each bit-image row +T} +bit_image_type bitype Yp T{ +type of bit-image device +T} +buffer_capacity bufsz Ya T{ +numbers of bytes buffered before printing +T} +buttons btns BT T{ +number of buttons on mouse +T} +dot_horz_spacing spinh Yc T{ +spacing of dots horizontally in dots per inch +T} +dot_vert_spacing spinv Yb T{ +spacing of pins vertically in pins per inch +T} +max_micro_address maddr Yd T{ +maximum value in micro_..._address +T} +max_micro_jump mjump Ye T{ +maximum value in parm_..._micro +T} +micro_col_size mcs Yf T{ +character step size when in micro mode +T} +micro_line_size mls Yg T{ +line step size when in micro mode +T} +number_of_pins npins Yh T{ +numbers of pins in print-head +T} +output_res_char orc Yi T{ +horizontal resolution in units per line +T} +output_res_horz_inch orhi Yk T{ +horizontal resolution in units per inch +T} +output_res_line orl Yj T{ +vertical resolution in units per line +T} +output_res_vert_inch orvi Yl T{ +vertical resolution in units per inch +T} +print_rate cps Ym T{ +print rate in characters per second +T} +wide_char_size widcs Yn T{ +character step size when in double wide mode +T} +.TE +.ad + +These are the string capabilities: + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw20. +\fBVariable Cap- TCap Description\fR +\fBString name Code\fR +acs_chars acsc ac T{ +graphics charset pairs, based on vt100 +T} +back_tab cbt bt T{ +back tab (P) +T} +bell bel bl T{ +audible signal (bell) (P) +T} +carriage_return cr cr T{ +carriage return (P*) (P*) +T} +change_char_pitch cpi ZA T{ +Change number of characters per inch to #1 +T} +change_line_pitch lpi ZB T{ +Change number of lines per inch to #1 +T} +change_res_horz chr ZC T{ +Change horizontal resolution to #1 +T} +change_res_vert cvr ZD T{ +Change vertical resolution to #1 +T} +change_scroll_region csr cs T{ +change region to line #1 to line #2 (P) +T} +char_padding rmp rP T{ +like ip but when in insert mode +T} +clear_all_tabs tbc ct T{ +clear all tab stops (P) +T} +clear_margins mgc MC T{ +clear right and left soft margins +T} +clear_screen clear cl T{ +clear screen and home cursor (P*) +T} +clr_bol el1 cb T{ +Clear to beginning of line +T} +clr_eol el ce T{ +clear to end of line (P) +T} +clr_eos ed cd T{ +clear to end of screen (P*) +T} +column_address hpa ch T{ +horizontal position #1, absolute (P) +T} +command_character cmdch CC T{ +terminal settable cmd character in prototype !? +T} +create_window cwin CW T{ +define a window #1 from #2,#3 to #4,#5 +T} +cursor_address cup cm T{ +move to row #1 columns #2 +T} +cursor_down cud1 do T{ +down one line +T} +cursor_home home ho T{ +home cursor (if no cup) +T} +cursor_invisible civis vi T{ +make cursor invisible +T} +cursor_left cub1 le T{ +move left one space +T} +cursor_mem_address mrcup CM T{ +memory relative cursor addressing, move to row #1 columns #2 +T} +cursor_normal cnorm ve T{ +make cursor appear normal (undo civis/cvvis) +T} +cursor_right cuf1 nd T{ +non-destructive space (move right one space) +T} +cursor_to_ll ll ll T{ +last line, first column (if no cup) +T} +cursor_up cuu1 up T{ +up one line +T} +cursor_visible cvvis vs T{ +make cursor very visible +T} +define_char defc ZE T{ +Define a character #1, #2 dots wide, descender #3 +T} +delete_character dch1 dc T{ +delete character (P*) +T} +delete_line dl1 dl T{ +delete line (P*) +T} +dial_phone dial DI T{ +dial number #1 +T} +dis_status_line dsl ds T{ +disable status line +T} +display_clock dclk DK T{ +display clock +T} +down_half_line hd hd T{ +half a line down +T} +ena_acs enacs eA T{ +enable alternate char set +T} +enter_alt_charset_mode smacs as T{ +start alternate character set (P) +T} +enter_am_mode smam SA T{ +turn on automatic margins +T} +enter_blink_mode blink mb T{ +turn on blinking +T} +enter_bold_mode bold md T{ +turn on bold (extra bright) mode +T} +enter_ca_mode smcup ti T{ +string to start programs using cup +T} +enter_delete_mode smdc dm T{ +enter delete mode +T} +enter_dim_mode dim mh T{ +turn on half-bright mode +T} +enter_doublewide_mode swidm ZF T{ +Enter double-wide mode +T} +enter_draft_quality sdrfq ZG T{ +Enter draft-quality mode +T} +enter_insert_mode smir im T{ +enter insert mode +T} +enter_italics_mode sitm ZH T{ +Enter italic mode +T} +enter_leftward_mode slm ZI T{ +Start leftward carriage motion +T} +enter_micro_mode smicm ZJ T{ +Start micro-motion mode +T} +enter_near_letter_quality snlq ZK T{ +Enter NLQ mode +T} +enter_normal_quality snrmq ZL T{ +Enter normal-quality mode +T} +enter_protected_mode prot mp T{ +turn on protected mode +T} +enter_reverse_mode rev mr T{ +turn on reverse video mode +T} +enter_secure_mode invis mk T{ +turn on blank mode (characters invisible) +T} +enter_shadow_mode sshm ZM T{ +Enter shadow-print mode +T} +enter_standout_mode smso so T{ +begin standout mode +T} +enter_subscript_mode ssubm ZN T{ +Enter subscript mode +T} +enter_superscript_mode ssupm ZO T{ +Enter superscript mode +T} +enter_underline_mode smul us T{ +begin underline mode +T} +enter_upward_mode sum ZP T{ +Start upward carriage motion +T} +enter_xon_mode smxon SX T{ +turn on xon/xoff handshaking +T} +erase_chars ech ec T{ +erase #1 characters (P) +T} +exit_alt_charset_mode rmacs ae T{ +end alternate character set (P) +T} +exit_am_mode rmam RA T{ +turn off automatic margins +T} +exit_attribute_mode sgr0 me T{ +turn off all attributes +T} +exit_ca_mode rmcup te T{ +strings to end programs using cup +T} +exit_delete_mode rmdc ed T{ +end delete mode +T} +exit_doublewide_mode rwidm ZQ T{ +End double-wide mode +T} +exit_insert_mode rmir ei T{ +exit insert mode +T} +exit_italics_mode ritm ZR T{ +End italic mode +T} +exit_leftward_mode rlm ZS T{ +End left-motion mode +T} +exit_micro_mode rmicm ZT T{ +End micro-motion mode +T} +exit_shadow_mode rshm ZU T{ +End shadow-print mode +T} +exit_standout_mode rmso se T{ +exit standout mode +T} +exit_subscript_mode rsubm ZV T{ +End subscript mode +T} +exit_superscript_mode rsupm ZW T{ +End superscript mode +T} +exit_underline_mode rmul ue T{ +exit underline mode +T} +exit_upward_mode rum ZX T{ +End reverse character motion +T} +exit_xon_mode rmxon RX T{ +turn off xon/xoff handshaking +T} +fixed_pause pause PA T{ +pause for 2-3 seconds +T} +flash_hook hook fh T{ +flash switch hook +T} +flash_screen flash vb T{ +visible bell (may not move cursor) +T} +form_feed ff ff T{ +hardcopy terminal page eject (P*) +T} +from_status_line fsl fs T{ +return from status line +T} +goto_window wingo WG T{ +go to window #1 +T} +hangup hup HU T{ +hang-up phone +T} +init_1string is1 i1 T{ +initialization string +T} +init_2string is2 is T{ +initialization string +T} +init_3string is3 i3 T{ +initialization string +T} +init_file if if T{ +name of initialization file +T} +init_prog iprog iP T{ +path name of program for initialization +T} +initialize_color initc Ic T{ +initialize color #1 to (#2,#3,#4) +T} +initialize_pair initp Ip T{ +Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7) +T} +insert_character ich1 ic T{ +insert character (P) +T} +insert_line il1 al T{ +insert line (P*) +T} +insert_padding ip ip T{ +insert padding after inserted character +T} +key_a1 ka1 K1 T{ +upper left of keypad +T} +key_a3 ka3 K3 T{ +upper right of keypad +T} +key_b2 kb2 K2 T{ +center of keypad +T} +key_backspace kbs kb T{ +backspace key +T} +key_beg kbeg @1 T{ +begin key +T} +key_btab kcbt kB T{ +back-tab key +T} +key_c1 kc1 K4 T{ +lower left of keypad +T} +key_c3 kc3 K5 T{ +lower right of keypad +T} +key_cancel kcan @2 T{ +cancel key +T} +key_catab ktbc ka T{ +clear-all-tabs key +T} +key_clear kclr kC T{ +clear-screen or erase key +T} +key_close kclo @3 T{ +close key +T} +key_command kcmd @4 T{ +command key +T} +key_copy kcpy @5 T{ +copy key +T} +key_create kcrt @6 T{ +create key +T} +key_ctab kctab kt T{ +clear-tab key +T} +key_dc kdch1 kD T{ +delete-character key +T} +key_dl kdl1 kL T{ +delete-line key +T} +key_down kcud1 kd T{ +down-arrow key +T} +key_eic krmir kM T{ +sent by rmir or smir in insert mode +T} +key_end kend @7 T{ +end key +T} +key_enter kent @8 T{ +enter/send key +T} +key_eol kel kE T{ +clear-to-end-of-line key +T} +key_eos ked kS T{ +clear-to-end-of-screen key +T} +key_exit kext @9 T{ +exit key +T} +key_f0 kf0 k0 T{ +F0 function key +T} +key_f1 kf1 k1 T{ +F1 function key +T} +key_f10 kf10 k; T{ +F10 function key +T} +key_f11 kf11 F1 T{ +F11 function key +T} +key_f12 kf12 F2 T{ +F12 function key +T} +key_f13 kf13 F3 T{ +F13 function key +T} +key_f14 kf14 F4 T{ +F14 function key +T} +key_f15 kf15 F5 T{ +F15 function key +T} +key_f16 kf16 F6 T{ +F16 function key +T} +key_f17 kf17 F7 T{ +F17 function key +T} +key_f18 kf18 F8 T{ +F18 function key +T} +key_f19 kf19 F9 T{ +F19 function key +T} +key_f2 kf2 k2 T{ +F2 function key +T} +key_f20 kf20 FA T{ +F20 function key +T} +key_f21 kf21 FB T{ +F21 function key +T} +key_f22 kf22 FC T{ +F22 function key +T} +key_f23 kf23 FD T{ +F23 function key +T} +key_f24 kf24 FE T{ +F24 function key +T} +key_f25 kf25 FF T{ +F25 function key +T} +key_f26 kf26 FG T{ +F26 function key +T} +key_f27 kf27 FH T{ +F27 function key +T} +key_f28 kf28 FI T{ +F28 function key +T} +key_f29 kf29 FJ T{ +F29 function key +T} +key_f3 kf3 k3 T{ +F3 function key +T} +key_f30 kf30 FK T{ +F30 function key +T} +key_f31 kf31 FL T{ +F31 function key +T} +key_f32 kf32 FM T{ +F32 function key +T} +key_f33 kf33 FN T{ +F33 function key +T} +key_f34 kf34 FO T{ +F34 function key +T} +key_f35 kf35 FP T{ +F35 function key +T} +key_f36 kf36 FQ T{ +F36 function key +T} +key_f37 kf37 FR T{ +F37 function key +T} +key_f38 kf38 FS T{ +F38 function key +T} +key_f39 kf39 FT T{ +F39 function key +T} +key_f4 kf4 k4 T{ +F4 function key +T} +key_f40 kf40 FU T{ +F40 function key +T} +key_f41 kf41 FV T{ +F41 function key +T} +key_f42 kf42 FW T{ +F42 function key +T} +key_f43 kf43 FX T{ +F43 function key +T} +key_f44 kf44 FY T{ +F44 function key +T} +key_f45 kf45 FZ T{ +F45 function key +T} +key_f46 kf46 Fa T{ +F46 function key +T} +key_f47 kf47 Fb T{ +F47 function key +T} +key_f48 kf48 Fc T{ +F48 function key +T} +key_f49 kf49 Fd T{ +F49 function key +T} +key_f5 kf5 k5 T{ +F5 function key +T} +key_f50 kf50 Fe T{ +F50 function key +T} +key_f51 kf51 Ff T{ +F51 function key +T} +key_f52 kf52 Fg T{ +F52 function key +T} +key_f53 kf53 Fh T{ +F53 function key +T} +key_f54 kf54 Fi T{ +F54 function key +T} +key_f55 kf55 Fj T{ +F55 function key +T} +key_f56 kf56 Fk T{ +F56 function key +T} +key_f57 kf57 Fl T{ +F57 function key +T} +key_f58 kf58 Fm T{ +F58 function key +T} +key_f59 kf59 Fn T{ +F59 function key +T} +key_f6 kf6 k6 T{ +F6 function key +T} +key_f60 kf60 Fo T{ +F60 function key +T} +key_f61 kf61 Fp T{ +F61 function key +T} +key_f62 kf62 Fq T{ +F62 function key +T} +key_f63 kf63 Fr T{ +F63 function key +T} +key_f7 kf7 k7 T{ +F7 function key +T} +key_f8 kf8 k8 T{ +F8 function key +T} +key_f9 kf9 k9 T{ +F9 function key +T} +key_find kfnd @0 T{ +find key +T} +key_help khlp %1 T{ +help key +T} +key_home khome kh T{ +home key +T} +key_ic kich1 kI T{ +insert-character key +T} +key_il kil1 kA T{ +insert-line key +T} +key_left kcub1 kl T{ +left-arrow key +T} +key_ll kll kH T{ +lower-left key (home down) +T} +key_mark kmrk %2 T{ +mark key +T} +key_message kmsg %3 T{ +message key +T} +key_move kmov %4 T{ +move key +T} +key_next knxt %5 T{ +next key +T} +key_npage knp kN T{ +next-page key +T} +key_open kopn %6 T{ +open key +T} +key_options kopt %7 T{ +options key +T} +key_ppage kpp kP T{ +previous-page key +T} +key_previous kprv %8 T{ +previous key +T} +key_print kprt %9 T{ +print key +T} +key_redo krdo %0 T{ +redo key +T} +key_reference kref &1 T{ +reference key +T} +key_refresh krfr &2 T{ +refresh key +T} +key_replace krpl &3 T{ +replace key +T} +key_restart krst &4 T{ +restart key +T} +key_resume kres &5 T{ +resume key +T} +key_right kcuf1 kr T{ +right-arrow key +T} +key_save ksav &6 T{ +save key +T} +key_sbeg kBEG &9 T{ +shifted begin key +T} +key_scancel kCAN &0 T{ +shifted cancel key +T} +key_scommand kCMD *1 T{ +shifted command key +T} +key_scopy kCPY *2 T{ +shifted copy key +T} +key_screate kCRT *3 T{ +shifted create key +T} +key_sdc kDC *4 T{ +shifted delete-character key +T} +key_sdl kDL *5 T{ +shifted delete-line key +T} +key_select kslt *6 T{ +select key +T} +key_send kEND *7 T{ +shifted end key +T} +key_seol kEOL *8 T{ +shifted clear-to-end-of-line key +T} +key_sexit kEXT *9 T{ +shifted exit key +T} +key_sf kind kF T{ +scroll-forward key +T} +key_sfind kFND *0 T{ +shifted find key +T} +key_shelp kHLP #1 T{ +shifted help key +T} +key_shome kHOM #2 T{ +shifted home key +T} +key_sic kIC #3 T{ +shifted insert-character key +T} +key_sleft kLFT #4 T{ +shifted left-arrow key +T} +key_smessage kMSG %a T{ +shifted message key +T} +key_smove kMOV %b T{ +shifted move key +T} +key_snext kNXT %c T{ +shifted next key +T} +key_soptions kOPT %d T{ +shifted options key +T} +key_sprevious kPRV %e T{ +shifted previous key +T} +key_sprint kPRT %f T{ +shifted print key +T} +key_sr kri kR T{ +scroll-backward key +T} +key_sredo kRDO %g T{ +shifted redo key +T} +key_sreplace kRPL %h T{ +shifted replace key +T} +key_sright kRIT %i T{ +shifted right-arrow key +T} +key_srsume kRES %j T{ +shifted resume key +T} +key_ssave kSAV !1 T{ +shifted save key +T} +key_ssuspend kSPD !2 T{ +shifted suspend key +T} +key_stab khts kT T{ +set-tab key +T} +key_sundo kUND !3 T{ +shifted undo key +T} +key_suspend kspd &7 T{ +suspend key +T} +key_undo kund &8 T{ +undo key +T} +key_up kcuu1 ku T{ +up-arrow key +T} +keypad_local rmkx ke T{ +leave 'keyboard_transmit' mode +T} +keypad_xmit smkx ks T{ +enter 'keyboard_transmit' mode +T} +lab_f0 lf0 l0 T{ +label on function key f0 if not f0 +T} +lab_f1 lf1 l1 T{ +label on function key f1 if not f1 +T} +lab_f10 lf10 la T{ +label on function key f10 if not f10 +T} +lab_f2 lf2 l2 T{ +label on function key f2 if not f2 +T} +lab_f3 lf3 l3 T{ +label on function key f3 if not f3 +T} +lab_f4 lf4 l4 T{ +label on function key f4 if not f4 +T} +lab_f5 lf5 l5 T{ +label on function key f5 if not f5 +T} +lab_f6 lf6 l6 T{ +label on function key f6 if not f6 +T} +lab_f7 lf7 l7 T{ +label on function key f7 if not f7 +T} +lab_f8 lf8 l8 T{ +label on function key f8 if not f8 +T} +lab_f9 lf9 l9 T{ +label on function key f9 if not f9 +T} +label_format fln Lf T{ +label format +T} +label_off rmln LF T{ +turn off soft labels +T} +label_on smln LO T{ +turn on soft labels +T} +meta_off rmm mo T{ +turn off meta mode +T} +meta_on smm mm T{ +turn on meta mode (8th-bit on) +T} +micro_column_address mhpa ZY T{ +Like column_address in micro mode +T} +micro_down mcud1 ZZ T{ +Like cursor_down in micro mode +T} +micro_left mcub1 Za T{ +Like cursor_left in micro mode +T} +micro_right mcuf1 Zb T{ +Like cursor_right in micro mode +T} +micro_row_address mvpa Zc T{ +Like row_address #1 in micro mode +T} +micro_up mcuu1 Zd T{ +Like cursor_up in micro mode +T} +newline nel nw T{ +newline (behave like cr followed by lf) +T} +order_of_pins porder Ze T{ +Match software bits to print-head pins +T} +orig_colors oc oc T{ +Set all color pairs to the original ones +T} +orig_pair op op T{ +Set default pair to its original value +T} +pad_char pad pc T{ +padding char (instead of null) +T} +parm_dch dch DC T{ +delete #1 characters (P*) +T} +parm_delete_line dl DL T{ +delete #1 lines (P*) +T} +parm_down_cursor cud DO T{ +down #1 lines (P*) +T} +parm_down_micro mcud Zf T{ +Like parm_down_cursor in micro mode +T} +parm_ich ich IC T{ +insert #1 characters (P*) +T} +parm_index indn SF T{ +scroll forward #1 lines (P) +T} +parm_insert_line il AL T{ +insert #1 lines (P*) +T} +parm_left_cursor cub LE T{ +move #1 characters to the left (P) +T} +parm_left_micro mcub Zg T{ +Like parm_left_cursor in micro mode +T} +parm_right_cursor cuf RI T{ +move #1 characters to the right (P*) +T} +parm_right_micro mcuf Zh T{ +Like parm_right_cursor in micro mode +T} +parm_rindex rin SR T{ +scroll back #1 lines (P) +T} +parm_up_cursor cuu UP T{ +up #1 lines (P*) +T} +parm_up_micro mcuu Zi T{ +Like parm_up_cursor in micro mode +T} +pkey_key pfkey pk T{ +program function key #1 to type string #2 +T} +pkey_local pfloc pl T{ +program function key #1 to execute string #2 +T} +pkey_xmit pfx px T{ +program function key #1 to transmit string #2 +T} +plab_norm pln pn T{ +program label #1 to show string #2 +T} +print_screen mc0 ps T{ +print contents of screen +T} +prtr_non mc5p pO T{ +turn on printer for #1 bytes +T} +prtr_off mc4 pf T{ +turn off printer +T} +prtr_on mc5 po T{ +turn on printer +T} +pulse pulse PU T{ +select pulse dialing +T} +quick_dial qdial QD T{ +dial number #1 without checking +T} +remove_clock rmclk RC T{ +remove clock +T} +repeat_char rep rp T{ +repeat char #1 #2 times (P*) +T} +req_for_input rfi RF T{ +send next input char (for ptys) +T} +reset_1string rs1 r1 T{ +reset string +T} +reset_2string rs2 r2 T{ +reset string +T} +reset_3string rs3 r3 T{ +reset string +T} +reset_file rf rf T{ +name of reset file +T} +restore_cursor rc rc T{ +restore cursor to position of last save_cursor +T} +row_address vpa cv T{ +vertical position #1 absolute (P) +T} +save_cursor sc sc T{ +save current cursor position (P) +T} +scroll_forward ind sf T{ +scroll text up (P) +T} +scroll_reverse ri sr T{ +scroll text down (P) +T} +select_char_set scs Zj T{ +Select character set, #1 +T} +set_attributes sgr sa T{ +define video attributes #1-#9 (PG9) +T} +set_background setb Sb T{ +Set background color #1 +T} +set_bottom_margin smgb Zk T{ +Set bottom margin at current line +T} +set_bottom_margin_parm smgbp Zl T{ +Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom +T} +set_clock sclk SC T{ +set clock, #1 hrs #2 mins #3 secs +T} +set_color_pair scp sp T{ +Set current color pair to #1 +T} +set_foreground setf Sf T{ +Set foreground color #1 +T} +set_left_margin smgl ML T{ +set left soft margin at current column. See smgl. (ML is not in BSD termcap). +T} +set_left_margin_parm smglp Zm T{ +Set left (right) margin at column #1 +T} +set_right_margin smgr MR T{ +set right soft margin at current column +T} +set_right_margin_parm smgrp Zn T{ +Set right margin at column #1 +T} +set_tab hts st T{ +set a tab in every row, current columns +T} +set_top_margin smgt Zo T{ +Set top margin at current line +T} +set_top_margin_parm smgtp Zp T{ +Set top (bottom) margin at row #1 +T} +set_window wind wi T{ +current window is lines #1-#2 cols #3-#4 +T} +start_bit_image sbim Zq T{ +Start printing bit image graphics +T} +start_char_set_def scsd Zr T{ +Start character set definition #1, with #2 characters in the set +T} +stop_bit_image rbim Zs T{ +Stop printing bit image graphics +T} +stop_char_set_def rcsd Zt T{ +End definition of character set #1 +T} +subscript_characters subcs Zu T{ +List of subscriptable characters +T} +superscript_characters supcs Zv T{ +List of superscriptable characters +T} +tab ht ta T{ +tab to next 8-space hardware tab stop +T} +these_cause_cr docr Zw T{ +Printing any of these characters causes CR +T} +to_status_line tsl ts T{ +move to status line, column #1 +T} +tone tone TO T{ +select touch tone dialing +T} +underline_char uc uc T{ +underline char and move past it +T} +up_half_line hu hu T{ +half a line up +T} +user0 u0 u0 T{ +User string #0 +T} +user1 u1 u1 T{ +User string #1 +T} +user2 u2 u2 T{ +User string #2 +T} +user3 u3 u3 T{ +User string #3 +T} +user4 u4 u4 T{ +User string #4 +T} +user5 u5 u5 T{ +User string #5 +T} +user6 u6 u6 T{ +User string #6 +T} +user7 u7 u7 T{ +User string #7 +T} +user8 u8 u8 T{ +User string #8 +T} +user9 u9 u9 T{ +User string #9 +T} +wait_tone wait WA T{ +wait for dial-tone +T} +xoff_character xoffc XF T{ +XOFF character +T} +xon_character xonc XN T{ +XON character +T} +zero_motion zerom Zx T{ +No motion for subsequent character +T} +.TE +.ad + +The following string capabilities are present in the SVr4.0 term structure, +but were originally not documented in the man page. + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw18. +\fBVariable Cap- TCap Description\fR +\fBString name Code\fR +alt_scancode_esc scesa S8 T{ +Alternate escape for scancode emulation +T} +bit_image_carriage_return bicr Yv T{ +Move to beginning of same row +T} +bit_image_newline binel Zz T{ +Move to next row of the bit image +T} +bit_image_repeat birep Xy T{ +Repeat bit image cell #1 #2 times +T} +char_set_names csnm Zy T{ +Produce #1'th item from list of character set names +T} +code_set_init csin ci T{ +Init sequence for multiple codesets +T} +color_names colornm Yw T{ +Give name for color #1 +T} +define_bit_image_region defbi Yx T{ +Define rectangualar bit image region +T} +device_type devt dv T{ +Indicate language/codeset support +T} +display_pc_char dispc S1 T{ +Display PC character #1 +T} +end_bit_image_region endbi Yy T{ +End a bit-image region +T} +enter_pc_charset_mode smpch S2 T{ +Enter PC character display mode +T} +enter_scancode_mode smsc S4 T{ +Enter PC scancode mode +T} +exit_pc_charset_mode rmpch S3 T{ +Exit PC character display mode +T} +exit_scancode_mode rmsc S5 T{ +Exit PC scancode mode +T} +get_mouse getm Gm T{ +Curses should get button events, parameter #1 not documented. +T} +key_mouse kmous Km T{ +Mouse event has occurred +T} +mouse_info minfo Mi T{ +Mouse status information +T} +pc_term_options pctrm S6 T{ +PC terminal options +T} +pkey_plab pfxl xl T{ +Program function key #1 to type string #2 and show string #3 +T} +req_mouse_pos reqmp RQ T{ +Request mouse position +T} +scancode_escape scesc S7 T{ +Escape for scancode emulation +T} +set0_des_seq s0ds s0 T{ +Shift to codeset 0 (EUC set 0, ASCII) +T} +set1_des_seq s1ds s1 T{ +Shift to codeset 1 +T} +set2_des_seq s2ds s2 T{ +Shift to codeset 2 +T} +set3_des_seq s3ds s3 T{ +Shift to codeset 3 +T} +set_a_background setab AB T{ +Set background color to #1, using ANSI escape +T} +set_a_foreground setaf AF T{ +Set foreground color to #1, using ANSI escape +T} +set_color_band setcolor Yz T{ +Change to ribbon color #1 +T} +set_lr_margin smglr ML T{ +Set both left and right margins to #1, #2. (ML is not in BSD termcap). +T} +set_page_length slines YZ T{ +Set page length to #1 lines +T} +set_tb_margin smgtb MT T{ +Sets both top and bottom margins to #1, #2 +T} +.TE +.ad + +.in .8i +The XSI Curses standard added these. They are some post-4.1 +versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x. +The \fBncurses\fR termcap names for them are invented; according to the +XSI Curses standard, they have no termcap names. If your compiled terminfo +entries use these, they may not be binary-compatible with System V terminfo +entries after SVr4.1; beware! + +.na +.TS H +center expand; +c l l c +c l l c +lw25 lw6 lw2 lw20. +\fBVariable Cap- TCap Description\fR +\fBString name Code\fR +enter_horizontal_hl_mode ehhlm Xh T{ +Enter horizontal highlight mode +T} +enter_left_hl_mode elhlm Xl T{ +Enter left highlight mode +T} +enter_low_hl_mode elohlm Xo T{ +Enter low highlight mode +T} +enter_right_hl_mode erhlm Xr T{ +Enter right highlight mode +T} +enter_top_hl_mode ethlm Xt T{ +Enter top highlight mode +T} +enter_vertical_hl_mode evhlm Xv T{ +Enter vertical highlight mode +T} +set_a_attributes sgr1 sA T{ +Define second set of video attributes #1-#6 +T} +set_pglen_inch slength sL T{ +YI Set page length to #1 hundredth of an inch +T} +.TE +.ad +.\" $Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp $ +.\" Beginning of terminfo.tail file +.ps +1 +.PP +.SS A Sample Entry +.PP +The following entry, describing an ANSI-standard terminal, is representative +of what a \fBterminfo\fR entry for a modern terminal typically looks like. +.PP +.nf +.in -2 +.ta .3i +.ft CW +\s-2ansi|ansi/pc-term compatible with color, + mc5i, + colors#8, ncv#3, pairs#64, + cub=\\E[%p1%dD, cud=\\E[%p1%dB, cuf=\\E[%p1%dC, + cuu=\\E[%p1%dA, dch=\\E[%p1%dP, dl=\\E[%p1%dM, + ech=\\E[%p1%dX, el1=\\E[1K, hpa=\\E[%p1%dG, ht=\\E[I, + ich=\\E[%p1%d@, il=\\E[%p1%dL, indn=\\E[%p1%dS, .indn=\\E[%p1%dT, + kbs=^H, kcbt=\\E[Z, kcub1=\\E[D, kcud1=\\E[B, + kcuf1=\\E[C, kcuu1=\\E[A, kf1=\\E[M, kf10=\\E[V, + kf11=\\E[W, kf12=\\E[X, kf2=\\E[N, kf3=\\E[O, kf4=\\E[P, + kf5=\\E[Q, kf6=\\E[R, kf7=\\E[S, kf8=\\E[T, kf9=\\E[U, + kich1=\\E[L, mc4=\\E[4i, mc5=\\E[5i, nel=\\r\\E[S, + op=\\E[37;40m, rep=%p1%c\\E[%p2%{1}%-%db, + rin=\\E[%p1%dT, s0ds=\\E(B, s1ds=\\E)B, s2ds=\\E*B, + s3ds=\\E+B, setab=\\E[4%p1%dm, setaf=\\E[3%p1%dm, + setb=\\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + setf=\\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + sgr=\\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;12%;m, + sgr0=\\E[0;10m, tbc=\\E[2g, u6=\\E[%d;%dR, u7=\\E[6n, + u8=\\E[?%[;0123456789]c, u9=\\E[c, vpa=\\E[%p1%dd,\s+2 +.in +2 +.fi +.ft R +.PP +Entries may continue onto multiple lines by placing white space at +the beginning of each line except the first. +Comments may be included on lines beginning with ``#''. +Capabilities in +.I terminfo +are of three types: +Boolean capabilities which indicate that the terminal has +some particular feature, numeric capabilities giving the size of the terminal +or the size of particular delays, and string +capabilities, which give a sequence which can be used to perform particular +terminal operations. +.PP +.SS Types of Capabilities +.PP +All capabilities have names. +For instance, the fact that +ANSI-standard terminals have +.I "automatic margins" +(i.e., an automatic return and line-feed +when the end of a line is reached) is indicated by the capability \fBam\fR. +Hence the description of ansi includes \fBam\fR. +Numeric capabilities are followed by the character `#' and then a positive value. +Thus \fBcols\fR, which indicates the number of columns the terminal has, +gives the value `80' for ansi. +Values for numeric capabilities may be specified in decimal, octal or hexadecimal, +using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF). +.PP +Finally, string valued capabilities, such as \fBel\fR (clear to end of line +sequence) are given by the two-character code, an `=', and then a string +ending at the next following `,'. +.PP +A number of escape sequences are provided in the string valued capabilities +for easy encoding of characters there. +Both \fB\eE\fR and \fB\ee\fR +map to an \s-1ESCAPE\s0 character, +\fB^x\fR maps to a control-x for any appropriate x, and the sequences +\fB\en \el \er \et \eb \ef \es\fR give +a newline, line-feed, return, tab, backspace, form-feed, and space. +Other escapes include \fB\e^\fR for \fB^\fR, +\fB\e\e\fR for \fB\e\fR, +\fB\e\fR, for comma, +\fB\e:\fR for \fB:\fR, +and \fB\e0\fR for null. +(\fB\e0\fR will produce \e200, which does not terminate a string but behaves +as a null character on most terminals, providing CS7 is specified. +See stty(1).) +Finally, characters may be given as three octal digits after a \fB\e\fR. +.PP +A delay in milliseconds may appear anywhere in a string capability, enclosed in +$<..> brackets, as in \fBel\fP=\eEK$<5>, and padding characters are supplied by +.I tputs +to provide this delay. +The delay must be a number with at most one decimal +place of precision; it may be followed by suffixes `*' or '/' or both. +A `*' +indicates that the padding required is proportional to the number of lines +affected by the operation, and the amount given is the per-affected-unit +padding required. +(In the case of insert character, the factor is still the +number of +.IR lines +affected.) Normally, padding is advisory if the device has the \fBxon\fR +capability; it is used for cost computation but does not trigger delays. +A `/' +suffix indicates that the padding is mandatory and forces a delay of the given +number of milliseconds even on devices for which \fBxon\fR is present to +indicate flow control. +.PP +Sometimes individual capabilities must be commented out. +To do this, put a period before the capability name. +For example, see the second +.B ind +in the example above. +.br +.ne 5 +.PP +.SS Fetching Compiled Descriptions +.PP +If the environment variable TERMINFO is set, it is interpreted as the pathname +of a directory containing the compiled description you are working on. +Only +that directory is searched. +.PP +If TERMINFO is not set, the \fBncurses\fR version of the terminfo reader code +will instead look in the directory \fB$HOME/.terminfo\fR +for a compiled description. +If it fails to find one there, and the environment variable TERMINFO_DIRS is +set, it will interpret the contents of that variable as a list of colon- +separated directories to be searched (an empty entry is interpreted as a +command to search \fI\*d\fR). +If no description is found in any of the +TERMINFO_DIRS directories, the fetch fails. +.PP +If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the +system terminfo directory, \fI\*d\fR. +.PP +(Neither the \fB$HOME/.terminfo\fR lookups nor TERMINFO_DIRS extensions are +supported under stock System V terminfo/curses.) +.PP +.SS Preparing Descriptions +.PP +We now outline how to prepare descriptions of terminals. +The most effective way to prepare a terminal description is by imitating +the description of a similar terminal in +.I terminfo +and to build up a description gradually, using partial descriptions +with +.I vi +or some other screen-oriented program to check that they are correct. +Be aware that a very unusual terminal may expose deficiencies in +the ability of the +.I terminfo +file to describe it +or bugs in the screen-handling code of the test program. +.PP +To get the padding for insert line right (if the terminal manufacturer +did not document it) a severe test is to edit a large file at 9600 baud, +delete 16 or so lines from the middle of the screen, then hit the `u' +key several times quickly. +If the terminal messes up, more padding is usually needed. +A similar test can be used for insert character. +.PP +.SS Basic Capabilities +.PP +The number of columns on each line for the terminal is given by the +\fBcols\fR numeric capability. +If the terminal is a \s-1CRT\s0, then the +number of lines on the screen is given by the \fBlines\fR capability. +If the terminal wraps around to the beginning of the next line when +it reaches the right margin, then it should have the \fBam\fR capability. +If the terminal can clear its screen, leaving the cursor in the home +position, then this is given by the \fBclear\fR string capability. +If the terminal overstrikes +(rather than clearing a position when a character is struck over) +then it should have the \fBos\fR capability. +If the terminal is a printing terminal, with no soft copy unit, +give it both +.B hc +and +.BR os . +.RB ( os +applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010 +series, as well as hard copy and APL terminals.) +If there is a code to move the cursor to the left edge of the current +row, give this as +.BR cr . +(Normally this will be carriage return, control M.) +If there is a code to produce an audible signal (bell, beep, etc) +give this as +.BR bel . +.PP +If there is a code to move the cursor one position to the left +(such as backspace) that capability should be given as +.BR cub1 . +Similarly, codes to move to the right, up, and down should be +given as +.BR cuf1 , +.BR cuu1 , +and +.BR cud1 . +These local cursor motions should not alter the text they pass over, +for example, you would not normally use `\fBcuf1\fP=\ ' because the +space would erase the character moved over. +.PP +A very important point here is that the local cursor motions encoded +in +.I terminfo +are undefined at the left and top edges of a \s-1CRT\s0 terminal. +Programs should never attempt to backspace around the left edge, +unless +.B bw +is given, +and never attempt to go up locally off the top. +In order to scroll text up, a program will go to the bottom left corner +of the screen and send the +.B ind +(index) string. +.PP +To scroll text down, a program goes to the top left corner +of the screen and sends the +.B ri +(reverse index) string. +The strings +.B ind +and +.B ri +are undefined when not on their respective corners of the screen. +.PP +Parameterized versions of the scrolling sequences are +.B indn +and +.B rin +which have the same semantics as +.B ind +and +.B ri +except that they take one parameter, and scroll that many lines. +They are also undefined except at the appropriate edge of the screen. +.PP +The \fBam\fR capability tells whether the cursor sticks at the right +edge of the screen when text is output, but this does not necessarily +apply to a +.B cuf1 +from the last column. +The only local motion which is defined from the left edge is if +.B bw +is given, then a +.B cub1 +from the left edge will move to the right edge of the previous row. +If +.B bw +is not given, the effect is undefined. +This is useful for drawing a box around the edge of the screen, for example. +If the terminal has switch selectable automatic margins, +the +.I terminfo +file usually assumes that this is on; i.e., \fBam\fR. +If the terminal has a command which moves to the first column of the next +line, that command can be given as +.B nel +(newline). +It does not matter if the command clears the remainder of the current line, +so if the terminal has no +.B cr +and +.B lf +it may still be possible to craft a working +.B nel +out of one or both of them. +.PP +These capabilities suffice to describe hard-copy and \*(lqglass-tty\*(rq terminals. +Thus the model 33 teletype is described as +.PP +.DT +.nf +.ft CW +.in -7 + \s-133\||\|tty33\||\|tty\||\|model 33 teletype, + bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1 +.in +7 +.ft R +.PP +while the Lear Siegler \s-1ADM\-3\s0 is described as +.PP +.DT +.nf +.ft CW +.in -7 + \s-1adm3\||\|3\||\|lsi adm3, + am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J, + ind=^J, lines#24,\s+1 +.in +7 +.ft R +.fi +.PP +.SS Parameterized Strings +.PP +Cursor addressing and other strings requiring parameters +in the terminal are described by a +parameterized string capability, with +.IR printf (3S) +like escapes \fB%x\fR in it. +For example, to address the cursor, the +.B cup +capability is given, using two parameters: +the row and column to address to. +(Rows and columns are numbered from zero and refer to the +physical screen visible to the user, not to any unseen memory.) +If the terminal has memory relative cursor addressing, +that can be indicated by +.BR mrcup . +.PP +The parameter mechanism uses a stack and special \fB%\fP codes +to manipulate it. +Typically a sequence will push one of the +parameters onto the stack and then print it in some format. +Print (e.g., "%d") is a special case. +Other operations, including "%t" pop their operand from the stack. +It is noted that more complex operations are often necessary, +e.g., in the \fBsgr\fP string. +.PP +The \fB%\fR encodings have the following meanings: +.PP +.TP 5 +\s-1%% +outputs `%' +.TP +%\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP +as in \fBprintf\fP, flags are [-+#] and space +.TP +%c +print pop() like %c in \fBprintf\fP +.TP +%s +print pop() like %s in \fBprintf\fP +.TP +%p[1-9] +push \fIi\fP'th parameter +.TP +%P[a-z] +set dynamic variable [a-z] to pop() +.TP +%g[a-z] +get dynamic variable [a-z] and push it +.TP +%P[A-Z] +set static variable [a-z] to pop() +.TP +%g[A-Z] +get static variable [a-z] and push it +.IP +The terms "static" and "dynamic" are misleading. +Historically, these are simply two different sets of variables, +whose values are not reset between calls to \fBtparm\fP. +However, that fact is not documented in other implementations. +Relying on it will adversely impact portability to other implementations. +.TP +%'\fIc\fP' +char constant \fIc\fP +.TP +%{\fInn\fP} +integer constant \fInn\fP +.TP +%l +push strlen(pop) +.TP +%+ %- %* %/ %m +arithmetic (%m is mod): push(pop() op pop()) +.TP +%& %| %^ +bit operations: push(pop() op pop()) +.TP +%= %> %< +logical operations: push(pop() op pop()) +.TP +%A, %O +logical and & or operations (for conditionals) +.TP +%! %~ +unary operations push(op pop()) +.TP +%i +add 1 to first two parameters (for ANSI terminals) +.TP +%? \fIexpr\fP %t \fIthenpart\fP %e \fIelsepart\fP %; +if-then-else, %e \fIelsepart\fP is optional. +else-if's are possible a la Algol 68: +.br +%? c\d1\u %t b\d1\u %e c\d2\u %t b\d2\u %e c\d3\u %t b\d3\u %e c\d4\u %t b\d4\u %e %; +.br +c\di\u are conditions, b\di\u are bodies. +.PP +Binary operations are in postfix form with the operands in the usual order. +That is, to get x-5 one would use "%gx%{5}%-". +%P and %g variables are +persistent across escape-string evaluations. +.PP +Consider the HP2645, which, to get to row 3 and column 12, needs +to be sent \eE&a12c03Y padded for 6 milliseconds. +Note that the order +of the rows and columns is inverted here, and that the row and column +are printed as two digits. +Thus its \fBcup\fR capability is \*(lqcup=6\eE&%p2%2dc%p1%2dY\*(rq. +.PP +The Microterm \s-1ACT-IV\s0 needs the current row and column sent +preceded by a \fB^T\fR, with the row and column simply encoded in binary, +\*(lqcup=^T%p1%c%p2%c\*(rq. +Terminals which use \*(lq%c\*(rq need to be able to +backspace the cursor (\fBcub1\fR), +and to move the cursor up one line on the screen (\fBcuu1\fR). +This is necessary because it is not always safe to transmit \fB\en\fR +\fB^D\fR and \fB\er\fR, as the system may change or discard them. +(The library routines dealing with terminfo set tty modes so that +tabs are never expanded, so \et is safe to send. +This turns out to be essential for the Ann Arbor 4080.) +.PP +A final example is the \s-1LSI ADM\s0-3a, which uses row and column +offset by a blank character, thus \*(lqcup=\eE=%p1%' '%+%c%p2%' '%+%c\*(rq. +After sending `\eE=', this pushes the first parameter, pushes the +ASCII value for a space (32), adds them (pushing the sum on the stack +in place of the two previous values) and outputs that value as a character. +Then the same is done for the second parameter. +More complex arithmetic is possible using the stack. +.PP +.SS Cursor Motions +.PP +If the terminal has a fast way to home the cursor +(to very upper left corner of screen) then this can be given as +\fBhome\fR; similarly a fast way of getting to the lower left-hand corner +can be given as \fBll\fR; this may involve going up with \fBcuu1\fR +from the home position, +but a program should never do this itself (unless \fBll\fR does) because it +can make no assumption about the effect of moving up from the home position. +Note that the home position is the same as addressing to (0,0): +to the top left corner of the screen, not of memory. +(Thus, the \eEH sequence on HP terminals cannot be used for +.BR home .) +.PP +If the terminal has row or column absolute cursor addressing, +these can be given as single parameter capabilities +.B hpa +(horizontal position absolute) +and +.B vpa +(vertical position absolute). +Sometimes these are shorter than the more general two parameter +sequence (as with the hp2645) and can be used in preference to +.BR cup . +If there are parameterized local motions (e.g., move +.I n +spaces to the right) these can be given as +.BR cud , +.BR cub , +.BR cuf , +and +.BR cuu +with a single parameter indicating how many spaces to move. +These are primarily useful if the terminal does not have +.BR cup , +such as the \s-1TEKTRONIX\s+1 4025. +.PP +If the terminal needs to be in a special mode when running +a program that uses these capabilities, +the codes to enter and exit this mode can be given as \fBsmcup\fR and \fBrmcup\fR. +This arises, for example, from terminals like the Concept with more than +one page of memory. +If the terminal has only memory relative cursor addressing and not screen +relative cursor addressing, a one screen-sized window must be fixed into +the terminal for cursor addressing to work properly. +This is also used for the \s-1TEKTRONIX\s+1 4025, +where +.B smcup +sets the command character to be the one used by terminfo. +If the \fBsmcup\fP sequence will not restore the screen after an +\fBrmcup\fP sequence is output (to the state prior to outputting +\fBrmcup\fP), specify \fBnrrmc\fP. +.PP +.SS Area Clears +.PP +If the terminal can clear from the current position to the end of the +line, leaving the cursor where it is, this should be given as \fBel\fR. +If the terminal can clear from the beginning of the line to the current +position inclusive, leaving +the cursor where it is, this should be given as \fBel1\fP. +If the terminal can clear from the current position to the end of the +display, then this should be given as \fBed\fR. +\fBEd\fR is only defined from the first column of a line. +(Thus, it can be simulated by a request to delete a large number of lines, +if a true +.B ed +is not available.) +.PP +.SS Insert/delete line and vertical motions +.PP +If the terminal can open a new blank line before the line where the cursor +is, this should be given as \fBil1\fR; this is done only from the first +position of a line. +The cursor must then appear on the newly blank line. +If the terminal can delete the line which the cursor is on, then this +should be given as \fBdl1\fR; this is done only from the first position on +the line to be deleted. +Versions of +.B il1 +and +.B dl1 +which take a single parameter and insert or delete that many lines can +be given as +.B il +and +.BR dl . +.PP +If the terminal has a settable scrolling region (like the vt100) +the command to set this can be described with the +.B csr +capability, which takes two parameters: +the top and bottom lines of the scrolling region. +The cursor position is, alas, undefined after using this command. +.PP +It is possible to get the effect of insert or delete line using +.B csr +on a properly chosen region; the +.B sc +and +.B rc +(save and restore cursor) commands may be useful for ensuring that +your synthesized insert/delete string does not move the cursor. +(Note that the \fBncurses\fR(3X) library does this synthesis +automatically, so you need not compose insert/delete strings for +an entry with \fBcsr\fR). +.PP +Yet another way to construct insert and delete might be to use a combination of +index with the memory-lock feature found on some terminals (like the HP-700/90 +series, which however also has insert/delete). +.PP +Inserting lines at the top or bottom of the screen can also be +done using +.B ri +or +.B ind +on many terminals without a true insert/delete line, +and is often faster even on terminals with those features. +.PP +The boolean \fBnon_dest_scroll_region\fR should be set if each scrolling +window is effectively a view port on a screen-sized canvas. +To test for +this capability, create a scrolling region in the middle of the screen, +write something to the bottom line, move the cursor to the top of the region, +and do \fBri\fR followed by \fBdl1\fR or \fBind\fR. +If the data scrolled +off the bottom of the region by the \fBri\fR re-appears, then scrolling +is non-destructive. +System V and XSI Curses expect that \fBind\fR, \fBri\fR, +\fBindn\fR, and \fBrin\fR will simulate destructive scrolling; their +documentation cautions you not to define \fBcsr\fR unless this is true. +This \fBcurses\fR implementation is more liberal and will do explicit erases +after scrolling if \fBndstr\fR is defined. +.PP +If the terminal has the ability to define a window as part of +memory, which all commands affect, +it should be given as the parameterized string +.BR wind . +The four parameters are the starting and ending lines in memory +and the starting and ending columns in memory, in that order. +.PP +If the terminal can retain display memory above, then the +\fBda\fR capability should be given; if display memory can be retained +below, then \fBdb\fR should be given. +These indicate +that deleting a line or scrolling may bring non-blank lines up from below +or that scrolling back with \fBri\fR may bring down non-blank lines. +.PP +.SS Insert/Delete Character +.PP +There are two basic kinds of intelligent terminals with respect to +insert/delete character which can be described using +.I terminfo. +The most common insert/delete character operations affect only the characters +on the current line and shift characters off the end of the line rigidly. +Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make +a distinction between typed and untyped blanks on the screen, shifting +upon an insert or delete only to an untyped blank on the screen which is +either eliminated, or expanded to two untyped blanks. +You can determine the +kind of terminal you have by clearing the screen and then typing +text separated by cursor motions. +Type \*(lqabc\ \ \ \ def\*(rq using local +cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq. +Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert +mode. +If typing characters causes the rest of the line to shift +rigidly and characters to fall off the end, then your terminal does +not distinguish between blanks and untyped positions. +If the \*(lqabc\*(rq +shifts over to the \*(lqdef\*(rq which then move together around the end of the +current line and onto the next as you insert, you have the second type of +terminal, and should give the capability \fBin\fR, which stands for +\*(lqinsert null\*(rq. +While these are two logically separate attributes (one line versus multi-line +insert mode, and special treatment of untyped spaces) we have seen no +terminals whose insert mode cannot be described with the single attribute. +.PP +Terminfo can describe both terminals which have an insert mode, and terminals +which send a simple sequence to open a blank position on the current line. +Give as \fBsmir\fR the sequence to get into insert mode. +Give as \fBrmir\fR the sequence to leave insert mode. +Now give as \fBich1\fR any sequence needed to be sent just before sending +the character to be inserted. +Most terminals with a true insert mode +will not give \fBich1\fR; terminals which send a sequence to open a screen +position should give it here. +.PP +If your terminal has both, insert mode is usually preferable to \fBich1\fR. +Technically, you should not give both unless the terminal actually requires +both to be used in combination. +Accordingly, some non-curses applications get +confused if both are present; the symptom is doubled characters in an update +using insert. +This requirement is now rare; most \fBich\fR sequences do not +require previous smir, and most smir insert modes do not require \fBich1\fR +before each character. +Therefore, the new \fBcurses\fR actually assumes this +is the case and uses either \fBrmir\fR/\fBsmir\fR or \fBich\fR/\fBich1\fR as +appropriate (but not both). +If you have to write an entry to be used under +new curses for a terminal old enough to need both, include the +\fBrmir\fR/\fBsmir\fR sequences in \fBich1\fR. +.PP +If post insert padding is needed, give this as a number of milliseconds +in \fBip\fR (a string option). +Any other sequence which may need to be +sent after an insert of a single character may also be given in \fBip\fR. +If your terminal needs both to be placed into an `insert mode' and +a special code to precede each inserted character, then both +.BR smir / rmir +and +.B ich1 +can be given, and both will be used. +The +.B ich +capability, with one parameter, +.IR n , +will repeat the effects of +.B ich1 +.I n +times. +.PP +If padding is necessary between characters typed while not +in insert mode, give this as a number of milliseconds padding in \fBrmp\fP. +.PP +It is occasionally necessary to move around while in insert mode +to delete characters on the same line (e.g., if there is a tab after +the insertion position). +If your terminal allows motion while in +insert mode you can give the capability \fBmir\fR to speed up inserting +in this case. +Omitting \fBmir\fR will affect only speed. +Some terminals +(notably Datamedia's) must not have \fBmir\fR because of the way their +insert mode works. +.PP +Finally, you can specify +.B dch1 +to delete a single character, +.B dch +with one parameter, +.IR n , +to delete +.I n characters, +and delete mode by giving \fBsmdc\fR and \fBrmdc\fR +to enter and exit delete mode (any mode the terminal needs to be placed +in for +.B dch1 +to work). +.PP +A command to erase +.I n +characters (equivalent to outputting +.I n +blanks without moving the cursor) +can be given as +.B ech +with one parameter. +.PP +.SS "Highlighting, Underlining, and Visible Bells" +.PP +If your terminal has one or more kinds of display attributes, +these can be represented in a number of different ways. +You should choose one display form as +\f2standout mode\fR, +representing a good, high contrast, easy-on-the-eyes, +format for highlighting error messages and other attention getters. +(If you have a choice, reverse video plus half-bright is good, +or reverse video alone.) +The sequences to enter and exit standout mode +are given as \fBsmso\fR and \fBrmso\fR, respectively. +If the code to change into or out of standout +mode leaves one or even two blank spaces on the screen, +as the TVI 912 and Teleray 1061 do, +then \fBxmc\fR should be given to tell how many spaces are left. +.PP +Codes to begin underlining and end underlining can be given as \fBsmul\fR +and \fBrmul\fR respectively. +If the terminal has a code to underline the current character and move +the cursor one space to the right, +such as the Microterm Mime, +this can be given as \fBuc\fR. +.PP +Other capabilities to enter various highlighting modes include +.B blink +(blinking) +.B bold +(bold or extra bright) +.B dim +(dim or half-bright) +.B invis +(blanking or invisible text) +.B prot +(protected) +.B rev +(reverse video) +.B sgr0 +(turn off +.I all +attribute modes) +.B smacs +(enter alternate character set mode) +and +.B rmacs +(exit alternate character set mode). +Turning on any of these modes singly may or may not turn off other modes. +.PP +If there is a sequence to set arbitrary combinations of modes, +this should be given as +.B sgr +(set attributes), +taking 9 parameters. +Each parameter is either 0 or nonzero, as the corresponding attribute is on or off. +The 9 parameters are, in order: +standout, underline, reverse, blink, dim, bold, blank, protect, alternate +character set. +Not all modes need be supported by +.BR sgr , +only those for which corresponding separate attribute commands exist. +.PP +For example, the DEC vt220 supports most of the modes: +.PP +.TS +center; +l c c +l c c +lw28 lw6 lw2 lw20. +\fBtparm parameter attribute escape sequence\fP + +none none \\E[0m +p1 standout \\E[0;1;7m +p2 underline \\E[0;4m +p3 reverse \\E[0;7m +p4 blink \\E[0;5m +p5 dim not available +p6 bold \\E[0;1m +p7 invis \\E[0;8m +p8 protect not used +p9 altcharset ^O (off) ^N (on) +.TE +.PP +We begin each escape sequence by turning off any existing modes, since +there is no quick way to determine whether they are active. +Standout is set up to be the combination of reverse and bold. +The vt220 terminal has a protect mode, +though it is not commonly used in sgr +because it protects characters on the screen from the host's erasures. +The altcharset mode also is different in that it is either ^O or ^N, +depending on whether it is off or on. +If all modes are turned on, the resulting sequence is \\E[0;1;4;5;7;8m^N. +.PP +Some sequences are common to different modes. +For example, ;7 is output when either p1 or p3 is true, that is, if +either standout or reverse modes are turned on. +.PP +Writing out the above sequences, along with their dependencies yields +.PP +.TS +center; +l c c +l c c +lw28 lw6 lw2 lw20. +\fBsequence when to output terminfo translation\fP + +\\E[0 always \\E[0 +;1 if p1 or p6 %?%p1%p6%|%t;1%; +;4 if p2 %?%p2%|%t;4%; +;5 if p4 %?%p4%|%t;5%; +;7 if p1 or p3 %?%p1%p3%|%t;7%; +;8 if p7 %?%p7%|%t;8%; +m always m +^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%; +.TE +.PP +Putting this all together into the sgr sequence gives: +.PP +.nf + sgr=\\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%; + %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\\016%e\\017%;, +.fi +.PP +Remember that if you specify sgr, you must also specify sgr0. +.PP +Terminals with the ``magic cookie'' glitch +.RB ( xmc ) +deposit special ``cookies'' when they receive mode-setting sequences, +which affect the display algorithm rather than having extra bits for +each character. +Some terminals, such as the HP 2621, automatically leave standout +mode when they move to a new line or the cursor is addressed. +Programs using standout mode should exit standout mode before +moving the cursor or sending a newline, +unless the +.B msgr +capability, asserting that it is safe to move in standout mode, is present. +.PP +If the terminal has +a way of flashing the screen to indicate an error quietly (a bell replacement) +then this can be given as \fBflash\fR; it must not move the cursor. +.PP +If the cursor needs to be made more visible than normal when it is +not on the bottom line (to make, for example, a non-blinking underline into an +easier to find block or blinking underline) +give this sequence as +.BR cvvis . +If there is a way to make the cursor completely invisible, give that as +.BR civis . +The capability +.BR cnorm +should be given which undoes the effects of both of these modes. +.PP +If your terminal correctly generates underlined characters +(with no special codes needed) +even though it does not overstrike, +then you should give the capability \fBul\fR. +If a character overstriking another leaves both characters on the screen, +specify the capability \fBos\fP. +If overstrikes are erasable with a blank, +then this should be indicated by giving \fBeo\fR. +.PP +.SS Keypad and Function Keys +.PP +If the terminal has a keypad that transmits codes when the keys are pressed, +this information can be given. +Note that it is not possible to handle +terminals where the keypad only works in local (this applies, for example, +to the unshifted HP 2621 keys). +If the keypad can be set to transmit or not transmit, +give these codes as \fBsmkx\fR and \fBrmkx\fR. +Otherwise the keypad is assumed to always transmit. +The codes sent by the left arrow, right arrow, up arrow, down arrow, +and home keys can be given as +\fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fR respectively. +If there are function keys such as f0, f1, ..., f10, the codes they send +can be given as \fBkf0, kf1, ..., kf10\fR. +If these keys have labels other than the default f0 through f10, the labels +can be given as \fBlf0, lf1, ..., lf10\fR. +The codes transmitted by certain other special keys can be given: +.B kll +(home down), +.B kbs +(backspace), +.B ktbc +(clear all tabs), +.B kctab +(clear the tab stop in this column), +.B kclr +(clear screen or erase key), +.B kdch1 +(delete character), +.B kdl1 +(delete line), +.B krmir +(exit insert mode), +.B kel +(clear to end of line), +.B ked +(clear to end of screen), +.B kich1 +(insert character or enter insert mode), +.B kil1 +(insert line), +.B knp +(next page), +.B kpp +(previous page), +.B kind +(scroll forward/down), +.B kri +(scroll backward/up), +.B khts +(set a tab stop in this column). +In addition, if the keypad has a 3 by 3 array of keys including the four +arrow keys, the other five keys can be given as +.BR ka1 , +.BR ka3 , +.BR kb2 , +.BR kc1 , +and +.BR kc3 . +These keys are useful when the effects of a 3 by 3 directional pad are needed. +.PP +Strings to program function keys can be given as +.BR pfkey , +.BR pfloc , +and +.BR pfx . +A string to program screen labels should be specified as \fBpln\fP. +Each of these strings takes two parameters: the function key number to +program (from 0 to 10) and the string to program it with. +Function key numbers out of this range may program undefined keys in +a terminal dependent manner. +The difference between the capabilities is that +.B pfkey +causes pressing the given key to be the same as the user typing the +given string; +.B pfloc +causes the string to be executed by the terminal in local; and +.B pfx +causes the string to be transmitted to the computer. +.PP +The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP +define the number of programmable +screen labels and their width and height. +If there are commands to turn the labels on and off, +give them in \fBsmln\fP and \fBrmln\fP. +\fBsmln\fP is normally output after one or more pln +sequences to make sure that the change becomes visible. +.PP +.SS Tabs and Initialization +.PP +If the terminal has hardware tabs, the command to advance to the next +tab stop can be given as +.B ht +(usually control I). +A ``back-tab'' command which moves leftward to the preceding tab stop can +be given as +.BR cbt . +By convention, if the teletype modes indicate that tabs are being +expanded by the computer rather than being sent to the terminal, +programs should not use +.B ht +or +.B cbt +even if they are present, since the user may not have the tab stops +properly set. +If the terminal has hardware tabs which are initially set every +.I n +spaces when the terminal is powered up, +the numeric parameter +.B it +is given, showing the number of spaces the tabs are set to. +This is normally used by the +.IR tset +command to determine whether to set the mode for hardware tab expansion, +and whether to set the tab stops. +If the terminal has tab stops that can be saved in non-volatile memory, +the terminfo description can assume that they are properly set. +.PP +Other capabilities +include +.BR is1 , +.BR is2 , +and +.BR is3 , +initialization strings for the terminal, +.BR iprog , +the path name of a program to be run to initialize the terminal, +and \fBif\fR, the name of a file containing long initialization strings. +These strings are expected to set the terminal into modes consistent +with the rest of the terminfo description. +They are normally sent to the terminal, by the +.I init +option of the +.IR tput +program, each time the user logs in. +They will be printed in the following order: +run the program +.BR iprog ; +output +.BR is1 ; +.BR is2 ; +set the margins using +.BR mgc , +.BR smgl +and +.BR smgr ; +set tabs using +.B tbc +and +.BR hts ; +print the file +.BR if ; +and finally +output +.BR is3 . +.PP +Most initialization is done with +.BR is2 . +Special terminal modes can be set up without duplicating strings +by putting the common sequences in +.B is2 +and special cases in +.B is1 +and +.BR is3 . +A pair of sequences that does a harder reset from a totally unknown state +can be analogously given as +.BR rs1 , +.BR rs2 , +.BR rf , +and +.BR rs3 , +analogous to +.B is2 +and +.BR if . +These strings are output by the +.IR reset +program, which is used when the terminal gets into a wedged state. +Commands are normally placed in +.BR rs1 , +.BR rs2 +.B rs3 +and +.B rf +only if they produce annoying effects on the screen and are not +necessary when logging in. +For example, the command to set the vt100 into 80-column mode would +normally be part of +.BR is2 , +but it causes an annoying glitch of the screen and is not normally +needed since the terminal is usually already in 80 column mode. +.PP +If there are commands to set and clear tab stops, they can be given as +.B tbc +(clear all tab stops) +and +.B hts +(set a tab stop in the current column of every row). +If a more complex sequence is needed to set the tabs than can be +described by this, the sequence can be placed in +.B is2 +or +.BR if . +.SS Delays and Padding +.PP +Many older and slower terminals don't support either XON/XOFF or DTR +handshaking, including hard copy terminals and some very archaic CRTs +(including, for example, DEC VT100s). +These may require padding characters +after certain cursor motions and screen changes. +.PP +If the terminal uses xon/xoff handshaking for flow control (that is, +it automatically emits ^S back to the host when its input buffers are +close to full), set +.BR xon . +This capability suppresses the emission of padding. +You can also set it +for memory-mapped console devices effectively that don't have a speed limit. +Padding information should still be included so that routines can +make better decisions about relative costs, but actual pad characters will +not be transmitted. +.PP +If \fBpb\fR (padding baud rate) is given, padding is suppressed at baud rates +below the value of \fBpb\fR. +If the entry has no padding baud rate, then +whether padding is emitted or not is completely controlled by \fBxon\fR. +.PP +If the terminal requires other than a null (zero) character as a pad, +then this can be given as \fBpad\fR. +Only the first character of the +.B pad +string is used. +.PP +.SS Status Lines +Some terminals have an extra `status line' which is not normally used by +software (and thus not counted in the terminal's \fBlines\fR capability). +.PP +The simplest case is a status line which is cursor-addressable but not +part of the main scrolling region on the screen; the Heathkit H19 has +a status line of this kind, as would a 24-line VT100 with a 23-line +scrolling region set up on initialization. +This situation is indicated +by the \fBhs\fR capability. +.PP +Some terminals with status lines need special sequences to access the +status line. +These may be expressed as a string with single parameter +\fBtsl\fR which takes the cursor to a given zero-origin column on the +status line. +The capability \fBfsl\fR must return to the main-screen +cursor positions before the last \fBtsl\fR. +You may need to embed the +string values of \fBsc\fR (save cursor) and \fBrc\fR (restore cursor) +in \fBtsl\fR and \fBfsl\fR to accomplish this. +.PP +The status line is normally assumed to be the same width as the width +of the terminal. +If this is untrue, you can specify it with the numeric +capability \fBwsl\fR. +.PP +A command to erase or blank the status line may be specified as \fBdsl\fR. +.PP +The boolean capability \fBeslok\fR specifies that escape sequences, tabs, +etc., work ordinarily in the status line. +.PP +The \fBncurses\fR implementation does not yet use any of these capabilities. +They are documented here in case they ever become important. +.PP +.SS Line Graphics +.PP +Many terminals have alternate character sets useful for forms-drawing. +Terminfo and \fBcurses\fR build in support for the drawing characters +supported by the VT100, with some characters from the AT&T 4410v1 added. +This alternate character set may be specified by the \fBacsc\fR capability. +.PP +.TS H +center expand; +c l l c +c l l c +lw28 lw6 lw2 lw20. +.\".TH +\fBGlyph ACS Ascii VT100\fR +\fBName Name Default Name\fR +UK pound sign ACS_STERLING f } +arrow pointing down ACS_DARROW v . +arrow pointing left ACS_LARROW < , +arrow pointing right ACS_RARROW > + +arrow pointing up ACS_UARROW ^ - +board of squares ACS_BOARD # h +bullet ACS_BULLET o ~ +checker board (stipple) ACS_CKBOARD : a +degree symbol ACS_DEGREE \e f +diamond ACS_DIAMOND + ` +greater-than-or-equal-to ACS_GEQUAL > z +greek pi ACS_PI * { +horizontal line ACS_HLINE - q +lantern symbol ACS_LANTERN # i +large plus or crossover ACS_PLUS + n +less-than-or-equal-to ACS_LEQUAL < y +lower left corner ACS_LLCORNER + m +lower right corner ACS_LRCORNER + j +not-equal ACS_NEQUAL ! | +plus/minus ACS_PLMINUS # g +scan line 1 ACS_S1 ~ o +scan line 3 ACS_S3 - p +scan line 7 ACS_S7 - r +scan line 9 ACS_S9 \&_ s +solid square block ACS_BLOCK # 0 +tee pointing down ACS_TTEE + w +tee pointing left ACS_RTEE + u +tee pointing right ACS_LTEE + t +tee pointing up ACS_BTEE + v +upper left corner ACS_ULCORNER + l +upper right corner ACS_URCORNER + k +vertical line ACS_VLINE | x +.TE +.PP +The best way to define a new device's graphics set is to add a column +to a copy of this table for your terminal, giving the character which +(when emitted between \fBsmacs\fR/\fBrmacs\fR switches) will be rendered +as the corresponding graphic. +Then read off the VT100/your terminal +character pairs right to left in sequence; these become the ACSC string. +.PP +.SS Color Handling +.PP +Most color terminals are either `Tektronix-like' or `HP-like'. +Tektronix-like +terminals have a predefined set of N colors (where N usually 8), and can set +character-cell foreground and background characters independently, mixing them +into N * N color-pairs. +On HP-like terminals, the use must set each color +pair up separately (foreground and background are not independently settable). +Up to M color-pairs may be set up from 2*M different colors. +ANSI-compatible +terminals are Tektronix-like. +.PP +Some basic color capabilities are independent of the color method. +The numeric +capabilities \fBcolors\fR and \fBpairs\fR specify the maximum numbers of colors +and color-pairs that can be displayed simultaneously. +The \fBop\fR (original +pair) string resets foreground and background colors to their default values +for the terminal. +The \fBoc\fR string resets all colors or color-pairs to +their default values for the terminal. +Some terminals (including many PC +terminal emulators) erase screen areas with the current background color rather +than the power-up default background; these should have the boolean capability +\fBbce\fR. +.PP +To change the current foreground or background color on a Tektronix-type +terminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSI +background) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background). +These take one parameter, the color number. +The SVr4 documentation describes +only \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminal +supports ANSI escape sequences to set background and foreground, they should +be coded as \fBsetaf\fR and \fBsetab\fR, respectively. +If the terminal +supports other escape sequences to set background and foreground, they should +be coded as \fBsetf\fR and \fBsetb\fR, respectively. +The \fIvidputs()\fR +function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are +defined." +.PP +The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a +single numeric argument each. +Argument values 0-7 of \fBsetaf\fR/\fBsetab\fR are portably defined as +follows (the middle column is the symbolic #define available in the header for +the \fBcurses\fR or \fBncurses\fR libraries). +The terminal hardware is free to +map these as it likes, but the RGB values indicate normal locations in color +space. +.PP +.TS H +center; +l c c c +l l n l. +\fBColor #define Value RGB\fR +black \fBCOLOR_BLACK\fR 0 0, 0, 0 +red \fBCOLOR_RED\ \fR 1 max,0,0 +green \fBCOLOR_GREEN\fR 2 0,max,0 +yellow \fBCOLOR_YELLOW\fR 3 max,max,0 +blue \fBCOLOR_BLUE\fR 4 0,0,max +magenta \fBCOLOR_MAGENTA\fR 5 max,0,max +cyan \fBCOLOR_CYAN\fR 6 0,max,max +white \fBCOLOR_WHITE\fR 7 max,max,max +.TE +.PP +The argument values of \fBsetf\fR/\fBsetb\fR historically correspond to +a different mapping, i.e., +.TS H +center; +l c c c +l l n l. +\fBColor #define Value RGB\fR +black \fBCOLOR_BLACK\fR 0 0, 0, 0 +blue \fBCOLOR_BLUE\fR 1 0,0,max +green \fBCOLOR_GREEN\fR 2 0,max,0 +cyan \fBCOLOR_CYAN\fR 3 0,max,max +red \fBCOLOR_RED\ \fR 4 max,0,0 +magenta \fBCOLOR_MAGENTA\fR 5 max,0,max +yellow \fBCOLOR_YELLOW\fR 6 max,max,0 +white \fBCOLOR_WHITE\fR 7 max,max,max +.TE +It is important to not confuse the two sets of color capabilities; +otherwise red/blue will be interchanged on the display. +.PP +On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set +which color pair is current. +.PP +On a Tektronix-like terminal, the capability \fBccc\fR may be present to +indicate that colors can be modified. +If so, the \fBinitc\fR capability will +take a color number (0 to \fBcolors\fR - 1)and three more parameters which +describe the color. +These three parameters default to being interpreted as RGB +(Red, Green, Blue) values. +If the boolean capability \fBhls\fR is present, +they are instead as HLS (Hue, Lightness, Saturation) indices. +The ranges are +terminal-dependent. +.PP +On an HP-like terminal, \fBinitp\fR may give a capability for changing a +color-pair value. +It will take seven parameters; a color-pair number (0 to +\fBmax_pairs\fR - 1), and two triples describing first background and then +foreground colors. +These parameters must be (Red, Green, Blue) or +(Hue, Lightness, Saturation) depending on \fBhls\fR. +.PP +On some color terminals, colors collide with highlights. +You can register +these collisions with the \fBncv\fR capability. +This is a bit-mask of +attributes not to be used when colors are enabled. +The correspondence with the +attributes understood by \fBcurses\fR is as follows: +.PP +.TS +center; +l c c +lw25 lw2 lw10. +\fBAttribute Bit Decimal\fR +A_STANDOUT 0 1 +A_UNDERLINE 1 2 +A_REVERSE 2 4 +A_BLINK 3 8 +A_DIM 4 16 +A_BOLD 5 32 +A_INVIS 6 64 +A_PROTECT 7 128 +A_ALTCHARSET 8 256 +.TE +.PP +For example, on many IBM PC consoles, the underline attribute collides with the +foreground color blue and is not available in color mode. +These should have +an \fBncv\fR capability of 2. +.PP +SVr4 curses does nothing with \fBncv\fR, ncurses recognizes it and optimizes +the output in favor of colors. +.PP +.SS Miscellaneous +If the terminal requires other than a null (zero) character as a pad, then this +can be given as pad. +Only the first character of the pad string is used. +If the terminal does not have a pad character, specify npc. +Note that ncurses implements the termcap-compatible \fBPC\fR variable; +though the application may set this value to something other than +a null, ncurses will test \fBnpc\fR first and use napms if the terminal +has no pad character. +.PP +If the terminal can move up or down half a line, +this can be indicated with +.B hu +(half-line up) +and +.B hd +(half-line down). +This is primarily useful for superscripts and subscripts on hard-copy terminals. +If a hard-copy terminal can eject to the next page (form feed), give this as +.B ff +(usually control L). +.PP +If there is a command to repeat a given character a given number of +times (to save time transmitting a large number of identical characters) +this can be indicated with the parameterized string +.BR rep . +The first parameter is the character to be repeated and the second +is the number of times to repeat it. +Thus, tparm(repeat_char, 'x', 10) is the same as `xxxxxxxxxx'. +.PP +If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025, +this can be indicated with +.BR cmdch . +A prototype command character is chosen which is used in all capabilities. +This character is given in the +.B cmdch +capability to identify it. +The following convention is supported on some UNIX systems: +The environment is to be searched for a +.B CC +variable, and if found, all +occurrences of the prototype character are replaced with the character +in the environment variable. +.PP +Terminal descriptions that do not represent a specific kind of known +terminal, such as +.IR switch , +.IR dialup , +.IR patch , +and +.IR network , +should include the +.B gn +(generic) capability so that programs can complain that they do not know +how to talk to the terminal. +(This capability does not apply to +.I virtual +terminal descriptions for which the escape sequences are known.) +.PP +If the terminal has a ``meta key'' which acts as a shift key, +setting the 8th bit of any character transmitted, this fact can +be indicated with +.BR km . +Otherwise, software will assume that the 8th bit is parity and it +will usually be cleared. +If strings exist to turn this ``meta mode'' on and off, they +can be given as +.B smm +and +.BR rmm . +.PP +If the terminal has more lines of memory than will fit on the screen +at once, the number of lines of memory can be indicated with +.BR lm . +A value of +.BR lm #0 +indicates that the number of lines is not fixed, +but that there is still more memory than fits on the screen. +.PP +If the terminal is one of those supported by the \s-1UNIX\s+1 virtual +terminal protocol, the terminal number can be given as +.BR vt . +.PP +Media copy +strings which control an auxiliary printer connected to the terminal +can be given as +.BR mc0 : +print the contents of the screen, +.BR mc4 : +turn off the printer, and +.BR mc5 : +turn on the printer. +When the printer is on, all text sent to the terminal will be sent +to the printer. +It is undefined whether the text is also displayed on the terminal screen +when the printer is on. +A variation +.B mc5p +takes one parameter, and leaves the printer on for as many characters +as the value of the parameter, then turns the printer off. +The parameter should not exceed 255. +All text, including +.BR mc4 , +is transparently passed to the printer while an +.B mc5p +is in effect. +.PP +.SS Glitches and Braindamage +.PP +Hazeltine terminals, which do not allow `~' characters to be displayed should +indicate \fBhz\fR. +.PP +Terminals which ignore a line-feed immediately after an \fBam\fR wrap, +such as the Concept and vt100, +should indicate \fBxenl\fR. +.PP +If +.B el +is required to get rid of standout +(instead of merely writing normal text on top of it), +\fBxhp\fP should be given. +.PP +Teleray terminals, where tabs turn all characters moved over to blanks, +should indicate \fBxt\fR (destructive tabs). +Note: the variable indicating this is now `dest_tabs_magic_smso'; in +older versions, it was teleray_glitch. +This glitch is also taken to mean that it is not possible to position +the cursor on top of a ``magic cookie'', +that to erase standout mode it is instead necessary to use +delete and insert line. +The ncurses implementation ignores this glitch. +.PP +The Beehive Superbee, which is unable to correctly transmit the escape +or control C characters, has +.BR xsb , +indicating that the f1 key is used for escape and f2 for control C. +(Only certain Superbees have this problem, depending on the ROM.) +Note that in older terminfo versions, this capability was called +`beehive_glitch'; it is now `no_esc_ctl_c'. +.PP +Other specific terminal problems may be corrected by adding more +capabilities of the form \fBx\fR\fIx\fR. +.PP +.SS Similar Terminals +.PP +If there are two very similar terminals, one (the variant) can be defined as +being just like the other (the base) with certain exceptions. +In the +definition of the variant, the string capability \fBuse\fR can be given with +the name of the base terminal. +The capabilities given before +.B use +override those in the base type named by +.BR use . +If there are multiple \fBuse\fR capabilities, they are merged in reverse order. +That is, the rightmost \fBuse\fR reference is processed first, then the one to +its left, and so forth. +Capabilities given explicitly in the entry override +those brought in by \fBuse\fR references. +.PP +A capability can be canceled by placing \fBxx@\fR to the left of the +use reference that imports it, where \fIxx\fP is the capability. +For example, the entry +.PP + 2621-nl, smkx@, rmkx@, use=2621, +.PP +defines a 2621-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities, +and hence does not turn on the function key labels when in visual mode. +This is useful for different modes for a terminal, or for different +user preferences. +.PP +.SS Pitfalls of Long Entries +.PP +Long terminfo entries are unlikely to be a problem; to date, no entry has even +approached terminfo's 4K string-table maximum. +Unfortunately, the termcap +translations are much more strictly limited (to 1K), thus termcap translations +of long terminfo entries can cause problems. +.PP +The man pages for 4.3BSD and older versions of tgetent() instruct the user to +allocate a 1K buffer for the termcap entry. +The entry gets null-terminated by +the termcap library, so that makes the maximum safe length for a termcap entry +1k-1 (1023) bytes. +Depending on what the application and the termcap library +being used does, and where in the termcap file the terminal type that tgetent() +is searching for is, several bad things can happen. +.PP +Some termcap libraries print a warning message or exit if they find an +entry that's longer than 1023 bytes; others don't; others truncate the +entries to 1023 bytes. +Some application programs allocate more than +the recommended 1K for the termcap entry; others don't. +.PP +Each termcap entry has two important sizes associated with it: before +"tc" expansion, and after "tc" expansion. +"tc" is the capability that +tacks on another termcap entry to the end of the current one, to add +on its capabilities. +If a termcap entry doesn't use the "tc" +capability, then of course the two lengths are the same. +.PP +The "before tc expansion" length is the most important one, because it +affects more than just users of that particular terminal. +This is the +length of the entry as it exists in /etc/termcap, minus the +backslash-newline pairs, which tgetent() strips out while reading it. +Some termcap libraries strip off the final newline, too (GNU termcap does not). +Now suppose: +.TP 5 +* +a termcap entry before expansion is more than 1023 bytes long, +.TP 5 +* +and the application has only allocated a 1k buffer, +.TP 5 +* +and the termcap library (like the one in BSD/OS 1.1 and GNU) reads +the whole entry into the buffer, no matter what its length, to see +if it's the entry it wants, +.TP 5 +* +and tgetent() is searching for a terminal type that either is the +long entry, appears in the termcap file after the long entry, or +doesn't appear in the file at all (so that tgetent() has to search +the whole termcap file). +.PP +Then tgetent() will overwrite memory, perhaps its stack, and probably core dump +the program. +Programs like telnet are particularly vulnerable; modern telnets +pass along values like the terminal type automatically. +The results are almost +as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that +prints warning messages when it reads an overly long termcap entry. +If a +termcap library truncates long entries, like OSF/1 3.0, it is immune to dying +here but will return incorrect data for the terminal. +.PP +The "after tc expansion" length will have a similar effect to the +above, but only for people who actually set TERM to that terminal +type, since tgetent() only does "tc" expansion once it's found the +terminal type it was looking for, not while searching. +.PP +In summary, a termcap entry that is longer than 1023 bytes can cause, +on various combinations of termcap libraries and applications, a core +dump, warnings, or incorrect operation. +If it's too long even before +"tc" expansion, it will have this effect even for users of some other +terminal types and users whose TERM variable does not have a termcap +entry. +.PP +When in -C (translate to termcap) mode, the \fBncurses\fR implementation of +\fBtic\fR(1) issues warning messages when the pre-tc length of a termcap +translation is too long. +The -c (check) option also checks resolved (after tc +expansion) lengths. +.SS Binary Compatibility +It is not wise to count on portability of binary terminfo entries between +commercial UNIX versions. +The problem is that there are at least two versions +of terminfo (under HP-UX and AIX) which diverged from System V terminfo after +SVr1, and have added extension capabilities to the string table that (in the +binary format) collide with System V and XSI Curses extensions. +.SH EXTENSIONS +Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, don't +interpret the %A and %O operators in parameter strings. +.PP +SVr4/XPG4 do not specify whether \fBmsgr\fR licenses movement while in +an alternate-character-set mode (such modes may, among other things, map +CR and NL to characters that don't trigger local motions). +The \fBncurses\fR implementation ignores \fBmsgr\fR in \fBALTCHARSET\fR +mode. +This raises the possibility that an XPG4 +implementation making the opposite interpretation may need terminfo +entries made for \fBncurses\fR to have \fBmsgr\fR turned off. +.PP +The \fBncurses\fR library handles insert-character and insert-character modes +in a slightly non-standard way to get better update efficiency. +See +the \fBInsert/Delete Character\fR subsection above. +.PP +The parameter substitutions for \fBset_clock\fR and \fBdisplay_clock\fR are +not documented in SVr4 or the XSI Curses standard. +They are deduced from the +documentation for the AT&T 505 terminal. +.PP +Be careful assigning the \fBkmous\fR capability. +The \fBncurses\fR wants to +interpret it as \fBKEY_MOUSE\fR, for use by terminals and emulators like xterm +that can return mouse-tracking information in the keyboard-input stream. +.PP +Different commercial ports of terminfo and curses support different subsets of +the XSI Curses standard and (in some cases) different extension sets. +Here +is a summary, accurate as of October 1995: +.PP +\fBSVR4, Solaris, ncurses\fR -- +These support all SVr4 capabilities. +.PP +\fBSGI\fR -- +Supports the SVr4 set, adds one undocumented extended string +capability (\fBset_pglen\fR). +.PP +\fBSVr1, Ultrix\fR -- +These support a restricted subset of terminfo capabilities. +The booleans +end with \fBxon_xoff\fR; the numerics with \fBwidth_status_line\fR; and the +strings with \fBprtr_non\fR. +.PP +\fBHP/UX\fR -- +Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fR, +\fBlabel_height\fR, \fBlabel_width\fR, plus function keys 11 through 63, plus +\fBplab_norm\fR, \fBlabel_on\fR, and \fBlabel_off\fR, plus some incompatible +extensions in the string table. +.PP +\fBAIX\fR -- +Supports the SVr1 subset, plus function keys 11 through 63, plus a number +of incompatible string table extensions. +.PP +\fBOSF\fR -- +Supports both the SVr4 set and the AIX extensions. +.SH FILES +.TP 25 +\*d/?/* +files containing terminal descriptions +.SH SEE ALSO +\fBtic\fR(1M), \fBcurses\fR(3X), \fBprintf\fR(3S), \fBterm\fR(\*n). +.SH AUTHORS +Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. +Based on pcurses by Pavel Curtis. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/tput.1 b/lib/libncurses/man/tput.1 new file mode 100644 index 0000000000..db91bacfbd --- /dev/null +++ b/lib/libncurses/man/tput.1 @@ -0,0 +1,289 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: tput.1,v 1.20 2003/05/11 00:32:53 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/tput.1,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH tput 1 "" +.ds d /usr/share/terminfo +.ds n 1 +.SH NAME +\fBtput\fR, \fBreset\fR - initialize a terminal or query terminfo database +.SH SYNOPSIS +\fBtput\fR [\fB\-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ] +.br +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBinit\fR +.br +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBreset\fR +.br +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBlongname\fR +.br +\fBtput \-S\fR \fB<<\fR +.br +\fBtput \-V\fR +.br +.SH DESCRIPTION +The \fBtput\fR utility uses the \fBterminfo\fR database to make the +values of terminal-dependent capabilities and information available to +the shell (see \fBsh\fR(1)), to initialize or reset the terminal, or +return the long name of the requested terminal type. \fBtput\fR +outputs a string if the attribute (\fIcap\fRability \fIname\fR) is of +type string, or an integer if the attribute is of type integer. If +the attribute is of type boolean, \fBtput\fR simply sets the exit code +(\fB0\fR for TRUE if the terminal has the capability, \fB1\fR for +FALSE if it does not), and produces no output. Before using a value +returned on standard output, the user should test the exit code +[\fB$?\fR, see \fBsh\fR(1)] to be sure it is \fB0\fR. +(See the \fBEXIT CODES\fR and \fBDIAGNOSTICS\fR sections.) +For a complete list of capabilities +and the \fIcapname\fR associated with each, see \fBterminfo\fR(\*n). +.TP +\fB\-T\fR\fItype\fR +indicates the \fItype\fR of terminal. Normally this option is +unnecessary, because the default is taken from the environment +variable \fBTERM\fR. If \fB\-T\fR is specified, then the shell +variables \fBLINES\fR and \fBCOLUMNS\fR will be ignored,and the +operating system will not be queried for the actual screen size. +.TP +\fIcapname\fR +indicates the attribute from the \fBterminfo\fR database. When +\fBtermcap\fR support is compiled in, the \fBtermcap\fR name for +the attribute is also accepted. +.TP +\fIparms\fR +If the attribute is a string that takes parameters, the arguments +\fIparms\fR will be instantiated into the string. +An all-numeric argument will be passed to the attribute as a number. +.IP +Only a few terminfo capabilities require string parameters; +\fBtput\fR uses a table to decide which to pass as strings. +Normally \fBtput\fR uses \fBtparm\fR (3X) to perform the substitution. +If no parameters are given for the attribute, +\fBtput\fR writes the string without performing the substitution. +.TP +\fB\-S\fR +allows more than one capability per invocation of \fBtput\fR. The +capabilities must be passed to \fBtput\fR from the standard input +instead of from the command line (see example). +Only one \fIcapname\fR is allowed per line. +The \fB\-S\fR option changes the +meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the +EXIT CODES section). +.IP +Again, \fBtput\fR uses a table and the presence of parameters in its input +to decide whether to use \fBtparm\fR (3X), +and how to interpret the parameters. +.TP +\fB\-V\fR +reports the version of ncurses which was used in this program, and exits. +.TP +\fBinit\fR +If the \fBterminfo\fR database is present and an entry for the user's +terminal exists (see \fB\-T\fR\fItype\fR, above), the following will +occur: (1) if present, the terminal's initialization strings will be +output (\fBis1\fR, \fBis2\fR, \fBis3\fR, \fBif\fR, \fBiprog\fR), (2) +any delays (e.g., newline) specified in the entry will be set in the +tty driver, (3) tabs expansion will be turned on or off according to +the specification in the entry, and (4) if tabs are not expanded, +standard tabs will be set (every 8 spaces). If an entry does not +contain the information needed for any of the four above activities, +that activity will silently be skipped. +.TP +\fBreset\fR +Instead of putting out initialization strings, the terminal's +reset strings will be output if present (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR, \fBrf\fR). +If the reset strings are not present, but initialization +strings are, the initialization strings will be output. +Otherwise, \fBreset\fR acts identically to \fBinit\fR. +.TP +\fBlongname\fR +If the \fBterminfo\fR database is present and an entry for the +user's terminal exists (see \fB\-T\fR\fItype\fR above), then the long name +of the terminal will be put out. The long name is the last +name in the first line of the terminal's description in the +\fBterminfo\fR database [see \fBterm\fR(5)]. +.PP +If \fBtput\fR is invoked by a link named \fBreset\fR, this has the +same effect as \fBtput reset\fR. +See \fBtset\fR for comparison, which has similar behavior. +.SH EXAMPLES +.TP 5 +\fBtput init\fR +Initialize the terminal according to the type of +terminal in the environmental variable \fBTERM\fR. This +command should be included in everyone's .profile after +the environmental variable \fBTERM\fR has been exported, as +illustrated on the \fBprofile\fR(5) manual page. +.TP 5 +\fBtput \-T5620 reset\fR +Reset an AT&T 5620 terminal, overriding the type of +terminal in the environmental variable \fBTERM\fR. +.TP 5 +\fBtput cup 0 0\fR +Send the sequence to move the cursor to row \fB0\fR, column \fB0\fR +(the upper left corner of the screen, usually known as the "home" +cursor position). +.TP 5 +\fBtput clear\fR +Echo the clear-screen sequence for the current terminal. +.TP 5 +\fBtput cols\fR +Print the number of columns for the current terminal. +.TP 5 +\fBtput \-T450 cols\fR +Print the number of columns for the 450 terminal. +.TP 5 +\fBbold=`tput smso` offbold=`tput rmso`\fR +Set the shell variables \fBbold\fR, to begin stand-out mode +sequence, and \fBoffbold\fR, to end standout mode sequence, +for the current terminal. This might be followed by a +prompt: \fBecho "${bold}Please type in your name: ${offbold}\\c"\fR +.TP 5 +\fBtput hc\fR +Set exit code to indicate if the current terminal is a hard copy terminal. +.TP 5 +\fBtput cup 23 4\fR +Send the sequence to move the cursor to row 23, column 4. +.TP 5 +\fBtput cup\fR +Send the terminfo string for cursor-movement, with no parameters substituted. +.TP 5 +\fBtput longname\fR +Print the long name from the \fBterminfo\fR database for the +type of terminal specified in the environmental +variable \fBTERM\fR. +.PP +.RS 5 +\fBtput \-S < clear\fR +.br +\fB> cup 10 10\fR +.br +\fB> bold\fR +.br +\fB> !\fR +.RE +.TP 5 +\& +This example shows \fBtput\fR processing several capabilities in one invocation. +It clears the screen, +moves the cursor to position 10, 10 +and turns on bold (extra bright) mode. +The list is terminated by an exclamation mark (\fB!\fR) on a line by itself. +.SH FILES +.TP +\fB\*d\fR +compiled terminal description database +.TP +\fB/usr/include/curses.h\fR +\fBcurses\fR(3X) header file +.TP +\fB/usr/include/term.h\fR +\fBterminfo\fR header file +.TP +\fB/usr/share/tabset/*\fR +tab settings for some terminals, in a format +appropriate to be output to the terminal (escape +sequences that set margins and tabs); for more +information, see the "Tabs and Initialization" +section of \fBterminfo\fR(5) +.SH EXIT CODES +If the \fB\-S\fR option is used, +\fBtput\fR checks for errors from each line, +and if any errors are found, will set the exit code to 4 plus the +number of lines with errors. +If no errors are found, the exit code is \fB0\fR. +No indication of which line failed can be given so +exit code \fB1\fR will never appear. Exit codes \fB2\fR, \fB3\fR, and +\fB4\fR retain their usual interpretation. +If the \fB\-S\fR option is not used, +the exit code depends on the type of \fIcapname\fR: +.RS 5 +.TP +.I boolean +a value of \fB0\fR is set for TRUE and \fB1\fR for FALSE. +.TP +.I string +a value of \fB0\fR is set if the +\fIcapname\fR is defined for this terminal \fItype\fR (the value of +\fIcapname\fR is returned on standard output); +a value of \fB1\fR is set if \fIcapname\fR +is not defined for this terminal \fItype\fR +(nothing is written to standard output). +.TP +.I integer +a value of \fB0\fR is always set, +whether or not \fIcapname\fR is defined for this terminal \fItype\fR. +To determine if \fIcapname\fR is defined for this terminal \fItype\fR, +the user must test the value written to standard output. +A value of \fB\-1\fR +means that \fIcapname\fR is not defined for this terminal \fItype\fR. +.TP +.I other +\fBreset\fR or \fBinit\fR may fail to find their respective files. +In that case, the exit code is set to 4 + \fBerrno\fR. +.RE +.PP +Any other exit code indicates an error; see the DIAGNOSTICS section. +.SH DIAGNOSTICS +\fBtput\fR prints the following error messages and sets the corresponding exit +codes. +.PP +.ne 15 +.TS +l l. +exit code error message += +\fB0\fR T{ +(\fIcapname\fR is a numeric variable that is not specified in the +\fBterminfo\fR(\*n) database for this terminal type, e.g. +\fBtput \-T450 lines\fR and \fBtput \-T2621 xmc\fR) +T} +\fB1\fR no error message is printed, see the \fBEXIT CODES\fR section. +\fB2\fR usage error +\fB3\fR unknown terminal \fItype\fR or no \fBterminfo\fR database +\fB4\fR unknown \fBterminfo\fR capability \fIcapname\fR +\fB>4\fR error occurred in \-S += +.TE +.SH PORTABILITY +The \fBlongname\fR and \fB\-S\fR options, and the parameter-substitution +features used in the \fBcup\fR example, are not supported in BSD curses or in +AT&T/USL curses before SVr4. +.SH SEE ALSO +\fBclear\fR(1), +\fBstty\fR(1), +\fBtabs\fR(\*n), +\fBterminfo\fR(5). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libncurses/man/tset.1 b/lib/libncurses/man/tset.1 new file mode 100644 index 0000000000..09ad6d01e5 --- /dev/null +++ b/lib/libncurses/man/tset.1 @@ -0,0 +1,254 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: tset.1,v 1.13 2003/05/11 00:32:53 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/tset.1,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH tset 1 "" +.SH NAME +\fBtset\fR, \fBreset\fR - terminal initialization +.SH SYNOPSIS +tset [\-IQVqrs] [\-] [\-e \fIch\fR] [\-i \fIch\fR] [\-k \fIch\fR] [\-m \fImapping\fR] [\fIterminal\fR] +.br +reset [\-IQVqrs] [\-] [\-e \fIch\fR] [\-i \fIch\fR] [\-k \fIch\fR] [\-m \fImapping\fR] [\fIterminal\fR] +.SH DESCRIPTION +\&\fBTset\fR initializes terminals. +\fBTset\fR first determines the type of terminal that you are using. +This determination is done as follows, using the first terminal type found. +.PP +1. The \fBterminal\fR argument specified on the command line. +.PP +2. The value of the \fBTERM\fR environmental variable. +.PP +3. (BSD systems only.) The terminal type associated with the standard +error output device in the \fI/etc/ttys\fR file. (On Linux and +System-V-like UNIXes, \fIgetty\fR does this job by setting +\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.) +.PP +4. The default terminal type, ``unknown''. +.PP +If the terminal type was not specified on the command-line, the \fB\-m\fR +option mappings are then applied (see below for more information). +Then, if the terminal type begins with a question mark (``?''), the +user is prompted for confirmation of the terminal type. An empty +response confirms the type, or, another type can be entered to specify +a new type. Once the terminal type has been determined, the terminfo +entry for the terminal is retrieved. If no terminfo entry is found +for the type, the user is prompted for another terminal type. +.PP +Once the terminfo entry is retrieved, the window size, backspace, interrupt +and line kill characters (among many other things) are set and the terminal +and tab initialization strings are sent to the standard error output. +Finally, if the erase, interrupt and line kill characters have changed, +or are not set to their default values, their values are displayed to the +standard error output. +.PP +When invoked as \fBreset\fR, \fBtset\fR sets cooked and echo modes, +turns off cbreak and raw modes, turns on newline translation and +resets any unset special characters to their default values before +doing the terminal initialization described above. This is useful +after a program dies leaving a terminal in an abnormal state. Note, +you may have to type + + \fBreset\fR + +(the line-feed character is normally control-J) to get the terminal +to work, as carriage-return may no longer work in the abnormal state. +Also, the terminal will often not echo the command. +.PP +The options are as follows: +.TP 5 +.B \-q +The terminal type is displayed to the standard output, and the terminal is +not initialized in any way. The option `-' by itself is equivalent but +archaic. +.TP +.B \-e +Set the erase character to \fIch\fR. +.TP +.B \-I +Do not send the terminal or tab initialization strings to the terminal. +.TP +.B \-Q +Don't display any values for the erase, interrupt and line kill characters. +.TP +.B \-V +reports the version of ncurses which was used in this program, and exits. +.TP +.B \-i +Set the interrupt character to \fIch\fR. +.TP +.B \-k +Set the line kill character to \fIch\fR. +.TP +.B \-m +Specify a mapping from a port type to a terminal. +See below for more information. +.TP +.B \-r +Print the terminal type to the standard error output. +.TP +.B \-s +Print the sequence of shell commands to initialize the environment variable +\fBTERM\fR to the standard output. +See the section below on setting the environment for details. +.PP +The arguments for the \fB-e\fR, \fB-i\fR, and \fB-k\fR +options may either be entered as actual characters or by using the `hat' +notation, i.e. control-h may be specified as ``^H'' or ``^h''. +.SH SETTING THE ENVIRONMENT +It is often desirable to enter the terminal type and information about +the terminal's capabilities into the shell's environment. +This is done using the \fB\-s\fR option. +.PP +When the \fB\-s\fR option is specified, the commands to enter the information +into the shell's environment are written to the standard output. If +the \fBSHELL\fR environmental variable ends in ``csh'', the commands +are for \fBcsh\fR, otherwise, they are for \fBsh\fR. +Note, the \fBcsh\fR commands set and unset the shell variable +\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR +or \fB.profile\fR files will initialize the environment correctly: + + eval \`tset \-s options ... \` + +.SH TERMINAL TYPE MAPPING +When the terminal is not hardwired into the system (or the current +system information is incorrect) the terminal type derived from the +\fI/etc/ttys\fR file or the \fBTERM\fR environmental variable is often +something generic like \fBnetwork\fR, \fBdialup\fR, or \fBunknown\fR. +When \fBtset\fR is used in a startup script it is often desirable to +provide information about the type of terminal used on such ports. +.PP +The purpose of the \fB\-m\fR option is to map +from some set of conditions to a terminal type, that is, to +tell \fBtset\fR +``If I'm on this port at a particular speed, guess that I'm on that +kind of terminal''. +.PP +The argument to the \fB\-m\fR option consists of an optional port type, an +optional operator, an optional baud rate specification, an optional +colon (``:'') character and a terminal type. The port type is a +string (delimited by either the operator or the colon character). The +operator may be any combination of ``>'', ``<'', ``@'', and ``!''; ``>'' +means greater than, ``<'' means less than, ``@'' means equal to +and ``!'' inverts the sense of the test. +The baud rate is specified as a number and is compared with the speed +of the standard error output (which should be the control terminal). +The terminal type is a string. +.PP +If the terminal type is not specified on the command line, the \fB\-m\fR +mappings are applied to the terminal type. If the port type and baud +rate match the mapping, the terminal type specified in the mapping +replaces the current type. If more than one mapping is specified, the +first applicable mapping is used. +.PP +For example, consider the following mapping: \fBdialup>9600:vt100\fR. +The port type is dialup , the operator is >, the baud rate +specification is 9600, and the terminal type is vt100. The result of +this mapping is to specify that if the terminal type is \fBdialup\fR, +and the baud rate is greater than 9600 baud, a terminal type of +\fBvt100\fR will be used. +.PP +If no baud rate is specified, the terminal type will match any baud rate. +If no port type is specified, the terminal type will match any port type. +For example, \fB\-m dialup:vt100 \-m :?xterm\fR +will cause any dialup port, regardless of baud rate, to match the terminal +type vt100, and any non-dialup port type to match the terminal type ?xterm. +Note, because of the leading question mark, the user will be +queried on a default port as to whether they are actually using an xterm +terminal. +.PP +No whitespace characters are permitted in the \fB\-m\fR option argument. +Also, to avoid problems with meta-characters, it is suggested that the +entire \fB\-m\fR option argument be placed within single quote characters, +and that \fBcsh\fR users insert a backslash character (``\e'') before +any exclamation marks (``!''). +.SH HISTORY +The \fBtset\fR command appeared in BSD 3.0. The \fBncurses\fR implementation +was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric +S. Raymond . +.SH COMPATIBILITY +The \fBtset\fR utility has been provided for backward-compatibility with BSD +environments (under most modern UNIXes, \fB/etc/inittab\fR and \fIgetty\fR(1) +can set \fBTERM\fR appropriately for each dial-up line; this obviates what was +\fBtset\fR's most important use). This implementation behaves like 4.4BSD +tset, with a few exceptions specified here. +.PP +The \fB\-S\fR option of BSD tset no longer works; it prints an error message to stderr +and dies. The \fB\-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these +changes are because the \fBTERMCAP\fR variable is no longer supported under +terminfo-based \fBncurses\fR, which makes \fBtset \-S\fR useless (we made it die +noisily rather than silently induce lossage). +.PP +There was an undocumented 4.4BSD feature that invoking tset via a link named +`TSET` (or via any other name beginning with an upper-case letter) set the +terminal to use upper-case only. This feature has been omitted. +.PP +The \fB\-A\fR, \fB\-E\fR, \fB\-h\fR, \fB\-u\fR and \fB\-v\fR +options were deleted from the \fBtset\fR +utility in 4.4BSD. +None of them were documented in 4.3BSD and all are +of limited utility at best. +The \fB\-a\fR, -\fB\d\fR, and -\fB\p\fR options are similarly +not documented or useful, but were retained as they appear to be in +widespread use. It is strongly recommended that any usage of these +three options be changed to use the \fB\-m\fR option instead. The +-n option remains, but has no effect. The \fB\-adnp\fR options are therefore +omitted from the usage summary above. +.PP +It is still permissible to specify the \fB\-e\fR, \fB\-i\fR, and \fB\-k\fR options without +arguments, although it is strongly recommended that such usage be fixed to +explicitly specify the character. +.PP +As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB\-Q\fR +option. Also, the interaction between the - option and the \fIterminal\fR +argument in some historic implementations of \fBtset\fR has been removed. +.SH ENVIRONMENT +The \fBtset\fR command uses the \fBSHELL\fR and \fBTERM\fR +environment variables. +.SH FILES +.TP 5 +/etc/ttys +system port name to terminal type mapping database (BSD versions only). +.TP +/usr/share/terminfo +terminal capability database +.SH SEE ALSO +csh(1), +sh(1), +stty(1), +tty(4), +termcap(5), +ttys(5), +environ(7) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: + diff --git a/lib/libncurses/man/wresize.3 b/lib/libncurses/man/wresize.3 new file mode 100644 index 0000000000..b539d9db62 --- /dev/null +++ b/lib/libncurses/man/wresize.3 @@ -0,0 +1,65 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1996 +.\" +.\" $Id: wresize.3x,v 1.8 2003/10/25 20:41:08 tom Exp $ +.\" $DragonFly: src/lib/libncurses/man/wresize.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $ +.TH wresize 3X "" +.SH NAME +\fBwresize\fR - resize a curses window +.SH SYNOPSIS +\fB#include \fR + +\fBint wresize(WINDOW *win, int lines, int columns);\fR +.SH DESCRIPTION +The \fBwresize\fR function reallocates storage for an \fBncurses\fR +window to adjust its dimensions to the specified values. +If either dimension is larger than the current values, the +window's data is filled with blanks that have the current background rendition +(as set by \fBwbkgndset\fR) merged into them. +.SH RETURN VALUE +The function returns the integer \fBERR\fR upon failure and \fBOK\fR on success. +It will fail if either of the dimensions less than or equal to zero, +or if an error occurs while (re)allocating memory for the window. +.SH NOTES +The only restriction placed on the dimensions is that they be greater than zero. +The dimensions are not compared to \fBcurses\fR screen dimensions to +simplify the logic of \fBresizeterm\fR. +The caller must ensure that the window's dimensions fit within the +actual screen dimensions. +.SH SEE ALSO +\fBresizeterm\fR(3X). +.SH AUTHOR +Thomas Dickey (from an equivalent function written in 1988 for BSD curses). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libpanel/Makefile b/lib/libpanel/Makefile deleted file mode 100644 index fb77c8b0f0..0000000000 --- a/lib/libpanel/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# Makefile for libpanel -# $FreeBSD: src/lib/libpanel/Makefile,v 1.2.2.5 2002/07/24 12:38:44 ru Exp $ -# $DragonFly: src/lib/libpanel/Attic/Makefile,v 1.2 2003/06/17 04:26:51 dillon Exp $ - -NCURSES=${.CURDIR}/../../contrib/ncurses - -.PATH: ${NCURSES}/panel ${NCURSES}/include -.PATH: ${NCURSES}/man - -LIB= panel -AWK?= awk - -SRCS= ncurses_def.h \ - p_above.c p_below.c p_bottom.c p_delete.c p_hidden.c \ - p_hide.c p_move.c p_new.c p_replace.c p_show.c p_top.c \ - p_update.c p_user.c p_win.c panel.c -INCS= ${NCURSES}/panel/panel.h - -CLEANFILES+= ncurses_def.h -CFLAGS+= -I. -I${.CURDIR}/../libncurses -I${NCURSES}/panel -I${NCURSES}/include \ - -Wall -DNDEBUG -DHAVE_CONFIG_H - -ncurses_def.h: MKncurses_def.sh ncurses_defs - AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \ - ${NCURSES}/include/ncurses_defs > ncurses_def.h - -# generate MAN -CLEANFILES+= panel.3 -MAN= panel.3 -panel.3: panel.3x - ln -s ${.ALLSRC} ${.TARGET} - -MLINKS+=panel.3 bottom_panel.3 panel.3 del_panel.3 panel.3 hide_panel.3 \ - panel.3 move_panel.3 panel.3 new_panel.3 panel.3 panel_above.3 \ - panel.3 panel_below.3 panel.3 panel_hidden.3 \ - panel.3 panel_userptr.3 panel.3 panel_window.3 \ - panel.3 replace_panel.3 panel.3 set_panel_userptr.3 \ - panel.3 show_panel.3 panel.3 top_panel.3 panel.3 update_panels.3 - -.include - -.SUFFIXES: .3x .3 -- 2.41.0