From a8987e73ec254703634802b4f7ee30d3a485524d Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 8 Feb 2004 21:15:26 -0500 Subject: [PATCH] ncurses 5.4 --- ANNOUNCE | 420 +- Ada95/Makefile.in | 3 +- Ada95/README | 1 - Ada95/gen/Makefile.in | 16 +- Ada95/gen/gen.c | 3 +- .../gen/terminal_interface-curses-aux.ads.m4 | 3 +- ..._interface-curses-forms-field_types.ads.m4 | 3 +- ...erface-curses-forms-field_user_data.ads.m4 | 3 +- ...terface-curses-forms-form_user_data.ads.m4 | 3 +- .../terminal_interface-curses-forms.ads.m4 | 3 +- ...terface-curses-menus-item_user_data.ads.m4 | 3 +- ...terface-curses-menus-menu_user_data.ads.m4 | 3 +- .../terminal_interface-curses-menus.ads.m4 | 3 +- .../terminal_interface-curses-mouse.ads.m4 | 3 +- ...l_interface-curses-panels-user_data.ads.m4 | 3 +- .../terminal_interface-curses-panels.ads.m4 | 3 +- Ada95/gen/terminal_interface-curses.ads.m4 | 3 +- Ada95/samples/Makefile.in | 3 +- Ada95/samples/ncurses2-getopt.adb | 6 +- Ada95/samples/ncurses2-m.adb | 5 +- Ada95/samples/rain.adb | 3 +- Ada95/samples/rain.ads | 3 +- .../samples/sample-curses_demo-attributes.adb | 3 +- .../samples/sample-curses_demo-attributes.ads | 3 +- Ada95/samples/sample-curses_demo-mouse.adb | 3 +- Ada95/samples/sample-curses_demo-mouse.ads | 3 +- Ada95/samples/sample-curses_demo.adb | 3 +- Ada95/samples/sample-curses_demo.ads | 3 +- Ada95/samples/sample-explanation.adb | 3 +- Ada95/samples/sample-explanation.ads | 3 +- Ada95/samples/sample-form_demo-aux.adb | 3 +- Ada95/samples/sample-form_demo-aux.ads | 3 +- Ada95/samples/sample-form_demo-handler.adb | 3 +- Ada95/samples/sample-form_demo-handler.ads | 3 +- Ada95/samples/sample-form_demo.adb | 3 +- Ada95/samples/sample-form_demo.ads | 3 +- Ada95/samples/sample-function_key_setting.adb | 3 +- Ada95/samples/sample-function_key_setting.ads | 3 +- Ada95/samples/sample-header_handler.adb | 3 +- Ada95/samples/sample-header_handler.ads | 3 +- Ada95/samples/sample-helpers.adb | 3 +- Ada95/samples/sample-helpers.ads | 3 +- Ada95/samples/sample-keyboard_handler.adb | 3 +- Ada95/samples/sample-keyboard_handler.ads | 3 +- Ada95/samples/sample-manifest.ads | 3 +- Ada95/samples/sample-menu_demo-aux.adb | 3 +- Ada95/samples/sample-menu_demo-aux.ads | 3 +- Ada95/samples/sample-menu_demo-handler.adb | 3 +- Ada95/samples/sample-menu_demo-handler.ads | 3 +- Ada95/samples/sample-menu_demo.adb | 3 +- Ada95/samples/sample-menu_demo.ads | 3 +- Ada95/samples/sample-my_field_type.adb | 3 +- Ada95/samples/sample-my_field_type.ads | 3 +- Ada95/samples/sample-text_io_demo.adb | 3 +- Ada95/samples/sample-text_io_demo.ads | 3 +- Ada95/samples/sample.adb | 3 +- Ada95/samples/sample.ads | 3 +- Ada95/samples/status.adb | 3 +- Ada95/samples/status.ads | 3 +- Ada95/samples/tour.adb | 3 +- Ada95/samples/tour.ads | 3 +- Ada95/src/Makefile.in | 9 +- Ada95/src/terminal_interface-curses-aux.adb | 3 +- ...terface-curses-forms-field_types-alpha.adb | 3 +- ...terface-curses-forms-field_types-alpha.ads | 3 +- ...-curses-forms-field_types-alphanumeric.adb | 3 +- ...-curses-forms-field_types-alphanumeric.ads | 3 +- ...rses-forms-field_types-enumeration-ada.adb | 3 +- ...rses-forms-field_types-enumeration-ada.ads | 3 +- ...e-curses-forms-field_types-enumeration.adb | 3 +- ...e-curses-forms-field_types-enumeration.ads | 3 +- ...face-curses-forms-field_types-intfield.adb | 3 +- ...face-curses-forms-field_types-intfield.ads | 3 +- ...-curses-forms-field_types-ipv4_address.adb | 3 +- ...-curses-forms-field_types-ipv4_address.ads | 3 +- ...rface-curses-forms-field_types-numeric.adb | 3 +- ...rface-curses-forms-field_types-numeric.ads | 3 +- ...erface-curses-forms-field_types-regexp.adb | 3 +- ...erface-curses-forms-field_types-regexp.ads | 3 +- ...e-curses-forms-field_types-user-choice.adb | 3 +- ...e-curses-forms-field_types-user-choice.ads | 3 +- ...nterface-curses-forms-field_types-user.adb | 3 +- ...nterface-curses-forms-field_types-user.ads | 3 +- ...nal_interface-curses-forms-field_types.adb | 3 +- ...interface-curses-forms-field_user_data.adb | 3 +- ..._interface-curses-forms-form_user_data.adb | 3 +- Ada95/src/terminal_interface-curses-forms.adb | 3 +- ..._interface-curses-menus-item_user_data.adb | 3 +- ..._interface-curses-menus-menu_user_data.adb | 3 +- Ada95/src/terminal_interface-curses-menus.adb | 3 +- Ada95/src/terminal_interface-curses-mouse.adb | 3 +- ...inal_interface-curses-panels-user_data.adb | 3 +- .../src/terminal_interface-curses-panels.adb | 3 +- .../src/terminal_interface-curses-putwin.adb | 3 +- .../src/terminal_interface-curses-putwin.ads | 3 +- .../src/terminal_interface-curses-termcap.adb | 9 +- .../src/terminal_interface-curses-termcap.ads | 3 +- .../terminal_interface-curses-terminfo.adb | 3 +- .../terminal_interface-curses-terminfo.ads | 3 +- .../terminal_interface-curses-text_io-aux.adb | 3 +- .../terminal_interface-curses-text_io-aux.ads | 3 +- ...al_interface-curses-text_io-complex_io.adb | 3 +- ...al_interface-curses-text_io-complex_io.ads | 3 +- ...al_interface-curses-text_io-decimal_io.adb | 3 +- ...al_interface-curses-text_io-decimal_io.ads | 3 +- ...nterface-curses-text_io-enumeration_io.adb | 3 +- ...nterface-curses-text_io-enumeration_io.ads | 3 +- ...inal_interface-curses-text_io-fixed_io.adb | 3 +- ...inal_interface-curses-text_io-fixed_io.ads | 3 +- ...inal_interface-curses-text_io-float_io.adb | 3 +- ...inal_interface-curses-text_io-float_io.ads | 3 +- ...al_interface-curses-text_io-integer_io.adb | 3 +- ...al_interface-curses-text_io-integer_io.ads | 3 +- ...al_interface-curses-text_io-modular_io.adb | 3 +- ...al_interface-curses-text_io-modular_io.ads | 3 +- .../src/terminal_interface-curses-text_io.adb | 3 +- .../src/terminal_interface-curses-text_io.ads | 3 +- .../src/terminal_interface-curses-trace.adb_p | 3 +- Ada95/src/terminal_interface-curses.adb | 3 +- Ada95/src/terminal_interface.ads | 3 +- INSTALL | 172 +- MANIFEST | 31 +- Makefile.glibc | 405 -- NEWS | 797 ++- README | 10 +- README.glibc | 5 - TO-DO | 39 +- aclocal.m4 | 1133 +++- announce.html.in | 497 +- c++/Makefile.in | 64 +- c++/README-first | 4 +- c++/cursesapp.cc | 5 +- c++/cursesapp.h | 5 +- c++/cursesf.cc | 5 +- c++/cursesf.h | 15 +- c++/cursesm.cc | 5 +- c++/cursesm.h | 5 +- c++/cursesmain.cc | 15 +- c++/cursesp.cc | 5 +- c++/cursesp.h | 5 +- c++/cursespad.cc | 5 +- c++/cursesw.cc | 4 +- c++/cursesw.h | 181 +- c++/cursslk.cc | 5 +- c++/cursslk.h | 5 +- c++/demo.cc | 9 +- c++/edit_cfg.sh | 7 +- c++/etip.h.in | 3 +- c++/internal.h | 5 +- config.guess | 301 +- config.sub | 139 +- configure | 4611 +++++++++++------ configure.in | 379 +- dist.mk | 22 +- doc/hackguide.doc | 808 +-- doc/html/Ada95.html | 79 +- doc/html/ada/files/T.htm | 2 +- doc/html/ada/funcs/A.htm | 17 +- doc/html/ada/funcs/B.htm | 10 +- doc/html/ada/funcs/C.htm | 57 +- doc/html/ada/funcs/D.htm | 33 +- doc/html/ada/funcs/E.htm | 10 +- doc/html/ada/funcs/F.htm | 76 +- doc/html/ada/funcs/G.htm | 54 +- doc/html/ada/funcs/H.htm | 16 +- doc/html/ada/funcs/I.htm | 51 +- doc/html/ada/funcs/K.htm | 10 +- doc/html/ada/funcs/L.htm | 14 +- doc/html/ada/funcs/M.htm | 77 +- doc/html/ada/funcs/N.htm | 41 +- doc/html/ada/funcs/O.htm | 8 +- doc/html/ada/funcs/P.htm | 71 +- doc/html/ada/funcs/Q.htm | 4 +- doc/html/ada/funcs/R.htm | 29 +- doc/html/ada/funcs/S.htm | 180 +- doc/html/ada/funcs/T.htm | 54 +- doc/html/ada/funcs/U.htm | 13 +- doc/html/ada/funcs/V.htm | 4 +- doc/html/ada/funcs/W.htm | 99 +- .../terminal_interface-curses-aux__adb.htm | 91 +- .../terminal_interface-curses-aux__ads.htm | 69 +- ...ce-curses-forms-field_types-alpha__adb.htm | 41 +- ...ce-curses-forms-field_types-alpha__ads.htm | 21 +- ...es-forms-field_types-alphanumeric__adb.htm | 41 +- ...es-forms-field_types-alphanumeric__ads.htm | 21 +- ...forms-field_types-enumeration-ada__adb.htm | 55 +- ...forms-field_types-enumeration-ada__ads.htm | 27 +- ...ses-forms-field_types-enumeration__adb.htm | 117 +- ...ses-forms-field_types-enumeration__ads.htm | 61 +- ...curses-forms-field_types-intfield__adb.htm | 49 +- ...curses-forms-field_types-intfield__ads.htm | 25 +- ...es-forms-field_types-ipv4_address__adb.htm | 41 +- ...es-forms-field_types-ipv4_address__ads.htm | 19 +- ...-curses-forms-field_types-numeric__adb.htm | 51 +- ...-curses-forms-field_types-numeric__ads.htm | 25 +- ...e-curses-forms-field_types-regexp__adb.htm | 49 +- ...e-curses-forms-field_types-regexp__ads.htm | 23 +- ...ses-forms-field_types-user-choice__adb.htm | 99 +- ...ses-forms-field_types-user-choice__ads.htm | 49 +- ...ace-curses-forms-field_types-user__adb.htm | 127 +- ...ace-curses-forms-field_types-user__ads.htm | 51 +- ...nterface-curses-forms-field_types__adb.htm | 299 +- ...nterface-curses-forms-field_types__ads.htm | 83 +- ...face-curses-forms-field_user_data__adb.htm | 49 +- ...face-curses-forms-field_user_data__ads.htm | 15 +- ...rface-curses-forms-form_user_data__adb.htm | 49 +- ...rface-curses-forms-form_user_data__ads.htm | 15 +- .../terminal_interface-curses-forms__adb.htm | 1249 +++-- .../terminal_interface-curses-forms__ads.htm | 395 +- ...rface-curses-menus-item_user_data__adb.htm | 49 +- ...rface-curses-menus-item_user_data__ads.htm | 15 +- ...rface-curses-menus-menu_user_data__adb.htm | 49 +- ...rface-curses-menus-menu_user_data__ads.htm | 15 +- .../terminal_interface-curses-menus__adb.htm | 1323 +++-- .../terminal_interface-curses-menus__ads.htm | 225 +- .../terminal_interface-curses-mouse__adb.htm | 219 +- .../terminal_interface-curses-mouse__ads.htm | 125 +- ...interface-curses-panels-user_data__adb.htm | 53 +- ...interface-curses-panels-user_data__ads.htm | 17 +- .../terminal_interface-curses-panels__adb.htm | 155 +- .../terminal_interface-curses-panels__ads.htm | 13 +- .../terminal_interface-curses-putwin__adb.htm | 53 +- .../terminal_interface-curses-putwin__ads.htm | 17 +- ...terminal_interface-curses-termcap__adb.htm | 171 +- ...terminal_interface-curses-termcap__ads.htm | 39 +- ...erminal_interface-curses-terminfo__adb.htm | 159 +- ...erminal_interface-curses-terminfo__ads.htm | 37 +- ...inal_interface-curses-text_io-aux__adb.htm | 113 +- ...inal_interface-curses-text_io-aux__ads.htm | 23 +- ...terface-curses-text_io-complex_io__adb.htm | 55 +- ...terface-curses-text_io-complex_io__ads.htm | 43 +- ...terface-curses-text_io-decimal_io__adb.htm | 57 +- ...terface-curses-text_io-decimal_io__ads.htm | 41 +- ...ace-curses-text_io-enumeration_io__adb.htm | 59 +- ...ace-curses-text_io-enumeration_io__ads.htm | 35 +- ...interface-curses-text_io-fixed_io__adb.htm | 57 +- ...interface-curses-text_io-fixed_io__ads.htm | 41 +- ...interface-curses-text_io-float_io__adb.htm | 57 +- ...interface-curses-text_io-float_io__ads.htm | 41 +- ...terface-curses-text_io-integer_io__adb.htm | 47 +- ...terface-curses-text_io-integer_io__ads.htm | 35 +- ...terface-curses-text_io-modular_io__adb.htm | 47 +- ...terface-curses-text_io-modular_io__ads.htm | 35 +- ...terminal_interface-curses-text_io__adb.htm | 333 +- ...terminal_interface-curses-text_io__ads.htm | 97 +- .../terminal_interface-curses-trace__adb.htm | 19 +- .../ada/terminal_interface-curses__adb.htm | 3531 +++++++------ .../ada/terminal_interface-curses__ads.htm | 965 ++-- doc/html/ada/terminal_interface__ads.htm | 13 +- doc/html/announce.html | 499 +- doc/html/hackguide.html | 3 +- doc/html/man/captoinfo.1m.html | 25 +- doc/html/man/clear.1.html | 43 +- doc/html/man/curs_add_wch.3x.html | 41 +- doc/html/man/curs_add_wchstr.3x.html | 59 +- doc/html/man/curs_addch.3x.html | 43 +- doc/html/man/curs_addchstr.3x.html | 11 +- doc/html/man/curs_addstr.3x.html | 16 +- doc/html/man/curs_addwstr.3x.html | 12 +- doc/html/man/curs_attr.3x.html | 53 +- doc/html/man/curs_beep.3x.html | 26 +- doc/html/man/curs_bkgd.3x.html | 55 +- doc/html/man/curs_bkgrnd.3x.html | 51 +- doc/html/man/curs_border.3x.html | 32 +- doc/html/man/curs_border_set.3x.html | 6 + doc/html/man/curs_clear.3x.html | 56 +- doc/html/man/curs_color.3x.html | 33 +- doc/html/man/curs_delch.3x.html | 20 +- doc/html/man/curs_deleteln.3x.html | 12 +- doc/html/man/curs_extend.3x.html | 27 +- doc/html/man/curs_get_wch.3x.html | 41 +- doc/html/man/curs_get_wstr.3x.html | 39 +- doc/html/man/curs_getcchar.3x.html | 31 +- doc/html/man/curs_getch.3x.html | 229 +- doc/html/man/curs_getstr.3x.html | 49 +- doc/html/man/curs_getyx.3x.html | 18 +- doc/html/man/curs_in_wch.3x.html | 23 +- doc/html/man/curs_in_wchstr.3x.html | 8 +- doc/html/man/curs_inch.3x.html | 18 +- doc/html/man/curs_inchstr.3x.html | 6 +- doc/html/man/curs_initscr.3x.html | 27 +- doc/html/man/curs_inopts.3x.html | 46 +- doc/html/man/curs_ins_wch.3x.html | 26 +- doc/html/man/curs_ins_wstr.3x.html | 55 +- doc/html/man/curs_insch.3x.html | 24 +- doc/html/man/curs_insstr.3x.html | 54 +- doc/html/man/curs_instr.3x.html | 9 +- doc/html/man/curs_inwstr.3x.html | 15 +- doc/html/man/curs_kernel.3x.html | 46 +- doc/html/man/curs_mouse.3x.html | 62 +- doc/html/man/curs_move.3x.html | 22 +- doc/html/man/curs_outopts.3x.html | 27 +- doc/html/man/curs_overlay.3x.html | 11 +- doc/html/man/curs_pad.3x.html | 52 +- doc/html/man/curs_print.3x.html | 10 +- doc/html/man/curs_printw.3x.html | 59 +- doc/html/man/curs_refresh.3x.html | 23 +- doc/html/man/curs_scanw.3x.html | 51 +- doc/html/man/curs_scr_dump.3x.html | 83 +- doc/html/man/curs_scroll.3x.html | 11 +- doc/html/man/curs_slk.3x.html | 60 +- doc/html/man/curs_termattrs.3x.html | 33 +- doc/html/man/curs_termcap.3x.html | 41 +- doc/html/man/curs_terminfo.3x.html | 44 +- doc/html/man/curs_touch.3x.html | 54 +- doc/html/man/curs_trace.3x.html | 6 +- doc/html/man/curs_util.3x.html | 48 +- doc/html/man/curs_window.3x.html | 52 +- doc/html/man/default_colors.3x.html | 34 +- doc/html/man/define_key.3x.html | 29 +- doc/html/man/form.3x.html | 51 +- doc/html/man/form_cursor.3x.html | 13 +- doc/html/man/form_data.3x.html | 25 +- doc/html/man/form_driver.3x.html | 34 +- doc/html/man/form_field.3x.html | 50 +- doc/html/man/form_field_attributes.3x.html | 55 +- doc/html/man/form_field_buffer.3x.html | 45 +- doc/html/man/form_field_info.3x.html | 8 + doc/html/man/form_field_just.3x.html | 17 +- doc/html/man/form_field_new.3x.html | 52 +- doc/html/man/form_field_opts.3x.html | 30 +- doc/html/man/form_field_userptr.3x.html | 16 +- doc/html/man/form_field_validation.3x.html | 128 +- doc/html/man/form_fieldtype.3x.html | 56 +- doc/html/man/form_hook.3x.html | 47 +- doc/html/man/form_new.3x.html | 9 +- doc/html/man/form_new_page.3x.html | 12 +- doc/html/man/form_opts.3x.html | 51 +- doc/html/man/form_page.3x.html | 46 +- doc/html/man/form_post.3x.html | 49 +- doc/html/man/form_requestname.3x.html | 20 +- doc/html/man/form_userptr.3x.html | 16 +- doc/html/man/form_win.3x.html | 46 +- doc/html/man/infocmp.1m.html | 54 +- doc/html/man/infotocap.1m.html | 25 +- doc/html/man/key_defined.3x.html | 103 + doc/html/man/keybound.3x.html | 42 +- doc/html/man/keyok.3x.html | 30 +- doc/html/man/menu.3x.html | 57 +- doc/html/man/menu_attributes.3x.html | 46 +- doc/html/man/menu_cursor.3x.html | 14 +- doc/html/man/menu_driver.3x.html | 18 +- doc/html/man/menu_format.3x.html | 55 +- doc/html/man/menu_hook.3x.html | 47 +- doc/html/man/menu_items.3x.html | 47 +- doc/html/man/menu_mark.3x.html | 7 + doc/html/man/menu_new.3x.html | 9 +- doc/html/man/menu_opts.3x.html | 37 +- doc/html/man/menu_pattern.3x.html | 11 +- doc/html/man/menu_post.3x.html | 47 +- doc/html/man/menu_requestname.3x.html | 20 +- doc/html/man/menu_spacing.3x.html | 8 + doc/html/man/menu_userptr.3x.html | 16 +- doc/html/man/menu_win.3x.html | 46 +- doc/html/man/mitem_current.3x.html | 41 +- doc/html/man/mitem_name.3x.html | 25 +- doc/html/man/mitem_new.3x.html | 25 +- doc/html/man/mitem_opts.3x.html | 5 + doc/html/man/mitem_userptr.3x.html | 16 +- doc/html/man/mitem_value.3x.html | 13 +- doc/html/man/mitem_visible.3x.html | 29 +- doc/html/man/ncurses.3x.html | 480 +- doc/html/man/panel.3x.html | 14 +- doc/html/man/resizeterm.3x.html | 56 +- doc/html/man/term.5.html | 17 +- doc/html/man/term.7.html | 66 +- doc/html/man/terminfo.5.html | 1064 ++-- doc/html/man/tic.1m.html | 47 +- doc/html/man/toe.1m.html | 12 +- doc/html/man/tput.1.html | 44 +- doc/html/man/tset.1.html | 178 +- doc/html/man/wresize.3x.html | 27 +- doc/html/ncurses-intro.html | 17 +- doc/ncurses-intro.doc | 13 +- form/Makefile.in | 16 +- form/READ.ME | 6 +- form/fld_arg.c | 5 +- form/fld_attr.c | 6 +- form/fld_current.c | 6 +- form/fld_def.c | 13 +- form/fld_dup.c | 5 +- form/fld_ftchoice.c | 5 +- form/fld_ftlink.c | 7 +- form/fld_info.c | 5 +- form/fld_just.c | 5 +- form/fld_link.c | 5 +- form/fld_max.c | 5 +- form/fld_move.c | 5 +- form/fld_newftyp.c | 7 +- form/fld_opts.c | 6 +- form/fld_pad.c | 6 +- form/fld_page.c | 5 +- form/fld_stat.c | 5 +- form/fld_type.c | 5 +- form/fld_user.c | 5 +- form/form.h | 9 +- form/form.priv.h | 9 +- form/frm_cursor.c | 6 +- form/frm_data.c | 7 +- form/frm_def.c | 9 +- form/frm_driver.c | 127 +- form/frm_hook.c | 5 +- form/frm_opts.c | 5 +- form/frm_page.c | 5 +- form/frm_post.c | 6 +- form/frm_req_name.c | 5 +- form/frm_scale.c | 5 +- form/frm_sub.c | 5 +- form/frm_user.c | 5 +- form/frm_win.c | 5 +- form/fty_alnum.c | 3 +- form/fty_alpha.c | 3 +- form/fty_enum.c | 5 +- form/fty_int.c | 3 +- form/fty_num.c | 3 +- form/fty_regex.c | 3 +- include/Caps.hpux11 | 9 +- include/MKkey_defs.sh | 16 +- include/MKncurses_def.sh | 4 +- include/MKterm.h.awk.in | 6 +- include/curses.h.in | 144 +- include/curses.tail | 6 +- include/curses.wide | 72 +- include/ncurses_defs | 17 +- include/ncurses_dll.h | 14 +- include/tic.h | 27 +- man/MKterminfo.sh | 10 +- man/Makefile.in | 10 +- man/captoinfo.1m | 20 +- man/curs_add_wchstr.3x | 6 +- man/curs_addch.3x | 25 +- man/curs_addchstr.3x | 9 +- man/curs_addstr.3x | 6 +- man/curs_addwstr.3x | 6 +- man/curs_attr.3x | 16 +- man/curs_beep.3x | 8 +- man/curs_bkgd.3x | 17 +- man/curs_deleteln.3x | 6 +- man/curs_extend.3x | 12 +- man/curs_get_wch.3x | 14 +- man/curs_get_wstr.3x | 7 +- man/curs_getcchar.3x | 6 +- man/curs_getch.3x | 50 +- man/curs_getstr.3x | 6 +- man/curs_getyx.3x | 14 +- man/curs_initscr.3x | 6 +- man/curs_inopts.3x | 40 +- man/curs_insch.3x | 6 +- man/curs_mouse.3x | 69 +- man/curs_outopts.3x | 8 +- man/curs_pad.3x | 71 +- man/curs_print.3x | 6 +- man/curs_printw.3x | 14 +- man/curs_scr_dump.3x | 6 +- man/curs_scroll.3x | 8 +- man/curs_slk.3x | 14 +- man/curs_termattrs.3x | 31 +- man/curs_termcap.3x | 10 +- man/curs_terminfo.3x | 62 +- man/curs_util.3x | 42 +- man/curs_window.3x | 6 +- man/default_colors.3x | 6 +- man/define_key.3x | 8 +- man/form_field.3x | 6 +- man/form_field_buffer.3x | 6 +- man/form_field_just.3x | 6 +- man/form_field_new.3x | 6 +- man/form_field_opts.3x | 8 +- man/form_field_validation.3x | 47 +- man/form_fieldtype.3x | 33 +- man/infocmp.1m | 138 +- man/infotocap.1m | 18 +- man/key_defined.3x | 60 + man/keybound.3x | 13 +- man/keyok.3x | 6 +- man/make_sed.sh | 8 +- man/man_db.renames | 3 +- man/manlinks.sed | 58 +- man/menu_driver.3x | 8 +- man/menu_pattern.3x | 6 +- man/mitem_new.3x | 6 +- man/ncurses.3x | 124 +- man/panel.3x | 6 +- man/resizeterm.3x | 6 +- man/term.5 | 20 +- man/term.7 | 22 +- man/terminfo.tail | 128 +- man/tic.1m | 104 +- man/toe.1m | 18 +- man/tput.1 | 50 +- man/tset.1 | 91 +- man/wresize.3x | 6 +- menu/Makefile.in | 19 +- menu/READ.ME | 5 +- menu/eti.h | 5 +- menu/m_attribs.c | 9 +- menu/m_cursor.c | 5 +- menu/m_driver.c | 3 +- menu/m_format.c | 3 +- menu/m_global.c | 11 +- menu/m_hook.c | 3 +- menu/m_item_cur.c | 5 +- menu/m_item_nam.c | 3 +- menu/m_item_new.c | 5 +- menu/m_item_opt.c | 7 +- menu/m_item_top.c | 5 +- menu/m_item_use.c | 3 +- menu/m_item_val.c | 5 +- menu/m_item_vis.c | 3 +- menu/m_items.c | 5 +- menu/m_new.c | 3 +- menu/m_opts.c | 7 +- menu/m_pad.c | 3 +- menu/m_pattern.c | 7 +- menu/m_post.c | 3 +- menu/m_req_name.c | 3 +- menu/m_scale.c | 3 +- menu/m_spacing.c | 7 +- menu/m_sub.c | 5 +- menu/m_userptr.c | 5 +- menu/m_win.c | 5 +- menu/menu.h | 7 +- menu/menu.priv.h | 5 +- menu/mf_common.h | 5 +- misc/csort | 36 + misc/emx.src | 67 +- misc/run_tic.in | 28 +- misc/shlib | 9 +- misc/terminfo.src | 1472 +++++- mk-1st.awk | 68 +- mk-2nd.awk | 12 +- ncurses/Makefile.in | 60 +- ncurses/SigAction.h | 10 +- ncurses/base/MKlib_gen.sh | 27 +- ncurses/base/define_key.c | 15 +- .../lib_ins_nwstr.c => base/key_defined.c} | 78 +- ncurses/base/keybound.c | 7 +- ncurses/base/lib_addch.c | 145 +- ncurses/base/lib_addstr.c | 77 +- ncurses/base/lib_bkgd.c | 4 +- ncurses/base/lib_colorset.c | 11 +- ncurses/base/lib_freeall.c | 24 +- ncurses/base/lib_getch.c | 82 +- ncurses/base/lib_initscr.c | 6 +- ncurses/base/lib_insch.c | 97 +- ncurses/base/lib_insdel.c | 6 +- ncurses/base/lib_mouse.c | 523 +- ncurses/base/lib_newterm.c | 9 +- ncurses/base/lib_printw.c | 17 +- ncurses/base/lib_scroll.c | 66 +- ncurses/base/lib_set_term.c | 36 +- ncurses/base/lib_slk.c | 78 +- ncurses/base/lib_slkatr_set.c | 5 +- ncurses/base/lib_slkcolor.c | 5 +- ncurses/base/lib_slklab.c | 6 +- ncurses/base/lib_slkrefr.c | 6 +- ncurses/base/lib_slkset.c | 30 +- ncurses/base/resizeterm.c | 35 +- ncurses/base/safe_sprintf.c | 84 +- ncurses/base/sigaction.c | 64 +- ncurses/base/tries.c | 23 +- ncurses/base/version.c | 11 +- ncurses/base/vsscanf.c | 4 +- ncurses/curses.priv.h | 156 +- ncurses/llib-lncurses | 1037 ++-- ncurses/llib-lncursesw | 1505 +++--- ncurses/modules | 23 +- ncurses/tinfo/MKkeys_list.sh | 8 +- ncurses/tinfo/access.c | 31 +- ncurses/tinfo/alloc_entry.c | 59 +- ncurses/tinfo/alloc_ttype.c | 18 +- ncurses/tinfo/captoinfo.c | 22 +- ncurses/tinfo/comp_hash.c | 6 +- ncurses/tinfo/comp_parse.c | 28 +- ncurses/tinfo/comp_scan.c | 105 +- ncurses/tinfo/free_ttype.c | 40 +- ncurses/tinfo/home_terminfo.c | 8 +- ncurses/tinfo/lib_acs.c | 147 +- ncurses/tinfo/lib_cur_term.c | 10 +- ncurses/tinfo/lib_has_cap.c | 5 +- ncurses/tinfo/lib_kernel.c | 4 +- ncurses/tinfo/lib_napms.c | 18 +- ncurses/tinfo/lib_options.c | 42 +- ncurses/tinfo/lib_setup.c | 255 +- ncurses/tinfo/lib_termcap.c | 10 +- ncurses/tinfo/lib_termname.c | 16 +- ncurses/tinfo/lib_tgoto.c | 6 +- ncurses/tinfo/lib_ti.c | 10 +- ncurses/tinfo/lib_tparm.c | 394 +- ncurses/tinfo/lib_tputs.c | 10 +- ncurses/tinfo/lib_ttyflags.c | 13 +- ncurses/tinfo/parse_entry.c | 44 +- ncurses/tinfo/read_entry.c | 81 +- ncurses/tinfo/read_termcap.c | 15 +- ncurses/tinfo/setbuf.c | 58 +- ncurses/tinfo/strings.c | 23 +- ncurses/trace/lib_trace.c | 39 +- ncurses/trace/lib_traceatr.c | 84 +- ncurses/trace/lib_tracechr.c | 35 +- ncurses/trace/trace_buf.c | 37 +- ncurses/trace/varargs.c | 6 +- ncurses/trace/visbuf.c | 56 +- ncurses/tty/lib_mvcur.c | 167 +- ncurses/tty/lib_twait.c | 19 +- ncurses/tty/tty_display.h | 7 +- ncurses/tty/tty_update.c | 269 +- ncurses/widechar/charable.c | 77 + ncurses/widechar/lib_add_wch.c | 109 + ncurses/widechar/lib_box_set.c | 4 +- ncurses/widechar/lib_cchar.c | 28 +- ncurses/widechar/lib_get_wch.c | 30 +- ncurses/widechar/lib_get_wstr.c | 35 +- ncurses/widechar/lib_ins_wch.c | 83 +- .../lib_pecho_wchar.c} | 62 +- ncurses/widechar/lib_slk_wset.c | 149 + ncurses/widechar/lib_unget_wch.c | 26 +- ncurses/widechar/lib_wacs.c | 15 +- ncurses/widechar/lib_wunctrl.c | 8 +- panel/Makefile.in | 21 +- progs/MKtermsort.sh | 6 +- progs/Makefile.in | 77 +- progs/dump_entry.c | 26 +- progs/infocmp.c | 43 +- progs/tic.c | 240 +- progs/tput.c | 33 +- progs/tset.c | 43 +- sysdeps/unix/sysv/linux/Makefile | 10 - sysdeps/unix/sysv/linux/alpha/configure | 2 - sysdeps/unix/sysv/linux/configure | 407 -- sysdeps/unix/sysv/linux/edit_man.sed | 100 - sysdeps/unix/sysv/linux/edit_man.sh | 37 - sysdeps/unix/sysv/linux/run_tic.sh | 143 - tack/HISTORY | 3 + tack/Makefile.in | 60 +- tack/color.c | 54 +- tack/init.c | 16 +- tack/output.c | 6 +- tack/pad.c | 35 +- tack/tack.h | 4 +- tar-copy.sh | 29 +- test/Makefile.in | 175 +- test/README | 601 +++ test/aclocal.m4 | 875 ++++ test/background.c | 68 + test/bs.c | 6 +- test/cardfile.c | 39 +- test/color_set.c | 55 + test/configure | 3232 ++++++++++-- test/configure.in | 257 +- test/demo_defkey.c | 250 + test/demo_forms.c | 295 ++ test/demo_keyok.c | 55 + test/demo_menus.c | 73 + test/demo_panels.c | 33 + test/edit_field.c | 402 ++ test/edit_field.h | 17 + test/gdc.6 | 3 +- test/hashtest.c | 4 +- test/ins_wide.c | 218 + test/inserts.c | 162 + test/keynames.c | 4 +- test/knight.c | 4 +- test/listused.sh | 155 + test/modules | 22 +- test/ncurses.c | 732 ++- test/railroad.c | 4 +- test/tclock.c | 14 +- test/test.priv.h | 96 +- test/testcurs.c | 3 +- test/testscanw.c | 3 +- test/view.c | 10 +- 671 files changed, 29831 insertions(+), 20658 deletions(-) delete mode 100644 Makefile.glibc delete mode 100644 README.glibc create mode 100644 doc/html/man/key_defined.3x.html create mode 100644 man/key_defined.3x create mode 100755 misc/csort rename ncurses/{widechar/lib_ins_nwstr.c => base/key_defined.c} (68%) create mode 100644 ncurses/widechar/charable.c create mode 100644 ncurses/widechar/lib_add_wch.c rename ncurses/{base/lib_insstr.c => widechar/lib_pecho_wchar.c} (64%) create mode 100644 ncurses/widechar/lib_slk_wset.c delete mode 100644 sysdeps/unix/sysv/linux/Makefile delete mode 100755 sysdeps/unix/sysv/linux/alpha/configure delete mode 100755 sysdeps/unix/sysv/linux/configure delete mode 100644 sysdeps/unix/sysv/linux/edit_man.sed delete mode 100755 sysdeps/unix/sysv/linux/edit_man.sh delete mode 100755 sysdeps/unix/sysv/linux/run_tic.sh create mode 100644 test/aclocal.m4 create mode 100644 test/background.c create mode 100644 test/color_set.c create mode 100644 test/demo_defkey.c create mode 100644 test/demo_forms.c create mode 100644 test/demo_keyok.c create mode 100644 test/demo_menus.c create mode 100644 test/demo_panels.c create mode 100644 test/edit_field.c create mode 100644 test/edit_field.h create mode 100644 test/ins_wide.c create mode 100644 test/inserts.c create mode 100755 test/listused.sh diff --git a/ANNOUNCE b/ANNOUNCE index e39a0bee..513234e3 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ - Announcing ncurses 5.3 + Announcing ncurses 5.4 The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, @@ -23,133 +23,238 @@ manual pages are provided for the library and tools. The ncurses distribution is available via anonymous FTP at the GNU - distribution site [1]ftp://ftp.gnu.org/pub/gnu/ncurses. - It is also available at [2]ftp://invisible-island.net/ncurses. + distribution site [1]ftp://ftp.gnu.org/gnu/ncurses/ . + It is also available at [2]ftp://invisible-island.net/ncurses/ . Release Notes This release is designed to be upward compatible from ncurses 5.0 and - 5.2; very few applications will require recompilation, depending on + 5.3; very few applications will require recompilation, depending on the platform. These are the highlights from the change-log since - ncurses 5.2 release. + ncurses 5.3 release. Interface changes: - * change type for bool used in headers to NCURSES_BOOL, which - usually is the same as the compiler's definition for bool. - * add all but two functions for X/Open curses wide-character - support. These are only available if the library is configured - using the --enable-widec option. Missing functions are + * add the remaining functions for X/Open curses wide-character + support. + pecho_wchar() + slk_wset() - * add environment variable $NCURSES_ASSUMED_COLORS to modify the - assume_default_colors() extension. + These are only available if the library is configured using the + --enable-widec option. + * write getyx() and related 2-return macros in terms of getcury(), + getcurx(), etc. + * simplify ifdef for bool declaration in curses.h + * modify ifdef's in curses.h that disabled use of __attribute__() + for g++, since recent versions implement the cases which ncurses + uses. + * add key_defined() function, to tell which keycode a string is + bound to. New features and improvements: - * Improved support for termcap applications: - + add logic to dump_entry.c to remove function-key definitions - that do not fit into the 1023-byte limit for generated - termcaps. This makes hds200 fit. - + modify tgetent() to check if exit_attribute_mode resets the - alternate character set, and if so, attempt to adjust the - copy of the termcap "me" string which it will return to - eliminate that part. In particular, 'screen' would lose track - of line-drawing characters. - + add check/fix to comp_parse.c to suppress warning about - missing acsc string. This happens in configurations where raw - termcap information is processed; tic already does this and - other checks. - + add tic -A option to suppress capabilities which are - commented out when translating to termcap. - + modify logic in lib_baudrate.c for ospeed, for FreeBSD to - make it work properly for termcap applications (patch by - Andrey A Chernov). - * add a call to _nc_keypad() in keypad() to accommodate applications - such as nvi, which use curses for output but not for input (fixes - Debian #131263, cf: 20011215). - * correct logic for COLORFGBG environment variable: if rxvt is - compiled with xpm support, the variable has three fields, making - it slightly incompatible with itself. In either case, the - background color is the last field. + * library + + implement logic in lib_mouse.c to handle position reports + which are generated when XFree86 xterm is initialized with + private modes 1002 or 1003. These are returned to the + application as the REPORT_MOUSE_POSITION mask, which was not + implemented. + + modify soft-key initialization to use A_REVERSE if A_STANDOUT + would not be shown when colors are used, i.e., if ncv#1 is + set in the terminfo as is done in "screen". + + add configure option for FreeBSD sysmouse, --with-sysmouse, + and implement library support for that. + * programs: + + tack: + o allow it to run from fallback terminfo data. + o reset colors after each color test, correct a place + where exit_standout_mode was used instead of + exit_attribute_mode. + o improve bce test by making it set colors other than + black on white. + + tic: + o handle a case where an entry has no description, and + capabilities begin on the same line as the entry name. + o allow a terminfo entry with a leading 2-character name. + o improved warnings when suppressing items to fit in + termcap's 1023-byte limit. + o add check for multiple "tc=" clauses in a termcap. + o correct logic for resolving "use=" clauses allow infocmp + and tic to show cancelled capabilities. + o check for incomplete line-drawing character mapping. + o check for missing/empty/illegal terminfo name. + + tput: + o modify tput to use the same parameter analysis as + tparm() does, to provide for user-defined strings, e.g., + for xterm title, a corresponding capability might be + title=\E]2;%p1%s^G, + + tset: + o use the system's default values for CKILL and other + default control characters. + o correct interchanged defaults for kill and interrupt + characters, which caused it to report unnecessarily. Major bug fixes: - * rewrote limit-checks in wscrl() and associated - _nc_scroll_window(), to ensure that if the parameter of wscrl() is - larger than the size of the scrolling region, then the scrolling - region will be cleared. - * modify tset to restore original I/O modes if an error is - encountered. Also modify to use buffered stderr consistently - rather than mixing with write(). - * move calls to def_shell_mode() and def_prog_mode() before loop - with callbacks in lib_set_term.c, since the c++ demo otherwise - initialized the tty modes before saving them. - * modified wresize() to ensure that a failed realloc will not - corrupt the window structure, and to make subwindows fit within - the resized window. - * altered resizeterm() to avoid having it fail when a child window - cannot be resized because it would be larger than its parent. - * correct/improve logic to produce an exit status for errors in - tput, which did not exit with an error when told to put a string - not in the current terminfo entry. - * modify behavior of can_clear_with() so that if an application is - running in a non-bce terminals with default colors enabled, it - returns true, allowing the user to select/paste text without - picking up extraneous trailing blanks. - * add a check in relative_move() to guard against buffer overflow in - the overwrite logic. - * add some limit/pointer checks to -S option of tputs. - * modify mvcur() to avoid emitting newline characters when nonl() - mode is set. Normally this is not a problem since the actual - terminal mode is set to suppress nl/crlf translations, however it - is useful to allow the caller to manipulate the terminal mode to - avoid staircasing effects after spawning a process which writes - messages (for lynx 2.8.4). + * prevent recursion in wgetch() via wgetnstr() if the connection + cannot be switched between cooked/raw modes because it is not a + TTY. + * correct a case in _nc_remove_string(), used by define_key(), to + avoid infinite loop if the given string happens to be a substring + of other strings which are assigned to keys. + * modify logic of acsc to use the original character if no mapping + is defined, rather than a null. + * several improvements for handling multi-cell display of wide + characters. + + modify setcchar() to allow converting control characters to + complex characters. + + correct handling of multibyte characters in waddch_literal() + which force wrapping because they are started too late on the + line. + + modify setcchar() to allow for wchar_t input strings that + have more than one spacing character. + * other fixes for wide-character support: + + rewrote lib_acs.c to allow PutAttrChar() to decide how to + render alternate-characters, i.e., to work with Linux console + and UTF-8 locale. + + implement a workaround so that line-drawing works with + screen's crippled UTF-8 support (tested with 3.9.13). This + only works with the wide-character support (--enable-widec); + the normal library will simply suppress line-drawing when + running in a UTF-8 locale in screen. + + corrections to lib_get_wstr.c: + o null-terminate buffer passed to setcchar(), which + occasionally failed. + o map special characters such as erase- and + kill-characters into key-codes so those will work as + expected even if they are not mentioned in the terminfo. + * modify setupterm() to check if the terminfo and terminal-modes + have already been read. This ensures that it does not reinvoke + def_prog_mode() when an application calls more than one function, + such as tgetent() and initscr(). + * fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, + REQ_DEL_CHAR, REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure + the cursor was at the editing position before making + modifications. + * correct keybound(), which reported definitions in the wrong table, + i.e., the list of definitions which are disabled by keyok(). + * fixes related to safe_sprintf.c: + + correct an allocation size in safe_sprintf.c for the "*" + format code. + + correct safe_sprintf.c to not return a null pointer if the + format happens to be an empty string. + + make return value from _nc_printf_string() consistent. + Before, depending on whether --enable-safe-sprintf was used, + it might not be cached for reallocating. + * other low-level improvements to the optimization code include: + + if the output is a socket or other non-tty device, use 1 + millisecond for the cost in mvcur; previously it was 9 + milliseconds because the baudrate was not known. + + modify lib_getch.c to avoid recursion via wgetnstr() when the + input is not a tty and consequently mode-changes do not work. + + fix several places in tack/pad.c which tested and used the + parameter- and parameterless strings inconsistently. + + change several tputs() calls in scrolling code to use putp(), + to enable padding which may be needed for some terminals. + + improve mvcur() by checking if it is safe to move when video + attributes are set (msgr), and if not, reset/restore + attributes within that function rather than doing it + separately in the GoTo() function in tty_update.c. + + use tputs() rather than putp() in a few cases in tty_update.c + since the corresponding delays are proportional to the number + of lines affected: repeat_char, clr_eos, + change_scroll_region. + * correct line/column reference in adjust_window(), needed to make + special windows such as curscr track properly when resizing. + * fix a potential recursion between napms() and _nc_timed_wait() + * rewrote lib_insch.c, combining it with lib_insstr.c so both handle + tab and other control characters consistently. + * do not try to open gpm mouse driver if standard output is not a + tty; the gpm library does not make this check. Portability: * configure script: - + modify check in --disable-overwrite option so that it is used - by default unless the --prefix/$prefix value is not /usr, in - attempt to work around packagers who do not read the INSTALL - notes. - + correct a typo in configure --enable-colorfgbg option, and - move it to the experimental section (cf: 20011208). - + modify configure script to allow building with termcap only, - or with fallbacks only. In this case, we do not build tic and - toe. - + modify run_tic.sh to check if the build is a cross-compile. - In that case, do not use the build's tic to install the - terminfo database. - + modify c++/Makefile.in to accommodate archive programs that - are different for C++ than for C, and add cases for vendor's - C++ compilers on Solaris and IRIX. - + add several configure script options to aid with - cross-compiling: --with-build-cc, --with-build-cflags, - --with-build-ldflags, and --with-build-libs. - + add experimental --with-caps=XXX option to customize to - similar terminfo database formats such as AIX 4.x - + add configure option --with-ospeed to assist packagers in - transition to 5.3 change to ospeed type. + + new options: + + --with-abi-version option. + addresses platforms where packagers have diverged + from ncurses ABI numbering. + + --with-manpage-format=catonly + addresses behavior of BSDI, allow install of + man+cat files on NetBSD, whose behavior has + diverged by requiring both to be present. + + --with-manpage-aliases + extends "--with-manpage-aliases" to provide the + option of generating ".so" files rather than + symbolic links for manpage aliases. + + --with-rel-version + workaround to force libtool on Darwin generate the + "same" library names as with the "--with-shared" + option. The Darwin ld program does not work well + with a zero as the minor-version value. + + --with-trace + simplifies defining TRACE to incorporate trace() in + libraries. + + + fixes/improvements for cross-compiling: + o allow BUILD_CC and related configure script variables to + be overridden from the environment. + o use AC_CHECK_TOOL to get proper values for AR and LD for + cross compiling. + o use $cross_compiling variable in configure script rather + than comparing $host_alias and $target alias, since + "host" is traditionally misused in autoconf to refer to + the target platform. + o modify run_tic.in to avoid using wrong shared libraries + when cross-compiling. + + fixes for Mac OS X: + o fix a redefinition of $RANLIB in the configure script + when libtool is used. + o modify MKlib_gen.sh to avoid passing "#" tokens through + the C preprocessor. This works around Mac OS X's + preprocessor, which insists on adding a blank on each + side of the token. + + workarounds for broken tools: + o add configure check for wchar_t and wint_t types, rather + than rely on preprocessor definitions. Also work around + for gcc fixinclude bug which creates a shadow copy of + curses.h if it sees these symbols apparently typedef'd. + o modify configure script to omit -Winline for gcc 3.3, + since that feature is broken. + o several script fixes to work around the ironically named + POSIXLY_CORRECT feature of GNU sed 4.0. + o modify configure script to avoid using "head -1", which + does not work if POSIXLY_CORRECT (sic) is set. + o update configure script to reflect fix for + AC_PROG_GCC_TRADITIONAL, which is broken in autoconf + 2.5x for Mac OS X 10.2.3. + o repair check for missing C++ compiler, which is broken + in autoconf 2.5x by hardcoding it to g++. + + corrected ifdef's relating to configure check for wchar_t, + etc. + + remove configure script check to allow -Wconversion for older + versions of gcc + + modify configure script to accommodate libtool 1.5, as well + as add an parameter to the "--with-libtool" option which can + specify the pathname of libtool. + + change several sed scripts to avoid using "\+" since it is + not a BRE (basic regular expression). One instance caused + terminfo.5 to be misformatted on FreeBSD. + + use '%' as sed substitute delimiter in run_tic script to + avoid problems with pathname delimiters such as ':' and '@'. + + add -D_XOPEN_SOURCE=500 if needed when configuring with + "--enable-widec", to get mbstate_t declaration on HPUX 11.11. * library: - + implement a simple vsscanf() fallback function which uses the - %n conversion to help parse the input data. - + various fixes to build/work with different implementations of - vsscanf(). - + add/use macro to suppress sign-extension of char type on - platforms where this is a problem in ctype macros, e.g., - Solaris. - + finish changes needed to build dll's on cygwin. - + add #undef's before possible redefinition of ERR and OK in - curses.h - * programs: - + modify ifdef's in write_entry.c to allow use of symbolic - links on platforms with no hard links, e.g., BeOS. - + modify _nc_write_entry() to allow for the possibility that - linking aliases on a filesystem that ignores case would not - succeed because the source and destination differ only by - case, e.g., NCR260VT300WPP0 on cygwin. - + modify logic in tic, toe, tput and tset which checks for - basename of argv[0] to work properly on systems such as OS/2 - which have case-independent filenames and/or program - suffixes, e.g., ".ext". + + adjust include-options in CF_ETIP_DEFINES to avoid missing + ncurses_dll.h, fixing special definitions that may be needed + for etip.h. + + modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use + a ".so" suffix. + + improve ifdef's to guard against redefinition of wchar_t and + wint_t in curses.h. + + remove an #undef for KEY_EVENT from curses.tail used in the + experimental NCURSES_WGETCH_EVENTS feature. The #undef + confuses Debian dpkg's build script. Features of Ncurses @@ -268,71 +373,71 @@ cdk Curses Development Kit - [3]http://invisible-island.net/cdk. - [4]http://www.vexus.ca/CDK.html + [3]http://invisible-island.net/cdk/ + [4]http://www.vexus.ca/products/CDK/ ded directory-editor - [5]http://invisible-island.net/ded. + [5]http://invisible-island.net/ded/ dialog the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. - [6]http://invisible-island.net/dialog. + [6]http://invisible-island.net/dialog/ lynx the character-screen WWW browser - [7]http://lynx.isc.org/release. + [7]http://lynx.isc.org/release/ Midnight Commander file manager - [8]www.gnome.org/mc/. + [8]http://www.ibiblio.org/mc/ mutt mail utility - [9]http://www.mutt.org. + [9]http://www.mutt.org/ ncftp file-transfer utility - [10]http://www.ncftp.com. + [10]http://www.ncftp.com/ nvi New vi versions 1.50 are able to use ncurses versions 1.9.7 and later. - [11]http://www.bostic.com/vi/. + [11]http://www.bostic.com/vi/ - tin - newsreader, supporting color, MIME - [12]http://www.tin.org. + pinfo + Lynx-like info browser. + [12]http://dione.ids.pl/~pborys/software/pinfo/ - taper - tape archive utility - [13]http://members.iinet.net.au/~yusuf/taper/. + tin + newsreader, supporting color, MIME [13]http://www.tin.org/ vh-1.6 Volks-Hypertext browser for the Jargon File - [14]http://www.bg.debian.org/Packages/unstable/text/vh.html. + [14]http://www.debian.org/Packages/unstable/text/vh.html as well as some that use ncurses for the terminfo support alone: minicom terminal emulator - [15]http://www.pp.clinet.fi/~walker/minicom.html. + [15]http://www.netsonic.fi/~walker/minicom.html vile vi-like-emacs - [16]http://invisible-island.net/vile. + [16]http://invisible-island.net/vile/ The ncurses distribution includes a selection of test programs (including a few games). Who's Who and What's What - The original developers of ncurses are [17]Zeyd Ben-Halim and [18]Eric - S. Raymond. Ongoing work is being done by [19]Thomas Dickey and - [20]Jürgen Pfeifer. [21]Thomas Dickey acts as the maintainer for the + Zeyd Ben-Halim started it from a previous package pcurses, written by + Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer + wrote most of the form and menu libraries. Ongoing work is being done + by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. - Contact the current maintainers at [22]bug-ncurses@gnu.org. + Contact the current maintainers at [18]bug-ncurses@gnu.org. To join the ncurses mailing list, please write email to bug-ncurses-request@gnu.org containing the line: @@ -342,7 +447,7 @@ Who's Who and What's What and testing of this package. Beta versions of ncurses and patches to the current release are made - available at [23]ftp://invisible-island.net/ncurses. + available at [19]ftp://invisible-island.net/ncurses/ . Future Plans @@ -355,37 +460,34 @@ Future Plans Other Related Resources - The distribution includes and uses a version of the terminfo-format - terminal description file maintained by Eric Raymond. - [24]http://earthspace.net/~esr/terminfo. + The distribution provides a newer version of the terminfo-format + terminal description file maintained by [20]Eric Raymond . Unlike the + older version, the termcap and terminfo data are provided in the same + file. You can find lots of information on terminal-related topics not - covered in the terminfo file at [25]Richard Shuford's archive. + covered in the terminfo file at [21]Richard Shuford's archive . References - 1. ftp://ftp.gnu.org/pub/gnu/ncurses - 2. ftp://invisible-island.net/ncurses - 3. http://invisible-island.net/cdk/cdk.html - 4. http://www.vexus.ca/CDK.html - 5. http://invisible-island.net/ded/ded.html - 6. http://invisible-island.net/dialog/dialog.html + 1. ftp://ftp.gnu.org/gnu/ncurses/ + 2. ftp://invisible-island.net/ncurses/ + 3. http://invisible-island.net/cdk/ + 4. http://www.vexus.ca/products/CDK/ + 5. http://invisible-island.net/ded/ + 6. http://invisible-island.net/dialog/ 7. http://lynx.isc.org/release/ - 8. file://localhost/usr/build/ncurses/ncurses-5.2-20021012/doc/html/www.gnome.org/mc/ + 8. http://www.ibiblio.org/mc/ 9. http://www.mutt.org/ 10. http://www.ncftp.com/ 11. http://www.bostic.com/vi/ - 12. http://www.tin.org/ - 13. http://members.iinet.net.au/~yusuf/taper/ - 14. http://www.bg.debian.org/Packages/unstable/text/vh.html - 15. http://www.pp.clinet.fi/~walker/minicom.html - 16. http://invisible-island.net/vile/vile.html - 17. mailto:zmbenhal@netcom.com - 18. http://www.ccil.org/~esr/home.html - 19. mailto:dickey@herndon4.his.com - 20. http://www.familiepfeifer.de/Contact.aspx?Lang=en - 21. mailto:dickey@herndon4.his.com - 22. mailto:bug-ncurses@gnu.org - 23. ftp://invisible-island.net/ncurses - 24. http://earthspace.net/~esr/terminfo - 25. http://www.cs.utk.edu/~shuford/terminal_index.html + 12. http://dione.ids.pl/~pborys/software/pinfo/ + 13. http://www.tin.org/ + 14. http://www.debian.org/Packages/unstable/text/vh.html + 15. http://www.netsonic.fi/~walker/minicom.html + 16. http://invisible-island.net/vile/ + 17. mailto:dickey@invisible-island.net + 18. mailto:bug-ncurses@gnu.org + 19. ftp://invisible-island.net/ncurses/ + 20. http://www.catb.org/~esr/terminfo/ + 21. http://www.cs.utk.edu/~shuford/terminal_index.html diff --git a/Ada95/Makefile.in b/Ada95/Makefile.in index 9f6db419..b1743cfa 100644 --- a/Ada95/Makefile.in +++ b/Ada95/Makefile.in @@ -27,10 +27,9 @@ ############################################################################## # # Author: Juergen Pfeifer, 1996 -# Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en # # Version Control -# $Revision: 1.14 $ +# $Revision: 1.15 $ # SHELL = /bin/sh THIS = Makefile diff --git a/Ada95/README b/Ada95/README index 21e9b4cd..be842596 100644 --- a/Ada95/README +++ b/Ada95/README @@ -27,7 +27,6 @@ ------------------------------------------------------------------------------- -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en The documentation is provided in HTML format in the ./html subdirectory. The main document is named index.html diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in index bccea45f..aea7fdd7 100644 --- a/Ada95/gen/Makefile.in +++ b/Ada95/gen/Makefile.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# 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"), # @@ -27,10 +27,9 @@ ############################################################################## # # Author: Juergen Pfeifer, 1996 -# Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en # # Version Control -# $Revision: 1.41 $ +# $Revision: 1.44 $ # .SUFFIXES: @@ -53,6 +52,7 @@ INSTALL_DATA = @INSTALL_DATA@ AWK = @AWK@ LN_S = @LN_S@ +CC = @CC@ HOST_CC = @BUILD_CC@ CFLAGS = @CFLAGS@ @@ -82,8 +82,6 @@ DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' GNATHTML = `type -p gnathtml || type -p gnathtml.pl` GNATHP = www.gnat.com -MAIL = www.familiepfeifer.de/Contact.aspx?Lang=en -HOMEP = www.familiepfeifer.de/juergen ################################################################################ ALIB = @cf_ada_package@ @@ -171,9 +169,9 @@ install.libs :: $(ADA_INCLUDE) install \ install.libs :: $(ADA_OBJECTS) @echo installing package $(ALIB) in $(ADA_OBJECTS) - @chmod a-wx $(ADA_SRCDIR)/*.ali + @-chmod a-wx $(ADA_SRCDIR)/*.ali @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS) - @chmod u+x $(ADA_SRCDIR)/*.ali + @-chmod u+x $(ADA_SRCDIR)/*.ali uninstall \ uninstall.libs :: @@ -420,11 +418,9 @@ adahtml: sed -e 's%">%">%g' |\ sed -e 's/3X/3x/g' |\ sed -e 's/$$\([ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxz0123456789_]*:.*\)\$$/@\1@/' |\ - sed -e 's%Juergen Pfeifer%J\ürgen Pfeifer%g' |\ - sed -e 's%http://$(MAIL)%$(MAIL)%g' |\ sed -e 's%</A>%%g' > $$a.tmp ;\ mv $$a.tmp $$f ;\ - done + done @rm -f *.ad[sb] *.ali *.tmp @for f in funcs.htm main.htm ; do \ sed -e "\%\[ \]%d" < html/$$f > $$f ;\ diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index 11ba3d73..7a5bbedf 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1996 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /* Version Control - $Revision: 1.35 $ + $Revision: 1.36 $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the diff --git a/Ada95/gen/terminal_interface-curses-aux.ads.m4 b/Ada95/gen/terminal_interface-curses-aux.ads.m4 index aacac4f5..4fc742a2 100644 --- a/Ada95/gen/terminal_interface-curses-aux.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-aux.ads.m4 @@ -36,9 +36,8 @@ include(M4MACRO)---------------------------------------------------------------- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.14 $ +-- $Revision: 1.15 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Base_Defs') diff --git a/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 index 79726781..8819844a 100644 --- a/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 index 6f99e854..41398836 100644 --- a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.14 $ +-- $Revision: 1.15 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 index b07618ae..0c4420d8 100644 --- a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/gen/terminal_interface-curses-forms.ads.m4 b/Ada95/gen/terminal_interface-curses-forms.ads.m4 index 9123f9d9..e6570c28 100644 --- a/Ada95/gen/terminal_interface-curses-forms.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.26 $ +-- $Revision: 1.27 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Form_Base_Defs') diff --git a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 index 1c42bbeb..6a5ab809 100644 --- a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 index 87ffadc7..696149b9 100644 --- a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/gen/terminal_interface-curses-menus.ads.m4 b/Ada95/gen/terminal_interface-curses-menus.ads.m4 index ba620792..6faa0539 100644 --- a/Ada95/gen/terminal_interface-curses-menus.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.23 $ +-- $Revision: 1.24 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Menu_Base_Defs') diff --git a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 index 84eeacb2..bb9516f7 100644 --- a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.21 $ +-- $Revision: 1.22 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Mouse_Base_Defs') diff --git a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 index 4b9a8581..e6def9b0 100644 --- a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/gen/terminal_interface-curses-panels.ads.m4 b/Ada95/gen/terminal_interface-curses-panels.ads.m4 index 7d571b9e..71252180 100644 --- a/Ada95/gen/terminal_interface-curses-panels.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-panels.ads.m4 @@ -37,9 +37,8 @@ include(M4MACRO)dnl -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.16 $ +-- $Revision: 1.17 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; diff --git a/Ada95/gen/terminal_interface-curses.ads.m4 b/Ada95/gen/terminal_interface-curses.ads.m4 index bd879cdd..a8e9795b 100644 --- a/Ada95/gen/terminal_interface-curses.ads.m4 +++ b/Ada95/gen/terminal_interface-curses.ads.m4 @@ -36,9 +36,8 @@ include(M4MACRO)---------------------------------------------------------------- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.30 $ +-- $Revision: 1.31 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Base_Defs') diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in index 23cf94f8..8c8dd72f 100644 --- a/Ada95/samples/Makefile.in +++ b/Ada95/samples/Makefile.in @@ -27,10 +27,9 @@ ############################################################################## # # Author: Juergen Pfeifer, 1996 -# Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en # # Version Control -# $Revision: 1.29 $ +# $Revision: 1.30 $ # .SUFFIXES: diff --git a/Ada95/samples/ncurses2-getopt.adb b/Ada95/samples/ncurses2-getopt.adb index 93f17139..176073b0 100644 --- a/Ada95/samples/ncurses2-getopt.adb +++ b/Ada95/samples/ncurses2-getopt.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000 Free Software Foundation, Inc. -- +-- Copyright (c) 2000,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 -- @@ -35,7 +35,7 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- A simplified version of the GNU getopt function @@ -47,9 +47,7 @@ with Ada.Text_IO; use Ada.Text_IO; package body ncurses2.getopt is - opterr : Character := Character'Val (1); optopt : Character := '?'; - initialized : Boolean := False; nextchar : Natural := 0; diff --git a/Ada95/samples/ncurses2-m.adb b/Ada95/samples/ncurses2-m.adb index d4f2b8a0..214c735b 100644 --- a/Ada95/samples/ncurses2-m.adb +++ b/Ada95/samples/ncurses2-m.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000 Free Software Foundation, Inc. -- +-- Copyright (c) 2000,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 -- @@ -35,7 +35,7 @@ ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno 2000 -- Version Control --- $Revision: 1.1 $ +-- $Revision: 1.2 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- TODO use Default_Character where appropriate @@ -302,7 +302,6 @@ package body ncurses2.m is c : Integer; c2 : Character; optind : Integer := 1; -- must be initialized to one. - type stringa is access String; optarg : getopt.stringa; length : Integer; diff --git a/Ada95/samples/rain.adb b/Ada95/samples/rain.adb index f769733c..c576f3f3 100644 --- a/Ada95/samples/rain.adb +++ b/Ada95/samples/rain.adb @@ -35,9 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Laurent Pautet -- Modified by: Juergen Pfeifer, 1997 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.5 $ +-- $Revision: 1.6 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- -- diff --git a/Ada95/samples/rain.ads b/Ada95/samples/rain.ads index 7eccb485..3ad1912c 100644 --- a/Ada95/samples/rain.ads +++ b/Ada95/samples/rain.ads @@ -35,9 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Laurent Pautet -- Modified by: Juergen Pfeifer, 1997 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.5 $ +-- $Revision: 1.6 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- -- diff --git a/Ada95/samples/sample-curses_demo-attributes.adb b/Ada95/samples/sample-curses_demo-attributes.adb index 03b6e741..c49f37d6 100644 --- a/Ada95/samples/sample-curses_demo-attributes.adb +++ b/Ada95/samples/sample-curses_demo-attributes.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-curses_demo-attributes.ads b/Ada95/samples/sample-curses_demo-attributes.ads index dc70abb9..6d9b4e8d 100644 --- a/Ada95/samples/sample-curses_demo-attributes.ads +++ b/Ada95/samples/sample-curses_demo-attributes.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Curses_Demo.Attributes is diff --git a/Ada95/samples/sample-curses_demo-mouse.adb b/Ada95/samples/sample-curses_demo-mouse.adb index 7d80bfd8..34a0ab11 100644 --- a/Ada95/samples/sample-curses_demo-mouse.adb +++ b/Ada95/samples/sample-curses_demo-mouse.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.12 $ +-- $Revision: 1.13 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-curses_demo-mouse.ads b/Ada95/samples/sample-curses_demo-mouse.ads index e7774f2b..ad78d0d0 100644 --- a/Ada95/samples/sample-curses_demo-mouse.ads +++ b/Ada95/samples/sample-curses_demo-mouse.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Curses_Demo.Mouse is diff --git a/Ada95/samples/sample-curses_demo.adb b/Ada95/samples/sample-curses_demo.adb index 60965f96..aab45c29 100644 --- a/Ada95/samples/sample-curses_demo.adb +++ b/Ada95/samples/sample-curses_demo.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-curses_demo.ads b/Ada95/samples/sample-curses_demo.ads index d90da475..ed4ad0f0 100644 --- a/Ada95/samples/sample-curses_demo.ads +++ b/Ada95/samples/sample-curses_demo.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Curses_Demo is diff --git a/Ada95/samples/sample-explanation.adb b/Ada95/samples/sample-explanation.adb index 96978183..705e02da 100644 --- a/Ada95/samples/sample-explanation.adb +++ b/Ada95/samples/sample-explanation.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.14 $ +-- $Revision: 1.15 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and diff --git a/Ada95/samples/sample-explanation.ads b/Ada95/samples/sample-explanation.ads index 50ec3fb0..18617ac4 100644 --- a/Ada95/samples/sample-explanation.ads +++ b/Ada95/samples/sample-explanation.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and diff --git a/Ada95/samples/sample-form_demo-aux.adb b/Ada95/samples/sample-form_demo-aux.adb index c7874df3..712fb5d1 100644 --- a/Ada95/samples/sample-form_demo-aux.adb +++ b/Ada95/samples/sample-form_demo-aux.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.12 $ +-- $Revision: 1.13 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; diff --git a/Ada95/samples/sample-form_demo-aux.ads b/Ada95/samples/sample-form_demo-aux.ads index 99334eaa..2317e145 100644 --- a/Ada95/samples/sample-form_demo-aux.ads +++ b/Ada95/samples/sample-form_demo-aux.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-form_demo-handler.adb b/Ada95/samples/sample-form_demo-handler.adb index 4cf1fab3..667df4dd 100644 --- a/Ada95/samples/sample-form_demo-handler.adb +++ b/Ada95/samples/sample-form_demo-handler.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Sample.Form_Demo.Aux; diff --git a/Ada95/samples/sample-form_demo-handler.ads b/Ada95/samples/sample-form_demo-handler.ads index 912a6bf2..4a564121 100644 --- a/Ada95/samples/sample-form_demo-handler.ads +++ b/Ada95/samples/sample-form_demo-handler.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-form_demo.adb b/Ada95/samples/sample-form_demo.adb index ff779c6d..c5df36f7 100644 --- a/Ada95/samples/sample-form_demo.adb +++ b/Ada95/samples/sample-form_demo.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-form_demo.ads b/Ada95/samples/sample-form_demo.ads index b9ebed6c..bd33f578 100644 --- a/Ada95/samples/sample-form_demo.ads +++ b/Ada95/samples/sample-form_demo.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Form_Demo is diff --git a/Ada95/samples/sample-function_key_setting.adb b/Ada95/samples/sample-function_key_setting.adb index 8009ab62..9c7a31e8 100644 --- a/Ada95/samples/sample-function_key_setting.adb +++ b/Ada95/samples/sample-function_key_setting.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; diff --git a/Ada95/samples/sample-function_key_setting.ads b/Ada95/samples/sample-function_key_setting.ads index fb56b21d..e20f619a 100644 --- a/Ada95/samples/sample-function_key_setting.ads +++ b/Ada95/samples/sample-function_key_setting.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-header_handler.adb b/Ada95/samples/sample-header_handler.adb index 78bb76d0..2c51e941 100644 --- a/Ada95/samples/sample-header_handler.adb +++ b/Ada95/samples/sample-header_handler.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Calendar; use Ada.Calendar; diff --git a/Ada95/samples/sample-header_handler.ads b/Ada95/samples/sample-header_handler.ads index f3a3314e..aa0a0c29 100644 --- a/Ada95/samples/sample-header_handler.ads +++ b/Ada95/samples/sample-header_handler.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-helpers.adb b/Ada95/samples/sample-helpers.adb index 8942921c..aed5a374 100644 --- a/Ada95/samples/sample-helpers.adb +++ b/Ada95/samples/sample-helpers.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-helpers.ads b/Ada95/samples/sample-helpers.ads index c8ee9cb6..c1c8e799 100644 --- a/Ada95/samples/sample-helpers.ads +++ b/Ada95/samples/sample-helpers.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-keyboard_handler.adb b/Ada95/samples/sample-keyboard_handler.adb index 92b9ccd4..60043581 100644 --- a/Ada95/samples/sample-keyboard_handler.adb +++ b/Ada95/samples/sample-keyboard_handler.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Strings; use Ada.Strings; diff --git a/Ada95/samples/sample-keyboard_handler.ads b/Ada95/samples/sample-keyboard_handler.ads index be9f8f8c..ac5b1399 100644 --- a/Ada95/samples/sample-keyboard_handler.ads +++ b/Ada95/samples/sample-keyboard_handler.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-manifest.ads b/Ada95/samples/sample-manifest.ads index 5422ef91..bb76c4cb 100644 --- a/Ada95/samples/sample-manifest.ads +++ b/Ada95/samples/sample-manifest.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo-aux.adb b/Ada95/samples/sample-menu_demo-aux.adb index 9b428813..2d2e06ac 100644 --- a/Ada95/samples/sample-menu_demo-aux.adb +++ b/Ada95/samples/sample-menu_demo-aux.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; diff --git a/Ada95/samples/sample-menu_demo-aux.ads b/Ada95/samples/sample-menu_demo-aux.ads index 5171aebb..964e38e6 100644 --- a/Ada95/samples/sample-menu_demo-aux.ads +++ b/Ada95/samples/sample-menu_demo-aux.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo-handler.adb b/Ada95/samples/sample-menu_demo-handler.adb index b203cc24..6098a250 100644 --- a/Ada95/samples/sample-menu_demo-handler.adb +++ b/Ada95/samples/sample-menu_demo-handler.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Sample.Menu_Demo.Aux; diff --git a/Ada95/samples/sample-menu_demo-handler.ads b/Ada95/samples/sample-menu_demo-handler.ads index d1b7cde4..1a82f9fd 100644 --- a/Ada95/samples/sample-menu_demo-handler.ads +++ b/Ada95/samples/sample-menu_demo-handler.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo.adb b/Ada95/samples/sample-menu_demo.adb index 8793db24..a0ebf695 100644 --- a/Ada95/samples/sample-menu_demo.adb +++ b/Ada95/samples/sample-menu_demo.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.12 $ +-- $Revision: 1.13 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo.ads b/Ada95/samples/sample-menu_demo.ads index 40b1e922..b071afc8 100644 --- a/Ada95/samples/sample-menu_demo.ads +++ b/Ada95/samples/sample-menu_demo.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Menu_Demo is diff --git a/Ada95/samples/sample-my_field_type.adb b/Ada95/samples/sample-my_field_type.adb index 15c55e95..cd289b91 100644 --- a/Ada95/samples/sample-my_field_type.adb +++ b/Ada95/samples/sample-my_field_type.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; diff --git a/Ada95/samples/sample-my_field_type.ads b/Ada95/samples/sample-my_field_type.ads index 78665039..7e74c33d 100644 --- a/Ada95/samples/sample-my_field_type.ads +++ b/Ada95/samples/sample-my_field_type.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; diff --git a/Ada95/samples/sample-text_io_demo.adb b/Ada95/samples/sample-text_io_demo.adb index 0cd370eb..43b24232 100644 --- a/Ada95/samples/sample-text_io_demo.adb +++ b/Ada95/samples/sample-text_io_demo.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Elementary_Functions; diff --git a/Ada95/samples/sample-text_io_demo.ads b/Ada95/samples/sample-text_io_demo.ads index e35ce102..d3f5a188 100644 --- a/Ada95/samples/sample-text_io_demo.ads +++ b/Ada95/samples/sample-text_io_demo.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Text_IO_Demo is diff --git a/Ada95/samples/sample.adb b/Ada95/samples/sample.adb index 0e445568..962963ed 100644 --- a/Ada95/samples/sample.adb +++ b/Ada95/samples/sample.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Text_IO; diff --git a/Ada95/samples/sample.ads b/Ada95/samples/sample.ads index 588c2114..9d0647da 100644 --- a/Ada95/samples/sample.ads +++ b/Ada95/samples/sample.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample is diff --git a/Ada95/samples/status.adb b/Ada95/samples/status.adb index e81355ea..e6581317 100644 --- a/Ada95/samples/status.adb +++ b/Ada95/samples/status.adb @@ -35,9 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Laurent Pautet -- Modified by: Juergen Pfeifer, 1997 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.6 $ +-- $Revision: 1.7 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- This package has been contributed by Laurent Pautet -- diff --git a/Ada95/samples/status.ads b/Ada95/samples/status.ads index e34c95c4..e9e3ee8b 100644 --- a/Ada95/samples/status.ads +++ b/Ada95/samples/status.ads @@ -35,9 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Laurent Pautet -- Modified by: Juergen Pfeifer, 1997 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- This package has been contributed by Laurent Pautet -- diff --git a/Ada95/samples/tour.adb b/Ada95/samples/tour.adb index b2cc6cfe..1cc91c15 100644 --- a/Ada95/samples/tour.adb +++ b/Ada95/samples/tour.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Sample; use Sample; diff --git a/Ada95/samples/tour.ads b/Ada95/samples/tour.ads index b0a81c8e..88881691 100644 --- a/Ada95/samples/tour.ads +++ b/Ada95/samples/tour.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ procedure Tour; diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in index a9c70817..01823144 100644 --- a/Ada95/src/Makefile.in +++ b/Ada95/src/Makefile.in @@ -27,10 +27,9 @@ ############################################################################## # # Author: Juergen Pfeifer, 1996 -# Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en # # Version Control -# $Revision: 1.26 $ +# $Revision: 1.28 $ # .SUFFIXES: @@ -214,19 +213,19 @@ $(ABASE).o: $(srcdir)/$(ABASE).adb $(BASEDEPS) $(ABASE)-terminfo.o: \ - $(ABASE)-terminfo.ads \ + $(srcdir)/$(ABASE)-terminfo.ads \ $(srcdir)/$(ABASE)-terminfo.adb $(BASEDEPS) $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-terminfo.adb $(ABASE)-termcap.o: \ - $(ABASE)-termcap.ads \ + $(srcdir)/$(ABASE)-termcap.ads \ $(srcdir)/$(ABASE)-termcap.adb $(BASEDEPS) $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-termcap.adb $(ABASE)-putwin.o: \ - $(ABASE)-putwin.ads \ + $(srcdir)/$(ABASE)-putwin.ads \ $(srcdir)/$(ABASE)-putwin.adb $(BASEDEPS) $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-putwin.adb diff --git a/Ada95/src/terminal_interface-curses-aux.adb b/Ada95/src/terminal_interface-curses-aux.adb index bcf83875..812e8cc1 100644 --- a/Ada95/src/terminal_interface-curses-aux.adb +++ b/Ada95/src/terminal_interface-curses-aux.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Aux is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb index bd42d3f9..5d1ef200 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.8 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads index f4eadf9e..6f0b79d7 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.Alpha is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb index 2f2d44d4..f10321b4 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.8 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads index 4e165fea..1f219508 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb index 89972d4f..84f276af 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.6 $ +-- $Revision: 1.7 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Characters.Handling; use Ada.Characters.Handling; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads index 7bff22f4..48fad09c 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb index d0273294..8be20f23 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.6 $ +-- $Revision: 1.7 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads index b9c1b00d..5a7e411f 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C.Strings; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb index 621f4c7c..1e279b4c 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.8 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads index 75652cc4..b285ca25 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.IntField is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb index 60a403bc..a86b5fe1 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.8 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads index 11398c06..6d0aef06 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb index bd3daf26..e580df35 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.8 $ +-- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads index cbb6b00c..f211bc87 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.Numeric is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb index a699f0af..cbd9e2f3 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.8 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; use Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads index 635f37ba..1e451ab8 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.RegExp is diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb index 2d8f60c0..d9ed454b 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads index c9a2abd5..d970c3a7 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user.adb b/Ada95/src/terminal_interface-curses-forms-field_types-user.adb index 5f82b098..6e348b93 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-user.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types-user.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user.ads b/Ada95/src/terminal_interface-curses-forms-field_types-user.ads index 4cca2a4d..0d09fcf2 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types-user.ads +++ b/Ada95/src/terminal_interface-curses-forms-field_types-user.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_types.adb b/Ada95/src/terminal_interface-curses-forms-field_types.adb index 7b83be65..e003058b 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_types.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_types.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-forms-field_user_data.adb b/Ada95/src/terminal_interface-curses-forms-field_user_data.adb index 04b09660..817ebe59 100644 --- a/Ada95/src/terminal_interface-curses-forms-field_user_data.adb +++ b/Ada95/src/terminal_interface-curses-forms-field_user_data.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; diff --git a/Ada95/src/terminal_interface-curses-forms-form_user_data.adb b/Ada95/src/terminal_interface-curses-forms-form_user_data.adb index 3b897faa..50c6708f 100644 --- a/Ada95/src/terminal_interface-curses-forms-form_user_data.adb +++ b/Ada95/src/terminal_interface-curses-forms-form_user_data.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- | diff --git a/Ada95/src/terminal_interface-curses-forms.adb b/Ada95/src/terminal_interface-curses-forms.adb index b9be41a8..b50b031b 100644 --- a/Ada95/src/terminal_interface-curses-forms.adb +++ b/Ada95/src/terminal_interface-curses-forms.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.21 $ +-- $Revision: 1.22 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; diff --git a/Ada95/src/terminal_interface-curses-menus-item_user_data.adb b/Ada95/src/terminal_interface-curses-menus-item_user_data.adb index 56199d10..6c35d338 100644 --- a/Ada95/src/terminal_interface-curses-menus-item_user_data.adb +++ b/Ada95/src/terminal_interface-curses-menus-item_user_data.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb b/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb index 83a3f95e..20b9e866 100644 --- a/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb +++ b/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; diff --git a/Ada95/src/terminal_interface-curses-menus.adb b/Ada95/src/terminal_interface-curses-menus.adb index 87097ce1..3dac213d 100644 --- a/Ada95/src/terminal_interface-curses-menus.adb +++ b/Ada95/src/terminal_interface-curses-menus.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.21 $ +-- $Revision: 1.22 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; diff --git a/Ada95/src/terminal_interface-curses-mouse.adb b/Ada95/src/terminal_interface-curses-mouse.adb index c2b52a05..52ac522e 100644 --- a/Ada95/src/terminal_interface-curses-mouse.adb +++ b/Ada95/src/terminal_interface-curses-mouse.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.17 $ +-- $Revision: 1.18 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; diff --git a/Ada95/src/terminal_interface-curses-panels-user_data.adb b/Ada95/src/terminal_interface-curses-panels-user_data.adb index fb2c9546..231efaef 100644 --- a/Ada95/src/terminal_interface-curses-panels-user_data.adb +++ b/Ada95/src/terminal_interface-curses-panels-user_data.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; diff --git a/Ada95/src/terminal_interface-curses-panels.adb b/Ada95/src/terminal_interface-curses-panels.adb index f0d246ad..a5af83a6 100644 --- a/Ada95/src/terminal_interface-curses-panels.adb +++ b/Ada95/src/terminal_interface-curses-panels.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; diff --git a/Ada95/src/terminal_interface-curses-putwin.adb b/Ada95/src/terminal_interface-curses-putwin.adb index 545ccaa0..986cd6b9 100644 --- a/Ada95/src/terminal_interface-curses-putwin.adb +++ b/Ada95/src/terminal_interface-curses-putwin.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 with Ada.Streams.Stream_IO.C_Streams; diff --git a/Ada95/src/terminal_interface-curses-putwin.ads b/Ada95/src/terminal_interface-curses-putwin.ads index 94220789..d302bdce 100644 --- a/Ada95/src/terminal_interface-curses-putwin.ads +++ b/Ada95/src/terminal_interface-curses-putwin.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 with Ada.Streams.Stream_IO; diff --git a/Ada95/src/terminal_interface-curses-termcap.adb b/Ada95/src/terminal_interface-curses-termcap.adb index 732a3fd6..be1da829 100644 --- a/Ada95/src/terminal_interface-curses-termcap.adb +++ b/Ada95/src/terminal_interface-curses-termcap.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 2000 Free Software Foundation, Inc. -- +-- Copyright (c) 2000,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 -- @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.6 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ @@ -112,7 +111,7 @@ package body Terminal_Interface.Curses.Termcap is Length : size_t; Txt2 : chars_ptr; type t is new char_array (0 .. 1024); -- does it need to be 1024? - Return_Buffer : t := (0 => nul); + Return_Buffer : t := (others => nul); begin To_C (Name, Txt, Length); Txt2 := tgetstr (Txt, char_array (Return_Buffer)); @@ -133,7 +132,7 @@ package body Terminal_Interface.Curses.Termcap is Length : size_t; Txt2 : chars_ptr; type t is new char_array (0 .. 1024); -- does it need to be 1024? - Phony_Txt : t := (0 => nul); + Phony_Txt : t := (others => nul); begin To_C (Name, Txt, Length); Txt2 := tgetstr (Txt, char_array (Phony_Txt)); diff --git a/Ada95/src/terminal_interface-curses-termcap.ads b/Ada95/src/terminal_interface-curses-termcap.ads index 189891ff..dd01396e 100644 --- a/Ada95/src/terminal_interface-curses-termcap.ads +++ b/Ada95/src/terminal_interface-curses-termcap.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/src/terminal_interface-curses-terminfo.adb b/Ada95/src/terminal_interface-curses-terminfo.adb index 25a8eb0a..657871ce 100644 --- a/Ada95/src/terminal_interface-curses-terminfo.adb +++ b/Ada95/src/terminal_interface-curses-terminfo.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/src/terminal_interface-curses-terminfo.ads b/Ada95/src/terminal_interface-curses-terminfo.ads index ced5d4ea..fb39bf1e 100644 --- a/Ada95/src/terminal_interface-curses-terminfo.ads +++ b/Ada95/src/terminal_interface-curses-terminfo.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.3 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ diff --git a/Ada95/src/terminal_interface-curses-text_io-aux.adb b/Ada95/src/terminal_interface-curses-text_io-aux.adb index d7fff5bb..ecd58e0e 100644 --- a/Ada95/src/terminal_interface-curses-text_io-aux.adb +++ b/Ada95/src/terminal_interface-curses-text_io-aux.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Text_IO.Aux is diff --git a/Ada95/src/terminal_interface-curses-text_io-aux.ads b/Ada95/src/terminal_interface-curses-text_io-aux.ads index eaa68cb2..e14c2e50 100644 --- a/Ada95/src/terminal_interface-curses-text_io-aux.ads +++ b/Ada95/src/terminal_interface-curses-text_io-aux.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ private package Terminal_Interface.Curses.Text_IO.Aux is diff --git a/Ada95/src/terminal_interface-curses-text_io-complex_io.adb b/Ada95/src/terminal_interface-curses-text_io-complex_io.adb index 4eb6a6d7..3b5871e2 100644 --- a/Ada95/src/terminal_interface-curses-text_io-complex_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-complex_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Text_IO.Float_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-complex_io.ads b/Ada95/src/terminal_interface-curses-text_io-complex_io.ads index 64a84908..233eb3c0 100644 --- a/Ada95/src/terminal_interface-curses-text_io-complex_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-complex_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Types; diff --git a/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb b/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb index d3a70dda..02068a06 100644 --- a/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads b/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads index 2b76feed..6f6fe75b 100644 --- a/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb index 4ad47043..528873a9 100644 --- a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads index 2bcee123..b221d7ff 100644 --- a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb b/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb index 493450a7..e74f1487 100644 --- a/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads b/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads index 6ca314dc..4b8b1366 100644 --- a/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io-float_io.adb b/Ada95/src/terminal_interface-curses-text_io-float_io.adb index ee3cb224..19d261b7 100644 --- a/Ada95/src/terminal_interface-curses-text_io-float_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-float_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-float_io.ads b/Ada95/src/terminal_interface-curses-text_io-float_io.ads index 35d47b80..08565235 100644 --- a/Ada95/src/terminal_interface-curses-text_io-float_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-float_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io-integer_io.adb b/Ada95/src/terminal_interface-curses-text_io-integer_io.adb index fee7e0eb..e694e082 100644 --- a/Ada95/src/terminal_interface-curses-text_io-integer_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-integer_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-integer_io.ads b/Ada95/src/terminal_interface-curses-text_io-integer_io.ads index ba6cb145..d8b169a7 100644 --- a/Ada95/src/terminal_interface-curses-text_io-integer_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-integer_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io-modular_io.adb b/Ada95/src/terminal_interface-curses-text_io-modular_io.adb index 0d107aa1..8cc1d4a6 100644 --- a/Ada95/src/terminal_interface-curses-text_io-modular_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io-modular_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-text_io-modular_io.ads b/Ada95/src/terminal_interface-curses-text_io-modular_io.ads index a539ac61..618706fc 100644 --- a/Ada95/src/terminal_interface-curses-text_io-modular_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io-modular_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.10 $ +-- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic diff --git a/Ada95/src/terminal_interface-curses-text_io.adb b/Ada95/src/terminal_interface-curses-text_io.adb index 01076921..cbf1d540 100644 --- a/Ada95/src/terminal_interface-curses-text_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Text_IO is diff --git a/Ada95/src/terminal_interface-curses-text_io.ads b/Ada95/src/terminal_interface-curses-text_io.ads index d5192248..2f6c48a1 100644 --- a/Ada95/src/terminal_interface-curses-text_io.ads +++ b/Ada95/src/terminal_interface-curses-text_io.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.12 $ +-- $Revision: 1.13 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; diff --git a/Ada95/src/terminal_interface-curses-trace.adb_p b/Ada95/src/terminal_interface-curses-trace.adb_p index a61ef4d4..6b510d91 100644 --- a/Ada95/src/terminal_interface-curses-trace.adb_p +++ b/Ada95/src/terminal_interface-curses-trace.adb_p @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.4 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ #if ADA_TRACE then diff --git a/Ada95/src/terminal_interface-curses.adb b/Ada95/src/terminal_interface-curses.adb index f196f3b5..0349c80d 100644 --- a/Ada95/src/terminal_interface-curses.adb +++ b/Ada95/src/terminal_interface-curses.adb @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.28 $ +-- $Revision: 1.29 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; diff --git a/Ada95/src/terminal_interface.ads b/Ada95/src/terminal_interface.ads index c7c0984d..eaaeea9f 100644 --- a/Ada95/src/terminal_interface.ads +++ b/Ada95/src/terminal_interface.ads @@ -34,9 +34,8 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.11 $ +-- $Revision: 1.12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Terminal_Interface is diff --git a/INSTALL b/INSTALL index a1c56ebb..8743d494 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ --- $Id: INSTALL,v 1.56 2002/09/01 22:42:11 tom Exp $ +-- $Id: INSTALL,v 1.71 2004/02/07 21:06:05 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -168,6 +168,11 @@ INSTALLATION PROCEDURE: databases are SVr4-compatible, but most seem to be. Exceptions include DEC's Digital Unix (formerly known as OSF/1). + If you run the test programs WITHOUT installing terminfo, ncurses may + read the termcap file and cache that in $HOME/.terminfo, which will + thereafter be used instead of the terminfo database. See the comments + on "--enable-getcap-cache", to see why this is a Bad Thing. + It is possible to configure ncurses to use other terminfo database formats. A few are provided as examples in the include-directory (see --with-caps). @@ -283,6 +288,12 @@ SUMMARY OF CONFIGURE OPTIONS: Compile without hashmap scrolling-optimization code. This algorithm is the default. + --disable-home-terminfo + The $HOME/.terminfo directory is normally added to ncurses' search + list for reading/writing terminfo entries, since that directory is + more likely writable than the system terminfo database. Use this + option to disable the feature altogether. + --disable-leaks For testing, compile-in code that frees memory that normally would not be freed, to simplify analysis of memory-leaks. @@ -312,10 +323,6 @@ SUMMARY OF CONFIGURE OPTIONS: Compile without scroll-hints code. This option is ignored when hashmap scrolling is configured, which is the default. - --enable-add-ons=DIR... - This is used to check if this package is a glibc add-on. This is used - only by the glibc makefiles. - --enable-assertions For testing, compile-in assertion code. This is used only for a few places where ncurses cannot easily recover by returning an error code. @@ -454,6 +461,11 @@ SUMMARY OF CONFIGURE OPTIONS: --enable-xmc-glitch Compile-in support experimental xmc (magic cookie) code. + --with-abi-version=NUM + Override the ABI version, which is used in shared library filenames. + Normally this is the same as the release version; some ports have + special requirements for compatibility. + --with-ada-compiler=CMD Specify the Ada95 compiler command (default "gnatmake") @@ -472,7 +484,7 @@ SUMMARY OF CONFIGURE OPTIONS: --with-build-cc=XXX If cross-compiling, specify a host C compiler, which is needed to - compile a few utilties which generate source modules for ncurses. + compile a few utilities which generate source modules for ncurses. If you do not give this option, the configure script checks if the $BUILD_CC variable is set, and otherwise defaults to gcc or cc. @@ -482,7 +494,7 @@ SUMMARY OF CONFIGURE OPTIONS: host compiler. --with-build-cppflags=XXX - If cross-compiling, specify the host C preprocesor-flags. You might + If cross-compiling, specify the host C preprocessor-flags. You might need to do this if the target compiler has unusual flags which confuse the host compiler. @@ -544,9 +556,25 @@ SUMMARY OF CONFIGURE OPTIONS: NOTE: a few systems build shared libraries with fixed pathnames; this option probably will not work for those configurations. - --with-libtool - Generate libraries with libtool. If this option is selected, then - it overrides all other library model specifications. + --with-libtool[=XXX] + Generate libraries with libtool. If this option is selected, then it + overrides all other library model specifications. Note that libtool + must already be installed, uses makefile rules dependent on GNU make, + and does not promise to follow the version numbering convention of + other shared libraries on your system. However, if the --with-shared + option does not succeed, you may get better results with this option. + + If a parameter value is given, it must be the full pathname of the + particular version of libtool, e.g., + /usr/bin/libtool-1.2.3 + + --with-manpage-aliases + Tell the configure script you wish to create entries in the + man-directory for aliases to manpages which list them, e.g., the + functions in the panel manpage. This is the default. You can disable + it if your man program does this. You can also disable + --with-manpage-symlinks to install files containing a ".so" command + rather than symbolic links. --with-manpage-format=XXX Tell the configure script how you would like to install man-pages. The @@ -595,6 +623,12 @@ SUMMARY OF CONFIGURE OPTIONS: --with-rcs-ids Compile-in RCS identifiers. Most of the C files have an identifier. + --with-rel-version=NUM + Override the release version, which may be used in shared library + filenames. This consists of a major and minor version number separated + by ".". Normally the major version number is the same as the ABI + version; some ports have special requirements for compatibility. + --with-shared Generate shared-libraries. The names given depend on the system for which you are building, typically using a ".so" suffix, along with @@ -609,6 +643,9 @@ SUMMARY OF CONFIGURE OPTIONS: This is normally chosen automatically based on the type of system which you are building on. We use it for testing the configure script. + --with-sysmouse + use FreeBSD sysmouse interface provide mouse support on the console. + --with-system-type=XXX For testing, override the derived host system-type which is used to decide things such as the linker commands used to build shared @@ -630,6 +667,10 @@ SUMMARY OF CONFIGURE OPTIONS: Specify a search-list of termcap files which will be compiled into the ncurses library (default: /etc/termcap:/usr/share/misc/termcap) + --with-trace + Configure the trace() function as part of the all models of the ncurses + library. Normally it is part of the debug (libncurses_g) library only. + --without-ada Suppress the configure script's check for Ada95, do not build the Ada95 binding and related demo. @@ -673,7 +714,53 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES: you may encounter when building a system with different versions of ncurses: - 5.3 (pre-release) + 5.4 (February 8, 2004) + Interface changes: + + + add the remaining functions for X/Open curses wide-character support. + These are only available if the library is configured using the + --enable-widec option. + pecho_wchar() + slk_wset() + + + write getyx() and related 2-return macros in terms of getcury(), + getcurx(), etc. + + + simplify ifdef for bool declaration in curses.h + + + modify ifdef's in curses.h that disabled use of __attribute__() for + g++, since recent versions implement the cases which ncurses uses. + + + change some interfaces to use const: + define_key() + mvprintw() + mvwprintw() + printw() + vw_printw() + winsnstr() + wprintw() + + Added extensions: + key_defined() + Added internal functions: + _nc_get_locale() + _nc_insert_ch() + _nc_is_charable() wide + _nc_locale_breaks_acs() + _nc_pathlast() + _nc_to_char() wide + _nc_to_widechar() wide + _nc_tparm_analyze() + _nc_trace_bufcat() debug + _nc_unicode_locale() + Removed internal functions: + _nc_outstr() + _nc_sigaction() + Modified internal functions: + _nc_remove_string() + _nc_retrace_chtype() + + 5.3 (October 12, 2002) Interface changes: + change type for bool used in headers to NCURSES_BOOL, which usually @@ -693,9 +780,13 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES: resize_term() Added internal functions: _nc_altcharset_name() debug + _nc_reset_colors() + _nc_retrace_bool() debug + _nc_retrace_unsigned() debug _nc_rootname() _nc_trace_ttymode() debug _nc_varargs() debug + _nc_visbufn() debug _nc_wgetch() Removed internal functions: _nc_background() @@ -895,31 +986,34 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES: IF YOU ARE A SYSTEM INTEGRATOR: ------------------------------ - Beginning with 1.9.9, the ncurses distribution includes both a tset - utility and /usr/share/tabset directory. If you are installing ncurses, - it is no longer either necessary or desirable to install tset-jv. - Configuration and Installation: - Configure with --prefix=/usr to make the install productions put - libraries and headers in the correct locations (overwriting any - previous curses libraries and headers). This will put the terminfo - hierarchy under /usr/share/terminfo; you may want to override this with - --datadir=/usr/share/misc; terminfo and tabset are installed under the - data directory. - - Please configure the ncurses library in a pure-terminfo mode; that - is, with the --disable-termcap option. This will make the ncurses - library smaller and faster. The ncurses library includes a termcap - emulation that queries the terminfo database, so even applications - that use raw termcap to query terminal characteristics will win - (providing you recompile and relink them!). - - If you must configure with termcap fallback enabled, you may also - wish to use the --enable-getcap option. This option speeds up - termcap-based startups, at the expense of not allowing personal - termcap entries to reference the terminfo tree. See the code in - ncurses/tinfo/read_termcap.c for details. + On platforms where ncurses is assumed to be installed in /usr/lib, + the configure script uses "/usr" as a default: + + Linux, FreeBSD, NetBSD, OpenBSD, Cygwin + + For other platforms, the default is "/usr/local". See the discussion + of the "--disable-overwrite" option. + + The location of the terminfo is set indirectly by the "--datadir" + configure option, e.g., /usr/share/terminfo, given a datadir of + /usr/share. You may want to override this if you are installing + ncurses libraries in nonstandard locations, but wish to share the + terminfo database. + + Normally the ncurses library is configured in a pure-terminfo mode; + that is, with the --disable-termcap option. This makes the ncurses + library smaller and faster. The ncurses library includes a termcap + emulation that queries the terminfo database, so even applications that + use raw termcap to query terminal characteristics will win (providing + you recompile and relink them!). + + If you must configure with termcap fallback enabled, you may also wish + to use the --enable-getcap option. This speeds up termcap-based + startups, at the expense of not allowing personal termcap entries to + reference the terminfo tree. See comments in + ncurses/tinfo/read_termcap.c for further details. Note that if you have $TERMCAP set, ncurses will use that value to locate termcap data. In particular, running from xterm will @@ -939,11 +1033,11 @@ IF YOU ARE A SYSTEM INTEGRATOR: Naming the Console Terminal - In various Linuxes (and possibly elsewhere) there has been a practice - of designating the system console driver type as `console'. Please - do not do this any more! It complicates peoples' lives, because it - can mean that several different terminfo entries from different - operating systems all logically want to be called `console'. + In various systems there has been a practice of designating the system + console driver type as `console'. Please do not do this! It + complicates peoples' lives, because it can mean that several different + terminfo entries from different operating systems all logically want to + be called `console'. Please pick a name unique to your console driver and set that up in the /etc/inittab table or local equivalent. Send the entry to the diff --git a/MANIFEST b/MANIFEST index 869e3bdb..3d2297e1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -166,13 +166,11 @@ ./Ada95/src/terminal_interface.ads ./INSTALL ./MANIFEST -./Makefile.glibc ./Makefile.in ./Makefile.os2 ./NEWS ./README ./README.emx -./README.glibc ./TO-DO ./aclocal.m4 ./announce.html.in @@ -394,6 +392,7 @@ ./doc/html/man/form_win.3x.html ./doc/html/man/infocmp.1m.html ./doc/html/man/infotocap.1m.html +./doc/html/man/key_defined.3x.html ./doc/html/man/keybound.3x.html ./doc/html/man/keyok.3x.html ./doc/html/man/menu.3x.html @@ -593,6 +592,7 @@ ./man/form_win.3x ./man/infocmp.1m ./man/infotocap.1m +./man/key_defined.3x ./man/keybound.3x ./man/keyok.3x ./man/make_sed.sh @@ -673,6 +673,7 @@ ./misc/chkdef.cmd ./misc/cleantic.cmd ./misc/cmpdef.cmd +./misc/csort ./misc/emx.src ./misc/form.def ./misc/form.ref @@ -706,6 +707,7 @@ ./ncurses/base/MKunctrl.awk ./ncurses/base/README ./ncurses/base/define_key.c +./ncurses/base/key_defined.c ./ncurses/base/keybound.c ./ncurses/base/keyok.c ./ncurses/base/lib_addch.c @@ -736,7 +738,6 @@ ./ncurses/base/lib_initscr.c ./ncurses/base/lib_insch.c ./ncurses/base/lib_insdel.c -./ncurses/base/lib_insstr.c ./ncurses/base/lib_instr.c ./ncurses/base/lib_isendwin.c ./ncurses/base/lib_leaveok.c @@ -861,6 +862,8 @@ ./ncurses/tty/tty_display.h ./ncurses/tty/tty_input.h ./ncurses/tty/tty_update.c +./ncurses/widechar/charable.c +./ncurses/widechar/lib_add_wch.c ./ncurses/widechar/lib_box_set.c ./ncurses/widechar/lib_cchar.c ./ncurses/widechar/lib_erasewchar.c @@ -869,9 +872,10 @@ ./ncurses/widechar/lib_hline_set.c ./ncurses/widechar/lib_in_wch.c ./ncurses/widechar/lib_in_wchnstr.c -./ncurses/widechar/lib_ins_nwstr.c ./ncurses/widechar/lib_ins_wch.c ./ncurses/widechar/lib_inwstr.c +./ncurses/widechar/lib_pecho_wchar.c +./ncurses/widechar/lib_slk_wset.c ./ncurses/widechar/lib_unget_wch.c ./ncurses/widechar/lib_vid_attr.c ./ncurses/widechar/lib_vline_set.c @@ -913,12 +917,6 @@ ./progs/toe.c ./progs/tput.c ./progs/tset.c -./sysdeps/unix/sysv/linux/Makefile -./sysdeps/unix/sysv/linux/alpha/configure -./sysdeps/unix/sysv/linux/configure -./sysdeps/unix/sysv/linux/edit_man.sed -./sysdeps/unix/sysv/linux/edit_man.sh -./sysdeps/unix/sysv/linux/run_tic.sh ./tack/COPYING ./tack/HISTORY ./tack/Makefile.in @@ -945,15 +943,25 @@ ./tar-copy.sh ./test/Makefile.in ./test/README +./test/aclocal.m4 +./test/background.c ./test/blue.c ./test/bs.6 ./test/bs.c ./test/cardfile.c ./test/cardfile.dat +./test/color_set.c ./test/configure ./test/configure.in +./test/demo_defkey.c +./test/demo_forms.c +./test/demo_keyok.c +./test/demo_menus.c +./test/demo_panels.c ./test/ditto.c ./test/dots.c +./test/edit_field.c +./test/edit_field.h ./test/filter.c ./test/firework.c ./test/firstlast.c @@ -961,8 +969,11 @@ ./test/gdc.c ./test/hanoi.c ./test/hashtest.c +./test/ins_wide.c +./test/inserts.c ./test/keynames.c ./test/knight.c +./test/listused.sh ./test/lrtest.c ./test/modules ./test/ncurses.c diff --git a/Makefile.glibc b/Makefile.glibc deleted file mode 100644 index 2535e9f3..00000000 --- a/Makefile.glibc +++ /dev/null @@ -1,405 +0,0 @@ -# Copyright (C) 1997,1998 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public -# License along with the GNU C Library; see the file COPYING.LIB. If not, -# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# -# Makefile for ncurses part. -# -subdir := ncurses - -ncurses-version = 4.2 -form-version = $(ncurses-version) -menu-version = $(ncurses-version) -panel-version = $(ncurses-version) - -extras := form menu ncurses panel - -extra-libs = $(extras:%=lib%) -# These libraries will be built in the `others' pass rather than -# the `lib' pass, because they depend on libc.so being built already. -extra-libs-others = $(extra-libs) - -# The sources are found in the appropriate subdir. -subdir-dirs = $(extras) progs test -vpath %.c $(subdir-dirs) -vpath %.h $(subdir-dirs) - -libform-routines = \ - fld_arg \ - fld_attr \ - fld_current \ - fld_def \ - fld_dup \ - fld_ftchoice \ - fld_ftlink \ - fld_info \ - fld_just \ - fld_link \ - fld_max \ - fld_move \ - fld_newftyp \ - fld_opts \ - fld_pad \ - fld_page \ - fld_stat \ - fld_type \ - fld_user \ - frm_cursor \ - frm_data \ - frm_def \ - frm_driver \ - frm_hook \ - frm_opts \ - frm_page \ - frm_post \ - frm_req_name \ - frm_scale \ - frm_sub \ - frm_user \ - frm_win \ - fty_alnum \ - fty_alpha \ - fty_enum \ - fty_int \ - fty_ipv4 \ - fty_num \ - fty_regex - -libncurses-routines = \ - base/define_key \ - base/keybound \ - base/keyok \ - base/lib_addch \ - base/lib_addstr \ - base/lib_beep \ - base/lib_bkgd \ - base/lib_box \ - base/lib_chgat \ - base/lib_clear \ - base/lib_clearok \ - base/lib_clrbot \ - base/lib_clreol \ - base/lib_color \ - base/lib_colorset \ - base/lib_delch \ - base/lib_delwin \ - base/lib_dft_fgbg \ - base/lib_echo \ - base/lib_endwin \ - base/lib_erase \ - base/lib_flash \ - base/lib_freeall \ - base/lib_getch \ - base/lib_getstr \ - base/lib_hline \ - base/lib_immedok \ - base/lib_inchstr \ - base/lib_initscr \ - base/lib_insch \ - base/lib_insdel \ - base/lib_insstr \ - base/lib_instr \ - base/lib_isendwin \ - base/lib_leaveok \ - base/lib_mouse \ - base/lib_move \ - base/lib_mvwin \ - base/lib_newterm \ - base/lib_newwin \ - base/lib_nl \ - base/lib_overlay \ - base/lib_pad \ - base/lib_printw \ - base/lib_redrawln \ - base/lib_refresh \ - base/lib_restart \ - base/lib_scanw \ - base/lib_screen \ - base/lib_scroll \ - base/lib_scrollok \ - base/lib_scrreg \ - base/lib_set_term \ - base/lib_slk \ - base/lib_slkatr_set \ - base/lib_slkatrof \ - base/lib_slkatron \ - base/lib_slkatrset \ - base/lib_slkattr \ - base/lib_slkclear \ - base/lib_slkcolor \ - base/lib_slkinit \ - base/lib_slklab \ - base/lib_slkrefr \ - base/lib_slkset \ - base/lib_slktouch \ - base/lib_touch \ - base/lib_ungetch \ - base/lib_vline \ - base/lib_wattroff \ - base/lib_wattron \ - base/lib_winch \ - base/lib_window \ - base/memmove \ - base/nc_panel \ - base/resizeterm \ - base/safe_sprintf \ - base/sigaction \ - base/tries \ - base/version \ - base/vsscanf \ - base/wresize \ - codes \ - comp_captab \ - expanded \ - fallback \ - lib_gen \ - lib_keyname \ - names \ - tinfo/access \ - tinfo/add_tries \ - tinfo/alloc_entry \ - tinfo/alloc_ttype \ - tinfo/captoinfo \ - tinfo/comp_error \ - tinfo/comp_expand \ - tinfo/comp_hash \ - tinfo/comp_parse \ - tinfo/comp_scan \ - tinfo/doalloc \ - tinfo/free_ttype \ - tinfo/getenv_num \ - tinfo/home_terminfo \ - tinfo/init_keytry \ - tinfo/lib_acs \ - tinfo/lib_baudrate \ - tinfo/lib_cur_term \ - tinfo/lib_data \ - tinfo/lib_has_cap \ - tinfo/lib_kernel \ - tinfo/lib_longname \ - tinfo/lib_napms \ - tinfo/lib_options \ - tinfo/lib_print \ - tinfo/lib_raw \ - tinfo/lib_setup \ - tinfo/lib_termcap \ - tinfo/lib_termname \ - tinfo/lib_tgoto \ - tinfo/lib_ti \ - tinfo/lib_tparm \ - tinfo/lib_tputs \ - tinfo/lib_ttyflags \ - tinfo/name_match \ - tinfo/parse_entry \ - tinfo/read_entry \ - tinfo/read_termcap \ - tinfo/setbuf \ - tinfo/strings \ - tinfo/write_entry \ - trace/lib_trace \ - trace/lib_traceatr \ - trace/lib_tracebits \ - trace/lib_tracechr \ - trace/lib_tracedmp \ - trace/lib_tracemse \ - trace/trace_buf \ - trace/trace_tries \ - trace/trace_xnames \ - trace/varargs \ - trace/visbuf \ - tty/hardscroll \ - tty/hashmap \ - tty/lib_mvcur \ - tty/lib_tstp \ - tty/lib_twait \ - tty/lib_vidattr \ - tty/tty_update \ - unctrl - -libmenu-routines = \ - m_attribs \ - m_cursor \ - m_driver \ - m_format \ - m_global \ - m_hook \ - m_item_cur \ - m_item_nam \ - m_item_new \ - m_item_opt \ - m_item_top \ - m_item_use \ - m_item_val \ - m_item_vis \ - m_items \ - m_new \ - m_opts \ - m_pad \ - m_pattern \ - m_post \ - m_req_name \ - m_scale \ - m_spacing \ - m_sub \ - m_userptr \ - m_win - -libpanel-routines = \ - panel \ - p_above \ - p_below \ - p_bottom \ - p_delete \ - p_hide \ - p_hidden \ - p_move \ - p_new \ - p_replace \ - p_show \ - p_top \ - p_update \ - p_user \ - p_win - -headers = curses.h eti.h form.h menu.h panel.h term.h termcap.h \ - unctrl.h -others = clear infocmp tic toe tput tset -install-bin = $(others) - -clear-objs = clear.o -infocmp-objs = infocmp.o dump_entry.o -tic-objs = tic.o dump_entry.o -toe-objs = toe.o dump_entry.o -tput-objs = tput.o -tset-objs = tset.o dump_entry.o -extra-objs = $(tic-objs) $(toe-objs) $(infocmp-objs) $(clear-objs) \ - $(tput-objs) $(tset-objs) - -test-srcs = blue bs cardfile ditto firework firstlast gdc hanoi hashtest knight \ - lrtest ncurses newdemo rain tclock testaddch testcurs \ - testscanw view worm xmas - -include ../Rules - -ifndef tabsetdir -tabsetdir = $(datadir)/tabset -endif -ifndef inst_tabsetdir -inst_tabsetdir = $(install_root)/$(tabsetdir) -endif - -ifndef terminfodir -terminfodir = $(datadir)/terminfo -endif -ifndef inst_terminfodir -inst_terminfodir = $(install_root)/$(terminfodir) -endif - -ifndef mandir -mandir = $(prefix)/man -endif - -ifndef inst_mandir -inst_mandir = $(install_root)/$(mandir) -endif - -CPPFLAGS += -DTERMINFO='"$(terminfodir)"' -Iinclude -Iform -Incurses \ - -Imenu -Ipanel -Iprogs -Itest - -ifneq ($(strip $(objpfx)),) -CPPFLAGS += -I$(objpfx) -endif - -LDLIBS-tclock = math/libm - -tests: $(test-srcs:%=$(objpfx)%) - -$(objpfx)clear: $(addprefix $(objpfx),$(clear-objs)) -$(objpfx)infocmp: $(addprefix $(objpfx),$(infocmp-objs)) -$(objpfx)tic: $(addprefix $(objpfx),$(tic-objs)) -$(objpfx)toe: $(addprefix $(objpfx),$(toe-objs)) -$(objpfx)tput: $(addprefix $(objpfx),$(tput-objs)) -$(objpfx)tset: $(addprefix $(objpfx),$(tset-objs)) - -ifeq ($(build-shared),yes) -$(others:%=$(objpfx)%): $(objpfx)libncurses.so -else -$(others:%=$(objpfx)%): $(objpfx)libncurses.a -endif - -$(test-srcs:%=$(objpfx)%): $(objpfx)libform.a $(objpfx)libmenu.a \ - $(objpfx)libpanel.a $(objpfx)libncurses.a - -# Depend on libc.so so a DT_NEEDED is generated in the shared objects. -# This ensures they will load libc.so for needed symbols if loaded by -# a statically-linked program that hasn't already loaded it. -$(extras:%=$(objpfx)lib%.so): $(common-objpfx)libc.so - -subdir_install: $(inst_libdir)/libtermcap.a $(inst_libdir)/libcurses.a \ - $(inst_bindir)/reset $(inst_bindir)/captoinfo - -$(inst_libdir)/libtermcap.a $(inst_libdir)/libcurses.a: \ - $(inst_libdir)/libncurses.a - $(make-link) - -$(inst_bindir)/reset: $(inst_bindir)/tset - $(make-link) - -$(inst_bindir)/captoinfo: $(inst_bindir)/tic - $(make-link) - -ifeq (yes,$(build-shared)) -subdir_install: $(inst_libdir)/libtermcap.so $(inst_libdir)/libcurses.so - -$(inst_libdir)/libtermcap.so $(inst_libdir)/libcurses.so: \ - $(inst_libdir)/libncurses.so - $(make-link) -endif - -subdir_install: $(inst_mandir)/man5/terminfo.5 - -$(inst_mandir)/man5/terminfo.5: $(objpfx)terminfo.5 $(wildcard man/*.[0-9]*) - $(make-target-directory) - sh $(edit_man-sh) $(prefix) $(inst_mandir) $(edit_man-sed) $^ - -subdir_install: $(inst_tabsetdir)/std - -$(inst_tabsetdir)/std: \ - $(filter-out misc/tabset/CVS, $(wildcard misc/tabset/*)) - $(make-target-directory) - for f in $^; do \ - echo installing $$f; \ - $(INSTALL_DATA) $$f $(inst_tabsetdir); \ - done - - -ifeq (no,$(cross-compiling)) -subdir_install: $(inst_terminfodir)/v/vt100 - -$(inst_terminfodir)/v/vt100: misc/terminfo.src $(objpfx)tic - $(make-target-directory) - sh $(run_tic-sh) $(common-objpfx) misc $(terminfodir) \ - $(install_root) -endif - -subdir_distclean subdir_realclean: - -rm -f $(addprefix $(objpfx), MKterm.h.awk codes.c \ - comp_captab.c confdefs.h config.log curses.h \ - expanded.c fallback.c hashsize.h keys.tries \ - lib_gen.c lib_keyname.c names.c ncurses_cfg.h \ - nomacros.h parametrized.h term.h termcap.h \ - terminfo.5 termsort.c unctrl.c unctrl.h) diff --git a/NEWS b/NEWS index 8ce31076..3f2c2d29 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ --- $Id: NEWS,v 1.714 2002/10/12 22:35:42 tom Exp $ +-- $Id: NEWS,v 1.797 2004/02/08 21:15:26 tom Exp $ This is a log of changes that ncurses has gone through since Zeyd started working with Pavel Curtis' original work, pcurses, in 1992. @@ -6,6 +6,788 @@ working with Pavel Curtis' original work, pcurses, in 1992. Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim. Changes since 1.9.9e are recorded by Thomas Dickey. +20040208 5.4 release for upload to ftp.gnu.org + + update TO-DO. + +20040207 pre-release + + minor fixes to _nc_tparm_analyze(), i.e., do not count %i as a param, + and do not count %d if it follows a %p. + + correct an inconsistency between handling of codes in the 128-255 + range, e.g., as illustrated by test/ncurses.c f/F tests. In POSIX + locale, the latter did not show printable results, while the former + did. + + modify MKlib_gen.sh to compensate for broken C preprocessor on Mac + OS X, which alters "%%" to "% % " (report by Robert Simms, fix + verified by Scott Corscadden). + +20040131 pre-release + + modify SCREEN struct to align it between normal/wide curses flavors + to simplify future changes to build a single version of libtinfo + (patch by Stanislav Ievlev). + + document handling of carriage return by addch() in manpage. + + document special features of unctrl() in manpage. + + documented interface changes in INSTALL. + + corrected control-char test in lib_addch.c to account for locale + (Debian #230335, cf: 971206). + + updated test/configure.in to use AC_EXEEXT and AC_OBJEXT. + + fixes to compile Ada95 binding with Debian gnat 3.15p-4 package. + + minor configure-script fixes for older ports, e.g., BeOS R4.5. + +20040125 pre-release + + amend change to PutAttrChar() from 20030614 which computed the number + of cells for a possibly multi-cell character. The 20030614 change + forced the cell to a blank if the result from wcwidth() was not + greater than zero. However, wcwidth() called for parameters in the + range 128-255 can give this return value. The logic now simply + ensures that the number of cells is greater than zero without + modifying the displayed value. + +20040124 pre-release + + looked good for 5.4 release for upload to ftp.gnu.org (but see above) + + modify configure script check for ranlib to use AC_CHECK_TOOL, since + that works better for cross-compiling. + +20040117 pre-release + + modify lib_get_wch.c to prefer mblen/mbtowc over mbrlen/mbrtowc to + work around core dump in Solaris 8's locale support, e.g., for + zh_CN.GB18030 (report by Saravanan Bellan). + + add includes for and in configure script macro + to make check work with Tru64 4.0d. + + add terminfo entry for U/Win -TD + + add terminfo entries for SFU aka Interix aka OpenNT (Federico + Bianchi). + + modify tput's error messages to prefix them with the program name + (report by Vincent Lefevre, patch by Daniel Jacobowitz, Debian + #227586). + + correct a place in tack where exit_standout_mode was used instead of + exit_attribute_mode (patch by Jochen Voss, Debian #224443). + + modify c++/cursesf.h to use const in the Enumeration_Field method. + + remove an ambiguous (actually redundant) method from c++/cursesf.h + + make $HOME/.terminfo update optional (suggested by Stanislav Ievlev). + + improve sed script which extracts libtool's version in the + CF_WITH_LIBTOOL macro. + + add ifdef'd call to AC_PROG_LIBTOOL to CF_WITH_LIBTOOL macro (to + simplify local patch for Albert Chin-A-Young).. + + add $(CXXFLAGS) to link command in c++/Makefile.in (adapted from + patch by Albert Chin-A-Young).. + + fix a missing substitution in configure.in for "$target" needed for + HPUX .so/.sl case. + + resync CF_XOPEN_SOURCE configure macro with lynx; fixes IRIX64 and + NetBSD 1.6 conflicts with _XOPEN_SOURCE. + + make check for stdbool.h more specific, to ensure that including it + will actually define/declare bool for the configured compiler. + + rewrite ifdef's in curses.h relating NCURSES_BOOL and bool. The + intention of that is to #define NCURSES_BOOL as bool when the + compiler declares bool, and to #define bool as NCURSES_BOOL when it + does not (reported by Jim Gifford, Sam Varshavchik, cf: 20031213). + +20040110 pre-release + + change minor version to 4, i.e., ncurses 5.4 + + revised/improved terminfo entries for tvi912b, tvi920b (Benjamin C W + Sittler). + + simplified ncurses/base/version.c by defining the result from the + configure script rather than using sprintf (suggested by Stanislav + Ievlev). + + remove obsolete casts from c++/cursesw.h (reported by Stanislav + Ievlev). + + modify configure script so that when configuring for termlib, programs + such as tic are not linked with the upper-level ncurses library + (suggested by Stanislav Ievlev). + + move version.c from ncurses/base to ncurses/tinfo to allow linking + of tic, etc., using libtinfo (suggested by Stanislav Ievlev). + +20040103 + + adjust -D's to build ncursesw on OpenBSD. + + modify CF_PROG_EXT to make OS/2 build with EXEEXT. + + add pecho_wchar(). + + remove include from lib_slk_wset.c which is not needed (or + available) on older platforms. + +20031227 + + add -D's to build ncursew on FreeBSD 5.1. + + modify shared library configuration for FreeBSD 4.x/5.x to add the + soname information (request by Marc Glisse). + + modify _nc_read_tic_entry() to not use MAX_ALIAS, but PATH_MAX only + for limiting the length of a filename in the terminfo database. + + modify termname() to return the terminal name used by setupterm() + rather than $TERM, without truncating to 14 characters as documented + by X/Open (report by Stanislav Ievlev, cf: 970719). + + re-add definition for _BSD_TYPES, lost in merge (cf: 20031206). + +20031220 + + add configure option --with-manpage-format=catonly to address + behavior of BSDI, allow install of man+cat files on NetBSD, whose + behavior has diverged by requiring both to be present. + + remove leading blanks from comment-lines in manlinks.sed script to + work with Tru64 4.0d. + + add screen.linux terminfo entry (discussion on mutt-users mailing + list). + +20031213 + + add a check for tic to flag missing backslashes for termcap + continuation lines. ncurses reads the whole entry, but termcap + applications do not. + + add configure option "--with-manpage-aliases" extending + "--with-manpage-aliases" to provide the option of generating ".so" + files rather than symbolic links for manpage aliases. + + add bool definition in include/curses.h.in for configurations with no + usable C++ compiler (cf: 20030607). + + fix pathname of SigAction.h for building with --srcdir (reported by + Mike Castle). + +20031206 + + folded ncurses/base/sigaction.c into includes of ncurses/SigAction.h, + since that header is used only within ncurses/tty/lib_tstp.c, for + non-POSIX systems (discussion with Stanislav Ievlev). + + remove obsolete _nc_outstr() function (report by Stanislav Ievlev + ). + + add test/background.c and test/color_set.c + + modify color_set() function to work with color pair 0 (report by + George Andreou ). + + add configure option --with-trace, since defining TRACE seems too + awkward for some cases. + + remove a call to _nc_free_termtype() from read_termtype(), since the + corresponding buffer contents were already zeroed by a memset (cf: + 20000101). + + improve configure check for _XOPEN_SOURCE and related definitions, + adding special cases for Solaris' __EXTENSIONS__ and FreeBSD's + __BSD_TYPES (reports by Marc Glisse ). + + small fixes to compile on Solaris and IRIX64 using cc. + + correct typo in check for pre-POSIX sort options in MKkey_defs.sh + (cf: 20031101). + +20031129 + + modify _nc_gettime() to avoid a problem with arithmetic on unsigned + values (Philippe Blain). + + improve the nanosleep() logic in napms() by checking for EINTR and + restarting (Philippe Blain). + + correct expression for "%D" in lib_tgoto.c (Juha Jarvi + ). + +20031122 + + add linux-vt terminfo entry (Andrey V Lukyanov ). + + allow "\|" escape in terminfo; tic should not warn about this. + + save the full pathname of the trace-file the first time it is opened, + to avoid creating it in different directories if the application + opens and closes it while changing its working directory. + + modify configure script to provide a non-empty default for + $BROKEN_LINKER + +20031108 + + add DJGPP to special case of DOS-style drive letters potentially + appearing in TERMCAP environment variable. + + fix some spelling in comments (reports by jmc, Jonathon Gray). + + update config.guess, config.sub + +20031101 + + fix a memory leak in error-return from setupterm() (report by + Stanislav Ievlev ). + + use EXEEXT and OBJEXT consistently in makefiles. + + amend fixes for cross-compiling to use separate executable-suffix + BUILD_EXEEXT (cf: 20031018). + + modify MKkey_defs.sh to check for sort utility that does not + recognize key options, e.g., busybox (report by Peter S Mazinger + ). + + fix potential out-of-bounds indexing in _nc_infotocap() (found by + David Krause using some of the new malloc debugging features + under OpenBSD, patch by Ted Unangst). + + modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a + ".so" suffix (patch by Jonathan Ward ). + +20031025 + + update terminfo for xterm-xfree86 -TD + + add check for multiple "tc=" clauses in a termcap to tic. + + check for missing op/oc in tic. + + correct _nc_resolve_uses() and _nc_merge_entry() to allow infocmp and + tic to show cancelled capabilities. These functions were ignoring + the state of the target entry, which should be untouched if cancelled. + + correct comment in tack/output.c (Debian #215806). + + add some null-pointer checks to lib_options.c (report by Michael + Bienia). + + regenerated html documentation. + + correction to tar-copy.sh, remove a trap command that resulted in + leaving temporary files (cf: 20030510). + + remove contact/maintainer addresses for Juergen Pfeifer (his request). + +20031018 + + updated test/configure to reflect changes for libtool (cf: 20030830). + + fix several places in tack/pad.c which tested and used the parameter- + and parameterless strings inconsistently, i.e., in pad_rin(), + pad_il(), pad_indn() and pad_dl() (Debian #215805). + + minor fixes for configure script and makefiles to cleanup executables + generated when cross-compiling for DJGPP. + + modify infocmp to omit check for $TERM for operations that do not + require it, e.g., "infocmp -e" used to build fallback list (report by + Koblinger Egmont). + +20031004 + + add terminfo entries for DJGPP. + + updated note about maintainer in ncurses-intro.html + +20030927 + + update terminfo entries for gnome terminal. + + modify tack to reset colors after each color test, correct a place + where exit_standout_mode was used instead of exit_attribute_mode. + + improve tack's bce test by making it set colors other than black + on white. + + plug a potential recursion between napms() and _nc_timed_wait() + (report by Philippe Blain). + +20030920 + + add --with-rel-version option to allow workaround to allow making + libtool on Darwin generate the "same" library names as with the + --with-shared option. The Darwin ld program does not work well + with a zero as the minor-version value (request by Chris Zubrzycki). + + modify CF_MIXEDCASE_FILENAMES macro to work with cross-compiling. + + modify tack to allow it to run from fallback terminfo data. + > Philippe Blain: + + improve PutRange() by adjusting call to EmitRange() and corresponding + return-value to not emit unchanged characters on the end of the + range. + + improve a check for changed-attribute by exiting a loop when the + change is found. + + improve logic in TransformLine(), eliminating a duplicated comparison + in the clr_bol logic. + +20030913 + > Philippe Blain: + + in ncurses/tty/lib_mvcur.c, + move the label 'nonlocal' just before the second gettimeofday() to + be able to compute the diff time when 'goto nonlocal' used. + Rename 'msec' to 'microsec' in the debug-message. + + in ncurses/tty/lib_mvcur.c, + Use _nc_outch() in carriage return/newline movement instead of + putchar() which goes to stdout. Move test for xold>0 out of loop. + + in ncurses/tinfo/setbuf.c, + Set the flag SP->_buffered at the end of operations when all has been + successful (typeMalloc can fail). + + simplify NC_BUFFERED macro by moving check inside _nc_setbuf(). + +20030906 + + modify configure script to avoid using "head -1", which does not + work if POSIXLY_CORRECT (sic) is set. + + modify run_tic.in to avoid using wrong shared libraries when + cross-compiling (Dan Kegel). + +20030830 + + alter configure script help message to make it clearer that + --with-build-cc does not specify a cross-compiler (suggested by Dan + Kegel ). + + modify configure script to accommodate libtool 1.5, as well as add an + parameter to the "--with-libtool" option which can specify the + pathname of libtool (report by Chris Zubrzycki). We note that + libtool 1.5 has more than one bug in its C++ support, so it is not + able to install libncurses++, for instance, if $DESTDIR or the option + --with-install-prefix is used. + +20030823 + > Philippe Blain: + + move assignments to SP->_cursrow, SP->_curscol into online_mvcur(). + + make baudrate computation in delay_output() consistent with the + assumption in _nc_mvcur_init(), i.e., a byte is 9 bits. + +20030816 + + modify logic in waddch_literal() to take into account zh_TW.Big5 + whose multibyte sequences may contain "printable" characters, e.g., + a "g" in the sequence "\247g" (Debian #204889, cf: 20030621). + + improve storage used by _nc_safe_strcpy() by ensuring that the size + is reset based on the initialization call, in case it were called + after other strcpy/strcat calls (report by Philippe Blain). + > Philippe Blain: + + remove an unused ifdef for REAL_ATTR & WANT_CHAR + + correct a place where _cup_cost was used rather than _cuu_cost + +20030809 + + fix a small memory leak in _nc_free_termtype(). + + close trace-file if trace() is called with a zero parameter. + + free memory allocated for soft-key strings, in delscreen(). + + fix an allocation size in safe_sprintf.c for the "*" format code. + + correct safe_sprintf.c to not return a null pointer if the format + happens to be an empty string. This applies to the "configure + --enable-safe-sprintf" option (Redhat #101486). + +20030802 + + modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by + Daniel Jacobowitz). + > Philippe Blain: + + change padding for change_scroll_region to not be proportional to + the size of the scroll-region. + + correct error-return in _nc_safe_strcat(). + +20030726 + + correct limit-checks in _nc_scroll_window() (report and test-case by + Thomas Graf cf: 20011020). + + re-order configure checks for _XOPEN_SOURCE to avoid conflict with + _GNU_SOURCE check. + +20030719 + + use clr_eol in preference to blanks for bce terminals, so select and + paste will have fewer trailing blanks, e.g., when using xterm + (request by Vincent Lefevre). + + correct prototype for wunctrl() in manpage. + + add configure --with-abi-version option (discussion with Charles + Wilson). + > cygwin changes from Charles Wilson: + + aclocal.m4: on cygwin, use autodetected prefix for import + and static lib, but use "cyg" for DLL. + + include/ncurses_dll.h: correct the comments to reflect current + status of cygwin/mingw port. Fix compiler warning. + + misc/run_tic.in: ensure that tic.exe can find the uninstalled + DLL, by adding the lib-directory to the PATH variable. + + misc/terminfo.src (nxterm|xterm-color): make xterm-color + primary instead of nxterm, to match XFree86's xterm.terminfo + usage and to prevent circular links. + (rxvt): add additional codes from rxvt.org. + (rxvt-color): new alias + (rxvt-xpm): new alias + (rxvt-cygwin): like rxvt, but with special acsc codes. + (rxvt-cygwin-native): ditto. rxvt may be run under XWindows, or + with a "native" MSWin GUI. Each takes different acsc codes, + which are both different from the "normal" rxvt's acsc. + (cygwin): cygwin-in-cmd.exe window. Lots of fixes. + (cygwinDBG): ditto. + + mk-1st.awk: use "cyg" for the DLL prefix, but "lib" for import + and static libs. + +20030712 + + update config.guess, config.sub + + add triples for configuring shared libraries with the Debian + GNU/FreeBSD packages (patch by Robert Millan ). + +20030705 + + modify CF_GCC_WARNINGS so it only applies to gcc, not g++. Some + platforms have installed g++ along with the native C compiler, which + would not accept gcc warning options. + + add -D_XOPEN_SOURCE=500 when configuring with --enable-widec, to + get mbstate_t declaration on HPUX 11.11 (report by David Ellement). + + add _nc_pathlast() to get rid of casts in _nc_basename() calls. + + correct a sign-extension in wadd_wch() and wecho_wchar() from + 20030628 (report by Tomohiro KUBOTA). + + work around omission of btowc() and wctob() from wide-character + support (sic) in NetBSD 1.6 using mbtowc() and wctomb() (report by + Gabor Z Papp). + + add portability note to curs_get_wstr.3x (Debian #199957). + +20030628 + + rewrite wadd_wch() and wecho_wchar() to call waddch() and wechochar() + respectively, to avoid calling waddch_noecho() with wide-character + data, since that function assumes its input is 8-bit data. + Similarly, modify waddnwstr() to call wadd_wch(). + + remove logic from waddnstr() which transformed multibyte character + strings into wide-characters. Rewrite of waddch_literal() from + 20030621 assumes its input is raw multibyte data rather than wide + characters (report by Tomohiro KUBOTA). + +20030621 + + write getyx() and related 2-return macros in terms of getcury(), + getcurx(), etc. + + modify waddch_literal() in case an application passes bytes of a + multibyte character directly to waddch(). In this case, waddch() + must reassemble the bytes into a wide-character (report by Tomohiro + KUBOTA ). + +20030614 + + modify waddch_literal() in case a multibyte value occupies more than + two cells. + + modify PutAttrChar() to compute the number of character cells that + are used in multibyte values. This fixes a problem displaying + double-width characters (report/test by Mitsuru Chinen + ). + + add a null-pointer check for result of keyname() in _tracechar() + + modify _tracechar() to work around glibc sprintf bug. + +20030607 + + add a call to setlocale() in cursesmain.cc, making demo display + properly in a UTF-8 locale. + + add a fallback definition in curses.priv.h for MB_LEN_MAX (prompted + by discussion with Gabor Z Papp). + + use macros NCURSES_ACS() and NCURSES_WACS() to hide cast needed to + appease -Wchar-subscript with g++ 3.3 (Debian #195732). + + fix a redefinition of $RANLIB in the configure script when libtool + is used, which broke configure on Mac OS X (report by Chris Zubrzycki + ). + + simplify ifdef for bool declaration in curses.h.in (suggested by + Albert Chin-A-Young). + + remove configure script check to allow -Wconversion for older + versions of gcc (suggested by Albert Chin-A-Young). + +20030531 + + regenerated html manpages. + + modify ifdef's in curses.h.in that disabled use of __attribute__() + for g++, since recent versions implement the cases which ncurses uses + (Debian #195230). + + modify _nc_get_token() to handle a case where an entry has no + description, and capabilities begin on the same line as the entry + name. + + fix a typo in ncurses_dll.h reported by gcc 3.3. + + add an entry for key_defined.3x to man_db.renames. + +20030524 + + modify setcchar() to allow converting control characters to complex + characters (report/test by Mitsuru Chinen ). + + add tkterm entry -TD + + modify parse_entry.c to allow a terminfo entry with a leading + 2-character name (report by Don Libes). + + corrected acsc in screen.teraterm, which requires a PC-style mapping. + + fix trace statements in read_entry.c to use lseek() rather than + tell(). + + fix signed/unsigned warnings from Sun's compiler (gcc should give + these warnings, but it is unpredictable). + + modify configure script to omit -Winline for gcc 3.3, since that + feature is broken. + + modify manlinks.sed to add a few functions that were overlooked since + they return function pointers: field_init, field_term, form_init, + form_term, item_init, item_term, menu_init and menu_term. + +20030517 + + prevent recursion in wgetch() via wgetnstr() if the connection cannot + be switched between cooked/raw modes because it is not a TTY (report + by Wolfgang Gutjahr ). + + change parameter of define_key() and key_defined() to const (prompted + by Debian #192860). + + add a check in test/configure for ncurses extensions, since there + are some older versions, etc., which would not compile with the + current test programs. + + corrected demo in test/ncurses.c of wgetn_wstr(), which did not + convert wchar_t string to multibyte form before printing it. + + corrections to lib_get_wstr.c: + + null-terminate buffer passed to setcchar(), which occasionally + failed. + + map special characters such as erase- and kill-characters into + key-codes so those will work as expected even if they are not + mentioned in the terminfo. + + modify PUTC() and Charable() macros to make wide-character line + drawing work for POSIX locale on Linux console (cf: 20021221). + +20030510 + + make typography for program options in manpages consistent (report + by Miloslav Trmac ). + + correct dependencies in Ada95/src/Makefile.in, so the builds with + "--srcdir" work (report by Warren L Dodge). + + correct missing definition of $(CC) in Ada95/gen/Makefile.in + (reported by Warren L Dodge ). + + fix typos and whitespace in manpages (patch by jmc + ). + +20030503 + + fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR, + REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at + the editing position before making modifications. + + add test/demo_forms and associated test/edit_field.c demos. + + modify test/configure.in to use test/modules for the list of objects + to compile rather than using the list of programs. + +20030419 + + modify logic of acsc to use the original character if no mapping is + defined, noting that Solaris does this. + + modify ncurses 'b' test to avoid using the acs_map[] array since + 20021231 changes it to no longer contain information from the acsc + string. + + modify makefile rules in c++, progs, tack and test to ensure that + the compiler flags (e.g., $CFLAGS or $CCFLAGS) are used in the link + command (report by Jose Luis Rico Botella ). + + modify soft-key initialization to use A_REVERSE if A_STANDOUT would + not be shown when colors are used, i.e., if ncv#1 is set in the + terminfo as is done in "screen". + +20030412 + + add a test for slk_color(), in ncurses.c + + fix some issues reported by valgrind in the slk_set() and slk_wset() + code, from recent rewrite. + + modify ncurses 'E' test to use show previous label via slk_label(), + as in 'e' test. + + modify wide-character versions of NewChar(), NewChar2() macros to + ensure that the whole struct is initialized. + +20030405 + + modify setupterm() to check if the terminfo and terminal-modes have + already been read. This ensures that it does not reinvoke + def_prog_mode() when an application calls more than one function, + such as tgetent() and initscr() (report by Olaf Buddenhagen). + +20030329 + + add 'E' test to ncurses.c, to exercise slk_wset(). + + correct handling of carriage-return in wgetn_wstr(), used in demo of + slk_wset(). + + first draft of slk_wset() function. + +20030322 + + improved warnings in tic when suppressing items to fit in termcap's + 1023-byte limit. + + built a list in test/README showing which externals are being used + by either programs in the test-directory or via internal library + calls. + + adjust include-options in CF_ETIP_DEFINES to avoid missing + ncurses_dll.h, fixing special definitions that may be needed for + etip.h (reported by Greg Schafer ). + +20030315 + + minor fixes for cardfile.c, to make it write the updated fields to + a file when ^W is given. + + add/use _nc_trace_bufcat() to eliminate some fixed buffer limits in + trace code. + +20030308 + + correct a case in _nc_remove_string(), used by define_key(), to avoid + infinite loop if the given string happens to be a substring of other + strings which are assigned to keys (report by John McCutchan). + + add key_defined() function, to tell which keycode a string is bound + to (discussion with John McCutchan ). + + correct keybound(), which reported definitions in the wrong table, + i.e., the list of definitions which are disabled by keyok(). + + modify demo_keydef.c to show the details it changes, and to check + for errors. + +20030301 + + restructured test/configure script, make it work for libncursesw. + + add description of link_fieldtype() to manpage (report by + L Dee Holtsclaw ). + +20030222 + + corrected ifdef's relating to configure check for wchar_t, etc. + + if the output is a socket or other non-tty device, use 1 millisecond + for the cost in mvcur; previously it was 9 milliseconds because the + baudrate was not known. + + in _nc_get_tty_mode(), initialize the TTY buffer on error, since + glibc copies uninitialized data in that case, as noted by valgrind. + + modify tput to use the same parameter analysis as tparm() does, to + provide for user-defined strings, e.g., for xterm title, a + corresponding capability might be + title=\E]2;%p1%s^G, + + modify MKlib_gen.sh to avoid passing "#" tokens through the C + preprocessor. This works around Mac OS X's preprocessor, which + insists on adding a blank on each side of the token (report/analysis + by Kevin Murphy ). + +20030215 + + add configure check for wchar_t and wint_t types, rather than rely + on preprocessor definitions. Also work around for gcc fixinclude + bug which creates a shadow copy of curses.h if it sees these symbols + apparently typedef'd. + + if database is disabled, do not generate run_tic.sh + + minor fixes for memory-leak checking when termcap is read. + +20030208 + + add checking in tic for incomplete line-drawing character mapping. + + update configure script to reflect fix for AC_PROG_GCC_TRADITIONAL, + which is broken in autoconf 2.5x for Mac OS X 10.2.3 (report by + Gerben Wierda ). + + make return value from _nc_printf_string() consistent. Before, + depending on whether --enable-safe-sprintf was used, it might not be + cached for reallocating. + +20030201 + + minor fixes for memory-leak checking in lib_tparm.c, hardscroll.c + + correct a potentially-uninitialized value if _read_termtype() does + not read as much data as expected (report by Wolfgang Rohdewald + ). + + correct several places where the aclocal.m4 macros relied on cache + variable names which were incompatible (as usual) between autoconf + 2.13 and 2.5x, causing the test for broken-linker to give incorrect + results (reports by Gerben Wierda and Thomas Esser + ). + + do not try to open gpm mouse driver if standard output is not a tty; + the gpm library does not make this check (from bug report for dialog + by David Oliveira ). + +20030125 + + modified emx.src to correspond more closely to terminfo.src, added + emx-base to the latter -TD + + add configure option for FreeBSD sysmouse, --with-sysmouse, and + implement support for that in lib_mouse.c, lib_getch.c + +20030118 + + revert 20030105 change to can_clear_with(), does not work for the + case where the update is made on cells which are blanks with + attributes, e.g., reverse. + + improve ifdef's to guard against redefinition of wchar_t and wint_t + in curses.h (report by Urs Jansen). + +20030111 + + improve mvcur() by checking if it is safe to move when video + attributes are set (msgr), and if not, reset/restore attributes + within that function rather than doing it separately in the GoTo() + function in tty_update.c (suggested by Philippe Blain). + + add a message in run_tic.in to explain more clearly what does not + work when attempting to create a symbolic link for /usr/lib/terminfo + on OS/2 and other platforms with no symbolic links (report by John + Polterak). + + change several sed scripts to avoid using "\+" since it is not a BRE + (basic regular expression). One instance caused terminfo.5 to be + misformatted on FreeBSD (from a FreeBSD bug report by Kazuo Horikawa + ). + + correct misspelled 'wint_t' in curs_get_wch.3x (Michael Elkins). + +20030105 + + improve description of terminfo operators, especially static/dynamic + variables (comments by Mark I Manning IV ). + + demonstrate use of FIELDTYPE by modifying test/ncurses 'r' test to + use the predefined TYPE_ALPHA field-type, and by defining a + specialized type for the middle initial/name. + + fix MKterminfo.sh, another workaround for POSIXLY_CORRECT misfeature + of sed 4.0 + > Philippe Blain: + + optimize can_clear_with() a little by testing first if the parameter + is indeed a "blank". + + simplify ClrBottom() a little by allowing it to use clr_eos to clear + sections as small as one line. + + improve ClrToEOL() by checking if clr_eos is available before trying + to use it. + + use tputs() rather than putp() in a few cases in tty_update.c since + the corresponding delays are proportional to the number of lines + affected: repeat_char, clr_eos, change_scroll_region. + +20021231 + + rewrite of lib_acs.c conflicts with copying of SCREEN acs_map to/from + global acs_map[] array; removed the lines that did the copying. + +20021228 + + change some overlooked tputs() calls in scrolling code to use putp() + (report by Philippe Blain). + + modify lib_getch.c to avoid recursion via wgetnstr() when the input + is not a tty and consequently mode-changes do not work (report by + ). + + rewrote lib_acs.c to allow PutAttrChar() to decide how to render + alternate-characters, i.e., to work with Linux console and UTF-8 + locale. + + correct line/column reference in adjust_window(), needed to make + special windows such as curscr track properly when resizing (report + by Lucas Gonze ). + > Philippe Blain: + + correct the value used for blank in ClrBottom() (broken in 20000708). + + correct an off-by-one in GoTo() parameter in _nc_scrolln(). + +20021221 + + change several tputs() calls in scrolling code to use putp(), to + enable padding which may be needed for some terminals (patch by + by Philippe Blain). + + use '%' as sed substitute delimiter in run_tic script to avoid + problems with pathname delimiters such as ':' and '@' (report by John + Polterak). + + implement a workaround so that line-drawing works with screen's + crippled UTF-8 support (tested with 3.9.13). This only works with + the wide-character support (--enable-widec); the normal library will + simply suppress line-drawing when running in a UTF-8 locale in screen. + +20021214 + + allow BUILD_CC and related configure script variables to be + overridden from the environment. + + make build-tools variables in ncurses/Makefile.in consistent with + the configure script variables (report by Maciej W Rozycki). + + modify ncurses/modules to allow + configure --disable-leaks --disable-ext-funcs + to build (report by Gary Samuelson). + + fix a few places in configure.in which lacked quotes (report by + Gary Samuelson ). + + correct handling of multibyte characters in waddch_literal() which + force wrapping because they are started too late on the line (report + by Sam Varshavchik). + + small fix for CF_GNAT_VERSION to ignore the help-message which + gnatmake adds to its version-message. + > Maciej W Rozycki : + + use AC_CHECK_TOOL to get proper values for AR and LD for cross + compiling. + + use $cross_compiling variable in configure script rather than + comparing $host_alias and $target alias, since "host" is + traditionally misused in autoconf to refer to the target platform. + + change configure --help message to use "build" rather than "host" + when referring to the --with-build-XXX options. + +20021206 + + modify CF_GNAT_VERSION to print gnatmake's version, and to allow for + possible gnat versions such as 3.2 (report by Chris Lingard + ). + + modify #define's for CKILL and other default control characters in + tset to use the system's default values if they are defined. + + correct interchanged defaults for kill and interrupt characters + in tset, which caused it to report unnecessarily (Debian #171583). + + repair check for missing C++ compiler, which is broken in autoconf + 2.5x by hardcoding it to g++ (report by Martin Mokrejs). + + update config.guess, config.sub (2002-11-30) + + modify configure script to skip --with-shared, etc., when the + --with-libtool option is given, since they would be ignored anyway. + + fix to allow "configure --with-libtool --with-termlib" to build. + + modify configure script to show version number of libtool, to help + with bug reports. libtool still gets confused if the installed + ncurses libraries are old, since it ignores the -L options at some + point (tested with libtool 1.3.3 and 1.4.3). + + reorder configure script's updating of $CPPFLAGS and $CFLAGS to + prevent -I options in the user's environment from introducing + conflicts with the build -I options (may be related to reports by + Patrick Ash and George Goffe). + + rename test/define_key.c to test/demo_defkey.c, test/keyok.c to + test/demo_keyok.c to allow building these with libtool. + +20021123 + + add example program test/define_key.c for define_key(). + + add example program test/keyok.c for keyok(). + + add example program test/ins_wide.c for wins_wch() and wins_wstr(). + + modify wins_wch() and wins_wstr() to interpret tabs by using the + winsch() internal function. + + modify setcchar() to allow for wchar_t input strings that have + more than one spacing character. + +20021116 + + fix a boundary check in lib_insch.c (patch by Philippe Blain). + + change type for *printw functions from NCURSES_CONST to const + (prompted by comment by Pedro Palhoto Matos , + but really from a note on X/Open's website stating that either is + acceptable, and the latter will be used in a future revision). + + add xterm-1002, xterm-1003 terminfo entries to demonstrate changes in + lib_mouse.c (20021026) -TD + + add screen-bce, screen-s entries from screen 3.9.13 (report by + Adam Lazur ) -TD + + add mterm terminfo entries -TD + +20021109 + + split-out useful fragments in terminfo for vt100 and vt220 numeric + keypad, i.e., vt100+keypad, vt100+pfkeys, vt100+fnkeys and + vt220+keypad. The last as embedded in various entries had ka3 and + kb2 interchanged (report/discussion with Leonard den Ottolander + ). + + add check in tic for keypads consistent with vt100 layout. + + improve checks in tic for color capabilities + +20021102 + + check for missing/empty/illegal terminfo name in _nc_read_entry() + (report by Martin Mokrejs, where $TERM was set to an empty string). + + rewrote lib_insch.c, combining it with lib_insstr.c so both handle + tab and other control characters consistently (report by Philippe + Blain). + + remove an #undef for KEY_EVENT from curses.tail used in the + experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses + dpkg's build script (Debian #165897). + + fix MKlib_gen.sh, working around the ironically named POSIXLY_CORRECT + feature of GNU sed 4.0 (reported by Ervin Nemeth ). + +20021026 + + implement logic in lib_mouse.c to handle position reports which are + generated when XFree86 xterm is initialized with private modes 1002 + or 1003. These are returned to the application as the + REPORT_MOUSE_POSITION mask, which was not implemented. Tested both + with ncurses 'a' menu (prompted by discussion with Larry Riedel + ). + + modify lib_mouse.c to look for "XM" terminfo string, which allows + one to override the escape sequence used to enable/disable mouse + mode. In particular this works for XFree86 xterm private modes + 1002 and 1003. If "XM" is missing (note that this is an extended + name), lib_mouse uses the conventional private mode 1000. + + correct NOT_LOCAL() macro in lib_mvcur.c to refer to screen_columns + where it used screen_lines (report by Philippe Blain). + + correct makefile rules for the case when both --with-libtool and + --with-gpm are given (report by Mr E_T ). + + add note to terminfo manpage regarding the differences between + setaf/setab and setf/setb capabilities (report by Pavel Roskin). + +20021019 + + remove redundant initialization of TABSIZE in newterm(), since it is + already done in setupterm() (report by Philippe Blain). + + add test/inserts.c, to test winnstr() and winsch(). + + replace 'sort' in dist.mk with script that sets locale to POSIX. + + update URLs in announce.html.in (patch by Frederic L W Meunier). + + remove glibc add-on files, which are no longer needed (report by + Frederic L W Meunier). + 20021012 5.3 release for upload to ftp.gnu.org + modify ifdef's in etip.h.in to allow the etip.h header to compile with gcc 3.2 (patch by Dimitar Zhekov ). @@ -192,7 +974,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. 20020727 + finish no-leak checking in cardfile.c, using this for testing changes - to resizeterm(). + to resizeterm(). + simplify _nc_freeall() using delscreen(). 20020720 @@ -355,7 +1137,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. can be linked. 20020413 - + add manpages: curs_get_wstr.3x, curs_in_wchstr.3x + + add manpages: curs_get_wstr.3x, curs_in_wchstr.3x + implement wgetn_wstr(). + implement win_wchnstr(). + remove redefinition of unget_wch() in lib_gen.c (reported by @@ -395,7 +1177,8 @@ Changes since 1.9.9e are recorded by Thomas Dickey. + implement key_name(). + remove const's in lib_box.c incorrectly leftover after splitting off lib_box_set.c - + update llib-lncurses, llib-ncursesw, fix configure script related to these. + + update llib-lncurses, llib-ncursesw, fix configure script related to + these. 20020218 + remove quotes on "SYNOPSIS" in man/curs_box_set.3x, which resulted @@ -417,7 +1200,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. options. > patch by Sven Verdoolaege (report by Gerhard Haering ): - + correct typos in definitions of several wide-character macros: + + correct typos in definitions of several wide-character macros: waddwstr, wgetbkgrnd, mvaddwstr, mvwadd_wchnstr, mvwadd_wchnstr, mvwaddwstr. + pass $(CPPFLAGS) to MKlib_gen.sh, thereby fixing a missing definition @@ -579,7 +1362,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. in the C++ runtime. + modify the build to name dynamic libraries according to the convention used on OS X and Darwin. Rather than something like - libncurses.dylib.5.2, Darwin would name it libncurses. 5.dylib. + libncurses.dylib.5.2, Darwin would name it libncurses. 5.dylib. There are a few additional minor fixes, such as setting the library version and compatibility version numbers (patch by Jason Evans ). @@ -664,7 +1447,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. 20011001 + simpler fix for signal_name(), to replace the one overlooked in 20010929 (reported by Larry Virden). - + 20010929 + add -i option to view.c, to test ncurses' check for non-default signal handler for SIGINT, etc. diff --git a/README b/README index c46fc195..6fd3098d 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ --- $Id: README,v 1.20 2000/08/12 23:31:21 tom Exp $ +-- $Id: README,v 1.21 2003/02/08 19:36:39 tom Exp $ ------------------------------------------------------------------------------- README file for the ncurses package @@ -43,6 +43,14 @@ The libraries are: libform.so (shared) libform_g.a (debug enabled) +If you configure using the --enable-widec option, a "w" is appended to the +library names (e.g., libncursesw.a), and the resulting libraries support +wide-characters, e.g., via a UTF-8 locale. The corresponding header files +are compatible with the non-wide-character configuration; wide-character +features are provided by ifdef's in the header files. The wide-character +library interfaces are not binary-compatible with the non-wide-character +version. + The ncurses libraries implement the curses API. The panel, menu and forms libraries implement clones of the SVr4 panel, menu and forms APIs. The source code for these lives in the `ncurses', `panel', `menu', and `form' directories diff --git a/README.glibc b/README.glibc deleted file mode 100644 index 7d52269b..00000000 --- a/README.glibc +++ /dev/null @@ -1,5 +0,0 @@ -To compile this as an add-on for glibc, unpack it in the glibc source -tree and put ncurses on the add-on list when you do configure. - -hjl@gnu.ai.mit.edu -03/21/1997 diff --git a/TO-DO b/TO-DO index e99051f5..a689447b 100644 --- a/TO-DO +++ b/TO-DO @@ -1,11 +1,15 @@ --- $Id: TO-DO,v 1.41 2002/08/31 21:32:43 tom Exp $ +-- $Id: TO-DO,v 1.43 2004/02/08 21:09:00 tom Exp $ SHORT-TERM TO-DO ITEMS: Known Problems: -* GNAT does not put libraries in the correct order, so a build only links - properly if you use shared libraries since -lncurses is first. +* The form/menu libraries do not use wide-character features. + +* Some users would like to build a single version of libtinfo which can be + used from either libncursesw or libncurses. + +* libtool does not work with GNAT. * The screen optimization has been tested only in an ad hoc manner. We should develop a good set of regression tests to cover lib_doupdate.c and @@ -23,7 +27,7 @@ Known Problems: activates them), and a touchwin can apparently also force them to be displayed. -+ The code departs from perfect 8-bit cleanness in one respect; you cannot +* The code departs from perfect 8-bit cleanness in one respect; you cannot specify a character \200 as part of a capability string, because the terminfo library interprets \200 as a request to embed NUL (\000) at that point. This is a legacy terminfo property we can't mess with. @@ -42,7 +46,7 @@ Portability (or lack thereof): suspend (this problem was first seen running lynx). You will not see this problem if you are running Linux or one of the 4.4BSD derivatives like FreeBSD, NetBSD, or BSDI. For details, see the analysis in the - header comment of ncurses/lib_tstp.c. + header comment of ncurses/tty/lib_tstp.c . * In theory, vwprintw and vwscanf are supposed to use the older varargs.h interface for handling variadic argument lists. Linux doesn't have @@ -56,21 +60,10 @@ Portability (or lack thereof): (It should work on any System V, however). If you want to fix this, add an implementation to ncurses/vsscanf.c. -* The demo build for the c++ library craps out with many link errors under gcc - 2.6.3. We're told the C++ support in 2.6.3 is broken and that the right - fix is to upgrade to 2.7.0. This demo is also known to not build with - the Sun SPARCworks 4.1 C++ compiler, due to a problem resolving templates. - -* Under Ultrix, configure craps out (Ultrix sh is lame). Run it under ksh. - -* We've not tested the configure script with cross-compilers. The autoconf - tests are supposed to be able to support this (please report bugs). You will - have to configure and build in two steps. The first step must create the - automatically-generated sources (e.g., comp_captab.c) on your host machine. - Then, run "make mostlyclean", remove config.* from the top-level directory - and configure for the cross-compiler. +* The C++ binding fails to build with a few C++ compilers, mainly with + configure script problems with vsscanf(). -+ terminfo.5 does not format with the SunOS (and most other platform's) tbl +* terminfo.5 does not format with the SunOS (and most other platform's) tbl utility because it relies on a diversion for each table entry. Get the groff package. @@ -83,8 +76,6 @@ Untested features: label_on, plab_norm, lab_f*) has not been tested. The label_format and lab_f* capabilities aren't presently used. -* The wide-character input functions need testing. - LONGER-TERM TO-DO ITEMS: 1. Extended COSE conformance @@ -94,10 +85,6 @@ of the SVr4 API. The library is BASE conformant with this standard. We would like to make ncurses fully conformant at the EXTENDED level supporting internationalization. -Current status: - pecho_wchar() not implemented. - slk_wset not implemented. - 2. DOS port Only 16 of the 55 files in the library depend on the terminfo format. @@ -187,5 +174,3 @@ These are the potentially important ones for ncurses. Notes: ii) We probably don't care about dest_tabs_magic_smso; only Telerays used it and they're all long obsolete. - - diff --git a/aclocal.m4 b/aclocal.m4 index 19f9bd58..a70a64e1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2000,2001,2002 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * dnl copy of this software and associated documentation files (the * @@ -26,22 +26,24 @@ dnl sale, use or other dealings in this Software without prior written * dnl authorization. * dnl*************************************************************************** dnl -dnl Author: Thomas E. Dickey 1996,1997,1998,1999,2000,2001 +dnl Author: Thomas E. Dickey 1995-2003 dnl -dnl $Id: aclocal.m4,v 1.285 2002/09/21 23:59:01 tom Exp $ +dnl $Id: aclocal.m4,v 1.333 2004/01/30 20:59:56 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- +dnl CF_ADA_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15 +dnl ------------------- dnl Construct the list of include-options for the C programs in the Ada95 dnl binding. AC_DEFUN([CF_ADA_INCLUDE_DIRS], [ -ACPPFLAGS="$ACPPFLAGS -I. -I../../include" +ACPPFLAGS="-I. -I../../include $ACPPFLAGS" if test "$srcdir" != "."; then - ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include" + ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS" fi if test "$GCC" != yes; then ACPPFLAGS="$ACPPFLAGS -I\$(includedir)" @@ -57,6 +59,8 @@ fi AC_SUBST(ACPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ADD_CFLAGS version: 5 updated: 2002/12/01 00:12:15 +dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. AC_DEFUN([CF_ADD_CFLAGS], @@ -88,11 +92,13 @@ fi if test -n "$cf_new_cppflags" ; then ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) - CPPFLAGS="$CPPFLAGS $cf_new_cppflags" + CPPFLAGS="$cf_new_cppflags $CPPFLAGS" fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34 +dnl ---------------- dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' dnl in the sharutils 4.2 distribution. AC_DEFUN([CF_ANSI_CC_CHECK], @@ -143,6 +149,8 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44 +dnl --------------- dnl For programs that must use an ANSI compiler, obtain compiler options that dnl will make it recognize prototypes. We'll do preprocessor checks in other dnl macros, since tools such as unproto can fake prototypes, but only part of @@ -159,18 +167,38 @@ You have the following choices: fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18 +dnl ------------ dnl Test if 'bool' is a builtin type in the configured C++ compiler. Some dnl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gcc dnl 2.6.3 does, in anticipation of the ANSI C++ standard. dnl dnl Treat the configuration-variable specially here, since we're directly dnl substituting its value (i.e., 1/0). +dnl +dnl $1 is the shell variable to store the result in, if not $cv_cv_builtin_bool AC_DEFUN([CF_BOOL_DECL], [ -AC_CHECK_HEADER(stdbool.h, - cf_cv_header_stdbool_h=1, - cf_cv_header_stdbool_h=0) +AC_MSG_CHECKING(if we should include stdbool.h) + +AC_CACHE_VAL(cf_cv_header_stdbool_h,[ + AC_TRY_COMPILE([],[bool foo = false], + [cf_cv_header_stdbool_h=0], + [AC_TRY_COMPILE([ +#ifndef __BEOS__ +#include +#endif +],[bool foo = false], + [cf_cv_header_stdbool_h=1], + [cf_cv_header_stdbool_h=0])])]) + +if test "$cf_cv_header_stdbool_h" = 1 +then AC_MSG_RESULT(yes) +else AC_MSG_RESULT(no) +fi + AC_MSG_CHECKING([for builtin bool type]) + AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[ AC_TRY_COMPILE([ #include @@ -179,12 +207,15 @@ AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[ [ifelse($1,,cf_cv_builtin_bool,[$1])=1], [ifelse($1,,cf_cv_builtin_bool,[$1])=0]) ]) + if test "$ifelse($1,,cf_cv_builtin_bool,[$1])" = 1 then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_BOOL_SIZE version: 10 updated: 2002/02/23 20:38:31 +dnl ------------ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type). dnl Don't bother looking for bool.h, since it's been deprecated. dnl @@ -251,6 +282,8 @@ if test "$cf_cv_type_of_bool" = unknown ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CFG_DEFAULTS version: 6 updated: 2003/07/12 15:15:19 +dnl --------------- dnl Determine the default configuration into which we'll install ncurses. This dnl can be overridden by the user's command-line options. There's two items to dnl look for: @@ -267,7 +300,7 @@ AC_MSG_CHECKING(for prefix) if test "x$prefix" = "xNONE" ; then case "$cf_cv_system_name" in # non-vendor systems don't have a conflict - openbsd*|netbsd*|freebsd*|linux*|cygwin*) + openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu) prefix=/usr ;; *) prefix=$ac_default_prefix @@ -303,6 +336,8 @@ AC_MSG_RESULT($includedir) fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52 +dnl ---------- dnl Check if the terminal-capability database functions are available. If not, dnl ncurses has a much-reduced version. AC_DEFUN([CF_CGETENT],[ @@ -324,6 +359,8 @@ AC_MSG_RESULT($cf_cv_cgetent) test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_CACHE version: 9 updated: 2004/01/30 15:59:13 +dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. dnl @@ -331,6 +368,9 @@ dnl If we've packaged config.guess and config.sub, run that (since it does a dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM dnl which is useful in cross-compiles. +dnl +dnl Note: we would use $ac_config_sub, but that is one of the places where +dnl autoconf 2.5x broke compatibility with autoconf 2.13 AC_DEFUN([CF_CHECK_CACHE], [ if test -f $srcdir/config.guess ; then @@ -354,6 +394,8 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_ERRNO version: 9 updated: 2001/12/30 18:03:23 +dnl -------------- dnl Check for data that is usually declared in or , e.g., dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it dnl ourselves. @@ -383,6 +425,8 @@ fi CF_CHECK_EXTERN_DATA($1,int) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_EXTERN_DATA version: 3 updated: 2001/12/30 18:03:23 +dnl -------------------- dnl Check for existence of external data in the current set of libraries. If dnl we can modify it, it's real enough. dnl $1 = the name to check @@ -406,6 +450,8 @@ fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18 +dnl ----------------- dnl Check if the C++ compiler accepts duplicate parameter initialization. This dnl is a late feature for the standard and is not in some recent compilers dnl (1999/9/11). @@ -439,6 +485,8 @@ fi test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CPP_VSCAN_FUNC version: 5 updated: 2001/12/02 01:39:28 +dnl ----------------- dnl Check if the g++ compiler supports vscan function (not a standard feature). AC_DEFUN([CF_CPP_VSCAN_FUNC], [ @@ -515,9 +563,13 @@ strstream_cast) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 +dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. -AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's:/[[^/]]*$::'`])dnl +AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl dnl --------------------------------------------------------------------------- +dnl CF_DIRS_TO_MAKE version: 3 updated: 2002/02/23 20:38:31 +dnl --------------- AC_DEFUN([CF_DIRS_TO_MAKE], [ DIRS_TO_MAKE="lib" @@ -537,12 +589,16 @@ done AC_SUBST(DIRS_TO_MAKE) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39 +dnl -------- dnl Check if 'errno' is declared in AC_DEFUN([CF_ERRNO], [ CF_CHECK_ERRNO(errno) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ETIP_DEFINES version: 3 updated: 2003/03/22 19:13:43 +dnl --------------- dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between dnl math.h and builtin.h, only for ncurses AC_DEFUN([CF_ETIP_DEFINES], @@ -554,7 +610,7 @@ for cf_math in "" MATH_H do for cf_excp in "" MATH_EXCEPTION do - CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu" + CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include" test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" AC_TRY_COMPILE([ @@ -571,6 +627,8 @@ AC_MSG_RESULT($cf_result) CXXFLAGS="$cf_save_CXXFLAGS" ]) dnl --------------------------------------------------------------------------- +dnl CF_FUNC_MEMMOVE version: 5 updated: 2000/08/12 23:18:52 +dnl --------------- dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither dnl is found, add our own version of memmove to the list of objects. AC_DEFUN([CF_FUNC_MEMMOVE], @@ -600,6 +658,8 @@ int main() { fi ])])dnl dnl --------------------------------------------------------------------------- +dnl CF_FUNC_POLL version: 2 updated: 2000/02/06 01:38:04 +dnl ------------ dnl See if the poll function really works. Some platforms have poll(), but dnl it does not work for terminals or files. AC_DEFUN([CF_FUNC_POLL],[ @@ -627,6 +687,8 @@ int main() { test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FUNC_TERMIOS version: 2 updated: 2000/07/22 23:37:24 +dnl --------------- dnl Some old/broken variations define tcgetattr() only as a macro in dnl termio(s).h AC_DEFUN([CF_FUNC_TERMIOS],[ @@ -654,6 +716,8 @@ tcgetattr(1, &foo);], test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FUNC_VSSCANF version: 3 updated: 2001/12/19 00:50:10 +dnl --------------- dnl Check for vsscanf() function, which is in c9x but generally not in earlier dnl versions of C. It is in the GNU C library, and can often be simulated by dnl other functions. @@ -697,6 +761,8 @@ esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52 +dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. @@ -761,8 +827,6 @@ EOF if AC_TRY_EVAL(ac_compile); then test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) cat conftest.h >>confdefs.h -# else -# sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h fi done else @@ -772,17 +836,35 @@ rm -rf conftest* fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57 +dnl -------------- +dnl Find version of gcc +AC_DEFUN([CF_GCC_VERSION],[ +AC_REQUIRE([AC_PROG_CC]) +GCC_VERSION=none +if test "$GCC" = yes ; then + AC_MSG_CHECKING(version of $CC) + GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" + test -z "$GCC_VERSION" && GCC_VERSION=unknown + AC_MSG_RESULT($GCC_VERSION) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30 +dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: dnl dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x) dnl -Wredundant-decls (system headers make this too noisy) dnl -Wtraditional (combines too many unrelated messages, only a few useful) -dnl -Wwrite-strings (too noisy, but should review occasionally) +dnl -Wwrite-strings (too noisy, but should review occasionally). This +dnl is enabled for ncurses using "--enable-const". dnl -pedantic dnl AC_DEFUN([CF_GCC_WARNINGS], [ +AC_REQUIRE([CF_GCC_VERSION]) if test "$GCC" = yes then cat > conftest.$ac_ext <&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\ - sed -e 's/[[^0-9 \.]]//g' | $AWK '{print $[1];}'` -case $cf_cv_gnat_version in +AC_MSG_CHECKING(for gnat version) +cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\ + sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'` +AC_MSG_RESULT($cf_gnat_version) + +case $cf_gnat_version in 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) cf_cv_prog_gnat_correct=yes ;; - *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. + *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. cf_cv_prog_gnat_correct=no ;; esac -case $cf_cv_gnat_version in - 3.1*|[[4-9]].*) +case $cf_gnat_version in + 3.[[1-9]]*|[[4-9]].*) cf_compile_generics=generics cf_generic_objects="\$(GENOBJS)" ;; @@ -867,6 +967,8 @@ case $cf_cv_gnat_version in esac ]) dnl --------------------------------------------------------------------------- +dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53 +dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect dnl (or misfeature) of glibc2, which breaks portability of many applications, @@ -895,6 +997,8 @@ make an error test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46 +dnl -------------- dnl If we're trying to use g++, test if libg++ is installed (a rather common dnl problem :-). If we have the compiler but no library, we'll be able to dnl configure, but won't be able to build the c++ demo program. @@ -909,7 +1013,7 @@ os2*) #(vi cf_gpp_libname=g++ ;; esac -if test "$ac_cv_prog_gxx" = yes; then +if test "$GXX" = yes; then AC_MSG_CHECKING([for lib$cf_gpp_libname]) cf_save="$LIBS" LIBS="$LIBS -l$cf_gpp_libname" @@ -937,20 +1041,37 @@ if test "$ac_cv_prog_gxx" = yes; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GXX_VERSION version: 3 updated: 2003/09/06 19:16:21 +dnl -------------- +dnl Check for version of g++ +AC_DEFUN([CF_GXX_VERSION],[ +AC_REQUIRE([AC_PROG_CPP]) +GXX_VERSION=none +if test "$GXX" = yes; then + AC_MSG_CHECKING(version of g++) + GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`" + AC_MSG_RESULT($GXX_VERSION) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23 +dnl --------------- dnl Insert text into the help-message, for readability, from AC_ARG_WITH. AC_DEFUN([CF_HELP_MESSAGE], [AC_DIVERT_HELP([$1])dnl ])dnl dnl --------------------------------------------------------------------------- +dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15 +dnl --------------- dnl Construct the list of include-options according to whether we're building dnl in the source directory or using '--srcdir=DIR' option. If we're building dnl with gcc, don't append the includedir if it happens to be /usr/include, dnl since that usually breaks gcc's shadow-includes. AC_DEFUN([CF_INCLUDE_DIRS], [ -CPPFLAGS="$CPPFLAGS -I. -I../include" +CPPFLAGS="-I. -I../include $CPPFLAGS" if test "$srcdir" != "."; then - CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include" + CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS" fi if test "$GCC" != yes; then CPPFLAGS="$CPPFLAGS -I\$(includedir)" @@ -966,6 +1087,8 @@ fi AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ISASCII version: 3 updated: 2000/08/12 23:18:52 +dnl ---------- dnl Check if we have either a function or macro for 'isascii()'. AC_DEFUN([CF_ISASCII], [ @@ -979,6 +1102,8 @@ AC_MSG_RESULT($cf_cv_have_isascii) test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIBUTF8 version: 2 updated: 2002/01/19 22:51:32 +dnl ---------- dnl Check for libutf8 AC_DEFUN([CF_LIBUTF8], [ @@ -998,6 +1123,8 @@ if test "$cf_cv_libutf8" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48 +dnl ------------- dnl Compute the library-prefix for the given host system dnl $1 = variable to set AC_DEFUN([CF_LIB_PREFIX], @@ -1011,6 +1138,8 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIB_RULES version: 30 updated: 2004/01/10 15:50:50 +dnl ------------ dnl Append definitions and rules for the given models to the subdirectory dnl Makefiles, and the recursion rule for the top-level Makefile. If the dnl subdirectory is a library-source directory, modify the LIBRARIES list in @@ -1054,8 +1183,10 @@ do esac fi # cygwin needs import library, and has unique naming convention + # use autodetected ${cf_prefix} for import lib and static lib, but + # use 'cyg' prefix for shared lib. if test $cf_cv_shlib_version = cygdll ; then - SHARED_LIB="../lib/${cf_prefix}${cf_dir}\$(ABI_VERSION).dll" + SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll" IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a" LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)" continue @@ -1066,16 +1197,13 @@ do if test $cf_dir = ncurses ; then cf_subsets="$LIB_SUBSETS" - case "$LIB_SUBSETS" in #(vi - termlib+*) #(vi - ;; - *) #(vi - cf_item=`echo $LIBS_TO_MAKE |sed -e s/$LIB_NAME/$TINFO_NAME/g` + cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'` + if test "$cf_termlib" != "$cf_subsets" ; then + cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g` LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE" - ;; - esac + fi else - cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib //'` + cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'` fi sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \ @@ -1128,7 +1256,7 @@ do ldconfig="$LDCONFIG" \ overwrite=$WITH_OVERWRITE \ depend="$cf_depend" \ - target="$target" \ + host="$host" \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile for cf_subdir2 in $cf_subdirs lib do @@ -1364,6 +1492,8 @@ done ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIB_SUFFIX version: 13 updated: 2003/11/01 16:09:07 +dnl ------------- dnl Compute the library file-suffix from the given model name dnl $1 = model name dnl $2 = variable to set @@ -1380,13 +1510,20 @@ AC_DEFUN([CF_LIB_SUFFIX], case $cf_cv_system_name in cygwin*) $2='.dll' ;; darwin*) $2='.dylib' ;; - hpux*) $2='.sl' ;; + hpux*) + case $target in + ia64*) $2='.so' ;; + *) $2='.sl' ;; + esac + ;; *) $2='.so' ;; esac esac test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LIB_TYPE version: 4 updated: 2000/10/20 22:57:49 +dnl ----------- dnl Compute the string to append to -library from the given model name dnl $1 = model name dnl $2 = variable to set @@ -1403,6 +1540,8 @@ AC_DEFUN([CF_LIB_TYPE], test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LINK_DATAONLY version: 6 updated: 2003/02/02 01:41:46 +dnl ---------------- dnl Some systems have a non-ANSI linker that doesn't pull in modules that have dnl only data (i.e., no functions), for example NeXT. On those systems we'll dnl have to provide wrappers for global tables to ensure they're linked @@ -1418,7 +1557,7 @@ int testdata[[3]] = { 123, 456, 789 }; EOF if AC_TRY_EVAL(ac_compile) ; then mv conftest.o data.o && \ - ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null + ( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null fi rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <&5 1>/dev/null + ( $AR $AR_OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null fi rm -f conftest.$ac_ext func.o - ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null + ( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null cf_saveLIBS="$LIBS" LIBS="conftest.a $LIBS" AC_TRY_RUN([ @@ -1464,6 +1603,8 @@ fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_LINK_FUNCS version: 5 updated: 2003/02/02 01:41:46 +dnl ------------- dnl Most Unix systems have both link and symlink, a few don't have symlink. dnl A few non-Unix systems implement symlink, but not link. dnl A few non-systems implement neither (or have nonfunctional versions). @@ -1473,7 +1614,7 @@ AC_CHECK_FUNCS( \ remove \ unlink ) -if test "$ac_cv_prog_cc_cross" = yes ; then +if test "$cross_compiling" = yes ; then AC_CHECK_FUNCS( \ link \ symlink ) @@ -1519,6 +1660,8 @@ int main() fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27 +dnl ------------ dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make' dnl options to lower-levels. It's very useful for "make -n" -- if we have it. dnl (GNU 'make' does both, something POSIX 'make', which happens to make the @@ -1556,6 +1699,8 @@ CF_EOF AC_SUBST(cf_cv_makeflags) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40 +dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have dnl a monocase filesystem. AC_DEFUN([CF_MAKE_TAGS],[ @@ -1583,8 +1728,20 @@ fi AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:34 +dnl ----------------- dnl Option to allow user to override automatic configuration of manpage format. -dnl There are several special cases. +dnl There are several special cases: +dnl +dnl gzip - man checks for, can display gzip'd files +dnl compress - man checks for, can display compressed files +dnl BSDI - files in the cat-directories are suffixed ".0" +dnl formatted - installer should format (put files in cat-directory) +dnl catonly - installer should only format, e.g., for a turnkey system. +dnl +dnl There are other configurations which this macro does not test, e.g., HPUX's +dnl compressed manpages (but uncompressed manpages are fine, and HPUX's naming +dnl convention would not match our use). AC_DEFUN([CF_MANPAGE_FORMAT], [ AC_REQUIRE([CF_PATHSEP]) @@ -1592,49 +1749,96 @@ AC_MSG_CHECKING(format of man-pages) AC_ARG_WITH(manpage-format, [ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and - optionally formatted, e.g., gzip,formatted], + optionally formatted/catonly, e.g., gzip,formatted], [MANPAGE_FORMAT=$withval], [MANPAGE_FORMAT=unknown]) -case ".$MANPAGE_FORMAT" in -.gzip|.compress|.BSDI|.normal|.formatted) # (vi - ;; -.unknown|.) # (vi +test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown +MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'` + +cf_unknown= + +case $MANPAGE_FORMAT in +unknown) if test -z "$MANPATH" ; then MANPATH="/usr/man:/usr/share/man" fi + # look for the 'date' man-page (it's most likely to be installed!) + MANPAGE_FORMAT= + cf_preform=no + cf_catonly=yes + cf_example=date + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}" - MANPAGE_FORMAT=unknown for cf_dir in $MANPATH; do test -z "$cf_dir" && cf_dir=/usr/man - for cf_name in $cf_dir/*/date.[[01]]* $cf_dir/*/date + for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example do - cf_test=`echo $cf_name | sed -e 's/*//'` - if test "x$cf_test" = "x$cf_name" ; then - case "$cf_name" in - *.gz) MANPAGE_FORMAT=gzip;; - *.Z) MANPAGE_FORMAT=compress;; - *.0) MANPAGE_FORMAT=BSDI,formatted;; - *) MANPAGE_FORMAT=normal;; - esac - break - fi + cf_test=`echo $cf_name | sed -e 's/*//'` + if test "x$cf_test" = "x$cf_name" ; then + + case "$cf_name" in + *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";; + *.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";; + *.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";; + *) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";; + esac + + case "$cf_name" in + $cf_dir/man*) + cf_catonly=no + ;; + $cf_dir/cat*) + cf_preform=yes + ;; + esac + break + fi + + # if we found a match in either man* or cat*, stop looking + if test -n "$MANPAGE_FORMAT" ; then + cf_found=no + test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted" + test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly" + case "$cf_name" in + $cf_dir/cat*) + cf_found=yes + ;; + esac + test $cf_found=yes && break + fi done - if test "$MANPAGE_FORMAT" != "unknown" ; then + # only check the first directory in $MANPATH where we find manpages + if test -n "$MANPAGE_FORMAT" ; then break fi done + # if we did not find the example, just assume it is normal + test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal IFS="$ac_save_ifs" ;; -.*) # (vi - AC_MSG_WARN(Unexpected manpage-format) +*) + for cf_option in $MANPAGE_FORMAT; do + case $cf_option in #(vi + gzip|compress|BSDI|normal|formatted|catonly) + ;; + *) + cf_unknown="$cf_unknown $cf_option" + ;; + esac + done ;; esac AC_MSG_RESULT($MANPAGE_FORMAT) +if test -n "$cf_unknown" ; then + AC_MSG_WARN(Unexpected manpage-format $cf_unknown) +fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MANPAGE_RENAMES version: 6 updated: 2002/01/19 22:51:32 +dnl ------------------ dnl The Debian people have their own naming convention for manpages. This dnl option lets us override the name of the file containing renaming, or dnl disable it altogether. @@ -1680,21 +1884,51 @@ AC_MSG_RESULT($MANPAGE_RENAMES) AC_SUBST(MANPAGE_RENAMES) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MANPAGE_SYMLINKS version: 4 updated: 2003/12/13 18:01:58 +dnl ------------------- dnl Some people expect each tool to make all aliases for manpages in the dnl man-directory. This accommodates the older, less-capable implementations dnl of 'man', and is optional. AC_DEFUN([CF_MANPAGE_SYMLINKS], [ -AC_MSG_CHECKING(for manpage symlinks) +AC_MSG_CHECKING(if manpage aliases will be installed) + +AC_ARG_WITH(manpage-aliases, + [ --with-manpage-aliases specify manpage-aliases using .so], + [MANPAGE_ALIASES=$withval], + [MANPAGE_ALIASES=yes]) + +AC_MSG_RESULT($MANPAGE_ALIASES) + +if test "$LN_S" = "ln -s"; then + cf_use_symlinks=yes +else + cf_use_symlinks=no +fi + +MANPAGE_SYMLINKS=no +if test "$MANPAGE_ALIASES" = yes ; then +AC_MSG_CHECKING(if manpage symlinks should be used) AC_ARG_WITH(manpage-symlinks, - [ --with-manpage-symlinks specify manpage-symlinks], + [ --with-manpage-symlinks specify manpage-aliases using symlinks], [MANPAGE_SYMLINKS=$withval], - [MANPAGE_SYMLINKS=yes]) + [MANPAGE_SYMLINKS=$cf_use_symlinks]) + +if test "$$cf_use_symlinks" = no; then +if test "$MANPAGE_SYMLINKS" = yes ; then + AC_MSG_WARN(cannot make symlinks, will use .so files) + MANPAGE_SYMLINKS=no +fi +fi AC_MSG_RESULT($MANPAGE_SYMLINKS) +fi + ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MANPAGE_TBL version: 3 updated: 2002/01/19 22:51:32 +dnl -------------- dnl This option causes manpages to be run through tbl(1) to generate tables dnl correctly. AC_DEFUN([CF_MANPAGE_TBL], @@ -1709,6 +1943,8 @@ AC_ARG_WITH(manpage-tbl, AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MAN_PAGES version: 27 updated: 2003/12/20 20:39:45 +dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that dnl will install man-pages. @@ -1727,20 +1963,40 @@ CF_MANPAGE_TBL fi case "$MANPAGE_FORMAT" in # (vi + *catonly*) # (vi + cf_format=yes + cf_inboth=no + ;; *formatted*) # (vi - cf_subdir='$mandir/cat' cf_format=yes + cf_inboth=yes ;; *) - cf_subdir='$mandir/man' cf_format=no + cf_inboth=no ;; esac test ! -d man && mkdir man -cat >man/edit_man.sh <$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <\$TMP +cat >>$cf_edit_man <\$TMP CF_EOF else -cat >>man/edit_man.sh <>$cf_edit_man <\$TMP CF_EOF fi -if test $MANPAGE_TBL = yes ; then -cat >>man/edit_man.sh <>$cf_edit_man <\$TMP.out mv \$TMP.out \$TMP -CF_EOF fi +CF_EOF + if test $with_curses_h != yes ; then -cat >>man/edit_man.sh <>$cf_edit_man <\$TMP.out mv \$TMP.out \$TMP CF_EOF fi -if test $cf_format = yes ; then -cat >>man/edit_man.sh <\$TMP.out - mv \$TMP.out \$TMP -CF_EOF -fi -case "$MANPAGE_FORMAT" in #(vi -*compress*) #(vi -cat >>man/edit_man.sh <>$cf_edit_man <\$TMP.out + mv \$TMP.out \$TMP fi - target="\$target.Z" CF_EOF - ;; -*gzip*) #(vi -cat >>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <>$cf_edit_man <>man/edit_man.sh <\$TMP +CF_EOF +if test -n "$cf_compress" ; then +cat >>$cf_edit_man <>$cf_edit_man <>man/edit_man.sh <>man/edit_man.sh < -#ifdef HAVE_LIBUTF8_H -#include -#endif], - [mbstate_t state], - [cf_cv_mbstate_t=no], - [AC_TRY_COMPILE([ -#include -#include -#ifdef HAVE_LIBUTF8_H -#include -#endif], - [mbstate_t value], - [cf_cv_mbstate_t=yes], - [cf_cv_mbstate_t=unknown])])]) - -if test "$cf_cv_mbstate_t" = yes ; then - AC_DEFINE(NEED_WCHAR_H) -fi - -if test "$cf_cv_mbstate_t" != unknown ; then - AC_DEFINE(HAVE_MBSTATE_T) -fi -])dnl -dnl --------------------------------------------------------------------------- +dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55 +dnl ---------------------- dnl Check if the file-system supports mixed-case filenames. If we're able to dnl create a lowercase name and see it as uppercase, it doesn't support that. AC_DEFUN([CF_MIXEDCASE_FILENAMES], [ AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ +if test "$cross_compiling" = yes ; then + case $target_alias in #(vi + *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi + cf_cv_mixedcase=no + ;; + *) + cf_cv_mixedcase=yes + ;; + esac +else rm -f conftest CONFTEST echo test >conftest if test -f CONFTEST ; then @@ -2013,10 +2291,13 @@ AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ cf_cv_mixedcase=yes fi rm -f conftest CONFTEST +fi ]) test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_MKSTEMP version: 3 updated: 2001/11/08 20:59:59 +dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ @@ -2065,6 +2346,27 @@ if test "$cf_cv_func_mkstemp" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49 +dnl ---------------- +dnl Check if the given variable is a number. If not, report an error. +dnl $1 is the variable +dnl $2 is the message +AC_DEFUN([CF_NUMBER_SYNTAX],[ +if test -n "$1" ; then + case $1 in #(vi + [[0-9]]*) #(vi + ;; + *) + AC_MSG_ERROR($2 is not a number: $1) + ;; + esac +else + AC_MSG_ERROR($2 value is empty) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_OBJ_SUBDIR version: 4 updated: 2002/02/23 20:38:31 +dnl ------------- dnl Compute the object-directory name from the given model name AC_DEFUN([CF_OBJ_SUBDIR], [ @@ -2083,6 +2385,8 @@ AC_DEFUN([CF_OBJ_SUBDIR], esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53 +dnl ---------- dnl Provide a value for the $PATH and similar separator AC_DEFUN([CF_PATHSEP], [ @@ -2094,6 +2398,8 @@ ifelse($1,,,[$1=$PATHSEP]) AC_SUBST(PATHSEP) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PATH_SYNTAX version: 9 updated: 2002/09/17 23:03:38 +dnl -------------- dnl Check the argument to see that it looks like a pathname. Rewrite it if it dnl begins with one of the prefix/exec_prefix variables, and then again if the dnl result begins with 'NONE'. This is necessary to work around autoconf's @@ -2123,28 +2429,66 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56 +dnl ------------ +dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles. +dnl +dnl $1 = symbol to test +dnl $2 = value (if any) to use for a predefinition +AC_DEFUN([CF_PREDEFINE], +[ +AC_MSG_CHECKING(if we must define $1) +AC_TRY_COMPILE([#include +],[ +#ifndef $1 +make an error +#endif],[cf_result=no],[cf_result=yes]) +AC_MSG_RESULT($cf_result) + +if test "$cf_result" = yes ; then + CPPFLAGS="$CPPFLAGS ifelse($2,,-D$1,[-D$1=$2])" +elif test "x$2" != "x" ; then + AC_MSG_CHECKING(checking for compatible value versus $2) + AC_TRY_COMPILE([#include +],[ +#if $1-$2 < 0 +make an error +#endif],[cf_result=yes],[cf_result=no]) + AC_MSG_RESULT($cf_result) + if test "$cf_result" = no ; then + # perhaps we can override it - try... + CPPFLAGS="$CPPFLAGS -D$1=$2" + fi +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18 +dnl ----------- dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX. AC_DEFUN([CF_PROG_EXT], [ AC_REQUIRE([CF_CHECK_CACHE]) -PROG_EXT= case $cf_cv_system_name in os2*) - # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@ CFLAGS="$CFLAGS -Zmt" CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__" CXXFLAGS="$CXXFLAGS -Zmt" - LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"` - PROG_EXT=".exe" - ;; -cygwin*) - PROG_EXT=".exe" + # autoconf's macro sets -Zexe and suffix both, which conflict:w + LDFLAGS="$LDFLAGS -Zmt -Zcrtdll" + ac_cv_exeext=.exe ;; esac + +AC_EXEEXT +AC_OBJEXT + +PROG_EXT="$EXEEXT" AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_INSTALL version: 5 updated: 2002/12/21 22:46:07 +dnl --------------- dnl Force $INSTALL to be an absolute-path. Otherwise, edit_man.sh and the dnl misc/tabset install won't work properly. Usually this happens only when dnl using the fallback mkinstalldirs script @@ -2156,11 +2500,33 @@ case $INSTALL in *) CF_DIRNAME(cf_dir,$INSTALL) test -z "$cf_dir" && cf_dir=. - INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'` + INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'` ;; esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:55 +dnl ---------------- +dnl Check for ldconfig, needed to fixup shared libraries that would be built +dnl and then used in the install. +AC_DEFUN([CF_PROG_LDCONFIG],[ +if test "$cross_compiling" = yes ; then + LDCONFIG=: +else +case "$cf_cv_system_name" in #(vi +freebsd*) #(vi + test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R" + ;; +*) LDPATH=$PATH:/sbin:/usr/sbin + AC_PATH_PROG(LDCONFIG,ldconfig,,$LDPATH) + ;; +esac +fi +AC_SUBST(LDCONFIG) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_REGEX version: 3 updated: 1997/11/01 14:26:01 +dnl -------- dnl Attempt to determine if we've got one of the flavors of regular-expression dnl code that we can support. AC_DEFUN([CF_REGEX], @@ -2193,6 +2559,8 @@ case $cf_cv_regex in esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SHARED_OPTS version: 30 updated: 2003/12/27 20:48:07 +dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared dnl library. dnl @@ -2303,7 +2671,7 @@ AC_DEFUN([CF_SHARED_OPTS], MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]' cf_cv_rm_so_locs=yes ;; - linux*|gnu*) + linux*|gnu*|k*bsd*-gnu) if test "$DFT_LWR_MODEL" = "shared" ; then LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" @@ -2319,6 +2687,23 @@ AC_DEFUN([CF_SHARED_OPTS], CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]' ;; + freebsd[[45]]*) + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" + MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $[@]` -o $[@]' + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + +# This doesn't work - I keep getting spurious references to needing +# libncurses.so.5.3 when ldd says it's resolved. LOCAL_LDFLAGS2 seems to be +# no longer used anyway. And the rpath logic isn't relative - so I have to +# add the local and install lib-directories: +# +# if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then +# LOCAL_LDFLAGS="-rpath `pwd`/lib" +# LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS" +# cf_ld_rpath_opt="-rpath " +# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS" +# fi + ;; openbsd*|freebsd*) CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -o $[@]' @@ -2364,7 +2749,7 @@ AC_DEFUN([CF_SHARED_OPTS], ;; sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98 # tested with osr5.0.5 - if test "$ac_cv_prog_gcc" != yes; then + if test "$GCC" != yes; then CC_SHARED_OPTS='-belf -KPIC' fi MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o [$]@' @@ -2378,7 +2763,7 @@ AC_DEFUN([CF_SHARED_OPTS], ;; sunos4*) # tested with SunOS 4.1.1 and gcc 2.7.0 - if test "$ac_cv_prog_gcc" != yes; then + if test "$GCC" != yes; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]' @@ -2386,7 +2771,7 @@ AC_DEFUN([CF_SHARED_OPTS], ;; solaris2*) # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 - if test "$ac_cv_prog_gcc" != yes; then + if test "$GCC" != yes; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]' @@ -2402,7 +2787,7 @@ AC_DEFUN([CF_SHARED_OPTS], ;; sysv5uw7*|unix_sv*) # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) - if test "$ac_cv_prog_gcc" != yes; then + if test "$GCC" != yes; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -d y -G -o [$]@' @@ -2449,6 +2834,8 @@ AC_DEFUN([CF_SHARED_OPTS], AC_SUBST(INSTALL_LIB) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16 +dnl ------------- dnl Check for definitions & structures needed for window size-changing dnl FIXME: check that this works with "snake" (HP-UX 10.x) AC_DEFUN([CF_SIZECHANGE], @@ -2517,6 +2904,8 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SRC_MODULES version: 15 updated: 2004/01/10 16:05:16 +dnl -------------- dnl For each parameter, test if the source-directory exists, and if it contains dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll dnl use in CF_LIB_RULES. @@ -2536,7 +2925,7 @@ else fi # dependencies and linker-arguments for utility-programs -PROG_ARGS="$TEST_ARGS" +test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS" cf_cv_src_modules= for cf_dir in $1 @@ -2614,6 +3003,8 @@ if test -n "$ADA_SUBDIRS"; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_STDCPP_LIBRARY version: 5 updated: 2000/08/12 23:18:52 +dnl ----------------- dnl Check for -lstdc++, which is GNU's standard C++ library. AC_DEFUN([CF_STDCPP_LIBRARY], [ @@ -2642,10 +3033,14 @@ test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname" fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_STRIP_G_OPT version: 3 updated: 2002/12/21 19:25:52 +dnl -------------- dnl Remove "-g" option from the compiler options AC_DEFUN([CF_STRIP_G_OPT], -[$1=`echo ${$1} | sed -e 's/-g //' -e 's/-g$//'`])dnl +[$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl dnl --------------------------------------------------------------------------- +dnl CF_STRUCT_SIGACTION version: 3 updated: 2000/08/12 23:18:52 +dnl ------------------- dnl Check if we need _POSIX_SOURCE defined to use struct sigaction. We'll only dnl do this if we've found the sigaction function. dnl @@ -2671,6 +3066,8 @@ AC_MSG_RESULT($sigact_bad) fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_STRUCT_TERMIOS version: 5 updated: 2000/11/04 12:22:46 +dnl ----------------- dnl Some machines require _POSIX_SOURCE to completely define struct termios. dnl If so, define SVR4_TERMIO AC_DEFUN([CF_STRUCT_TERMIOS],[ @@ -2705,6 +3102,8 @@ if test "$ac_cv_header_termios_h" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SUBST version: 2 updated: 1997/09/06 23:41:28 +dnl -------- dnl Shorthand macro for substituting things that the user may override dnl with an environment variable. dnl @@ -2721,6 +3120,8 @@ cf_cv_subst_$2=[$]$2]) $2=${cf_cv_subst_$2} ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SUBST_NCURSES_VERSION version: 7 updated: 2003/06/07 16:22:51 +dnl ------------------------ dnl Get the version-number for use in shared-library naming, etc. AC_DEFUN([CF_SUBST_NCURSES_VERSION], [ @@ -2739,12 +3140,13 @@ AC_SUBST(NCURSES_PATCH) dnl We need these values in the generated makefiles AC_SUBST(cf_cv_rel_version) AC_SUBST(cf_cv_abi_version) -AC_SUBST(cf_cv_cc_bool_type) AC_SUBST(cf_cv_builtin_bool) AC_SUBST(cf_cv_header_stdbool_h) AC_SUBST(cf_cv_type_of_bool)dnl ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40 +dnl ------------------ dnl Check if we can include with ; this breaks on dnl older SCO configurations. AC_DEFUN([CF_SYS_TIME_SELECT], @@ -2766,6 +3168,8 @@ AC_MSG_RESULT($cf_cv_sys_time_select) test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TYPEOF_CHTYPE version: 4 updated: 2000/10/04 09:18:40 +dnl ---------------- dnl Determine the type we should use for chtype (and attr_t, which is treated dnl as the same thing). We want around 32 bits, so on most machines want a dnl long, but on newer 64-bit machines, probably want an int. If we're using @@ -2835,6 +3239,8 @@ AC_SUBST(cf_cv_1UL) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TYPE_SIGACTION version: 3 updated: 2000/08/12 23:18:52 +dnl ----------------- dnl AC_DEFUN([CF_TYPE_SIGACTION], [ @@ -2849,6 +3255,8 @@ AC_MSG_RESULT($cf_cv_type_sigaction) test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_UNSIGNED_LITERALS version: 2 updated: 1998/02/07 22:10:16 +dnl -------------------- dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers dnl won't, but they're still there. AC_DEFUN([CF_UNSIGNED_LITERALS], @@ -2862,6 +3270,8 @@ AC_CACHE_VAL(cf_cv_unsigned_literals,[ AC_MSG_RESULT($cf_cv_unsigned_literals) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59 +dnl -------- dnl Make an uppercase version of a variable dnl $1=uppercase($2) AC_DEFUN([CF_UPPER], @@ -2869,11 +3279,244 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- +dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14 +dnl ---------- dnl Use AC_VERBOSE w/o the warnings AC_DEFUN([CF_VERBOSE], [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20 +dnl ------------- +dnl Check if type wide-character type $1 is declared, and if so, which header +dnl file is needed. The second parameter is used to set a shell variable when +dnl the type is not found. The first parameter sets a shell variable for the +dnl opposite sense. +AC_DEFUN([CF_WCHAR_TYPE], +[ +# This is needed on Tru64 5.0 to declare $1 +AC_CACHE_CHECK(if we must include wchar.h to declare $1,cf_cv_$1,[ +AC_TRY_COMPILE([ +#include +#include +#include +#ifdef HAVE_LIBUTF8_H +#include +#endif], + [$1 state], + [cf_cv_$1=no], + [AC_TRY_COMPILE([ +#include +#include +#include +#include +#ifdef HAVE_LIBUTF8_H +#include +#endif], + [$1 value], + [cf_cv_$1=yes], + [cf_cv_$1=unknown])])]) + +if test "$cf_cv_$1" = yes ; then + AC_DEFINE(NEED_WCHAR_H) + NEED_WCHAR_H=1 +fi + +ifelse($2,,,[ +# if we do not find $1 in either place, use substitution to provide a fallback. +if test "$cf_cv_$1" = unknown ; then + $2=1 +fi +]) +ifelse($3,,,[ +# if we find $1 in either place, use substitution to provide a fallback. +if test "$cf_cv_$1" != unknown ; then + $3=1 +fi +]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49 +dnl ------------------- +dnl Allow library's ABI to be overridden. Generally this happens when a +dnl packager has incremented the ABI past that used in the original package, +dnl and wishes to keep doing this. +dnl +dnl $1 is the package name, if any, to derive a corresponding {package}_ABI +dnl symbol. +AC_DEFUN([CF_WITH_ABI_VERSION],[ +test -z "$cf_cv_abi_version" && cf_cv_abi_version=0 +AC_ARG_WITH(abi-version, +[ --with-abi-version=XXX override derived ABI version], +[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval) + cf_cv_abi_version=$withval]) + CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version) +ifelse($1,,,[ +$1_ABI=$cf_cv_abi_version +]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_DBMALLOC version: 2 updated: 2002/12/29 21:11:45 +dnl ---------------- +dnl Configure-option for dbmalloc +AC_DEFUN([CF_WITH_DBMALLOC],[ +AC_MSG_CHECKING(if you want to link with dbmalloc for testing) +AC_ARG_WITH(dbmalloc, + [ --with-dbmalloc test: use Conor Cahill's dbmalloc library], + [with_dbmalloc=$withval], + [with_dbmalloc=no]) +AC_MSG_RESULT($with_dbmalloc) +if test $with_dbmalloc = yes ; then + AC_CHECK_LIB(dbmalloc,debug_malloc) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_DMALLOC version: 2 updated: 2002/12/29 21:11:45 +dnl --------------- +dnl Configure-option for dmalloc +AC_DEFUN([CF_WITH_DMALLOC],[ +AC_MSG_CHECKING(if you want to link with dmalloc for testing) +AC_ARG_WITH(dmalloc, + [ --with-dmalloc test: use Gray Watson's dmalloc library], + [with_dmalloc=$withval], + [with_dmalloc=no]) +AC_MSG_RESULT($with_dmalloc) +if test $with_dmalloc = yes ; then + AC_CHECK_LIB(dmalloc,dmalloc_debug) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_LIBTOOL version: 9 updated: 2004/01/16 14:55:37 +dnl --------------- +dnl Provide a configure option to incorporate libtool. Define several useful +dnl symbols for the makefile rules. +dnl +dnl The reference to AC_PROG_LIBTOOL does not normally work, since it uses +dnl macros from libtool.m4 which is in the aclocal directory of automake. +dnl Following is a simple script which turns on the AC_PROG_LIBTOOL macro. +dnl But that still does not work properly since the macro is expanded outside +dnl the CF_WITH_LIBTOOL macro: +dnl +dnl #!/bin/sh +dnl ACLOCAL=`aclocal --print-ac-dir` +dnl if test -z "$ACLOCAL" ; then +dnl echo cannot find aclocal directory +dnl exit 1 +dnl elif test ! -f $ACLOCAL/libtool.m4 ; then +dnl echo cannot find libtool.m4 file +dnl exit 1 +dnl fi +dnl +dnl LOCAL=aclocal.m4 +dnl ORIG=aclocal.m4.orig +dnl +dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15 +dnl rm -f $ORIG +dnl mv $LOCAL $ORIG +dnl +dnl # sed the LIBTOOL= assignment to omit the current directory? +dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL +dnl cat $ORIG >>$LOCAL +dnl +dnl autoconf-257 $* +dnl +AC_DEFUN([CF_WITH_LIBTOOL], +[ +ifdef([AC_PROG_LIBTOOL],,[ +LIBTOOL= +]) +# common library maintenance symbols that are convenient for libtool scripts: +LIB_CREATE='$(AR) -cr' +LIB_OBJECT='$(OBJECTS)' +LIB_SUFFIX=.a +LIB_PREP="$RANLIB" + +# symbols used to prop libtool up to enable it to determine what it should be +# doing: +LIB_CLEAN= +LIB_COMPILE= +LIB_LINK= +LIB_INSTALL= +LIB_UNINSTALL= + +AC_MSG_CHECKING(if you want to build libraries with libtool) +AC_ARG_WITH(libtool, + [ --with-libtool generate libraries with libtool], + [with_libtool=$withval], + [with_libtool=no]) +AC_MSG_RESULT($with_libtool) +if test "$with_libtool" != "no"; then +ifdef([AC_PROG_LIBTOOL],[ + # missing_content_AC_PROG_LIBTOOL{{ + AC_PROG_LIBTOOL + # missing_content_AC_PROG_LIBTOOL}} +],[ + if test "$with_libtool" != "yes" ; then + CF_PATH_SYNTAX(with_libtool) + LIBTOOL=$with_libtool + else + AC_PATH_PROG(LIBTOOL,libtool) + fi + if test -z "$LIBTOOL" ; then + AC_MSG_ERROR(Cannot find libtool) + fi +])dnl + LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o' + LIB_OBJECT='$(OBJECTS:.o=.lo)' + LIB_SUFFIX=.la + LIB_CLEAN='$(LIBTOOL) --mode=clean' + LIB_COMPILE='$(LIBTOOL) --mode=compile' + LIB_LINK='$(LIBTOOL) --mode=link' + LIB_INSTALL='$(LIBTOOL) --mode=install' + LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall' + LIB_PREP=: + + # Show the version of libtool + AC_MSG_CHECKING(version of libtool) + + # Save the version in a cache variable - this is not entirely a good + # thing, but the version string from libtool is very ugly, and for + # bug reports it might be useful to have the original string. + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` + AC_MSG_RESULT($cf_cv_libtool_version) + if test -z "$cf_cv_libtool_version" ; then + AC_MSG_ERROR(This is not libtool) + fi + + # special hack to add --tag option for C++ compiler + case $cf_cv_libtool_version in + 1.[[5-9]]*|[[2-9]]*) + LIBTOOL_CXX="$LIBTOOL --tag=CXX" + ;; + *) + LIBTOOL_CXX="$LIBTOOL" + ;; + esac +else + LIBTOOL="" + LIBTOOL_CXX="" +fi + +test -z "$LIBTOOL" && ECHO_LT= + +AC_SUBST(LIBTOOL) +AC_SUBST(LIBTOOL_CXX) + +AC_SUBST(LIB_CREATE) +AC_SUBST(LIB_OBJECT) +AC_SUBST(LIB_SUFFIX) +AC_SUBST(LIB_PREP) + +AC_SUBST(LIB_CLEAN) +AC_SUBST(LIB_COMPILE) +AC_SUBST(LIB_LINK) +AC_SUBST(LIB_INSTALL) +AC_SUBST(LIB_UNINSTALL) + +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_PATH version: 6 updated: 1998/10/11 00:40:17 +dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. dnl @@ -2891,6 +3534,8 @@ eval $3="$withval" AC_SUBST($3)dnl ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:30 +dnl ---------------- dnl Process an option specifying a list of colon-separated paths. dnl dnl $1 = option name @@ -2930,3 +3575,137 @@ eval '$3="$cf_dst_path"' AC_SUBST($3)dnl ])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49 +dnl ------------------- +dnl Allow library's release-version to be overridden. Generally this happens when a +dnl packager has incremented the release-version past that used in the original package, +dnl and wishes to keep doing this. +dnl +dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR +dnl and {package}_MINOR symbols +dnl symbol. +AC_DEFUN([CF_WITH_REL_VERSION],[ +test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0 +AC_ARG_WITH(rel-version, +[ --with-rel-version=XXX override derived release version], +[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval) + cf_cv_rel_version=$withval]) +ifelse($1,,[ + CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version) +],[ + $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'` + $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'` + CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version) + CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version) +]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_SYSMOUSE version: 2 updated: 2003/03/22 19:13:43 +dnl ---------------- +dnl If we can compile with sysmouse, make it available unless it is not wanted. +AC_DEFUN([CF_WITH_SYSMOUSE],[ +# not everyone has "test -c" +if test -c /dev/sysmouse 2>/dev/null ; then +AC_MSG_CHECKING(if you want to use sysmouse) +AC_ARG_WITH(sysmouse, + [ --with-sysmouse use sysmouse (FreeBSD console)], + [cf_with_sysmouse=$withval], + [cf_with_sysmouse=maybe]) + if test "$cf_with_sysmouse" != no ; then + AC_TRY_COMPILE([ +#include +#if (__FreeBSD_version >= 400017) +#include +#include +#else +#include +#endif +],[ + struct mouse_info the_mouse; + ioctl(0, CONS_MOUSECTL, &the_mouse); +],[cf_with_sysmouse=yes],[cf_with_sysmouse=no]) + fi +AC_MSG_RESULT($cf_with_sysmouse) +test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_XOPEN_SOURCE version: 11 updated: 2004/01/26 20:58:41 +dnl --------------- +dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, +dnl or adapt to the vendor's definitions to get equivalent functionality. +AC_DEFUN([CF_XOPEN_SOURCE],[ +case $host_os in #(vi +freebsd*) #(vi + CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600" + ;; +hpux*) #(vi + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" + ;; +irix6.*) #(vi + CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE" + ;; +linux*) #(vi + CF_GNU_SOURCE + ;; +mirbsd*) #(vi + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks + ;; +netbsd*) #(vi + # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + ;; +openbsd*) #(vi + # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw + ;; +osf[[45]]*) #(vi + CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE" + ;; +sco*) #(vi + # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer + ;; +solaris*) #(vi + CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" + ;; +*) + AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([#include ],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" + AC_TRY_COMPILE([#include ],[ +#ifdef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=yes]) + CPPFLAGS="$cf_save" + ]) +]) +test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" + + # FreeBSD 5.x headers demand this... + AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([#include ],[ +#ifndef _POSIX_C_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE" + AC_TRY_COMPILE([#include ],[ +#ifdef _POSIX_C_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=yes]) + CPPFLAGS="$cf_save" + ]) +]) +test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE" + ;; +esac +]) diff --git a/announce.html.in b/announce.html.in index 403e6762..11fb87c3 100644 --- a/announce.html.in +++ b/announce.html.in @@ -1,11 +1,12 @@ -Announcing ncurses @VERSION@ Pre-Release +Announcing ncurses @VERSION@ + @@ -35,173 +36,304 @@ the library and tools.

The ncurses distribution is available via anonymous FTP at the GNU distribution site -ftp://ftp.gnu.org/pub/gnu/ncurses. +ftp://ftp.gnu.org/gnu/ncurses/ .
It is also available at -ftp://invisible-island.net/ncurses. +ftp://invisible-island.net/ncurses/ .

Release Notes

-This release is designed to be upward compatible from ncurses 5.0 and 5.2; +This release is designed to be upward compatible from ncurses 5.0 and 5.3; very few applications will require recompilation, depending on the platform. -These are the highlights from the change-log since ncurses 5.2 release. +These are the highlights from the change-log since ncurses 5.3 release.

Interface changes:

    -
  • change type for bool used in headers to NCURSES_BOOL, - which usually is the same as the compiler's definition for - bool. - -
  • add all but two functions for X/Open curses wide-character support. - These are only available if the library is configured using the - --enable-widec option. Missing functions are -
      -
    • pecho_wchar() -
    • slk_wset() -
    - -
  • add environment variable $NCURSES_ASSUMED_COLORS to - modify the assume_default_colors() extension. - +
  • add the remaining functions for X/Open curses wide-character + support. +
      +
    • pecho_wchar() +
    • slk_wset() +
    + These are only available if the library is configured using the + --enable-widec option. + +
  • write getyx() and related 2-return macros in terms of + getcury(), + getcurx(), etc. + +
  • simplify ifdef for bool declaration in curses.h + +
  • modify ifdef's in curses.h that disabled use of + __attribute__() for g++, since recent versions + implement the cases which ncurses uses. + +
  • add key_defined() function, to tell which keycode a + string is bound to.
New features and improvements:
    -
  • Improved support for termcap applications: -
      -
    • add logic to dump_entry.c to remove function-key definitions that do - not fit into the 1023-byte limit for generated termcaps. This makes - hds200 fit. - -
    • modify tgetent() to check if exit_attribute_mode resets the alternate - character set, and if so, attempt to adjust the copy of the termcap - "me" string which it will return to eliminate that part. In - particular, 'screen' would lose track of line-drawing characters. - -
    • add check/fix to comp_parse.c to suppress warning about missing acsc - string. This happens in configurations where raw termcap information - is processed; tic already does this and other checks. - -
    • add tic -A option to suppress capabilities which are commented out - when translating to termcap. - -
    • modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it - work properly for termcap applications (patch by Andrey A Chernov). - -
    - -
  • add a call to _nc_keypad() in keypad() to accommodate applications - such as nvi, which use curses for output but not for input (fixes - Debian #131263, cf: 20011215). - -
  • correct logic for COLORFGBG environment variable: if rxvt is compiled - with xpm support, the variable has three fields, making it slightly - incompatible with itself. In either case, the background color is - the last field. +
  • library +
      +
    • implement logic in lib_mouse.c to handle position reports which + are generated when XFree86 xterm is initialized with private + modes 1002 or 1003. These are returned to the application as the + REPORT_MOUSE_POSITION mask, which was not implemented. +
    • modify soft-key initialization to use A_REVERSE if A_STANDOUT + would not be shown when colors are used, i.e., if ncv#1 is set in + the terminfo as is done in "screen". +
    • add configure option for FreeBSD sysmouse, --with-sysmouse, and + implement library support for that. +
    + +
  • programs: + +
      +
    • tack: + +
        +
      • allow it to run from fallback terminfo data. +
      • reset colors after each color test, correct a place + where exit_standout_mode was used instead of + exit_attribute_mode. +
      • improve bce test by making it set colors other + than black on white. +
      + +
    • tic: + +
        +
      • handle a case where an entry has no + description, and capabilities begin on the same line as the entry + name. +
      • allow a terminfo entry with a leading 2-character name. +
      • improved warnings when suppressing items to fit in termcap's + 1023-byte limit. +
      • add check for multiple "tc=" clauses in a termcap. +
      • correct logic for resolving "use=" clauses + allow infocmp and tic to show cancelled capabilities. +
      • check for incomplete line-drawing character mapping. +
      • check for missing/empty/illegal terminfo name. +
      + +
    • tput: +
        +
      • modify tput to use the same parameter analysis as tparm() does, + to provide for user-defined strings, e.g., for xterm title, a + corresponding capability might be + title=\E]2;%p1%s^G, +
      + +
    • tset: + +
        +
      • use the system's default values for CKILL and other default + control characters. +
      • correct interchanged defaults for kill and interrupt + characters, which caused it to report unnecessarily. +
      + +
Major bug fixes:
    -
  • rewrote limit-checks in wscrl() and associated _nc_scroll_window(), - to ensure that if the parameter of wscrl() is larger than the size of - the scrolling region, then the scrolling region will be cleared. - -
  • modify tset to restore original I/O modes if an error is encountered. - Also modify to use buffered stderr consistently rather than mixing - with write(). - -
  • move calls to def_shell_mode() and def_prog_mode() before loop with - callbacks in lib_set_term.c, since the c++ demo otherwise initialized - the tty modes before saving them. - -
  • modified wresize() to ensure that a failed realloc will not corrupt - the window structure, and to make subwindows fit within the resized - window. - -
  • altered resizeterm() to avoid having it fail when a child window - cannot be resized because it would be larger than its parent. - -
  • correct/improve logic to produce an exit status for errors in tput, - which did not exit with an error when told to put a string not in the - current terminfo entry. - -
  • modify behavior of can_clear_with() so that if an application is - running in a non-bce terminals with default colors enabled, it - returns true, allowing the user to select/paste text without picking - up extraneous trailing blanks. - -
  • add a check in relative_move() to guard against buffer overflow in - the overwrite logic. - -
  • add some limit/pointer checks to -S option of tputs. +
  • prevent recursion in wgetch() via wgetnstr() if the connection + cannot be switched between cooked/raw modes because it is not a TTY. + +
  • correct a case in _nc_remove_string(), used by + define_key(), to avoid infinite loop if the given string + happens to be a substring of other strings which are assigned to keys. + +
  • modify logic of acsc to use the original character if no mapping is + defined, rather than a null. + +
  • several improvements for handling multi-cell display of wide + characters. +
      +
    • modify setcchar() to allow converting control characters to complex + characters. +
    • correct handling of multibyte characters in waddch_literal() which + force wrapping because they are started too late on the line. +
    • modify setcchar() to allow for wchar_t input strings that have + more than one spacing character. +
    + +
  • other fixes for wide-character support: +
      +
    • rewrote lib_acs.c to allow PutAttrChar() to decide how to render + alternate-characters, i.e., to work with Linux console and UTF-8 + locale. +
    • implement a workaround so that line-drawing works with screen's + crippled UTF-8 support (tested with 3.9.13). This only works with + the wide-character support (--enable-widec); the normal library + will simply suppress line-drawing when running in a UTF-8 locale in + screen. +
    • corrections to lib_get_wstr.c: +
        +
      • null-terminate buffer passed to setcchar(), which occasionally + failed. +
      • map special characters such as erase- and kill-characters into + key-codes so those will work as expected even if they are not + mentioned in the terminfo. +
      +
    -
  • modify mvcur() to avoid emitting newline characters when nonl() mode - is set. Normally this is not a problem since the actual terminal - mode is set to suppress nl/crlf translations, however it is useful to - allow the caller to manipulate the terminal mode to avoid staircasing - effects after spawning a process which writes messages (for lynx - 2.8.4). +
  • modify setupterm() to check if the terminfo and + terminal-modes have already been read. This ensures that it does not + reinvoke def_prog_mode() when an application calls more + than one function, such as tgetent() and + initscr(). + +
  • fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR, + REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at + the editing position before making modifications. + +
  • correct keybound(), which reported definitions in the + wrong table, i.e., the list of definitions which are disabled by + keyok(). + +
  • fixes related to safe_sprintf.c: +
      +
    • correct an allocation size in safe_sprintf.c for the "*" format + code. +
    • correct safe_sprintf.c to not return a null pointer if the format + happens to be an empty string. +
    • make return value from _nc_printf_string() consistent. Before, + depending on whether --enable-safe-sprintf was used, it might not + be cached for reallocating. +
    + +
  • other low-level improvements to the optimization code include: +
      +
    • if the output is a socket or other non-tty device, use 1 + millisecond + for the cost in mvcur; previously it was 9 milliseconds because the + baudrate was not known. +
    • modify lib_getch.c to avoid recursion via wgetnstr() when the + input + is not a tty and consequently mode-changes do not work. +
    • fix several places in tack/pad.c which tested and used the + parameter- and parameterless strings inconsistently. +
    • change several tputs() calls in scrolling code to use putp(), to + enable padding which may be needed for some terminals. +
    • improve mvcur() by checking if it is safe to move when video + attributes are set (msgr), and if not, reset/restore attributes + within that function rather than doing it separately in the GoTo() + function in tty_update.c. +
    • use tputs() rather than putp() in a few cases in tty_update.c + since the corresponding delays are proportional to the number of + lines affected: repeat_char, clr_eos, change_scroll_region. +
    + +
  • correct line/column reference in adjust_window(), needed to make + special windows such as curscr track properly when resizing. + +
  • fix a potential recursion between napms() and _nc_timed_wait() + +
  • rewrote lib_insch.c, combining it with lib_insstr.c so both handle + tab and other control characters consistently. + +
  • do not try to open gpm mouse driver if standard output is not a + tty; the gpm library does not make this check.
Portability:
    -
  • configure script: -
      -
    • modify check in --disable-overwrite option so that it is used by - default unless the --prefix/$prefix value is not /usr, in attempt to - work around packagers who do not read the INSTALL notes. - -
    • correct a typo in configure --enable-colorfgbg option, and move it - to the experimental section (cf: 20011208). - -
    • modify configure script to allow building with termcap only, or with - fallbacks only. In this case, we do not build tic and toe. - -
    • modify run_tic.sh to check if the build is a cross-compile. In that - case, do not use the build's tic to install the terminfo database. - -
    • modify c++/Makefile.in to accommodate archive programs that are - different for C++ than for C, and add cases for vendor's C++ - compilers on Solaris and IRIX. - -
    • add several configure script options to aid with cross-compiling: - --with-build-cc, --with-build-cflags, --with-build-ldflags, and - --with-build-libs. - -
    • add experimental --with-caps=XXX option to customize to similar - terminfo database formats such as AIX 4.x - -
    • add configure option --with-ospeed to assist packagers in transition - to 5.3 change to ospeed type. -
    - -
  • library: -
      -
    • implement a simple vsscanf() fallback function which uses the %n - conversion to help parse the input data. - -
    • various fixes to build/work with different implementations of - vsscanf(). - -
    • add/use macro to suppress sign-extension of char type on - platforms where this is a problem in ctype macros, e.g., Solaris. - -
    • finish changes needed to build dll's on cygwin. - -
    • add #undef's before possible redefinition of ERR and OK in curses.h -
    - -
  • programs: -
      -
    • modify ifdef's in write_entry.c to allow use of symbolic links on - platforms with no hard links, e.g., BeOS. - -
    • modify _nc_write_entry() to allow for the possibility that linking - aliases on a filesystem that ignores case would not succeed because - the source and destination differ only by case, e.g., NCR260VT300WPP0 - on cygwin. - -
    • modify logic in tic, toe, tput and tset which checks for basename of - argv[0] to work properly on systems such as OS/2 which have - case-independent filenames and/or program suffixes, e.g., ".ext". -
    +
  • configure script: +
      +
    • new options: +
      +
      --with-abi-version option. +
      addresses platforms where packagers have diverged from + ncurses ABI numbering. +
      --with-manpage-format=catonly +
      addresses + behavior of BSDI, allow install of man+cat files on NetBSD, + whose behavior has diverged by requiring both to be present. +
      --with-manpage-aliases +
      extends + "--with-manpage-aliases" to provide the option of generating + ".so" files rather than symbolic links for manpage aliases. +
      --with-rel-version +
      workaround to force + libtool on Darwin generate the "same" library names as with + the "--with-shared" option. The Darwin ld program does not + work well with a zero as the minor-version value. +
      --with-trace +
      simplifies defining TRACE to incorporate trace() in libraries. +
      + +
    • fixes/improvements for cross-compiling: + +
        +
      • allow BUILD_CC and related configure script variables to be + overridden from the environment. +
      • use AC_CHECK_TOOL to get proper values for AR and LD for cross + compiling. +
      • use $cross_compiling variable in configure script + rather than comparing $host_alias and + $target alias, since "host" is traditionally misused + in autoconf to refer to the target platform. +
      • modify run_tic.in to avoid using wrong shared libraries when + cross-compiling. +
      + +
    • fixes for Mac OS X: +
        +
      • fix a redefinition of $RANLIB in the configure + script when libtool is used. +
      • modify MKlib_gen.sh to avoid passing "#" tokens through the C + preprocessor. This works around Mac OS X's preprocessor, which + insists on adding a blank on each side of the token. +
      + +
    • workarounds for broken tools: +
        +
      • add configure check for wchar_t and wint_t types, rather than + rely on preprocessor definitions. Also work around for gcc + fixinclude bug which creates a shadow copy of + curses.h if it sees these symbols apparently typedef'd. +
      • modify configure script to omit -Winline for gcc 3.3, since + that feature is broken. +
      • several script fixes to work around the ironically named + POSIXLY_CORRECT feature of GNU sed 4.0. +
      • modify configure script to avoid using "head -1", which does + not work if POSIXLY_CORRECT (sic) is set. +
      • update configure script to reflect fix for + AC_PROG_GCC_TRADITIONAL, which is broken in autoconf 2.5x for Mac + OS X 10.2.3. +
      • repair check for missing C++ compiler, which is broken in + autoconf 2.5x by hardcoding it to g++. +
      + +
    • corrected ifdef's relating to configure check for wchar_t, etc. +
    • remove configure script check to allow -Wconversion for older + versions of gcc +
    • modify configure script to accommodate libtool 1.5, as well as + add an parameter to the "--with-libtool" option which can specify + the pathname of libtool. +
    • change several sed scripts to avoid using "\+" since it is not a + BRE (basic regular expression). One instance caused terminfo.5 to + be misformatted on FreeBSD. +
    • use '%' as sed substitute delimiter in run_tic script to avoid + problems with pathname delimiters such as ':' and '@'. +
    • add -D_XOPEN_SOURCE=500 if needed when configuring with + "--enable-widec", to get mbstate_t declaration on HPUX + 11.11. +
    + +
  • library: +
      +
    • adjust include-options in CF_ETIP_DEFINES to avoid missing + ncurses_dll.h, fixing special definitions that may be needed for + etip.h. +
    • modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a + ".so" suffix. +
    • improve ifdef's to guard against redefinition of wchar_t and wint_t + in curses.h. +
    • remove an #undef for KEY_EVENT from curses.tail used in the + experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses + Debian dpkg's build script. +

Features of Ncurses

@@ -317,61 +449,60 @@ including (versions starting with those noted):
cdk
Curses Development Kit
-http://invisible-island.net/cdk. +http://invisible-island.net/cdk/
-http://www.vexus.ca/CDK.html +http://www.vexus.ca/products/CDK/
ded
directory-editor
-http://invisible-island.net/ded. +http://invisible-island.net/ded/
dialog
the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux.
-http://invisible-island.net/dialog. +http://invisible-island.net/dialog/
lynx
the character-screen WWW browser
-http://lynx.isc.org/release. +http://lynx.isc.org/release/
Midnight Commander
file manager
-www.gnome.org/mc/. +http://www.ibiblio.org/mc/
mutt
mail utility
-http://www.mutt.org. +http://www.mutt.org/
ncftp
file-transfer utility
-http://www.ncftp.com. +http://www.ncftp.com/
nvi
New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
-http://www.bostic.com/vi/. +http://www.bostic.com/vi/ +
+
pinfo +
Lynx-like info browser. +http://dione.ids.pl/~pborys/software/pinfo/
tin
newsreader, supporting color, MIME -
-http://www.tin.org. -
taper -
tape archive utility -
-http://members.iinet.net.au/~yusuf/taper/. +http://www.tin.org/
vh-1.6
Volks-Hypertext browser for the Jargon File
-http://www.bg.debian.org/Packages/unstable/text/vh.html. +http://www.debian.org/Packages/unstable/text/vh.html as well as some that use ncurses for the terminfo support alone:
minicom
terminal emulator
-http://www.pp.clinet.fi/~walker/minicom.html. +http://www.netsonic.fi/~walker/minicom.html
vile
vi-like-emacs
-http://invisible-island.net/vile. +http://invisible-island.net/vile/

@@ -380,16 +511,16 @@ a few games).

Who's Who and What's What

-The original developers of ncurses are Zeyd Ben-Halim and -Eric S. Raymond. +Zeyd Ben-Halim +started it from a previous package pcurses, written by Pavel Curtis. +Eric S. Raymond +continued development. +Jürgen Pfeifer wrote most of the form and menu libraries. Ongoing work is being done by -Thomas Dickey -and -Jürgen Pfeifer. -Thomas Dickey -acts as the maintainer for the Free Software Foundation, which holds the -copyright on ncurses. +Thomas Dickey. +Thomas Dickey +acts as the maintainer for the Free Software Foundation, +which holds the copyright on ncurses. Contact the current maintainers at bug-ncurses@gnu.org.

@@ -404,7 +535,7 @@ This list is open to anyone interested in helping with the development and testing of this package.

Beta versions of ncurses and patches to the current release are made available at -ftp://invisible-island.net/ncurses. +ftp://invisible-island.net/ncurses/ .

Future Plans

    @@ -416,14 +547,16 @@ on them, please join the ncurses list.

    Other Related Resources

    -The distribution includes and uses a version of the terminfo-format -terminal description file maintained by Eric Raymond. -http://earthspace.net/~esr/terminfo.

    +The distribution provides a newer version of the terminfo-format +terminal description file maintained by +Eric Raymond . +Unlike the older version, the termcap and terminfo data are provided +in the same file.

    You can find lots of information on terminal-related topics not covered in the terminfo file at Richard Shuford's -archive. +archive . ' >> doc/html/man/$$g ;\ - man/edit_man.sh editing /usr/man man $$f | $(MANPROG) | tr '\255' '-' | $(MAN2HTML) -title "$$T" | \ + man/edit_man.sh normal editing /usr/man man $$f | $(MANPROG) | tr '\255' '-' | $(MAN2HTML) -title "$$T" | \ sed -f subst.sed |\ sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \ >> doc/html/man/$$g ;\ @@ -97,7 +99,7 @@ manhtml: MANIFEST @sed -e "\%./doc/html/man/%d" < MANIFEST > MANIFEST.tmp @find ./doc/html/man -type f -print >> MANIFEST.tmp @chmod u+w MANIFEST - @sort -u < MANIFEST.tmp > MANIFEST + @misc/csort -u < MANIFEST.tmp > MANIFEST @rm -f MANIFEST.tmp # @@ -110,7 +112,7 @@ adahtml: MANIFEST (cd ./Ada95/gen ; make html) ;\ sed -e "\%./doc/html/ada/%d" < MANIFEST > MANIFEST.tmp ;\ find ./doc/html/ada -type f -print >> MANIFEST.tmp ;\ - sort -u < MANIFEST.tmp > MANIFEST ;\ + misc/csort -u < MANIFEST.tmp > MANIFEST ;\ rm -f MANIFEST.tmp ;\ fi @@ -128,7 +130,7 @@ writelock: MANIFEST: -rm -f $@ touch $@ - find . -type f -print |sort | fgrep -v .lsm |fgrep -v .spec >$@ + find . -type f -print |misc/csort | fgrep -v .lsm |fgrep -v .spec >$@ TAGS: etags */*.[ch] diff --git a/doc/hackguide.doc b/doc/hackguide.doc index e9828d29..a3524301 100644 --- a/doc/hackguide.doc +++ b/doc/hackguide.doc @@ -1,8 +1,8 @@ A Hacker's Guide to NCURSES - + Contents - + * Abstract * Objective of the Package + Why System V Curses? @@ -24,664 +24,664 @@ * Other Utilities * Style Tips for Developers * Porting Hints - + Abstract - + This document is a hacker's tour of the ncurses library and utilities. - It discusses design philosophy, implementation methods, and the - conventions used for coding and documentation. It is recommended - reading for anyone who is interested in porting, extending or + It discusses design philosophy, implementation methods, and the + conventions used for coding and documentation. It is recommended + reading for anyone who is interested in porting, extending or improving the package. - + Objective of the Package - + The objective of the ncurses package is to provide a free software API for character-cell terminals and terminal emulators with the following characteristics: - * Source-compatible with historical curses implementations + * Source-compatible with historical curses implementations (including the original BSD curses and System V curses. - * Conformant with the XSI Curses standard issued as part of XPG4 by + * Conformant with the XSI Curses standard issued as part of XPG4 by X/Open. - * High-quality -- stable and reliable code, wide portability, good + * High-quality -- stable and reliable code, wide portability, good packaging, superior documentation. - * Featureful -- should eliminate as much of the drudgery of C + * Featureful -- should eliminate as much of the drudgery of C interface programming as possible, freeing programmers to think at a higher level of design. - - These objectives are in priority order. So, for example, source - compatibility with older version must trump featurefulness -- we - cannot add features if it means breaking the portion of the API + + These objectives are in priority order. So, for example, source + compatibility with older version must trump featurefulness -- we + cannot add features if it means breaking the portion of the API corresponding to historical curses versions. - + Why System V Curses? - We used System V curses as a model, reverse-engineering their API, in + We used System V curses as a model, reverse-engineering their API, in order to fulfill the first two objectives. - - System V curses implementations can support BSD curses programs with + + System V curses implementations can support BSD curses programs with just a recompilation, so by capturing the System V API we also capture BSD's. - - More importantly for the future, the XSI Curses standard issued by - X/Open is explicitly and closely modeled on System V. So conformance + + More importantly for the future, the XSI Curses standard issued by + X/Open is explicitly and closely modeled on System V. So conformance with System V took us most of the way to base-level XSI conformance. - + How to Design Extensions - The third objective (standards conformance) requires that it be easy - to condition source code using ncurses so that the absence of + The third objective (standards conformance) requires that it be easy + to condition source code using ncurses so that the absence of nonstandard extensions does not break the code. - - Accordingly, we have a policy of associating with each nonstandard - extension a feature macro, so that ncurses client code can use this - macro to condition in or out the code that requires the ncurses + + Accordingly, we have a policy of associating with each nonstandard + extension a feature macro, so that ncurses client code can use this + macro to condition in or out the code that requires the ncurses extension. - - For example, there is a macro NCURSES_MOUSE_VERSION which XSI Curses - does not define, but which is defined in the ncurses library header. + + For example, there is a macro NCURSES_MOUSE_VERSION which XSI Curses + does not define, but which is defined in the ncurses library header. You can use this to condition the calls to the mouse API calls. - + Portability and Configuration - - Code written for ncurses may assume an ANSI-standard C compiler and - POSIX-compatible OS interface. It may also assume the presence of a + + Code written for ncurses may assume an ANSI-standard C compiler and + POSIX-compatible OS interface. It may also assume the presence of a System-V-compatible select(2) call. - + We encourage (but do not require) developers to make the code friendly to less-capable UNIX environments wherever possible. - - We encourage developers to support OS-specific optimizations and + + We encourage developers to support OS-specific optimizations and methods not available under POSIX/ANSI, provided only that: - * All such code is properly conditioned so the build process does + * All such code is properly conditioned so the build process does not attempt to compile it under a plain ANSI/POSIX environment. - * Adding such implementation methods does not introduce + * Adding such implementation methods does not introduce incompatibilities in the ncurses API between platforms. - - We use GNU autoconf(1) as a tool to deal with portability issues. The + + We use GNU autoconf(1) as a tool to deal with portability issues. The right way to leverage an OS-specific feature is to modify the autoconf - specification files (configure.in and aclocal.m4) to set up a new + specification files (configure.in and aclocal.m4) to set up a new feature macro, which you then use to condition your code. - + Documentation Conventions - - There are three kinds of documentation associated with this package. + + There are three kinds of documentation associated with this package. Each has a different preferred format: * Package-internal files (README, INSTALL, TO-DO etc.) * Manual pages. * Everything else (i.e., narrative documentation). - + Our conventions are simple: 1. Maintain package-internal files in plain text. The expected viewer - for them more(1) or an editor window; there's no point in + for them more(1) or an editor window; there's no point in elaborate mark-up. - 2. Mark up manual pages in the man macros. These have to be viewable + 2. Mark up manual pages in the man macros. These have to be viewable through traditional man(1) programs. 3. Write everything else in HTML. - - When in doubt, HTMLize a master and use lynx(1) to generate plain + + When in doubt, HTMLize a master and use lynx(1) to generate plain ASCII (as we do for the announcement document). - + The reason for choosing HTML is that it's (a) well-adapted for on-line browsing through viewers that are everywhere; (b) more easily readable - as plain text than most other mark-ups, if you don't have a viewer; - and (c) carries enough information that you can generate a - nice-looking printed version from it. Also, of course, it make + as plain text than most other mark-ups, if you don't have a viewer; + and (c) carries enough information that you can generate a + nice-looking printed version from it. Also, of course, it make exporting things like the announcement document to WWW pretty trivial. - + How to Report Bugs - - The reporting address for bugs is bug-ncurses@gnu.org. This is a - majordomo list; to join, write to bug-ncurses-request@gnu.org with a + + The reporting address for bugs is bug-ncurses@gnu.org. This is a + majordomo list; to join, write to bug-ncurses-request@gnu.org with a message containing the line: subscribe @ - The ncurses code is maintained by a small group of volunteers. While - we try our best to fix bugs promptly, we simply don't have a lot of - hours to spend on elementary hand-holding. We rely on intelligent - cooperation from our users. If you think you have found a bug in - ncurses, there are some steps you can take before contacting us that + The ncurses code is maintained by a small group of volunteers. While + we try our best to fix bugs promptly, we simply don't have a lot of + hours to spend on elementary hand-holding. We rely on intelligent + cooperation from our users. If you think you have found a bug in + ncurses, there are some steps you can take before contacting us that will help get the bug fixed quickly. - - In order to use our bug-fixing time efficiently, we put people who + + In order to use our bug-fixing time efficiently, we put people who show us they've taken these steps at the head of our queue. This means - that if you don't, you'll probably end up at the tail end and have to + that if you don't, you'll probably end up at the tail end and have to wait a while. 1. Develop a recipe to reproduce the bug. - Bugs we can reproduce are likely to be fixed very quickly, often - within days. The most effective single thing you can do to get a - quick fix is develop a way we can duplicate the bad behavior -- - ideally, by giving us source for a small, portable test program - that breaks the library. (Even better is a keystroke recipe using + Bugs we can reproduce are likely to be fixed very quickly, often + within days. The most effective single thing you can do to get a + quick fix is develop a way we can duplicate the bad behavior -- + ideally, by giving us source for a small, portable test program + that breaks the library. (Even better is a keystroke recipe using one of the test programs provided with the distribution.) 2. Try to reproduce the bug on a different terminal type. - In our experience, most of the behaviors people report as library + In our experience, most of the behaviors people report as library bugs are actually due to subtle problems in terminal descriptions. This is especially likely to be true if you're using a traditional - asynchronous terminal or PC-based terminal emulator, rather than + asynchronous terminal or PC-based terminal emulator, rather than xterm or a UNIX console entry. It's therefore extremely helpful if you can tell us whether or not - your problem reproduces on other terminal types. Usually you'll - have both a console type and xterm available; please tell us + your problem reproduces on other terminal types. Usually you'll + have both a console type and xterm available; please tell us whether or not your bug reproduces on both. - If you have xterm available, it is also good to collect xterm + If you have xterm available, it is also good to collect xterm reports for different window sizes. This is especially true if you - normally use an unusual xterm window size -- a surprising number + normally use an unusual xterm window size -- a surprising number of the bugs we've seen are either triggered or masked by these. 3. Generate and examine a trace file for the broken behavior. - Recompile your program with the debugging versions of the - libraries. Insert a trace() call with the argument set to - TRACE_UPDATE. (See "Writing Programs with NCURSES" for details on - trace levels.) Reproduce your bug, then look at the trace file to + Recompile your program with the debugging versions of the + libraries. Insert a trace() call with the argument set to + TRACE_UPDATE. (See "Writing Programs with NCURSES" for details on + trace levels.) Reproduce your bug, then look at the trace file to see what the library was actually doing. - Another frequent cause of apparent bugs is application coding - errors that cause the wrong things to be put on the virtual + Another frequent cause of apparent bugs is application coding + errors that cause the wrong things to be put on the virtual screen. Looking at the virtual-screen dumps in the trace file will - tell you immediately if this is happening, and save you from the - possible embarrassment of being told that the bug is in your code + tell you immediately if this is happening, and save you from the + possible embarrassment of being told that the bug is in your code and is your problem rather than ours. - If the virtual-screen dumps look correct but the bug persists, - it's possible to crank up the trace level to give more and more - information about the library's update actions and the control - sequences it issues to perform them. The test directory of the + If the virtual-screen dumps look correct but the bug persists, + it's possible to crank up the trace level to give more and more + information about the library's update actions and the control + sequences it issues to perform them. The test directory of the distribution contains a tool for digesting these logs to make them less tedious to wade through. Often you'll find terminfo problems at this stage by noticing that - the escape sequences put out for various capabilities are wrong. - If not, you're likely to learn enough to be able to characterize + the escape sequences put out for various capabilities are wrong. + If not, you're likely to learn enough to be able to characterize any bug in the screen-update logic quite exactly. 4. Report details and symptoms, not just interpretations. - If you do the preceding two steps, it is very likely that you'll + If you do the preceding two steps, it is very likely that you'll discover the nature of the problem yourself and be able to send us - a fix. This will create happy feelings all around and earn you - good karma for the first time you run into a bug you really can't + a fix. This will create happy feelings all around and earn you + good karma for the first time you run into a bug you really can't characterize and fix yourself. - If you're still stuck, at least you'll know what to tell us. - Remember, we need details. If you guess about what is safe to + If you're still stuck, at least you'll know what to tell us. + Remember, we need details. If you guess about what is safe to leave out, you are too likely to be wrong. - If your bug produces a bad update, include a trace file. Try to - make the trace at the least voluminous level that pins down the - bug. Logs that have been through tracemunch are OK, it doesn't - throw away any information (actually they're better than + If your bug produces a bad update, include a trace file. Try to + make the trace at the least voluminous level that pins down the + bug. Logs that have been through tracemunch are OK, it doesn't + throw away any information (actually they're better than un-munched ones because they're easier to read). - If your bug produces a core-dump, please include a symbolic stack + If your bug produces a core-dump, please include a symbolic stack trace generated by gdb(1) or your local equivalent. Tell us about every terminal on which you've reproduced the bug -- - and every terminal on which you can't. Ideally, sent us terminfo + and every terminal on which you can't. Ideally, sent us terminfo sources for all of these (yours might differ from ours). - Include your ncurses version and your OS/machine type, of course! + Include your ncurses version and your OS/machine type, of course! You can find your ncurses version in the curses.h file. - - If your problem smells like a logic error or in cursor movement or - scrolling or a bad capability, there are a couple of tiny test frames - for the library algorithms in the progs directory that may help you - isolate it. These are not part of the normal build, but do have their + + If your problem smells like a logic error or in cursor movement or + scrolling or a bad capability, there are a couple of tiny test frames + for the library algorithms in the progs directory that may help you + isolate it. These are not part of the normal build, but do have their own make productions. - - The most important of these is mvcur, a test frame for the - cursor-movement optimization code. With this program, you can see - directly what control sequences will be emitted for any given cursor + + The most important of these is mvcur, a test frame for the + cursor-movement optimization code. With this program, you can see + directly what control sequences will be emitted for any given cursor movement or scroll/insert/delete operations. If you think you've got a - bad capability identified, you can disable it and test again. The + bad capability identified, you can disable it and test again. The program is command-driven and has on-line help. - - If you think the vertical-scroll optimization is broken, or just want - to understand how it works better, build hashmap and read the header - comments of hardscroll.c and hashmap.c; then try it out. You can also + + If you think the vertical-scroll optimization is broken, or just want + to understand how it works better, build hashmap and read the header + comments of hardscroll.c and hashmap.c; then try it out. You can also test the hardware-scrolling optimization separately with hardscroll. - - There's one other interactive tester, tctest, that exercises - translation between termcap and terminfo formats. If you have a + + There's one other interactive tester, tctest, that exercises + translation between termcap and terminfo formats. If you have a serious need to run this, you probably belong on our development team! - + A Tour of the Ncurses Library - + Library Overview - Most of the library is superstructure -- fairly trivial convenience - interfaces to a small set of basic functions and data structures used - to manipulate the virtual screen (in particular, none of this code - does any I/O except through calls to more fundamental modules + Most of the library is superstructure -- fairly trivial convenience + interfaces to a small set of basic functions and data structures used + to manipulate the virtual screen (in particular, none of this code + does any I/O except through calls to more fundamental modules described below). The files - - lib_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c - lib_clearok.c lib_clrbot.c lib_clreol.c lib_colorset.c lib_data.c - lib_delch.c lib_delwin.c lib_echo.c lib_erase.c lib_gen.c - lib_getstr.c lib_hline.c lib_immedok.c lib_inchstr.c lib_insch.c - lib_insdel.c lib_insstr.c lib_instr.c lib_isendwin.c lib_keyname.c - lib_leaveok.c lib_move.c lib_mvwin.c lib_overlay.c lib_pad.c - lib_printw.c lib_redrawln.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_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c + lib_clearok.c lib_clrbot.c lib_clreol.c lib_colorset.c lib_data.c + lib_delch.c lib_delwin.c lib_echo.c lib_erase.c lib_gen.c + lib_getstr.c lib_hline.c lib_immedok.c lib_inchstr.c lib_insch.c + lib_insdel.c lib_insstr.c lib_instr.c lib_isendwin.c lib_keyname.c + lib_leaveok.c lib_move.c lib_mvwin.c lib_overlay.c lib_pad.c + lib_printw.c lib_redrawln.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_unctrl.c lib_vline.c lib_wattroff.c lib_wattron.c lib_window.c - - are all in this category. They are very unlikely to need change, + + are all in this category. They are very unlikely to need change, barring bugs or some fundamental reorganization in the underlying data structures. - + These files are used only for debugging support: - - lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c + + lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c lib_tracedmp.c lib_tracemse.c trace_buf.c - - It is rather unlikely you will ever need to change these, unless you + + It is rather unlikely you will ever need to change these, unless you want to introduce a new debug trace level for some reasoon. - - There is another group of files that do direct I/O via tputs(), - computations on the terminal capabilities, or queries to the OS - environment, but nevertheless have only fairly low complexity. These + + There is another group of files that do direct I/O via tputs(), + computations on the terminal capabilities, or queries to the OS + environment, but nevertheless have only fairly low complexity. These include: - - lib_acs.c lib_beep.c lib_color.c lib_endwin.c lib_initscr.c - lib_longname.c lib_newterm.c lib_options.c lib_termcap.c lib_ti.c + + lib_acs.c lib_beep.c lib_color.c lib_endwin.c lib_initscr.c + lib_longname.c lib_newterm.c lib_options.c lib_termcap.c lib_ti.c lib_tparm.c lib_tputs.c lib_vidattr.c read_entry.c. - + They are likely to need revision only if ncurses is being ported to an environment without an underlying terminfo capability representation. - - These files have serious hooks into the tty driver and signal + + These files have serious hooks into the tty driver and signal facilities: - + lib_kernel.c lib_baudrate.c lib_raw.c lib_tstp.c lib_twait.c - + If you run into porting snafus moving the package to another UNIX, the - problem is likely to be in one of these files. The file lib_print.c + problem is likely to be in one of these files. The file lib_print.c uses sleep(2) and also falls in this category. - + Almost all of the real work is done in the files - - hardscroll.c hashmap.c lib_addch.c lib_doupdate.c lib_getch.c + + hardscroll.c hashmap.c lib_addch.c lib_doupdate.c lib_getch.c lib_mouse.c lib_mvcur.c lib_refresh.c lib_setup.c lib_vidattr.c - - Most of the algorithmic complexity in the library lives in these - files. If there is a real bug in ncurses itself, it's probably here. + + Most of the algorithmic complexity in the library lives in these + files. If there is a real bug in ncurses itself, it's probably here. We'll tour some of these files in detail below (see The Engine Room). - - Finally, there is a group of files that is actually most of the - terminfo compiler. The reason this code lives in the ncurses library + + Finally, there is a group of files that is actually most of the + terminfo compiler. The reason this code lives in the ncurses library is to support fallback to /etc/termcap. These files include - - alloc_entry.c captoinfo.c comp_captab.c comp_error.c comp_hash.c + + alloc_entry.c captoinfo.c comp_captab.c comp_error.c comp_hash.c comp_parse.c comp_scan.c parse_entry.c read_termcap.c write_entry.c - + We'll discuss these in the compiler tour. - + The Engine Room Keyboard Input - - All ncurses input funnels through the function wgetch(), defined in - lib_getch.c. This function is tricky; it has to poll for keyboard and - mouse events and do a running match of incoming input against the set + + All ncurses input funnels through the function wgetch(), defined in + lib_getch.c. This function is tricky; it has to poll for keyboard and + mouse events and do a running match of incoming input against the set of defined special keys. - - The central data structure in this module is a FIFO queue, used to - match multiple-character input sequences against special-key + + The central data structure in this module is a FIFO queue, used to + match multiple-character input sequences against special-key capabilities; also to implement pushback via ungetch(). - + The wgetch() code distinguishes between function key sequences and the - same sequences typed manually by doing a timed wait after each input - character that could lead a function key sequence. If the entire - sequence takes less than 1 second, it is assumed to have been + same sequences typed manually by doing a timed wait after each input + character that could lead a function key sequence. If the entire + sequence takes less than 1 second, it is assumed to have been generated by a function key press. - - Hackers bruised by previous encounters with variant select(2) calls - may find the code in lib_twait.c interesting. It deals with the + + Hackers bruised by previous encounters with variant select(2) calls + may find the code in lib_twait.c interesting. It deals with the problem that some BSD selects don't return a reliable time-left value. The function timed_wait() effectively simulates a System V select. - + Mouse Events - + If the mouse interface is active, wgetch() polls for mouse events each - call, before it goes to the keyboard for input. It is up to + call, before it goes to the keyboard for input. It is up to lib_mouse.c how the polling is accomplished; it may vary for different devices. - - Under xterm, however, mouse event notifications come in via the - keyboard input stream. They are recognized by having the kmous - capability as a prefix. This is kind of klugey, but trying to wire in - recognition of a mouse key prefix without going through the - function-key machinery would be just too painful, and this turns out - to imply having the prefix somewhere in the function-key capabilities + + Under xterm, however, mouse event notifications come in via the + keyboard input stream. They are recognized by having the kmous + capability as a prefix. This is kind of klugey, but trying to wire in + recognition of a mouse key prefix without going through the + function-key machinery would be just too painful, and this turns out + to imply having the prefix somewhere in the function-key capabilities at terminal-type initialization. - - This kluge only works because kmous isn't actually used by any + + This kluge only works because kmous isn't actually used by any historic terminal type or curses implementation we know of. Best guess - is it's a relic of some forgotten experiment in-house at Bell Labs - that didn't leave any traces in the publicly-distributed System V - terminfo files. If System V or XPG4 ever gets serious about using it + is it's a relic of some forgotten experiment in-house at Bell Labs + that didn't leave any traces in the publicly-distributed System V + terminfo files. If System V or XPG4 ever gets serious about using it again, this kluge may have to change. - + Here are some more details about mouse event handling: - + The lib_mouse()code is logically split into a lower level that accepts - event reports in a device-dependent format and an upper level that + event reports in a device-dependent format and an upper level that parses mouse gestures and filters events. The mediating data structure is a circular queue of event structures. - + Functionally, the lower level's job is to pick up primitive events and - put them on the circular queue. This can happen in one of two ways: - either (a) _nc_mouse_event() detects a series of incoming mouse - reports and queues them, or (b) code in lib_getch.c detects the kmous - prefix in the keyboard input stream and calls _nc_mouse_inline to + put them on the circular queue. This can happen in one of two ways: + either (a) _nc_mouse_event() detects a series of incoming mouse + reports and queues them, or (b) code in lib_getch.c detects the kmous + prefix in the keyboard input stream and calls _nc_mouse_inline to queue up a series of adjacent mouse reports. - + In either case, _nc_mouse_parse() should be called after the series is accepted to parse the digested mouse reports (low-level events) into a gesture (a high-level or composite event). - + Output and Screen Updating - + With the single exception of character echoes during a wgetnstr() call - (which simulates cooked-mode line editing in an ncurses window), the + (which simulates cooked-mode line editing in an ncurses window), the library normally does all its output at refresh time. - - The main job is to go from the current state of the screen (as - represented in the curscr window structure) to the desired new state + + The main job is to go from the current state of the screen (as + represented in the curscr window structure) to the desired new state (as represented in the newscr window structure), while doing as little I/O as possible. - - The brains of this operation are the modules hashmap.c, hardscroll.c - and lib_doupdate.c; the latter two use lib_mvcur.c. Essentially, what + + The brains of this operation are the modules hashmap.c, hardscroll.c + and lib_doupdate.c; the latter two use lib_mvcur.c. Essentially, what happens looks like this: - - The hashmap.c module tries to detect vertical motion changes between - the real and virtual screens. This information is represented by the - oldindex members in the newscr structure. These are modified by - vertical-motion and clear operations, and both are re-initialized + + The hashmap.c module tries to detect vertical motion changes between + the real and virtual screens. This information is represented by the + oldindex members in the newscr structure. These are modified by + vertical-motion and clear operations, and both are re-initialized after each update. To this change-journalling information, the hashmap - code adds deductions made using a modified Heckel algorithm on hash + code adds deductions made using a modified Heckel algorithm on hash values generated from the line contents. - - The hardscroll.c module computes an optimum set of scroll, insertion, - and deletion operations to make the indices match. It calls + + The hardscroll.c module computes an optimum set of scroll, insertion, + and deletion operations to make the indices match. It calls _nc_mvcur_scrolln() in lib_mvcur.c to do those motions. - - Then lib_doupdate.c goes to work. Its job is to do line-by-line - transformations of curscr lines to newscr lines. Its main tool is the - routine mvcur() in lib_mvcur.c. This routine does cursor-movement - optimization, attempting to get from given screen location A to given + + Then lib_doupdate.c goes to work. Its job is to do line-by-line + transformations of curscr lines to newscr lines. Its main tool is the + routine mvcur() in lib_mvcur.c. This routine does cursor-movement + optimization, attempting to get from given screen location A to given location B in the fewest output characters posible. - - If you want to work on screen optimizations, you should use the fact - that (in the trace-enabled version of the library) enabling the - TRACE_TIMES trace level causes a report to be emitted after each - screen update giving the elapsed time and a count of characters - emitted during the update. You can use this to tell when an update + + If you want to work on screen optimizations, you should use the fact + that (in the trace-enabled version of the library) enabling the + TRACE_TIMES trace level causes a report to be emitted after each + screen update giving the elapsed time and a count of characters + emitted during the update. You can use this to tell when an update optimization improves efficiency. - - In the trace-enabled version of the library, it is also possible to + + In the trace-enabled version of the library, it is also possible to disable and re-enable various optimizations at runtime by tweaking the - variable _nc_optimize_enable. See the file include/curses.h.in for + variable _nc_optimize_enable. See the file include/curses.h.in for mask values, near the end. - + The Forms and Menu Libraries - - The forms and menu libraries should work reliably in any environment - you can port ncurses to. The only portability issue anywhere in them - is what flavor of regular expressions the built-in form field type + + The forms and menu libraries should work reliably in any environment + you can port ncurses to. The only portability issue anywhere in them + is what flavor of regular expressions the built-in form field type TYPE_REGEXP will recognize. - - The configuration code prefers the POSIX regex facility, modeled on - System V's, but will settle for BSD regexps if the former isn't + + The configuration code prefers the POSIX regex facility, modeled on + System V's, but will settle for BSD regexps if the former isn't available. - - Historical note: the panels code was written primarily to assist in - porting u386mon 2.0 (comp.sources.misc v14i001-4) to systems lacking - panels support; u386mon 2.10 and beyond use it. This version has been + + Historical note: the panels code was written primarily to assist in + porting u386mon 2.0 (comp.sources.misc v14i001-4) to systems lacking + panels support; u386mon 2.10 and beyond use it. This version has been slightly cleaned up for ncurses. - + A Tour of the Terminfo Compiler - + The ncurses implementation of tic is rather complex internally; it has - to do a trying combination of missions. This starts with the fact - that, in addition to its normal duty of compiling terminfo sources - into loadable terminfo binaries, it has to be able to handle termcap + to do a trying combination of missions. This starts with the fact + that, in addition to its normal duty of compiling terminfo sources + into loadable terminfo binaries, it has to be able to handle termcap syntax and compile that too into terminfo entries. - - The implementation therefore starts with a table-driven, dual-mode + + The implementation therefore starts with a table-driven, dual-mode lexical analyzer (in comp_scan.c). The lexer chooses its mode (termcap or terminfo) based on the first `,' or `:' it finds in each entry. The - lexer does all the work of recognizing capability names and values; - the grammar above it is trivial, just "parse entries till you run out + lexer does all the work of recognizing capability names and values; + the grammar above it is trivial, just "parse entries till you run out of file". - + Translation of Non-use Capabilities - Translation of most things besides use capabilities is pretty - straightforward. The lexical analyzer's tokenizer hands each - capability name to a hash function, which drives a table lookup. The + Translation of most things besides use capabilities is pretty + straightforward. The lexical analyzer's tokenizer hands each + capability name to a hash function, which drives a table lookup. The table entry yields an index which is used to look up the token type in another table, and controls interpretation of the value. - - One possibly interesting aspect of the implementation is the way the - compiler tables are initialized. All the tables are generated by - various awk/sed/sh scripts from a master table include/Caps; these - scripts actually write C initializers which are linked to the + + One possibly interesting aspect of the implementation is the way the + compiler tables are initialized. All the tables are generated by + various awk/sed/sh scripts from a master table include/Caps; these + scripts actually write C initializers which are linked to the compiler. Furthermore, the hash table is generated in the same way, so - it doesn't have to be generated at compiler startup time (another - benefit of this organization is that the hash table can be in + it doesn't have to be generated at compiler startup time (another + benefit of this organization is that the hash table can be in shareable text space). - + Thus, adding a new capability is usually pretty trivial, just a matter - of adding one line to the include/Caps file. We'll have more to say + of adding one line to the include/Caps file. We'll have more to say about this in the section on Source-Form Translation. - + Use Capability Resolution - The background problem that makes tic tricky isn't the capability - translation itself, it's the resolution of use capabilities. Older + The background problem that makes tic tricky isn't the capability + translation itself, it's the resolution of use capabilities. Older versions would not handle forward use references for this reason (that is, a using terminal always had to follow its use target in the source - file). By doing this, they got away with a simple implementation - tactic; compile everything as it blows by, then resolve uses from + file). By doing this, they got away with a simple implementation + tactic; compile everything as it blows by, then resolve uses from compiled entries. - - This won't do for ncurses. The problem is that that the whole - compilation process has to be embeddable in the ncurses library so + + This won't do for ncurses. The problem is that that the whole + compilation process has to be embeddable in the ncurses library so that it can be called by the startup code to translate termcap entries - on the fly. The embedded version can't go promiscuously writing - everything it translates out to disk -- for one thing, it will + on the fly. The embedded version can't go promiscuously writing + everything it translates out to disk -- for one thing, it will typically be running with non-root permissions. - - So our tic is designed to parse an entire terminfo file into a - doubly-linked circular list of entry structures in-core, and then do - use resolution in-memory before writing everything out. This design + + So our tic is designed to parse an entire terminfo file into a + doubly-linked circular list of entry structures in-core, and then do + use resolution in-memory before writing everything out. This design has other advantages: it makes forward and back use-references equally - easy (so we get the latter for free), and it makes checking for name + easy (so we get the latter for free), and it makes checking for name collisions before they're written out easy to do. - - And this is exactly how the embedded version works. But the - stand-alone user-accessible version of tic partly reverts to the + + And this is exactly how the embedded version works. But the + stand-alone user-accessible version of tic partly reverts to the historical strategy; it writes to disk (not keeping in core) any entry with no use references. - - This is strictly a core-economy kluge, implemented because the - terminfo master file is large enough that some core-poor systems swap + + This is strictly a core-economy kluge, implemented because the + terminfo master file is large enough that some core-poor systems swap like crazy when you compile it all in memory...there have been reports - of this process taking three hours, rather than the twenty seconds or + of this process taking three hours, rather than the twenty seconds or less typical on the author's development box. - + So. The executable tic passes the entry-parser a hook that immediately - writes out the referenced entry if it has no use capabilities. The - compiler main loop refrains from adding the entry to the in-core list - when this hook fires. If some other entry later needs to reference an - entry that got written immediately, that's OK; the resolution code + writes out the referenced entry if it has no use capabilities. The + compiler main loop refrains from adding the entry to the in-core list + when this hook fires. If some other entry later needs to reference an + entry that got written immediately, that's OK; the resolution code will fetch it off disk when it can't find it in core. - - Name collisions will still be detected, just not as cleanly. The - write_entry() code complains before overwriting an entry that - postdates the time of tic's first call to write_entry(), Thus it will - complain about overwriting entries newly made during the tic run, but + + Name collisions will still be detected, just not as cleanly. The + write_entry() code complains before overwriting an entry that + postdates the time of tic's first call to write_entry(), Thus it will + complain about overwriting entries newly made during the tic run, but not about overwriting ones that predate it. - + Source-Form Translation Another use of tic is to do source translation between various termcap and terminfo formats. There are more variants out there than you might think; the ones we know about are described in the captoinfo(1) manual page. - - The translation output code (dump_entry() in ncurses/dump_entry.c) is - shared with the infocmp(1) utility. It takes the same internal - representation used to generate the binary form and dumps it to + + The translation output code (dump_entry() in ncurses/dump_entry.c) is + shared with the infocmp(1) utility. It takes the same internal + representation used to generate the binary form and dumps it to standard output in a specified format. - - The include/Caps file has a header comment describing ways you can - specify source translations for nonstandard capabilities just by + + The include/Caps file has a header comment describing ways you can + specify source translations for nonstandard capabilities just by altering the master table. It's possible to set up capability aliasing - or tell the compiler to plain ignore a given capability without + or tell the compiler to plain ignore a given capability without writing any C code at all. - - For circumstances where you need to do algorithmic translation, there - are functions in parse_entry.c called after the parse of each entry + + For circumstances where you need to do algorithmic translation, there + are functions in parse_entry.c called after the parse of each entry that are specifically intended to encapsulate such translations. This, - for example, is where the AIX box1 capability get translated to an + for example, is where the AIX box1 capability get translated to an acsc string. - + Other Utilities - - The infocmp utility is just a wrapper around the same entry-dumping - code used by tic for source translation. Perhaps the one interesting - aspect of the code is the use of a predicate function passed in to - dump_entry() to control which capabilities are dumped. This is + + The infocmp utility is just a wrapper around the same entry-dumping + code used by tic for source translation. Perhaps the one interesting + aspect of the code is the use of a predicate function passed in to + dump_entry() to control which capabilities are dumped. This is necessary in order to handle both the ordinary De-compilation case and entry difference reporting. - - The tput and clear utilities just do an entry load followed by a + + The tput and clear utilities just do an entry load followed by a tputs() of a selected capability. - + Style Tips for Developers - - See the TO-DO file in the top-level directory of the source + + See the TO-DO file in the top-level directory of the source distribution for additions that would be particularly useful. - - The prefix _nc_ should be used on library public functions that are - not part of the curses API in order to prevent pollution of the - application namespace. If you have to add to or modify the function - prototypes in curses.h.in, read ncurses/MKlib_gen.sh first so you can - avoid breaking XSI conformance. Please join the ncurses mailing list. - See the INSTALL file in the top level of the distribution for details + + The prefix _nc_ should be used on library public functions that are + not part of the curses API in order to prevent pollution of the + application namespace. If you have to add to or modify the function + prototypes in curses.h.in, read ncurses/MKlib_gen.sh first so you can + avoid breaking XSI conformance. Please join the ncurses mailing list. + See the INSTALL file in the top level of the distribution for details on the list. - - Look for the string FIXME in source files to tag minor bugs and + + Look for the string FIXME in source files to tag minor bugs and potential problems that could use fixing. - - Don't try to auto-detect OS features in the main body of the C code. + + Don't try to auto-detect OS features in the main body of the C code. That's the job of the configuration system. - + To hold down complexity, do make your code data-driven. Especially, if - you can drive logic from a table filtered out of include/Caps, do it. - If you find you need to augment the data in that file in order to - generate the proper table, that's still preferable to ad-hoc code -- + you can drive logic from a table filtered out of include/Caps, do it. + If you find you need to augment the data in that file in order to + generate the proper table, that's still preferable to ad-hoc code -- that's why the fifth field (flags) is there. - + Have fun! - + Porting Hints - - The following notes are intended to be a first step towards DOS and + + The following notes are intended to be a first step towards DOS and Macintosh ports of the ncurses libraries. - - The following library modules are `pure curses'; they operate only on - the curses internal structures, do all output through other curses - calls (not including tputs() and putp()) and do not call any other - UNIX routines such as signal(2) or the stdio library. Thus, they + + The following library modules are `pure curses'; they operate only on + the curses internal structures, do all output through other curses + calls (not including tputs() and putp()) and do not call any other + UNIX routines such as signal(2) or the stdio library. Thus, they should not need to be modified for single-terminal ports. - - lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c - lib_clrbot.c lib_clreol.c lib_delch.c lib_delwin.c lib_erase.c - lib_inchstr.c lib_insch.c lib_insdel.c lib_insstr.c lib_keyname.c - lib_move.c lib_mvwin.c lib_newwin.c lib_overlay.c lib_pad.c - lib_printw.c lib_refresh.c lib_scanw.c lib_scroll.c lib_scrreg.c - lib_set_term.c lib_touch.c lib_tparm.c lib_tputs.c lib_unctrl.c + + lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c + lib_clrbot.c lib_clreol.c lib_delch.c lib_delwin.c lib_erase.c + lib_inchstr.c lib_insch.c lib_insdel.c lib_insstr.c lib_keyname.c + lib_move.c lib_mvwin.c lib_newwin.c lib_overlay.c lib_pad.c + lib_printw.c lib_refresh.c lib_scanw.c lib_scroll.c lib_scrreg.c + lib_set_term.c lib_touch.c lib_tparm.c lib_tputs.c lib_unctrl.c lib_window.c panel.c - + This module is pure curses, but calls outstr(): - + lib_getstr.c - - These modules are pure curses, except that they use tputs() and + + These modules are pure curses, except that they use tputs() and putp(): - - lib_beep.c lib_color.c lib_endwin.c lib_options.c lib_slk.c + + lib_beep.c lib_color.c lib_endwin.c lib_options.c lib_slk.c lib_vidattr.c - + This modules assist in POSIX emulation on non-POSIX systems: - + sigaction.c signal calls - - The following source files will not be needed for a + + The following source files will not be needed for a single-terminal-type port. - - alloc_entry.c captoinfo.c clear.c comp_captab.c comp_error.c - comp_hash.c comp_main.c comp_parse.c comp_scan.c dump_entry.c + + alloc_entry.c captoinfo.c clear.c comp_captab.c comp_error.c + comp_hash.c comp_main.c comp_parse.c comp_scan.c dump_entry.c infocmp.c parse_entry.c read_entry.c tput.c write_entry.c - - The following modules will use open()/read()/write()/close()/lseek() + + The following modules will use open()/read()/write()/close()/lseek() on files, but no other OS calls. - + lib_screen.c used to read/write screen dumps - + lib_trace.c used to write trace data to the logfile - + Modules that would have to be modified for a port start here: - - The following modules are `pure curses' but contain assumptions + + The following modules are `pure curses' but contain assumptions inappropriate for a memory-mapped port. - + lib_longname.c assumes there may be multiple terminals - + lib_acs.c assumes acs_map as a double indirection - + lib_mvcur.c assumes cursor moves have variable cost - + lib_termcap.c assumes there may be multiple terminals - + lib_ti.c assumes there may be multiple terminals - + The following modules use UNIX-specific calls: - + lib_doupdate.c input checking - + lib_getch.c read() - + lib_initscr.c getenv() - + lib_newterm.c lib_baudrate.c lib_kernel.c various tty-manipulation and system calls - + lib_raw.c various tty-manipulation calls - + lib_setup.c various tty-manipulation calls - + lib_restart.c various tty-manipulation calls - + lib_tstp.c signal-manipulation calls - + lib_twait.c gettimeofday(), select(). _________________________________________________________________ - - + + Eric S. Raymond - + (Note: This is not the bug address!) diff --git a/doc/html/Ada95.html b/doc/html/Ada95.html index 70a951db..043b9de5 100644 --- a/doc/html/Ada95.html +++ b/doc/html/Ada95.html @@ -1,6 +1,34 @@ @@ -8,20 +36,8 @@

    Ada95 Binding for ncurses

    -The ncurses Ada95 binding is © 1996-2000 by -Jürgen Pfeifer. -

    - -Permission is hereby granted to reproduce and distribute this -binding by any means and for any fee, whether alone or as part -of a larger distribution, in source or in binary form, PROVIDED -this notice is included with any such distribution, and is not -removed from any of its header files. Mention of ncurses and the -author of this binding in any applications linked with it is -highly appreciated.
    - -This binding comes AS IS with no warranty, implied or expressed. -

    +by Jürgen Pfeifer. +


    General Remarks

      @@ -29,24 +45,24 @@ This binding comes AS IS with no warranty, implied or expressed.
    • The functionality is modeled to be compatible with the ncurses package, a clone of the SVr4 curses model.
      I did the development on an Intel box running the latest stable release of -Linux, ncurses and the most recent released +Linux, ncurses and the most recent released GNU Ada Translator gnat versions. For any older versions of ncurses and gnat it is not guaranteed to work.
    • You must have the m4 macroprocessor to build this package. If you don't have this program, you can get the FSF version -here.
    • +here.
    • Ada programs are supposed to be readable. One of my favorite methods to make code readable is to use expressive names for the identifiers. You can find a list of a mapping of the cryptic curses names to the Ada names in this table.
    • -
    • This is not a typical one-2-one interface mapping. It is -close to one-2-one on the functional level. Each (n)curses function +
    • This is not a typical one-to-one interface mapping. It is +close to one-to-one on the functional level. Each (n)curses function has it's counterpart with a more or less similar formal parameter list -in the binding. It is not one-2-one with respect to the datatypes. +in the binding. It is not one-to-one with respect to the datatypes. I tried to make records out of the flat chtype and similar structures, so you don't have to do bit operations to mark an attributed character -as bold. Just make the boolean member bold of the record +as bold. Just make the boolean member bold of the record true. The binding also hides the structures like WINDOW, PANEL, MENU, FORM etc. ! It's a pure functional API.
    • I try to do as much error checking as possible and feasible @@ -58,8 +74,7 @@ error checking style of C.
    • Support for wide characters is currently not in the binding, as it is not really in ncurses at this point in time.
    -

    - +

    Limitations

    • I provide no SCREEN datatype and functions to set a new screen. @@ -79,7 +94,7 @@ which the various fieldtypes are derived.
    • forms subsystem.
    • The *_IO packages are currently output only.
    - +

    Hierarchy of packages

  • Forms +
+
  • Text_IO - + If you want to navigate through the html pages of the package specs, click here.

    Implementation Details

    Behind the abstraction

    All the new types like Window, Panel, Menu, Form etc. are just -opaque representations of the pointers to the corresponding -low level (n)curses structures like +opaque representations of the pointers to the corresponding +low level (n)curses structures like WINDOW *, PANEL *, MENU * or FORM *. So you can safely pass them to C routines that expect a pointer @@ -163,6 +178,6 @@ have two choices to deal with this: Most likely you will follow a mixed approach. Some features are easy to simulate, others will be hard if not impossible.
  • -I'm quite sure I forgot something.

    +I'm quite sure I forgot something. diff --git a/doc/html/ada/files/T.htm b/doc/html/ada/files/T.htm index 8fcea4d6..b9978941 100644 --- a/doc/html/ada/files/T.htm +++ b/doc/html/ada/files/T.htm @@ -74,4 +74,4 @@

  • terminal_interface-curses.adb
  • terminal_interface-curses.ads
  • terminal_interface.ads - \ No newline at end of file + diff --git a/doc/html/ada/funcs/A.htm b/doc/html/ada/funcs/A.htm index dd98d806..c59849d8 100644 --- a/doc/html/ada/funcs/A.htm +++ b/doc/html/ada/funcs/A.htm @@ -3,17 +3,6 @@

    Functions - A

    [index] \ No newline at end of file +
  • Ahead +
  • Allocate_Arg + diff --git a/doc/html/ada/funcs/B.htm b/doc/html/ada/funcs/B.htm index cd263b76..d23957e1 100644 --- a/doc/html/ada/funcs/B.htm +++ b/doc/html/ada/funcs/B.htm @@ -3,8 +3,8 @@

    Functions - B

    [index] \ No newline at end of file +
  • Baud +
  • Beeper +
  • Behind +
  • Bottompanel + diff --git a/doc/html/ada/funcs/C.htm b/doc/html/ada/funcs/C.htm index e5ab81fa..949508dd 100644 --- a/doc/html/ada/funcs/C.htm +++ b/doc/html/ada/funcs/C.htm @@ -3,34 +3,31 @@

    Functions - C

    [index] \ No newline at end of file +
  • Colorcontent +
  • Copywin +
  • Count - terminal_interface-curses-forms.adb:773 +
  • Count - terminal_interface-curses-menus.adb:911 +
  • Create - terminal_interface-curses-forms-field_types-enumeration-ada.ads:48 +
  • Create - terminal_interface-curses-forms-field_types-enumeration.ads:64 +
  • Current_Fld +
  • Curr_Item +
  • curses_versionC +
  • Curs_Set +
  • C_Assume_Default_Colors +
  • C_Builtin_Router +
  • C_Fields +
  • C_Generic_Choice +
  • C_Generic_Type +
  • C_Mitems +
  • C_Use_Default_Colors + diff --git a/doc/html/ada/funcs/D.htm b/doc/html/ada/funcs/D.htm index 705bd5c6..fa010bc7 100644 --- a/doc/html/ada/funcs/D.htm +++ b/doc/html/ada/funcs/D.htm @@ -3,20 +3,19 @@

    Functions - D

    [index] \ No newline at end of file +
  • Defkey +
  • Def_Prog_Mode +
  • Def_Shell_Mode +
  • Delayoutput +
  • Del_Panel +
  • Derwin +
  • Descname - terminal_interface-curses-menus.adb:125 +
  • Descname - terminal_interface-curses-menus.adb:269 +
  • Descname - terminal_interface-curses-menus.adb:277 +
  • Dispatch_Event +
  • Do_Update +
  • Driver +
  • Dupwin +
  • Dup_Field +
  • Dyn_Info + diff --git a/doc/html/ada/funcs/E.htm b/doc/html/ada/funcs/E.htm index b927c7b4..933c74ad 100644 --- a/doc/html/ada/funcs/E.htm +++ b/doc/html/ada/funcs/E.htm @@ -3,9 +3,7 @@

    Functions - E

    [index] \ No newline at end of file +
  • Echo +
  • Endwin +
  • Erasechar + diff --git a/doc/html/ada/funcs/F.htm b/doc/html/ada/funcs/F.htm index 21e6172a..5a95433f 100644 --- a/doc/html/ada/funcs/F.htm +++ b/doc/html/ada/funcs/F.htm @@ -3,44 +3,40 @@

    Functions - F

    [index] \ No newline at end of file +
  • Flushinp +
  • Form_Opts +
  • Form_Opts_Off +
  • Form_Opts_On +
  • Form_Request_Name - terminal_interface-curses-forms.adb:83 +
  • Form_Request_Name - terminal_interface-curses-forms.adb:91 +
  • Form_Sub +
  • Form_Userptr +
  • Form_Win +
  • FOS_2_CInt +
  • Free - terminal_interface-curses-forms.adb:824 +
  • Free - terminal_interface-curses-menus.adb:957 +
  • Freeargs +
  • Freeitem +
  • Free_Field +
  • Free_Type +
  • FrmOS_2_CInt +
  • Frm_Driver + diff --git a/doc/html/ada/funcs/G.htm b/doc/html/ada/funcs/G.htm index 4b6367be..1a57040d 100644 --- a/doc/html/ada/funcs/G.htm +++ b/doc/html/ada/funcs/G.htm @@ -3,30 +3,30 @@

    Functions - G

    [index] \ No newline at end of file +
  • Generic_Char_Check +
  • Generic_Field_Check +
  • Generic_Next +
  • Generic_Prev +
  • Getmouse +
  • getwin +
  • Get_Arg +
  • Get_Entry +
  • Get_Fieldindex +
  • Get_Fieldtype +
  • Get_Flag - terminal_interface-curses-termcap.ads:63 +
  • Get_Flag - terminal_interface-curses-terminfo.ads:64 +
  • Get_Flag - terminal_interface-curses.adb:92 +
  • Get_Itemindex +
  • Get_Menu_Mark - terminal_interface-curses-menus.adb:531 +
  • Get_Menu_Mark - terminal_interface-curses-menus.adb:539 +
  • Get_Number - terminal_interface-curses-termcap.ads:67 +
  • Get_Number - terminal_interface-curses-terminfo.ads:68 +
  • Get_Page +
  • Get_Pattern +
  • Get_Spacing +
  • Get_String - terminal_interface-curses-termcap.ads:73 +
  • Get_String - terminal_interface-curses-termcap.ads:76 +
  • Get_String - terminal_interface-curses-terminfo.ads:57 +
  • Get_Window - terminal_interface-curses-putwin.ads:48 +
  • Get_Window - terminal_interface-curses-text_io.ads:62 + diff --git a/doc/html/ada/funcs/H.htm b/doc/html/ada/funcs/H.htm index 8dd6ecf9..c3aa4789 100644 --- a/doc/html/ada/funcs/H.htm +++ b/doc/html/ada/funcs/H.htm @@ -3,11 +3,11 @@

    Functions - H

    [index] \ No newline at end of file +
  • Halfdelay +
  • Hascolors +
  • Haskey +
  • Has_Ic +
  • Has_Il +
  • Has_String +
  • Hidepanel + diff --git a/doc/html/ada/funcs/I.htm b/doc/html/ada/funcs/I.htm index 1ed76f9b..4968d3c2 100644 --- a/doc/html/ada/funcs/I.htm +++ b/doc/html/ada/funcs/I.htm @@ -3,31 +3,26 @@

    Functions - I

    [index] \ No newline at end of file +
  • IDC_Ok +
  • IDL_Ok +
  • Immedok +
  • Initcolor +
  • Initpair +
  • Initscr +
  • Intrflush +
  • IOS_2_CInt +
  • Isendwin +
  • Is_MinusOne_Pointer +
  • Is_New +
  • Itemname - terminal_interface-curses-menus.adb:127 +
  • Itemname - terminal_interface-curses-menus.adb:252 +
  • Itemname - terminal_interface-curses-menus.adb:260 +
  • Item_Init +
  • Item_Opts +
  • Item_Opts_Off +
  • Item_Opts_On +
  • Item_Term +
  • Item_Userptr +
  • Item_Val +
  • Item_Vis + diff --git a/doc/html/ada/funcs/K.htm b/doc/html/ada/funcs/K.htm index 0e8e47f2..ad419ef3 100644 --- a/doc/html/ada/funcs/K.htm +++ b/doc/html/ada/funcs/K.htm @@ -3,8 +3,8 @@

    Functions - K

    [index] \ No newline at end of file +
  • Keyname +
  • Keyok +
  • Keypad +
  • Killchar + diff --git a/doc/html/ada/funcs/L.htm b/doc/html/ada/funcs/L.htm index 4bf37dae..b97a815e 100644 --- a/doc/html/ada/funcs/L.htm +++ b/doc/html/ada/funcs/L.htm @@ -3,12 +3,12 @@

    Functions - L

    [index] \ No newline at end of file +
  • Lnk_Field +
  • Longname - terminal_interface-curses.adb:2137 +
  • Longname - terminal_interface-curses.adb:2145 + diff --git a/doc/html/ada/funcs/M.htm b/doc/html/ada/funcs/M.htm index dda91548..37297ae0 100644 --- a/doc/html/ada/funcs/M.htm +++ b/doc/html/ada/funcs/M.htm @@ -3,42 +3,41 @@

    Functions - M

    [index] \ No newline at end of file +
  • Make_Enumeration_Type +
  • Menu_Back - terminal_interface-curses-menus.adb:607 +
  • Menu_Back - terminal_interface-curses-menus.adb:617 +
  • Menu_Fmt +
  • Menu_Fore - terminal_interface-curses-menus.adb:568 +
  • Menu_Fore - terminal_interface-curses-menus.adb:578 +
  • Menu_Grey - terminal_interface-curses-menus.adb:646 +
  • Menu_Grey - terminal_interface-curses-menus.adb:656 +
  • Menu_Init +
  • Menu_Opts +
  • Menu_Opts_Off +
  • Menu_Opts_On +
  • Menu_Pad +
  • Menu_Sub +
  • Menu_Term +
  • Menu_Userptr +
  • Menu_Win +
  • Meta +
  • MMask +
  • MOS_2_CInt +
  • Mouseinterval +
  • Mouse_Avail +
  • Move - terminal_interface-curses-forms.adb:785 +
  • Move - terminal_interface-curses-panels.adb:131 +
  • Mvderwin +
  • mvwaddch +
  • Mvwdelch +
  • Mvwin +
  • Mvwinch +
  • Mvwinsch +
  • Mvwinsnstr +
  • M_Post - terminal_interface-curses-forms.adb:915 +
  • M_Post - terminal_interface-curses-menus.adb:353 +
  • M_Scale - terminal_interface-curses-forms.adb:642 +
  • M_Scale - terminal_interface-curses-menus.adb:482 +
  • M_Unpost - terminal_interface-curses-forms.adb:917 +
  • M_Unpost - terminal_interface-curses-menus.adb:355 + diff --git a/doc/html/ada/funcs/N.htm b/doc/html/ada/funcs/N.htm index ca303639..10345d6a 100644 --- a/doc/html/ada/funcs/N.htm +++ b/doc/html/ada/funcs/N.htm @@ -3,26 +3,25 @@

    Functions - N

    [index] \ No newline at end of file +
  • Next +
  • NL +
  • NoCbreak +
  • Nodelay +
  • NoEcho +
  • NoNL +
  • NoRaw +
  • Notimeout +
  • No_Qiflush + diff --git a/doc/html/ada/funcs/O.htm b/doc/html/ada/funcs/O.htm index ec2e1338..a4e4d3b7 100644 --- a/doc/html/ada/funcs/O.htm +++ b/doc/html/ada/funcs/O.htm @@ -3,7 +3,7 @@

    Functions - O

    [index] \ No newline at end of file +
  • Output +
  • Overlay +
  • Overwrite + diff --git a/doc/html/ada/funcs/P.htm b/doc/html/ada/funcs/P.htm index c0f4120d..2e5fc912 100644 --- a/doc/html/ada/funcs/P.htm +++ b/doc/html/ada/funcs/P.htm @@ -3,42 +3,41 @@

    Functions - P

    [index] \ No newline at end of file +
  • putp +
  • putwin +
  • Put_Buf +
  • Put_Line - terminal_interface-curses-text_io.ads:118 +
  • Put_Line - terminal_interface-curses-text_io.ads:122 +
  • Put_String +
  • Put_Window + diff --git a/doc/html/ada/funcs/Q.htm b/doc/html/ada/funcs/Q.htm index ae7d42c7..8164ad3e 100644 --- a/doc/html/ada/funcs/Q.htm +++ b/doc/html/ada/funcs/Q.htm @@ -3,5 +3,5 @@

    Functions - Q

    [index] \ No newline at end of file +
  • Qiflush + diff --git a/doc/html/ada/funcs/R.htm b/doc/html/ada/funcs/R.htm index fd066825..eb6817b1 100644 --- a/doc/html/ada/funcs/R.htm +++ b/doc/html/ada/funcs/R.htm @@ -3,18 +3,17 @@

    Functions - R

    [index] \ No newline at end of file +
  • Raw +
  • Redrawwin +
  • Release - terminal_interface-curses-forms-field_types-enumeration.ads:77 +
  • Release - terminal_interface-curses-forms.adb:1133 +
  • Release - terminal_interface-curses-menus.adb:994 +
  • Release_String +
  • Replace_Pan +
  • Request_Name - terminal_interface-curses-menus.adb:79 +
  • Request_Name - terminal_interface-curses-menus.adb:87 +
  • Resetty +
  • Reset_Prog_Mode +
  • Reset_Shell_Mode +
  • Ripoffline + diff --git a/doc/html/ada/funcs/S.htm b/doc/html/ada/funcs/S.htm index b9850c9d..9e68099f 100644 --- a/doc/html/ada/funcs/S.htm +++ b/doc/html/ada/funcs/S.htm @@ -3,95 +3,95 @@

    Functions - S

    [index] \ No newline at end of file +
  • Set_Mark +
  • Set_Menu_Back +
  • Set_Menu_Fmt +
  • Set_Menu_Fore +
  • Set_Menu_Grey +
  • Set_Menu_Init +
  • Set_Menu_Opts +
  • Set_Menu_Pad +
  • Set_Menu_Sub +
  • Set_Menu_Term +
  • Set_Menu_Userptr +
  • Set_Menu_Win +
  • Set_Page +
  • Set_Panel_Userptr +
  • Set_Pattern +
  • Set_Spacing +
  • Set_Toprow +
  • Set_Window +
  • Showpanel +
  • Slk_Attr - terminal_interface-curses.adb:1982 +
  • Slk_Attr - terminal_interface-curses.adb:1992 +
  • Slk_Attroff +
  • Slk_Attron +
  • Slk_Attrset +
  • Slk_Clear +
  • Slk_Color +
  • Slk_Init +
  • Slk_Label - terminal_interface-curses.adb:1896 +
  • Slk_Label - terminal_interface-curses.adb:1904 +
  • Slk_Noutrefresh +
  • Slk_Refresh +
  • Slk_Restore +
  • Slk_Set +
  • Slk_Touch +
  • Subpad +
  • Subwin +
  • Syncok + diff --git a/doc/html/ada/funcs/T.htm b/doc/html/ada/funcs/T.htm index a02ce1a5..3988e338 100644 --- a/doc/html/ada/funcs/T.htm +++ b/doc/html/ada/funcs/T.htm @@ -3,32 +3,28 @@

    Functions - T

    [index] \ No newline at end of file +
  • Termattrs +
  • Termname - terminal_interface-curses.adb:2153 +
  • Termname - terminal_interface-curses.adb:2161 +
  • tgetent +
  • tgetflag +
  • tgetnum +
  • tgetstr - terminal_interface-curses-termcap.adb:107 +
  • tgetstr - terminal_interface-curses-termcap.adb:128 +
  • tgoto +
  • TGoto +
  • tigetflag +
  • tigetstr - terminal_interface-curses-terminfo.adb:87 +
  • tigetstr - terminal_interface-curses-terminfo.adb:108 +
  • tigetstr - terminal_interface-curses-terminfo.adb:127 +
  • Toppanel +
  • Toprow +
  • To_Access +
  • To_Argument_Access - terminal_interface-curses-forms-field_types-user-choice.adb:49 +
  • To_Argument_Access - terminal_interface-curses-forms-field_types-user.adb:80 +
  • To_Argument_Access - terminal_interface-curses-forms-field_types.adb:55 +
  • To_Pointer +
  • To_Weird +
  • tputs +
  • Transform + diff --git a/doc/html/ada/funcs/U.htm b/doc/html/ada/funcs/U.htm index 1c66bf8a..1d8b8756 100644 --- a/doc/html/ada/funcs/U.htm +++ b/doc/html/ada/funcs/U.htm @@ -3,10 +3,9 @@

    Functions - U

    [index] \ No newline at end of file +
  • Unctrl - terminal_interface-curses.adb:2043 +
  • Unctrl - terminal_interface-curses.adb:2051 +
  • Ungetch +
  • Ungetmouse +
  • use_extended_namesC + diff --git a/doc/html/ada/funcs/V.htm b/doc/html/ada/funcs/V.htm index f30d7515..1562c4a3 100644 --- a/doc/html/ada/funcs/V.htm +++ b/doc/html/ada/funcs/V.htm @@ -3,5 +3,5 @@

    Functions - V

    [index] \ No newline at end of file +
  • Value + diff --git a/doc/html/ada/funcs/W.htm b/doc/html/ada/funcs/W.htm index 01a72e15..00fd9769 100644 --- a/doc/html/ada/funcs/W.htm +++ b/doc/html/ada/funcs/W.htm @@ -3,52 +3,53 @@

    Functions - W

    [index] \ No newline at end of file +
  • Waddch +
  • Waddchnstr +
  • Waddnstr +
  • Wattrget - terminal_interface-curses.adb:707 +
  • Wattrget - terminal_interface-curses.adb:730 +
  • Wattroff +
  • Wattron +
  • Wattrset +
  • WBackground +
  • Wborder +
  • WChangeBkgd +
  • Wchgat +
  • Wclear +
  • Wclearbot +
  • Wcleareol +
  • Wdelch +
  • Wdelwin +
  • Wechochar +
  • Wenclose +
  • Werase +
  • Wgetbkgd +
  • Wgetch +
  • Wgetnstr +
  • Whline +
  • Winch +
  • Winchnstr +
  • Winnstr +
  • Winsch +
  • Winsdelln +
  • Winsnstr +
  • WLineTouched +
  • Wmove +
  • Wnoutrefresh +
  • Wredrawln +
  • Wrefresh +
  • wresize +
  • Wscrl +
  • Wsetscrreg +
  • Wset_Color +
  • wstandend +
  • wstandout +
  • Wtimeout +
  • Wtouchln +
  • Wvline +
  • WWinTouched +
  • W_Get_Byte +
  • W_Get_Element +
  • W_Get_Int +
  • W_Get_Short + diff --git a/doc/html/ada/terminal_interface-curses-aux__adb.htm b/doc/html/ada/terminal_interface-curses-aux__adb.htm index 74810200..05c57e03 100644 --- a/doc/html/ada/terminal_interface-curses-aux__adb.htm +++ b/doc/html/ada/terminal_interface-curses-aux__adb.htm @@ -37,86 +37,85 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package body Terminal_Interface.Curses.Aux is +package body Terminal_Interface.Curses.Aux is -- -- Some helpers - procedure Fill_String (Cp : in chars_ptr; - Str : out String) + procedure Fill_String (Cp : in chars_ptr; + Str : out String) is -- Fill the string with the characters referenced by the -- chars_ptr. -- - Len : Natural; + Len : Natural; begin - if Cp /= Null_Ptr then - Len := Natural (Strlen (Cp)); - if Str'Length < Len then + if Cp /= Null_Ptr then + Len := Natural (Strlen (Cp)); + if Str'Length < Len then raise Constraint_Error; end if; declare - S : String (1 .. Len); + S : String (1 .. Len); begin - S := Value (Cp); - Str (Str'First .. (Str'First + Len - 1)) := S (S'Range); + S := Value (Cp); + Str (Str'First .. (Str'First + Len - 1)) := S (S'Range); end; else - Len := 0; + Len := 0; end if; - if Len < Str'Length then - Str ((Str'First + Len) .. Str'Last) := (others => ' '); + if Len < Str'Length then + Str ((Str'First + Len) .. Str'Last) := (others => ' '); end if; - end Fill_String; + end Fill_String; - function Fill_String (Cp : chars_ptr) return String + function Fill_String (Cp : chars_ptr) return String is - Len : Natural; + Len : Natural; begin - if Cp /= Null_Ptr then - Len := Natural (Strlen (Cp)); - if Len = 0 then + if Cp /= Null_Ptr then + Len := Natural (Strlen (Cp)); + if Len = 0 then return ""; else declare - S : String (1 .. Len); + S : String (1 .. Len); begin - Fill_String (Cp, S); - return S; + Fill_String (Cp, S); + return S; end; end if; else return ""; end if; - end Fill_String; + end Fill_String; - procedure Eti_Exception (Code : Eti_Error) + procedure Eti_Exception (Code : Eti_Error) is begin - case Code is - when E_Ok => null; - when E_System_Error => raise Eti_System_Error; - when E_Bad_Argument => raise Eti_Bad_Argument; - when E_Posted => raise Eti_Posted; - when E_Connected => raise Eti_Connected; - when E_Bad_State => raise Eti_Bad_State; - when E_No_Room => raise Eti_No_Room; - when E_Not_Posted => raise Eti_Not_Posted; - when E_Unknown_Command => raise Eti_Unknown_Command; - when E_No_Match => raise Eti_No_Match; - when E_Not_Selectable => raise Eti_Not_Selectable; - when E_Not_Connected => raise Eti_Not_Connected; - when E_Request_Denied => raise Eti_Request_Denied; - when E_Invalid_Field => raise Eti_Invalid_Field; - when E_Current => raise Eti_Current; + case Code is + when E_Ok => null; + when E_System_Error => raise Eti_System_Error; + when E_Bad_Argument => raise Eti_Bad_Argument; + when E_Posted => raise Eti_Posted; + when E_Connected => raise Eti_Connected; + when E_Bad_State => raise Eti_Bad_State; + when E_No_Room => raise Eti_No_Room; + when E_Not_Posted => raise Eti_Not_Posted; + when E_Unknown_Command => raise Eti_Unknown_Command; + when E_No_Match => raise Eti_No_Match; + when E_Not_Selectable => raise Eti_Not_Selectable; + when E_Not_Connected => raise Eti_Not_Connected; + when E_Request_Denied => raise Eti_Request_Denied; + when E_Invalid_Field => raise Eti_Invalid_Field; + when E_Current => raise Eti_Current; end case; - end Eti_Exception; + end Eti_Exception; -end Terminal_Interface.Curses.Aux; - \ No newline at end of file +end Terminal_Interface.Curses.Aux; + diff --git a/doc/html/ada/terminal_interface-curses-aux__ads.htm b/doc/html/ada/terminal_interface-curses-aux__ads.htm index ab711215..02c03d6c 100644 --- a/doc/html/ada/terminal_interface-curses-aux__ads.htm +++ b/doc/html/ada/terminal_interface-curses-aux__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.14 @ +-- @Revision: 1.15 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- curses binding. @@ -58,15 +57,15 @@ use type Interfaces.C.int; - subtype C_Int is Interfaces.C.int; - subtype C_Short is Interfaces.C.short; - subtype C_Long_Int is Interfaces.C.long; - subtype C_Size_T is Interfaces.C.size_t; - subtype C_UInt is Interfaces.C.unsigned; - subtype C_ULong is Interfaces.C.unsigned_long; - subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr; - type C_Void_Ptr is new System.Address; - type C_Chtype is new C_ULong; + subtype C_Int is Interfaces.C.int; + subtype C_Short is Interfaces.C.short; + subtype C_Long_Int is Interfaces.C.long; + subtype C_Size_T is Interfaces.C.size_t; + subtype C_UInt is Interfaces.C.unsigned; + subtype C_ULong is Interfaces.C.unsigned_long; + subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr; + type C_Void_Ptr is new System.Address; + type C_Chtype is new C_ULong; type C_AttrType is new C_ULong; -- This is how those constants are defined in ncurses. I see them also @@ -74,29 +73,29 @@ -- could be that this is quite general, but please check with your curses. -- This is critical, because curses sometime mixes boolean returns with -- returning an error status. - Curses_Ok : constant C_Int := 0; + Curses_Ok : constant C_Int := 0; Curses_Err : constant C_Int := -1; - Curses_True : constant C_Int := 1; + Curses_True : constant C_Int := 1; Curses_False : constant C_Int := 0; -- Eti_Error: type for error codes returned by the menu and form subsystem subtype Eti_Error is C_Int range -14 .. 0; - E_Ok : constant Eti_Error := 0; - E_System_Error : constant Eti_Error := -1; - E_Bad_Argument : constant Eti_Error := -2; - E_Posted : constant Eti_Error := -3; - E_Connected : constant Eti_Error := -4; - E_Bad_State : constant Eti_Error := -5; - E_No_Room : constant Eti_Error := -6; - E_Not_Posted : constant Eti_Error := -7; - E_Unknown_Command : constant Eti_Error := -8; - E_No_Match : constant Eti_Error := -9; - E_Not_Selectable : constant Eti_Error := -10; - E_Not_Connected : constant Eti_Error := -11; - E_Request_Denied : constant Eti_Error := -12; - E_Invalid_Field : constant Eti_Error := -13; + E_Ok : constant Eti_Error := 0; + E_System_Error : constant Eti_Error := -1; + E_Bad_Argument : constant Eti_Error := -2; + E_Posted : constant Eti_Error := -3; + E_Connected : constant Eti_Error := -4; + E_Bad_State : constant Eti_Error := -5; + E_No_Room : constant Eti_Error := -6; + E_Not_Posted : constant Eti_Error := -7; + E_Unknown_Command : constant Eti_Error := -8; + E_No_Match : constant Eti_Error := -9; + E_Not_Selectable : constant Eti_Error := -10; + E_Not_Connected : constant Eti_Error := -11; + E_Request_Denied : constant Eti_Error := -12; + E_Invalid_Field : constant Eti_Error := -13; E_Current : constant Eti_Error := -14; procedure Eti_Exception (Code : Eti_Error); @@ -105,21 +104,21 @@ -- -- Some helpers function Chtype_To_AttrChar is new - Unchecked_Conversion (Source => C_Chtype, - Target => Attributed_Character); + Unchecked_Conversion (Source => C_Chtype, + Target => Attributed_Character); function AttrChar_To_Chtype is new - Unchecked_Conversion (Source => Attributed_Character, + Unchecked_Conversion (Source => Attributed_Character, Target => C_Chtype); function AttrChar_To_AttrType is new - Unchecked_Conversion (Source => Attributed_Character, + Unchecked_Conversion (Source => Attributed_Character, Target => C_AttrType); function AttrType_To_AttrChar is new - Unchecked_Conversion (Source => C_AttrType, + Unchecked_Conversion (Source => C_AttrType, Target => Attributed_Character); - procedure Fill_String (Cp : in chars_ptr; + procedure Fill_String (Cp : in chars_ptr; Str : out String); -- Fill the Str parameter with the string denoted by the chars_ptr -- C-Style string. @@ -128,4 +127,4 @@ -- Same but as function. end Terminal_Interface.Curses.Aux; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm index a43d7519..9a4063be 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm @@ -37,38 +37,37 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.Alpha is +package body Terminal_Interface.Curses.Forms.Field_Types.Alpha is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in Alpha_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Alpha_Field) is - C_Alpha_Field_Type : C_Field_Type; - pragma Import (C, C_Alpha_Field_Type, "TYPE_ALPHA"); + C_Alpha_Field_Type : C_Field_Type; + pragma Import (C, C_Alpha_Field_Type, "TYPE_ALPHA"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_Alpha_Field_Type; - Arg1 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_Alpha_Field_Type; + Arg1 : C_Int) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.Alpha; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Alpha; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm index 521c5fd2..4f6c7ffd 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm @@ -37,23 +37,22 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.Alpha is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.Alpha); +package Terminal_Interface.Curses.Forms.Field_Types.Alpha is + pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.Alpha); - type Alpha_Field is new Field_Type + type Alpha_Field is new Field_Type with record - Minimum_Field_Width : Natural := 0; + Minimum_Field_Width : Natural := 0; end record; - procedure Set_Field_Type (Fld : in Field; - Typ : in Alpha_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Alpha_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.Alpha; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Alpha; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm index 727d1eec..8fd67a62 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm @@ -37,38 +37,37 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is +package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in AlphaNumeric_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in AlphaNumeric_Field) is - C_AlphaNumeric_Field_Type : C_Field_Type; - pragma Import (C, C_AlphaNumeric_Field_Type, "TYPE_ALNUM"); + C_AlphaNumeric_Field_Type : C_Field_Type; + pragma Import (C, C_AlphaNumeric_Field_Type, "TYPE_ALNUM"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_AlphaNumeric_Field_Type; - Arg1 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_AlphaNumeric_Field_Type; + Arg1 : C_Int) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm index 98ce0d67..42fe480a 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm @@ -37,24 +37,23 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is +package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is pragma Preelaborate - (Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric); + (Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric); - type AlphaNumeric_Field is new Field_Type + type AlphaNumeric_Field is new Field_Type with record - Minimum_Field_Width : Natural := 0; + Minimum_Field_Width : Natural := 0; end record; - procedure Set_Field_Type (Fld : in Field; - Typ : in AlphaNumeric_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in AlphaNumeric_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm index d65b81d3..dcc4909c 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm @@ -37,50 +37,49 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.6 @ +-- @Revision: 1.7 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Characters.Handling; use Ada.Characters.Handling; -package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is +package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is - function Create (Set : Type_Set := Mixed_Case; - Case_Sensitive : Boolean := False; - Must_Be_Unique : Boolean := False) - return Enumeration_Field + function Create (Set : Type_Set := Mixed_Case; + Case_Sensitive : Boolean := False; + Must_Be_Unique : Boolean := False) + return Enumeration_Field is - I : Enumeration_Info (T'Pos (T'Last) - T'Pos (T'First) + 1); - J : Positive := 1; + I : Enumeration_Info (T'Pos (T'Last) - T'Pos (T'First) + 1); + J : Positive := 1; begin - I.Case_Sensitive := Case_Sensitive; - I.Match_Must_Be_Unique := Must_Be_Unique; + I.Case_Sensitive := Case_Sensitive; + I.Match_Must_Be_Unique := Must_Be_Unique; - for E in T'Range loop - I.Names (J) := new String'(T'Image (T (E))); + for E in T'Range loop + I.Names (J) := new String'(T'Image (T (E))); -- The Image attribute defaults to upper case, so we have to handle -- only the other ones... - if Set /= Upper_Case then - I.Names (J).all := To_Lower (I.Names (J).all); - if Set = Mixed_Case then - I.Names (J)(I.Names (J).all'First) := - To_Upper (I.Names (J)(I.Names (J).all'First)); + if Set /= Upper_Case then + I.Names (J).all := To_Lower (I.Names (J).all); + if Set = Mixed_Case then + I.Names (J)(I.Names (J).all'First) := + To_Upper (I.Names (J)(I.Names (J).all'First)); end if; end if; - J := J + 1; + J := J + 1; end loop; - return Create (I, True); - end Create; + return Create (I, True); + end Create; - function Value (Fld : Field; - Buf : Buffer_Number := Buffer_Number'First) return T + function Value (Fld : Field; + Buf : Buffer_Number := Buffer_Number'First) return T is begin - return T'Value (Get_Buffer (Fld, Buf)); - end Value; + return T'Value (Get_Buffer (Fld, Buf)); + end Value; -end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm index c1028268..73b8ec10 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm @@ -37,29 +37,28 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type T is (<>); + type T is (<>); -package Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is +package Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is pragma Preelaborate - (Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada); + (Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada); - function Create (Set : Type_Set := Mixed_Case; - Case_Sensitive : Boolean := False; - Must_Be_Unique : Boolean := False) - return Enumeration_Field; + function Create (Set : Type_Set := Mixed_Case; + Case_Sensitive : Boolean := False; + Must_Be_Unique : Boolean := False) + return Enumeration_Field; - function Value (Fld : Field; - Buf : Buffer_Number := Buffer_Number'First) return T; + function Value (Fld : Field; + Buf : Buffer_Number := Buffer_Number'First) return T; -- Translate the content of the fields buffer - indicated by the -- buffer number - into an enumeration value. If the buffer is empty -- or the content is invalid, a Constraint_Error is raises. -end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm index c7376195..41d7ee74 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm @@ -37,89 +37,88 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.6 @ +-- @Revision: 1.7 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration is +package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration is - function Create (Info : Enumeration_Info; - Auto_Release_Names : Boolean := False) - return Enumeration_Field + function Create (Info : Enumeration_Info; + Auto_Release_Names : Boolean := False) + return Enumeration_Field is - procedure Release_String is + procedure Release_String is new Ada.Unchecked_Deallocation (String, - String_Access); - E : Enumeration_Field; - L : constant size_t := 1 + size_t (Info.C); - S : String_Access; + String_Access); + E : Enumeration_Field; + L : constant size_t := 1 + size_t (Info.C); + S : String_Access; begin - E.Case_Sensitive := Info.Case_Sensitive; - E.Match_Must_Be_Unique := Info.Match_Must_Be_Unique; - E.Arr := new chars_ptr_array (size_t (1) .. L); - for I in 1 .. Positive (L - 1) loop - if Info.Names (I) = null then - raise Form_Exception; + E.Case_Sensitive := Info.Case_Sensitive; + E.Match_Must_Be_Unique := Info.Match_Must_Be_Unique; + E.Arr := new chars_ptr_array (size_t (1) .. L); + for I in 1 .. Positive (L - 1) loop + if Info.Names (I) = null then + raise Form_Exception; end if; - E.Arr (size_t (I)) := New_String (Info.Names (I).all); - if Auto_Release_Names then - S := Info.Names (I); - Release_String (S); + E.Arr (size_t (I)) := New_String (Info.Names (I).all); + if Auto_Release_Names then + S := Info.Names (I); + Release_String (S); end if; end loop; - E.Arr (L) := Null_Ptr; - return E; - end Create; + E.Arr (L) := Null_Ptr; + return E; + end Create; - procedure Release (Enum : in out Enumeration_Field) + procedure Release (Enum : in out Enumeration_Field) is - I : size_t := 0; - P : chars_ptr; + I : size_t := 0; + P : chars_ptr; begin loop - P := Enum.Arr (I); - exit when P = Null_Ptr; - Free (P); - Enum.Arr (I) := Null_Ptr; - I := I + 1; + P := Enum.Arr (I); + exit when P = Null_Ptr; + Free (P); + Enum.Arr (I) := Null_Ptr; + I := I + 1; end loop; - Enum.Arr := null; - end Release; + Enum.Arr := null; + end Release; - procedure Set_Field_Type (Fld : in Field; - Typ : in Enumeration_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Enumeration_Field) is - C_Enum_Type : C_Field_Type; - pragma Import (C, C_Enum_Type, "TYPE_ENUM"); + C_Enum_Type : C_Field_Type; + pragma Import (C, C_Enum_Type, "TYPE_ENUM"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_Enum_Type; - Arg1 : chars_ptr_array; - Arg2 : C_Int; - Arg3 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_Enum_Type; + Arg1 : chars_ptr_array; + Arg2 : C_Int; + Arg3 : C_Int) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - if Typ.Arr = null then - raise Form_Exception; + if Typ.Arr = null then + raise Form_Exception; end if; - Res := Set_Fld_Type (Arg1 => Typ.Arr.all, - Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)), - Arg3 => C_Int (Boolean'Pos - (Typ.Match_Must_Be_Unique))); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => Typ.Arr.all, + Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)), + Arg3 => C_Int (Boolean'Pos + (Typ.Match_Must_Be_Unique))); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ, C_Choice_Router); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ, C_Choice_Router); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.Enumeration; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Enumeration; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm index c7d2901c..1c8eae3e 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm @@ -37,68 +37,67 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C.Strings; -package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is +package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is pragma Preelaborate - (Terminal_Interface.Curses.Forms.Field_Types.Enumeration); + (Terminal_Interface.Curses.Forms.Field_Types.Enumeration); - type String_Access is access String; + type String_Access is access String; -- Type_Set is used by the child package Ada - type Type_Set is (Lower_Case, Upper_Case, Mixed_Case); + type Type_Set is (Lower_Case, Upper_Case, Mixed_Case); - type Enum_Array is array (Positive range <>) - of String_Access; + type Enum_Array is array (Positive range <>) + of String_Access; - type Enumeration_Info (C : Positive) is + type Enumeration_Info (C : Positive) is record - Names : Enum_Array (1 .. C); - Case_Sensitive : Boolean := False; - Match_Must_Be_Unique : Boolean := False; - end record; + Names : Enum_Array (1 .. C); + Case_Sensitive : Boolean := False; + Match_Must_Be_Unique : Boolean := False; + end record; - type Enumeration_Field is new Field_Type with private; + type Enumeration_Field is new Field_Type with private; - function Create (Info : Enumeration_Info; - Auto_Release_Names : Boolean := False) - return Enumeration_Field; + function Create (Info : Enumeration_Info; + Auto_Release_Names : Boolean := False) + return Enumeration_Field; -- Make an fieldtype from the info. Enumerations are special, because -- they normally don't copy the enum values into a private store, so -- we have to care for the lifetime of the info we provide. -- The Auto_Release_Names flag may be used to automatically releases -- the strings in the Names array of the Enumeration_Info. - function Make_Enumeration_Type (Info : Enumeration_Info; - Auto_Release_Names : Boolean := False) - return Enumeration_Field renames Create; + function Make_Enumeration_Type (Info : Enumeration_Info; + Auto_Release_Names : Boolean := False) + return Enumeration_Field renames Create; - procedure Release (Enum : in out Enumeration_Field); + procedure Release (Enum : in out Enumeration_Field); -- But we may want to release the field to release the memory allocated -- by it internally. After that the Enumeration field is no longer usable. -- The next type defintions are all ncurses extensions. They are typically -- not available in other curses implementations. - procedure Set_Field_Type (Fld : in Field; - Typ : in Enumeration_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Enumeration_Field); pragma Inline (Set_Field_Type); private - type CPA_Access is access Interfaces.C.Strings.chars_ptr_array; + type CPA_Access is access Interfaces.C.Strings.chars_ptr_array; - type Enumeration_Field is new Field_Type with + type Enumeration_Field is new Field_Type with record - Case_Sensitive : Boolean := False; - Match_Must_Be_Unique : Boolean := False; - Arr : CPA_Access := null; + Case_Sensitive : Boolean := False; + Match_Must_Be_Unique : Boolean := False; + Arr : CPA_Access := null; end record; -end Terminal_Interface.Curses.Forms.Field_Types.Enumeration; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Enumeration; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm index 19df103a..89814d5f 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm @@ -37,42 +37,41 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.IntField is +package body Terminal_Interface.Curses.Forms.Field_Types.IntField is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in Integer_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Integer_Field) is - C_Integer_Field_Type : C_Field_Type; - pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER"); + C_Integer_Field_Type : C_Field_Type; + pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_Integer_Field_Type; - Arg1 : C_Int; - Arg2 : C_Long_Int; - Arg3 : C_Long_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_Integer_Field_Type; + Arg1 : C_Int; + Arg2 : C_Long_Int; + Arg3 : C_Long_Int) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision), - Arg2 => C_Long_Int (Typ.Lower_Limit), - Arg3 => C_Long_Int (Typ.Upper_Limit)); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision), + Arg2 => C_Long_Int (Typ.Lower_Limit), + Arg3 => C_Long_Int (Typ.Upper_Limit)); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.IntField; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.IntField; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm index fa224d7e..b3a8bd5d 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm @@ -37,25 +37,24 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.IntField is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.IntField); +package Terminal_Interface.Curses.Forms.Field_Types.IntField is + pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.IntField); - type Integer_Field is new Field_Type with + type Integer_Field is new Field_Type with record - Precision : Natural; - Lower_Limit : Integer; - Upper_Limit : Integer; + Precision : Natural; + Lower_Limit : Integer; + Upper_Limit : Integer; end record; - procedure Set_Field_Type (Fld : in Field; - Typ : in Integer_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Integer_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.IntField; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.IntField; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm index aa09c515..775005df 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm @@ -37,38 +37,37 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is +package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in Internet_V4_Address_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Internet_V4_Address_Field) is - C_IPV4_Field_Type : C_Field_Type; - pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4"); + C_IPV4_Field_Type : C_Field_Type; + pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_IPV4_Field_Type) - return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_IPV4_Field_Type) + return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Set_Fld_Type; - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type; + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm index 04f89d70..2e826d5d 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm @@ -37,21 +37,20 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is +package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is pragma Preelaborate - (Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address); + (Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address); - type Internet_V4_Address_Field is new Field_Type with null record; + type Internet_V4_Address_Field is new Field_Type with null record; - procedure Set_Field_Type (Fld : in Field; - Typ : in Internet_V4_Address_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Internet_V4_Address_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm index d3671e5f..96f96f2c 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm @@ -37,44 +37,43 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.8 @ +-- @Revision: 1.9 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is +package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in Numeric_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Numeric_Field) is - type Double is new Interfaces.C.double; + type Double is new Interfaces.C.double; - C_Numeric_Field_Type : C_Field_Type; - pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC"); + C_Numeric_Field_Type : C_Field_Type; + pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC"); - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_Numeric_Field_Type; - Arg1 : C_Int; - Arg2 : Double; - Arg3 : Double) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_Numeric_Field_Type; + Arg1 : C_Int; + Arg2 : Double; + Arg3 : Double) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision), - Arg2 => Double (Typ.Lower_Limit), - Arg3 => Double (Typ.Upper_Limit)); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision), + Arg2 => Double (Typ.Lower_Limit), + Arg3 => Double (Typ.Upper_Limit)); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.Numeric; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Numeric; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm index f44d8c70..00749b48 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm @@ -37,25 +37,24 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.Numeric is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.Numeric); +package Terminal_Interface.Curses.Forms.Field_Types.Numeric is + pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.Numeric); - type Numeric_Field is new Field_Type with + type Numeric_Field is new Field_Type with record - Precision : Natural; - Lower_Limit : Float; - Upper_Limit : Float; + Precision : Natural; + Lower_Limit : Float; + Upper_Limit : Float; end record; - procedure Set_Field_Type (Fld : in Field; - Typ : in Numeric_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Numeric_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.Numeric; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.Numeric; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm index 2f39185f..9c1d534f 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm @@ -37,41 +37,40 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; use Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is +package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is - procedure Set_Field_Type (Fld : in Field; - Typ : in Regular_Expression_Field) + procedure Set_Field_Type (Fld : in Field; + Typ : in Regular_Expression_Field) is - type Char_Ptr is access all Interfaces.C.char; + type Char_Ptr is access all Interfaces.C.char; - C_Regexp_Field_Type : C_Field_Type; - pragma Import (C, C_Regexp_Field_Type, "TYPE_REGEXP"); + C_Regexp_Field_Type : C_Field_Type; + pragma Import (C, C_Regexp_Field_Type, "TYPE_REGEXP"); - function Set_Ftyp (F : Field := Fld; - Cft : C_Field_Type := C_Regexp_Field_Type; - Arg1 : Char_Ptr) return C_Int; - pragma Import (C, Set_Ftyp, "set_field_type"); + function Set_Ftyp (F : Field := Fld; + Cft : C_Field_Type := C_Regexp_Field_Type; + Arg1 : Char_Ptr) return C_Int; + pragma Import (C, Set_Ftyp, "set_field_type"); - Txt : char_array (0 .. Typ.Regular_Expression.all'Length); - Len : size_t; - Res : Eti_Error; + Txt : char_array (0 .. Typ.Regular_Expression.all'Length); + Len : size_t; + Res : Eti_Error; begin - To_C (Typ.Regular_Expression.all, Txt, Len); - Res := Set_Ftyp (Arg1 => Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); + To_C (Typ.Regular_Expression.all, Txt, Len); + Res := Set_Ftyp (Arg1 => Txt (Txt'First)'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; + Wrap_Builtin (Fld, Typ); + end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.RegExp; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.RegExp; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm index 41829d94..e52f0400 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm @@ -37,25 +37,24 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Forms.Field_Types.RegExp is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.RegExp); +package Terminal_Interface.Curses.Forms.Field_Types.RegExp is + pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.RegExp); - type String_Access is access String; + type String_Access is access String; - type Regular_Expression_Field is new Field_Type with + type Regular_Expression_Field is new Field_Type with record - Regular_Expression : String_Access; + Regular_Expression : String_Access; end record; - procedure Set_Field_Type (Fld : in Field; - Typ : in Regular_Expression_Field); + procedure Set_Field_Type (Fld : in Field; + Typ : in Regular_Expression_Field); pragma Inline (Set_Field_Type); -end Terminal_Interface.Curses.Forms.Field_Types.RegExp; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.RegExp; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm index 7b007447..e9123b00 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm @@ -37,80 +37,79 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is +package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is use type Interfaces.C.int; - function To_Argument_Access is new Ada.Unchecked_Conversion - (System.Address, Argument_Access); + function To_Argument_Access is new Ada.Unchecked_Conversion + (System.Address, Argument_Access); - function Generic_Next (Fld : Field; - Usr : System.Address) return C_Int + function Generic_Next (Fld : Field; + Usr : System.Address) return C_Int is - Result : Boolean; - Udf : User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access - (To_Argument_Access (Usr).Typ); + Result : Boolean; + Udf : User_Defined_Field_Type_With_Choice_Access := + User_Defined_Field_Type_With_Choice_Access + (To_Argument_Access (Usr).Typ); begin - Result := Next (Fld, Udf.all); - return C_Int (Boolean'Pos (Result)); - end Generic_Next; + Result := Next (Fld, Udf.all); + return C_Int (Boolean'Pos (Result)); + end Generic_Next; - function Generic_Prev (Fld : Field; - Usr : System.Address) return C_Int + function Generic_Prev (Fld : Field; + Usr : System.Address) return C_Int is - Result : Boolean; - Udf : User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access - (To_Argument_Access (Usr).Typ); + Result : Boolean; + Udf : User_Defined_Field_Type_With_Choice_Access := + User_Defined_Field_Type_With_Choice_Access + (To_Argument_Access (Usr).Typ); begin - Result := Previous (Fld, Udf.all); - return C_Int (Boolean'Pos (Result)); - end Generic_Prev; + Result := Previous (Fld, Udf.all); + return C_Int (Boolean'Pos (Result)); + end Generic_Prev; -- ----------------------------------------------------------------------- -- - function C_Generic_Choice return C_Field_Type + function C_Generic_Choice return C_Field_Type is - Res : Eti_Error; - T : C_Field_Type; + Res : Eti_Error; + T : C_Field_Type; begin - if M_Generic_Choice = Null_Field_Type then - T := New_Fieldtype (Generic_Field_Check'Access, - Generic_Char_Check'Access); - if T = Null_Field_Type then - raise Form_Exception; + if M_Generic_Choice = Null_Field_Type then + T := New_Fieldtype (Generic_Field_Check'Access, + Generic_Char_Check'Access); + if T = Null_Field_Type then + raise Form_Exception; else - Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Arg (T, + Make_Arg'Access, + Copy_Arg'Access, + Free_Arg'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Res := Set_Fieldtype_Choice (T, - Generic_Next'Access, - Generic_Prev'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Choice (T, + Generic_Next'Access, + Generic_Prev'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - M_Generic_Choice := T; + M_Generic_Choice := T; end if; - pragma Assert (M_Generic_Choice /= Null_Field_Type); - return M_Generic_Choice; - end C_Generic_Choice; + pragma Assert (M_Generic_Choice /= Null_Field_Type); + return M_Generic_Choice; + end C_Generic_Choice; -end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm index 081d8c6e..d9405fa6 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm @@ -37,41 +37,40 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -package Terminal_Interface.Curses.Forms.Field_Types.User.Choice is +package Terminal_Interface.Curses.Forms.Field_Types.User.Choice is pragma Preelaborate - (Terminal_Interface.Curses.Forms.Field_Types.User.Choice); + (Terminal_Interface.Curses.Forms.Field_Types.User.Choice); use type Interfaces.C.int; - subtype C_Int is Interfaces.C.int; + subtype C_Int is Interfaces.C.int; - type User_Defined_Field_Type_With_Choice is abstract new - User_Defined_Field_Type with null record; + type User_Defined_Field_Type_With_Choice is abstract new + User_Defined_Field_Type with null record; -- This is the root of the mechanism we use to create field types in -- Ada95 that allow the prev/next mechanism. You should your own type -- derive from this one and implement the Field_Check, Character_Check -- Next and Previous functions for your own type. - type User_Defined_Field_Type_With_Choice_Access is access all - User_Defined_Field_Type_With_Choice'Class; + type User_Defined_Field_Type_With_Choice_Access is access all + User_Defined_Field_Type_With_Choice'Class; - function Next - (Fld : Field; - Typ : User_Defined_Field_Type_With_Choice) return Boolean + function Next + (Fld : Field; + Typ : User_Defined_Field_Type_With_Choice) return Boolean is abstract; -- If True is returned, the function successfully generated a next -- value into the fields buffer. - function Previous - (Fld : Field; - Typ : User_Defined_Field_Type_With_Choice) return Boolean + function Previous + (Fld : Field; + Typ : User_Defined_Field_Type_With_Choice) return Boolean is abstract; -- If True is returned, the function successfully generated a previous -- value into the fields buffer. @@ -82,21 +81,21 @@ private use type Interfaces.C.int; - function C_Generic_Choice return C_Field_Type; + function C_Generic_Choice return C_Field_Type; - function Generic_Next (Fld : Field; - Usr : System.Address) return C_Int; - pragma Convention (C, Generic_Next); + function Generic_Next (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Generic_Next); -- This is the generic next Choice_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivates. It routes -- the call to the Next implementation for the type. - function Generic_Prev (Fld : Field; - Usr : System.Address) return C_Int; - pragma Convention (C, Generic_Prev); + function Generic_Prev (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Generic_Prev); -- This is the generic prev Choice_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivates. It routes -- the call to the Previous implementation for the type. -end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm index bbc6e1f8..3e9f1c71 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm @@ -37,102 +37,101 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.User is +package body Terminal_Interface.Curses.Forms.Field_Types.User is use type Interfaces.C.int; - procedure Set_Field_Type (Fld : in Field; - Typ : in User_Defined_Field_Type) + procedure Set_Field_Type (Fld : in Field; + Typ : in User_Defined_Field_Type) is - function Allocate_Arg (T : User_Defined_Field_Type'Class) - return Argument_Access; + function Allocate_Arg (T : User_Defined_Field_Type'Class) + return Argument_Access; - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := C_Generic_Type; - Arg1 : Argument_Access) - return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + function Set_Fld_Type (F : Field := Fld; + Cft : C_Field_Type := C_Generic_Type; + Arg1 : Argument_Access) + return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); - Res : Eti_Error; + Res : Eti_Error; - function Allocate_Arg (T : User_Defined_Field_Type'Class) - return Argument_Access + function Allocate_Arg (T : User_Defined_Field_Type'Class) + return Argument_Access is - Ptr : Field_Type_Access := new User_Defined_Field_Type'Class'(T); + Ptr : Field_Type_Access := new User_Defined_Field_Type'Class'(T); begin - return new Argument'(Usr => System.Null_Address, - Typ => Ptr, - Cft => Null_Field_Type); - end Allocate_Arg; + return new Argument'(Usr => System.Null_Address, + Typ => Ptr, + Cft => Null_Field_Type); + end Allocate_Arg; begin - Res := Set_Fld_Type (Arg1 => Allocate_Arg (Typ)); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => Allocate_Arg (Typ)); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Field_Type; + end Set_Field_Type; - function To_Argument_Access is new Ada.Unchecked_Conversion - (System.Address, Argument_Access); + function To_Argument_Access is new Ada.Unchecked_Conversion + (System.Address, Argument_Access); - function Generic_Field_Check (Fld : Field; - Usr : System.Address) return C_Int + function Generic_Field_Check (Fld : Field; + Usr : System.Address) return C_Int is - Result : Boolean; - Udf : User_Defined_Field_Type_Access := - User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); + Result : Boolean; + Udf : User_Defined_Field_Type_Access := + User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); begin - Result := Field_Check (Fld, Udf.all); - return C_Int (Boolean'Pos (Result)); - end Generic_Field_Check; + Result := Field_Check (Fld, Udf.all); + return C_Int (Boolean'Pos (Result)); + end Generic_Field_Check; - function Generic_Char_Check (Ch : C_Int; - Usr : System.Address) return C_Int + function Generic_Char_Check (Ch : C_Int; + Usr : System.Address) return C_Int is - Result : Boolean; - Udf : User_Defined_Field_Type_Access := - User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); + Result : Boolean; + Udf : User_Defined_Field_Type_Access := + User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); begin - Result := Character_Check (Character'Val (Ch), Udf.all); - return C_Int (Boolean'Pos (Result)); - end Generic_Char_Check; + Result := Character_Check (Character'Val (Ch), Udf.all); + return C_Int (Boolean'Pos (Result)); + end Generic_Char_Check; -- ----------------------------------------------------------------------- -- - function C_Generic_Type return C_Field_Type + function C_Generic_Type return C_Field_Type is - Res : Eti_Error; - T : C_Field_Type; + Res : Eti_Error; + T : C_Field_Type; begin - if M_Generic_Type = Null_Field_Type then - T := New_Fieldtype (Generic_Field_Check'Access, - Generic_Char_Check'Access); - if T = Null_Field_Type then - raise Form_Exception; + if M_Generic_Type = Null_Field_Type then + T := New_Fieldtype (Generic_Field_Check'Access, + Generic_Char_Check'Access); + if T = Null_Field_Type then + raise Form_Exception; else - Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Arg (T, + Make_Arg'Access, + Copy_Arg'Access, + Free_Arg'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - M_Generic_Type := T; + M_Generic_Type := T; end if; - pragma Assert (M_Generic_Type /= Null_Field_Type); - return M_Generic_Type; - end C_Generic_Type; + pragma Assert (M_Generic_Type /= Null_Field_Type); + return M_Generic_Type; + end C_Generic_Type; -end Terminal_Interface.Curses.Forms.Field_Types.User; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.User; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm index 2cb7d858..2beaef3b 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm @@ -37,43 +37,42 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -package Terminal_Interface.Curses.Forms.Field_Types.User is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.User); +package Terminal_Interface.Curses.Forms.Field_Types.User is + pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.User); use type Interfaces.C.int; - subtype C_Int is Interfaces.C.int; + subtype C_Int is Interfaces.C.int; - type User_Defined_Field_Type is abstract new Field_Type with null record; + type User_Defined_Field_Type is abstract new Field_Type with null record; -- This is the root of the mechanism we use to create field types in -- Ada95. You should your own type derive from this one and implement -- the Field_Check and Character_Check functions for your own type. - type User_Defined_Field_Type_Access is access all - User_Defined_Field_Type'Class; + type User_Defined_Field_Type_Access is access all + User_Defined_Field_Type'Class; - function Field_Check - (Fld : Field; - Typ : User_Defined_Field_Type) return Boolean + function Field_Check + (Fld : Field; + Typ : User_Defined_Field_Type) return Boolean is abstract; -- If True is returned, the field is considered valid, otherwise it is -- invalid. - function Character_Check - (Ch : Character; - Typ : User_Defined_Field_Type) return Boolean + function Character_Check + (Ch : Character; + Typ : User_Defined_Field_Type) return Boolean is abstract; -- If True is returned, the character is considered as valid for the -- field, otherwise as invalid. - procedure Set_Field_Type (Fld : in Field; - Typ : in User_Defined_Field_Type); + procedure Set_Field_Type (Fld : in Field; + Typ : in User_Defined_Field_Type); -- This should work for all types derived from User_Defined_Field_Type. -- No need to reimplement it for your derived type. @@ -83,21 +82,21 @@ private use type Interfaces.C.int; - function C_Generic_Type return C_Field_Type; + function C_Generic_Type return C_Field_Type; - function Generic_Field_Check (Fld : Field; - Usr : System.Address) return C_Int; - pragma Convention (C, Generic_Field_Check); + function Generic_Field_Check (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Generic_Field_Check); -- This is the generic Field_Check_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivates. It routes -- the call to the Field_Check implementation for the type. - function Generic_Char_Check (Ch : C_Int; - Usr : System.Address) return C_Int; - pragma Convention (C, Generic_Char_Check); + function Generic_Char_Check (Ch : C_Int; + Usr : System.Address) return C_Int; + pragma Convention (C, Generic_Char_Check); -- This is the generic Char_Check_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivates. It routes -- the call to the Character_Check implementation for the type. -end Terminal_Interface.Curses.Forms.Field_Types.User; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types.User; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm index d258ff29..aa32d205 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm @@ -37,14 +37,13 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Ada.Unchecked_Deallocation; with Ada.Unchecked_Conversion; -- | @@ -52,19 +51,19 @@ -- | man page form_fieldtype.3x -- |===================================================================== -- | -package body Terminal_Interface.Curses.Forms.Field_Types is +package body Terminal_Interface.Curses.Forms.Field_Types is use type Interfaces.C.int; use type System.Address; - function To_Argument_Access is new Ada.Unchecked_Conversion - (System.Address, Argument_Access); + function To_Argument_Access is new Ada.Unchecked_Conversion + (System.Address, Argument_Access); - function Get_Fieldtype (F : Field) return C_Field_Type; - pragma Import (C, Get_Fieldtype, "field_type"); + function Get_Fieldtype (F : Field) return C_Field_Type; + pragma Import (C, Get_Fieldtype, "field_type"); - function Get_Arg (F : Field) return System.Address; - pragma Import (C, Get_Arg, "field_arg"); + function Get_Arg (F : Field) return System.Address; + pragma Import (C, Get_Arg, "field_arg"); -- | -- |===================================================================== -- | man page form_field_validation.3x @@ -72,31 +71,31 @@ -- | -- | -- | - function Get_Type (Fld : in Field) return Field_Type_Access + function Get_Type (Fld : in Field) return Field_Type_Access is - Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); - Arg : Argument_Access; + Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); + Arg : Argument_Access; begin - if Low_Level = Null_Field_Type then + if Low_Level = Null_Field_Type then return null; else - if Low_Level = M_Builtin_Router or else - Low_Level = M_Generic_Type or else - Low_Level = M_Choice_Router or else - Low_Level = M_Generic_Choice then - Arg := To_Argument_Access (Get_Arg (Fld)); - if Arg = null then - raise Form_Exception; + if Low_Level = M_Builtin_Router or else + Low_Level = M_Generic_Type or else + Low_Level = M_Choice_Router or else + Low_Level = M_Generic_Choice then + Arg := To_Argument_Access (Get_Arg (Fld)); + if Arg = null then + raise Form_Exception; else - return Arg.Typ; + return Arg.Typ; end if; else - raise Form_Exception; + raise Form_Exception; end if; end if; - end Get_Type; + end Get_Type; - function Make_Arg (Args : System.Address) return System.Address + function Make_Arg (Args : System.Address) return System.Address is -- Actually args is a double indirected pointer to the arguments -- of a C variable argument list. In theory it is now quite @@ -107,196 +106,196 @@ -- we know its size and for the first arg we don't care about -- into which stack direction we have to proceed. We simply -- resolve the double indirection and thats it. - type V is access all System.Address; - function To_Access is new Ada.Unchecked_Conversion (System.Address, - V); + type V is access all System.Address; + function To_Access is new Ada.Unchecked_Conversion (System.Address, + V); begin - return To_Access (To_Access (Args).all).all; - end Make_Arg; + return To_Access (To_Access (Args).all).all; + end Make_Arg; - function Copy_Arg (Usr : System.Address) return System.Address + function Copy_Arg (Usr : System.Address) return System.Address is begin - return Usr; - end Copy_Arg; + return Usr; + end Copy_Arg; - procedure Free_Arg (Usr : in System.Address) + procedure Free_Arg (Usr : in System.Address) is - procedure Free_Type is new Ada.Unchecked_Deallocation - (Field_Type'Class, Field_Type_Access); - procedure Freeargs is new Ada.Unchecked_Deallocation - (Argument, Argument_Access); + procedure Free_Type is new Ada.Unchecked_Deallocation + (Field_Type'Class, Field_Type_Access); + procedure Freeargs is new Ada.Unchecked_Deallocation + (Argument, Argument_Access); - To_Be_Free : Argument_Access := To_Argument_Access (Usr); - Low_Level : C_Field_Type; + To_Be_Free : Argument_Access := To_Argument_Access (Usr); + Low_Level : C_Field_Type; begin - if To_Be_Free /= null then - if To_Be_Free.Usr /= System.Null_Address then - Low_Level := To_Be_Free.Cft; - if Low_Level.Freearg /= null then - Low_Level.Freearg (To_Be_Free.Usr); + if To_Be_Free /= null then + if To_Be_Free.Usr /= System.Null_Address then + Low_Level := To_Be_Free.Cft; + if Low_Level.Freearg /= null then + Low_Level.Freearg (To_Be_Free.Usr); end if; end if; - if To_Be_Free.Typ /= null then - Free_Type (To_Be_Free.Typ); + if To_Be_Free.Typ /= null then + Free_Type (To_Be_Free.Typ); end if; - Freeargs (To_Be_Free); + Freeargs (To_Be_Free); end if; - end Free_Arg; + end Free_Arg; - procedure Wrap_Builtin (Fld : Field; - Typ : Field_Type'Class; - Cft : C_Field_Type := C_Builtin_Router) + procedure Wrap_Builtin (Fld : Field; + Typ : Field_Type'Class; + Cft : C_Field_Type := C_Builtin_Router) is - Usr_Arg : System.Address := Get_Arg (Fld); - Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); - Arg : Argument_Access; - Res : Eti_Error; - function Set_Fld_Type (F : Field := Fld; - Cf : C_Field_Type := Cft; - Arg1 : Argument_Access) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); + Usr_Arg : System.Address := Get_Arg (Fld); + Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); + Arg : Argument_Access; + Res : Eti_Error; + function Set_Fld_Type (F : Field := Fld; + Cf : C_Field_Type := Cft; + Arg1 : Argument_Access) return C_Int; + pragma Import (C, Set_Fld_Type, "set_field_type"); begin - pragma Assert (Low_Level /= Null_Field_Type); - if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then - raise Form_Exception; + pragma Assert (Low_Level /= Null_Field_Type); + if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then + raise Form_Exception; else - Arg := new Argument'(Usr => System.Null_Address, - Typ => new Field_Type'Class'(Typ), - Cft => Get_Fieldtype (Fld)); - if Usr_Arg /= System.Null_Address then - if Low_Level.Copyarg /= null then - Arg.Usr := Low_Level.Copyarg (Usr_Arg); + Arg := new Argument'(Usr => System.Null_Address, + Typ => new Field_Type'Class'(Typ), + Cft => Get_Fieldtype (Fld)); + if Usr_Arg /= System.Null_Address then + if Low_Level.Copyarg /= null then + Arg.Usr := Low_Level.Copyarg (Usr_Arg); else - Arg.Usr := Usr_Arg; + Arg.Usr := Usr_Arg; end if; end if; - Res := Set_Fld_Type (Arg1 => Arg); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fld_Type (Arg1 => Arg); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - end Wrap_Builtin; + end Wrap_Builtin; - function Field_Check_Router (Fld : Field; - Usr : System.Address) return C_Int + function Field_Check_Router (Fld : Field; + Usr : System.Address) return C_Int is - Arg : constant Argument_Access := To_Argument_Access (Usr); + Arg : constant Argument_Access := To_Argument_Access (Usr); begin - pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type - and then Arg.Typ /= null); - if Arg.Cft.Fcheck /= null then - return Arg.Cft.Fcheck (Fld, Arg.Usr); + pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type + and then Arg.Typ /= null); + if Arg.Cft.Fcheck /= null then + return Arg.Cft.Fcheck (Fld, Arg.Usr); else return 1; end if; - end Field_Check_Router; + end Field_Check_Router; - function Char_Check_Router (Ch : C_Int; - Usr : System.Address) return C_Int + function Char_Check_Router (Ch : C_Int; + Usr : System.Address) return C_Int is - Arg : constant Argument_Access := To_Argument_Access (Usr); + Arg : constant Argument_Access := To_Argument_Access (Usr); begin - pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type - and then Arg.Typ /= null); - if Arg.Cft.Ccheck /= null then - return Arg.Cft.Ccheck (Ch, Arg.Usr); + pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type + and then Arg.Typ /= null); + if Arg.Cft.Ccheck /= null then + return Arg.Cft.Ccheck (Ch, Arg.Usr); else return 1; end if; - end Char_Check_Router; + end Char_Check_Router; - function Next_Router (Fld : Field; - Usr : System.Address) return C_Int + function Next_Router (Fld : Field; + Usr : System.Address) return C_Int is - Arg : constant Argument_Access := To_Argument_Access (Usr); + Arg : constant Argument_Access := To_Argument_Access (Usr); begin - pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type - and then Arg.Typ /= null); - if Arg.Cft.Next /= null then - return Arg.Cft.Next (Fld, Arg.Usr); + pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type + and then Arg.Typ /= null); + if Arg.Cft.Next /= null then + return Arg.Cft.Next (Fld, Arg.Usr); else return 1; end if; - end Next_Router; + end Next_Router; - function Prev_Router (Fld : Field; - Usr : System.Address) return C_Int + function Prev_Router (Fld : Field; + Usr : System.Address) return C_Int is - Arg : constant Argument_Access := To_Argument_Access (Usr); + Arg : constant Argument_Access := To_Argument_Access (Usr); begin - pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type - and then Arg.Typ /= null); - if Arg.Cft.Prev /= null then - return Arg.Cft.Prev (Fld, Arg.Usr); + pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type + and then Arg.Typ /= null); + if Arg.Cft.Prev /= null then + return Arg.Cft.Prev (Fld, Arg.Usr); else return 1; end if; - end Prev_Router; + end Prev_Router; -- ----------------------------------------------------------------------- -- - function C_Builtin_Router return C_Field_Type + function C_Builtin_Router return C_Field_Type is - Res : Eti_Error; - T : C_Field_Type; + Res : Eti_Error; + T : C_Field_Type; begin - if M_Builtin_Router = Null_Field_Type then - T := New_Fieldtype (Field_Check_Router'Access, - Char_Check_Router'Access); - if T = Null_Field_Type then - raise Form_Exception; + if M_Builtin_Router = Null_Field_Type then + T := New_Fieldtype (Field_Check_Router'Access, + Char_Check_Router'Access); + if T = Null_Field_Type then + raise Form_Exception; else - Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Arg (T, + Make_Arg'Access, + Copy_Arg'Access, + Free_Arg'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - M_Builtin_Router := T; + M_Builtin_Router := T; end if; - pragma Assert (M_Builtin_Router /= Null_Field_Type); - return M_Builtin_Router; - end C_Builtin_Router; + pragma Assert (M_Builtin_Router /= Null_Field_Type); + return M_Builtin_Router; + end C_Builtin_Router; -- ----------------------------------------------------------------------- -- - function C_Choice_Router return C_Field_Type + function C_Choice_Router return C_Field_Type is - Res : Eti_Error; - T : C_Field_Type; + Res : Eti_Error; + T : C_Field_Type; begin - if M_Choice_Router = Null_Field_Type then - T := New_Fieldtype (Field_Check_Router'Access, - Char_Check_Router'Access); - if T = Null_Field_Type then - raise Form_Exception; + if M_Choice_Router = Null_Field_Type then + T := New_Fieldtype (Field_Check_Router'Access, + Char_Check_Router'Access); + if T = Null_Field_Type then + raise Form_Exception; else - Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Arg (T, + Make_Arg'Access, + Copy_Arg'Access, + Free_Arg'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Res := Set_Fieldtype_Choice (T, - Next_Router'Access, - Prev_Router'Access); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Fieldtype_Choice (T, + Next_Router'Access, + Prev_Router'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - M_Choice_Router := T; + M_Choice_Router := T; end if; - pragma Assert (M_Choice_Router /= Null_Field_Type); - return M_Choice_Router; - end C_Choice_Router; + pragma Assert (M_Choice_Router /= Null_Field_Type); + return M_Choice_Router; + end C_Choice_Router; -end Terminal_Interface.Curses.Forms.Field_Types; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_Types; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm index a835f274..b0388f1d 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm @@ -38,17 +38,16 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; package Terminal_Interface.Curses.Forms.Field_Types is pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types); - use type Interfaces.C.int; + use type Interfaces.C.int; subtype C_Int is Interfaces.C.int; -- |===================================================================== @@ -69,7 +68,7 @@ type Field_Type_Access is access all Field_Type'Class; -- #1A NAME="AFU_1"#2| - procedure Set_Field_Type (Fld : in Field; + procedure Set_Field_Type (Fld : in Field; Fld_Type : in Field_Type) is abstract; -- AKA: set_field_type() -- But: we hide the vararg mechanism of the C interface. You always @@ -107,12 +106,12 @@ procedure (Usr : System.Address); pragma Convention (C, Freearg_Function); - type Field_Check_Function is access + type Field_Check_Function is access function (Fld : Field; Usr : System.Address) return C_Int; pragma Convention (C, Field_Check_Function); - type Char_Check_Function is access - function (Ch : C_Int; Usr : System.Address) return C_Int; + type Char_Check_Function is access + function (Ch : C_Int; Usr : System.Address) return C_Int; pragma Convention (C, Char_Check_Function); type Choice_Function is access @@ -124,14 +123,14 @@ -- | type Low_Level_Field_Type is record - Status : Interfaces.C.short; - Ref_Count : Interfaces.C.long; - Left, Right : System.Address; - Makearg : Makearg_Function; - Copyarg : Copyarg_Function; - Freearg : Freearg_Function; - Fcheck : Field_Check_Function; - Ccheck : Char_Check_Function; + Status : Interfaces.C.short; + Ref_Count : Interfaces.C.long; + Left, Right : System.Address; + Makearg : Makearg_Function; + Copyarg : Copyarg_Function; + Freearg : Freearg_Function; + Fcheck : Field_Check_Function; + Ccheck : Char_Check_Function; Next, Prev : Choice_Function; end record; pragma Convention (C, Low_Level_Field_Type); @@ -144,18 +143,18 @@ -- | fieldtypes handled by this binding. Any other low-level fieldtype -- | will result in a Form_Exception is function Get_Type. -- | - M_Generic_Type : C_Field_Type := null; - M_Generic_Choice : C_Field_Type := null; - M_Builtin_Router : C_Field_Type := null; + M_Generic_Type : C_Field_Type := null; + M_Generic_Choice : C_Field_Type := null; + M_Builtin_Router : C_Field_Type := null; M_Choice_Router : C_Field_Type := null; -- Two wrapper functions to access those low-level fieldtypes defined -- in this package. - function C_Builtin_Router return C_Field_Type; + function C_Builtin_Router return C_Field_Type; function C_Choice_Router return C_Field_Type; - procedure Wrap_Builtin (Fld : Field; - Typ : Field_Type'Class; + procedure Wrap_Builtin (Fld : Field; + Typ : Field_Type'Class; Cft : C_Field_Type := C_Builtin_Router); -- This procedure has to be called by the Set_Field_Type implementation -- for builtin low-level fieldtypes to replace it by an Ada95 @@ -170,7 +169,7 @@ -- This is the Makearg_Function for the internal low-level types -- introduced by this binding. - function Copy_Arg (Usr : System.Address) return System.Address; + function Copy_Arg (Usr : System.Address) return System.Address; pragma Convention (C, Copy_Arg); -- This is the Copyarg_Function for the internal low-level types -- introduced by this binding. @@ -180,32 +179,32 @@ -- This is the Freearg_Function for the internal low-level types -- introduced by this binding. - function Field_Check_Router (Fld : Field; - Usr : System.Address) return C_Int; + function Field_Check_Router (Fld : Field; + Usr : System.Address) return C_Int; pragma Convention (C, Field_Check_Router); -- This is the Field_Check_Function for the internal low-level types -- introduced to wrap the low-level types by a Field_Type derived -- type. It routes the call to the corresponding low-level validation -- function. - function Char_Check_Router (Ch : C_Int; - Usr : System.Address) return C_Int; + function Char_Check_Router (Ch : C_Int; + Usr : System.Address) return C_Int; pragma Convention (C, Char_Check_Router); -- This is the Char_Check_Function for the internal low-level types -- introduced to wrap the low-level types by a Field_Type derived -- type. It routes the call to the corresponding low-level validation -- function. - function Next_Router (Fld : Field; - Usr : System.Address) return C_Int; + function Next_Router (Fld : Field; + Usr : System.Address) return C_Int; pragma Convention (C, Next_Router); -- This is the Choice_Function for the internal low-level types -- introduced to wrap the low-level types by a Field_Type derived -- type. It routes the call to the corresponding low-level next_choice -- function. - function Prev_Router (Fld : Field; - Usr : System.Address) return C_Int; + function Prev_Router (Fld : Field; + Usr : System.Address) return C_Int; pragma Convention (C, Prev_Router); -- This is the Choice_Function for the internal low-level types -- introduced to wrap the low-level types by a Field_Type derived @@ -215,8 +214,8 @@ -- This is the Argument structure maintained by all low-level field types -- introduced by this binding. type Argument is record - Typ : Field_Type_Access; -- the Field_Type creating this record - Usr : System.Address; -- original arg for builtin low-level types + Typ : Field_Type_Access; -- the Field_Type creating this record + Usr : System.Address; -- original arg for builtin low-level types Cft : C_Field_Type; -- the original low-level type end record; type Argument_Access is access all Argument; @@ -225,22 +224,22 @@ -- | -- | Some Imports of libform routines to deal with low-level fieldtypes. -- | - function New_Fieldtype (Fcheck : Field_Check_Function; - Ccheck : Char_Check_Function) + function New_Fieldtype (Fcheck : Field_Check_Function; + Ccheck : Char_Check_Function) return C_Field_Type; pragma Import (C, New_Fieldtype, "new_fieldtype"); - function Set_Fieldtype_Arg (Cft : C_Field_Type; - Mak : Makearg_Function := Make_Arg'Access; - Cop : Copyarg_Function := Copy_Arg'Access; - Fre : Freearg_Function := Free_Arg'Access) + function Set_Fieldtype_Arg (Cft : C_Field_Type; + Mak : Makearg_Function := Make_Arg'Access; + Cop : Copyarg_Function := Copy_Arg'Access; + Fre : Freearg_Function := Free_Arg'Access) return C_Int; pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg"); - function Set_Fieldtype_Choice (Cft : C_Field_Type; - Next, Prev : Choice_Function) + function Set_Fieldtype_Choice (Cft : C_Field_Type; + Next, Prev : Choice_Function) return C_Int; pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice"); end Terminal_Interface.Curses.Forms.Field_Types; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm index a281121b..34a3b2fd 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm @@ -37,55 +37,54 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.11 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -- | -- |===================================================================== -- | man page form_field_userptr.3x -- |===================================================================== -- | -package body Terminal_Interface.Curses.Forms.Field_User_Data is +package body Terminal_Interface.Curses.Forms.Field_User_Data is -- | -- | -- | use type Interfaces.C.int; - procedure Set_User_Data (Fld : in Field; - Data : in User_Access) + procedure Set_User_Data (Fld : in Field; + Data : in User_Access) is - function Set_Field_Userptr (Fld : Field; - Usr : User_Access) return C_Int; - pragma Import (C, Set_Field_Userptr, "set_field_userptr"); + function Set_Field_Userptr (Fld : Field; + Usr : User_Access) return C_Int; + pragma Import (C, Set_Field_Userptr, "set_field_userptr"); - Res : constant Eti_Error := Set_Field_Userptr (Fld, Data); + Res : constant Eti_Error := Set_Field_Userptr (Fld, Data); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_User_Data; + end Set_User_Data; -- | -- | -- | - function Get_User_Data (Fld : in Field) return User_Access + function Get_User_Data (Fld : in Field) return User_Access is - function Field_Userptr (Fld : Field) return User_Access; - pragma Import (C, Field_Userptr, "field_userptr"); + function Field_Userptr (Fld : Field) return User_Access; + pragma Import (C, Field_Userptr, "field_userptr"); begin - return Field_Userptr (Fld); - end Get_User_Data; + return Field_Userptr (Fld); + end Get_User_Data; - procedure Get_User_Data (Fld : in Field; - Data : out User_Access) + procedure Get_User_Data (Fld : in Field; + Data : out User_Access) is begin - Data := Get_User_Data (Fld); - end Get_User_Data; + Data := Get_User_Data (Fld); + end Get_User_Data; -end Terminal_Interface.Curses.Forms.Field_User_Data; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Field_User_Data; + diff --git a/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm b/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm index 3cfc919f..de086738 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm @@ -38,16 +38,15 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.14 @ +-- @Revision: 1.15 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type User is limited private; - type User_Access is access User; + type User is limited private; + type User_Access is access User; package Terminal_Interface.Curses.Forms.Field_User_Data is pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_User_Data); @@ -56,13 +55,13 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - procedure Set_User_Data (Fld : in Field; + procedure Set_User_Data (Fld : in Field; Data : in User_Access); -- AKA: set_field_userptr pragma Inline (Set_User_Data); -- #1A NAME="AFU_2"#2| - procedure Get_User_Data (Fld : in Field; + procedure Get_User_Data (Fld : in Field; Data : out User_Access); -- AKA: field_userptr @@ -73,4 +72,4 @@ pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Forms.Field_User_Data; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm b/doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm index ec9dc995..c1208aaf 100644 --- a/doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm @@ -37,10 +37,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.11 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- | @@ -48,45 +47,45 @@ -- | man page form__userptr.3x -- |===================================================================== -- | -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Form_User_Data is +package body Terminal_Interface.Curses.Forms.Form_User_Data is use type Interfaces.C.int; -- | -- | -- | - procedure Set_User_Data (Frm : in Form; - Data : in User_Access) + procedure Set_User_Data (Frm : in Form; + Data : in User_Access) is - function Set_Form_Userptr (Frm : Form; - Data : User_Access) return C_Int; - pragma Import (C, Set_Form_Userptr, "set_form_userptr"); + function Set_Form_Userptr (Frm : Form; + Data : User_Access) return C_Int; + pragma Import (C, Set_Form_Userptr, "set_form_userptr"); - Res : constant Eti_Error := Set_Form_Userptr (Frm, Data); + Res : constant Eti_Error := Set_Form_Userptr (Frm, Data); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_User_Data; + end Set_User_Data; -- | -- | -- | - function Get_User_Data (Frm : in Form) return User_Access + function Get_User_Data (Frm : in Form) return User_Access is - function Form_Userptr (Frm : Form) return User_Access; - pragma Import (C, Form_Userptr, "form_userptr"); + function Form_Userptr (Frm : Form) return User_Access; + pragma Import (C, Form_Userptr, "form_userptr"); begin - return Form_Userptr (Frm); - end Get_User_Data; + return Form_Userptr (Frm); + end Get_User_Data; - procedure Get_User_Data (Frm : in Form; - Data : out User_Access) + procedure Get_User_Data (Frm : in Form; + Data : out User_Access) is begin - Data := Get_User_Data (Frm); - end Get_User_Data; + Data := Get_User_Data (Frm); + end Get_User_Data; -end Terminal_Interface.Curses.Forms.Form_User_Data; - \ No newline at end of file +end Terminal_Interface.Curses.Forms.Form_User_Data; + diff --git a/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm b/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm index 8f748529..51045176 100644 --- a/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm @@ -38,16 +38,15 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type User is limited private; - type User_Access is access User; + type User is limited private; + type User_Access is access User; package Terminal_Interface.Curses.Forms.Form_User_Data is pragma Preelaborate (Terminal_Interface.Curses.Forms.Form_User_Data); @@ -56,13 +55,13 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - procedure Set_User_Data (Frm : in Form; + procedure Set_User_Data (Frm : in Form; Data : in User_Access); -- AKA: set_form_userptr pragma Inline (Set_User_Data); -- #1A NAME="AFU_2"#2| - procedure Get_User_Data (Frm : in Form; + procedure Get_User_Data (Frm : in Form; Data : out User_Access); -- AKA: form_userptr @@ -73,4 +72,4 @@ pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Forms.Form_User_Data; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-forms__adb.htm b/doc/html/ada/terminal_interface-curses-forms__adb.htm index 34543229..eb24f811 100644 --- a/doc/html/ada/terminal_interface-curses-forms__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms__adb.htm @@ -37,10 +37,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.21 @ +-- @Revision: 1.22 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; @@ -50,15 +49,15 @@ with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C.Pointers; -with Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms is +package body Terminal_Interface.Curses.Forms is - use Terminal_Interface.Curses.Aux; + use Terminal_Interface.Curses.Aux; - type C_Field_Array is array (Natural range <>) of aliased Field; - package F_Array is new - Interfaces.C.Pointers (Natural, Field, C_Field_Array, Null_Field); + type C_Field_Array is array (Natural range <>) of aliased Field; + package F_Array is new + Interfaces.C.Pointers (Natural, Field, C_Field_Array, Null_Field); ------------------------------------------------------------------------------ -- | @@ -66,38 +65,38 @@ -- | -- subtype chars_ptr is Interfaces.C.Strings.chars_ptr; - function FOS_2_CInt is new - Ada.Unchecked_Conversion (Field_Option_Set, - C_Int); + function FOS_2_CInt is new + Ada.Unchecked_Conversion (Field_Option_Set, + C_Int); - function CInt_2_FOS is new - Ada.Unchecked_Conversion (C_Int, - Field_Option_Set); + function CInt_2_FOS is new + Ada.Unchecked_Conversion (C_Int, + Field_Option_Set); - function FrmOS_2_CInt is new - Ada.Unchecked_Conversion (Form_Option_Set, - C_Int); + function FrmOS_2_CInt is new + Ada.Unchecked_Conversion (Form_Option_Set, + C_Int); - function CInt_2_FrmOS is new - Ada.Unchecked_Conversion (C_Int, - Form_Option_Set); + function CInt_2_FrmOS is new + Ada.Unchecked_Conversion (C_Int, + Form_Option_Set); - procedure Request_Name (Key : in Form_Request_Code; - Name : out String) + procedure Request_Name (Key : in Form_Request_Code; + Name : out String) is - function Form_Request_Name (Key : C_Int) return chars_ptr; - pragma Import (C, Form_Request_Name, "form_request_name"); + function Form_Request_Name (Key : C_Int) return chars_ptr; + pragma Import (C, Form_Request_Name, "form_request_name"); begin - Fill_String (Form_Request_Name (C_Int (Key)), Name); - end Request_Name; + Fill_String (Form_Request_Name (C_Int (Key)), Name); + end Request_Name; - function Request_Name (Key : Form_Request_Code) return String + function Request_Name (Key : Form_Request_Code) return String is - function Form_Request_Name (Key : C_Int) return chars_ptr; - pragma Import (C, Form_Request_Name, "form_request_name"); + function Form_Request_Name (Key : C_Int) return chars_ptr; + pragma Import (C, Form_Request_Name, "form_request_name"); begin - return Fill_String (Form_Request_Name (C_Int (Key))); - end Request_Name; + return Fill_String (Form_Request_Name (C_Int (Key))); + end Request_Name; ------------------------------------------------------------------------------ -- | -- | @@ -109,84 +108,84 @@ -- | -- | -- | - function Create (Height : Line_Count; - Width : Column_Count; - Top : Line_Position; - Left : Column_Position; - Off_Screen : Natural := 0; - More_Buffers : Buffer_Number := Buffer_Number'First) - return Field + function Create (Height : Line_Count; + Width : Column_Count; + Top : Line_Position; + Left : Column_Position; + Off_Screen : Natural := 0; + More_Buffers : Buffer_Number := Buffer_Number'First) + return Field is - function Newfield (H, W, T, L, O, M : C_Int) return Field; - pragma Import (C, Newfield, "new_field"); - Fld : constant Field := Newfield (C_Int (Height), C_Int (Width), - C_Int (Top), C_Int (Left), - C_Int (Off_Screen), - C_Int (More_Buffers)); + function Newfield (H, W, T, L, O, M : C_Int) return Field; + pragma Import (C, Newfield, "new_field"); + Fld : constant Field := Newfield (C_Int (Height), C_Int (Width), + C_Int (Top), C_Int (Left), + C_Int (Off_Screen), + C_Int (More_Buffers)); begin - if Fld = Null_Field then - raise Form_Exception; + if Fld = Null_Field then + raise Form_Exception; end if; - return Fld; - end Create; + return Fld; + end Create; -- | -- | -- | - procedure Delete (Fld : in out Field) + procedure Delete (Fld : in out Field) is - function Free_Field (Fld : Field) return C_Int; - pragma Import (C, Free_Field, "free_field"); + function Free_Field (Fld : Field) return C_Int; + pragma Import (C, Free_Field, "free_field"); - Res : Eti_Error; + Res : Eti_Error; begin - Res := Free_Field (Fld); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Free_Field (Fld); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Fld := Null_Field; - end Delete; + Fld := Null_Field; + end Delete; -- | -- | -- | - function Duplicate (Fld : Field; - Top : Line_Position; - Left : Column_Position) return Field + function Duplicate (Fld : Field; + Top : Line_Position; + Left : Column_Position) return Field is - function Dup_Field (Fld : Field; - Top : C_Int; - Left : C_Int) return Field; - pragma Import (C, Dup_Field, "dup_field"); - - F : constant Field := Dup_Field (Fld, - C_Int (Top), - C_Int (Left)); + function Dup_Field (Fld : Field; + Top : C_Int; + Left : C_Int) return Field; + pragma Import (C, Dup_Field, "dup_field"); + + F : constant Field := Dup_Field (Fld, + C_Int (Top), + C_Int (Left)); begin - if F = Null_Field then - raise Form_Exception; + if F = Null_Field then + raise Form_Exception; end if; - return F; - end Duplicate; + return F; + end Duplicate; -- | -- | -- | - function Link (Fld : Field; - Top : Line_Position; - Left : Column_Position) return Field + function Link (Fld : Field; + Top : Line_Position; + Left : Column_Position) return Field is - function Lnk_Field (Fld : Field; - Top : C_Int; - Left : C_Int) return Field; - pragma Import (C, Lnk_Field, "link_field"); - - F : constant Field := Lnk_Field (Fld, - C_Int (Top), - C_Int (Left)); + function Lnk_Field (Fld : Field; + Top : C_Int; + Left : C_Int) return Field; + pragma Import (C, Lnk_Field, "link_field"); + + F : constant Field := Lnk_Field (Fld, + C_Int (Top), + C_Int (Left)); begin - if F = Null_Field then - raise Form_Exception; + if F = Null_Field then + raise Form_Exception; end if; - return F; - end Link; + return F; + end Link; -- | -- |===================================================================== -- | man page form_field_just.3x @@ -194,31 +193,31 @@ -- | -- | -- | - procedure Set_Justification (Fld : in Field; - Just : in Field_Justification := None) + procedure Set_Justification (Fld : in Field; + Just : in Field_Justification := None) is - function Set_Field_Just (Fld : Field; - Just : C_Int) return C_Int; - pragma Import (C, Set_Field_Just, "set_field_just"); + function Set_Field_Just (Fld : Field; + Just : C_Int) return C_Int; + pragma Import (C, Set_Field_Just, "set_field_just"); - Res : constant Eti_Error := - Set_Field_Just (Fld, - C_Int (Field_Justification'Pos (Just))); + Res : constant Eti_Error := + Set_Field_Just (Fld, + C_Int (Field_Justification'Pos (Just))); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Justification; + end Set_Justification; -- | -- | -- | - function Get_Justification (Fld : Field) return Field_Justification + function Get_Justification (Fld : Field) return Field_Justification is - function Field_Just (Fld : Field) return C_Int; - pragma Import (C, Field_Just, "field_just"); + function Field_Just (Fld : Field) return C_Int; + pragma Import (C, Field_Just, "field_just"); begin - return Field_Justification'Val (Field_Just (Fld)); - end Get_Justification; + return Field_Justification'Val (Field_Just (Fld)); + end Get_Justification; -- | -- |===================================================================== -- | man page form_field_buffer.3x @@ -226,101 +225,101 @@ -- | -- | -- | - procedure Set_Buffer - (Fld : in Field; - Buffer : in Buffer_Number := Buffer_Number'First; - Str : in String) + procedure Set_Buffer + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First; + Str : in String) is - type Char_Ptr is access all Interfaces.C.char; - function Set_Fld_Buffer (Fld : Field; - Bufnum : C_Int; - S : Char_Ptr) - return C_Int; - pragma Import (C, Set_Fld_Buffer, "set_field_buffer"); - - Txt : char_array (0 .. Str'Length); - Len : size_t; - Res : Eti_Error; + type Char_Ptr is access all Interfaces.C.char; + function Set_Fld_Buffer (Fld : Field; + Bufnum : C_Int; + S : Char_Ptr) + return C_Int; + pragma Import (C, Set_Fld_Buffer, "set_field_buffer"); + + Txt : char_array (0 .. Str'Length); + Len : size_t; + Res : Eti_Error; begin - To_C (Str, Txt, Len); - Res := Set_Fld_Buffer (Fld, C_Int (Buffer), Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); + To_C (Str, Txt, Len); + Res := Set_Fld_Buffer (Fld, C_Int (Buffer), Txt (Txt'First)'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Buffer; + end Set_Buffer; -- | -- | -- | - procedure Get_Buffer - (Fld : in Field; - Buffer : in Buffer_Number := Buffer_Number'First; - Str : out String) + procedure Get_Buffer + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First; + Str : out String) is - function Field_Buffer (Fld : Field; - B : C_Int) return chars_ptr; - pragma Import (C, Field_Buffer, "field_buffer"); + function Field_Buffer (Fld : Field; + B : C_Int) return chars_ptr; + pragma Import (C, Field_Buffer, "field_buffer"); begin - Fill_String (Field_Buffer (Fld, C_Int (Buffer)), Str); - end Get_Buffer; + Fill_String (Field_Buffer (Fld, C_Int (Buffer)), Str); + end Get_Buffer; - function Get_Buffer - (Fld : in Field; - Buffer : in Buffer_Number := Buffer_Number'First) return String + function Get_Buffer + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First) return String is - function Field_Buffer (Fld : Field; - B : C_Int) return chars_ptr; - pragma Import (C, Field_Buffer, "field_buffer"); + function Field_Buffer (Fld : Field; + B : C_Int) return chars_ptr; + pragma Import (C, Field_Buffer, "field_buffer"); begin - return Fill_String (Field_Buffer (Fld, C_Int (Buffer))); - end Get_Buffer; + return Fill_String (Field_Buffer (Fld, C_Int (Buffer))); + end Get_Buffer; -- | -- | -- | - procedure Set_Status (Fld : in Field; - Status : in Boolean := True) + procedure Set_Status (Fld : in Field; + Status : in Boolean := True) is - function Set_Fld_Status (Fld : Field; - St : C_Int) return C_Int; - pragma Import (C, Set_Fld_Status, "set_field_status"); + function Set_Fld_Status (Fld : Field; + St : C_Int) return C_Int; + pragma Import (C, Set_Fld_Status, "set_field_status"); - Res : constant Eti_Error := Set_Fld_Status (Fld, Boolean'Pos (Status)); + Res : constant Eti_Error := Set_Fld_Status (Fld, Boolean'Pos (Status)); begin - if Res /= E_Ok then - raise Form_Exception; + if Res /= E_Ok then + raise Form_Exception; end if; - end Set_Status; + end Set_Status; -- | -- | -- | - function Changed (Fld : Field) return Boolean + function Changed (Fld : Field) return Boolean is - function Field_Status (Fld : Field) return C_Int; - pragma Import (C, Field_Status, "field_status"); + function Field_Status (Fld : Field) return C_Int; + pragma Import (C, Field_Status, "field_status"); - Res : constant C_Int := Field_Status (Fld); + Res : constant C_Int := Field_Status (Fld); begin - if Res = Curses_False then + if Res = Curses_False then return False; else return True; end if; - end Changed; + end Changed; -- | -- | -- | - procedure Set_Maximum_Size (Fld : in Field; - Max : in Natural := 0) + procedure Set_Maximum_Size (Fld : in Field; + Max : in Natural := 0) is - function Set_Field_Max (Fld : Field; - M : C_Int) return C_Int; - pragma Import (C, Set_Field_Max, "set_max_field"); + function Set_Field_Max (Fld : Field; + M : C_Int) return C_Int; + pragma Import (C, Set_Field_Max, "set_max_field"); - Res : constant Eti_Error := Set_Field_Max (Fld, C_Int (Max)); + Res : constant Eti_Error := Set_Field_Max (Fld, C_Int (Max)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Maximum_Size; + end Set_Maximum_Size; -- | -- |===================================================================== -- | man page form_field_opts.3x @@ -328,71 +327,71 @@ -- | -- | -- | - procedure Set_Options (Fld : in Field; - Options : in Field_Option_Set) + procedure Set_Options (Fld : in Field; + Options : in Field_Option_Set) is - function Set_Field_Opts (Fld : Field; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Field_Opts, "set_field_opts"); + function Set_Field_Opts (Fld : Field; + Opt : C_Int) return C_Int; + pragma Import (C, Set_Field_Opts, "set_field_opts"); - Opt : C_Int := FOS_2_CInt (Options); - Res : Eti_Error; + Opt : C_Int := FOS_2_CInt (Options); + Res : Eti_Error; begin - Res := Set_Field_Opts (Fld, Opt); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Field_Opts (Fld, Opt); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Options; + end Set_Options; -- | -- | -- | - procedure Switch_Options (Fld : in Field; - Options : in Field_Option_Set; - On : Boolean := True) + procedure Switch_Options (Fld : in Field; + Options : in Field_Option_Set; + On : Boolean := True) is - function Field_Opts_On (Fld : Field; - Opt : C_Int) return C_Int; - pragma Import (C, Field_Opts_On, "field_opts_on"); - function Field_Opts_Off (Fld : Field; - Opt : C_Int) return C_Int; - pragma Import (C, Field_Opts_Off, "field_opts_off"); - - Err : Eti_Error; - Opt : C_Int := FOS_2_CInt (Options); + function Field_Opts_On (Fld : Field; + Opt : C_Int) return C_Int; + pragma Import (C, Field_Opts_On, "field_opts_on"); + function Field_Opts_Off (Fld : Field; + Opt : C_Int) return C_Int; + pragma Import (C, Field_Opts_Off, "field_opts_off"); + + Err : Eti_Error; + Opt : C_Int := FOS_2_CInt (Options); begin - if On then - Err := Field_Opts_On (Fld, Opt); + if On then + Err := Field_Opts_On (Fld, Opt); else - Err := Field_Opts_Off (Fld, Opt); + Err := Field_Opts_Off (Fld, Opt); end if; - if Err /= E_Ok then - Eti_Exception (Err); + if Err /= E_Ok then + Eti_Exception (Err); end if; - end Switch_Options; + end Switch_Options; -- | -- | -- | - procedure Get_Options (Fld : in Field; - Options : out Field_Option_Set) + procedure Get_Options (Fld : in Field; + Options : out Field_Option_Set) is - function Field_Opts (Fld : Field) return C_Int; - pragma Import (C, Field_Opts, "field_opts"); + function Field_Opts (Fld : Field) return C_Int; + pragma Import (C, Field_Opts, "field_opts"); - Res : C_Int := Field_Opts (Fld); + Res : C_Int := Field_Opts (Fld); begin - Options := CInt_2_FOS (Res); - end Get_Options; + Options := CInt_2_FOS (Res); + end Get_Options; -- | -- | -- | - function Get_Options (Fld : Field := Null_Field) - return Field_Option_Set + function Get_Options (Fld : Field := Null_Field) + return Field_Option_Set is - Fos : Field_Option_Set; + Fos : Field_Option_Set; begin - Get_Options (Fld, Fos); - return Fos; - end Get_Options; + Get_Options (Fld, Fos); + return Fos; + end Get_Options; -- | -- |===================================================================== -- | man page form_field_attributes.3x @@ -400,119 +399,119 @@ -- | -- | -- | - procedure Set_Foreground - (Fld : in Field; - Fore : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Foreground + (Fld : in Field; + Fore : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Set_Field_Fore (Fld : Field; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Field_Fore, "set_field_fore"); - - Ch : constant Attributed_Character := (Ch => Character'First, - Color => Color, - Attr => Fore); - Res : constant Eti_Error := - Set_Field_Fore (Fld, AttrChar_To_Chtype (Ch)); + function Set_Field_Fore (Fld : Field; + Attr : C_Chtype) return C_Int; + pragma Import (C, Set_Field_Fore, "set_field_fore"); + + Ch : constant Attributed_Character := (Ch => Character'First, + Color => Color, + Attr => Fore); + Res : constant Eti_Error := + Set_Field_Fore (Fld, AttrChar_To_Chtype (Ch)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Foreground; + end Set_Foreground; -- | -- | -- | - procedure Foreground (Fld : in Field; - Fore : out Character_Attribute_Set) + procedure Foreground (Fld : in Field; + Fore : out Character_Attribute_Set) is - function Field_Fore (Fld : Field) return C_Chtype; - pragma Import (C, Field_Fore, "field_fore"); + function Field_Fore (Fld : Field) return C_Chtype; + pragma Import (C, Field_Fore, "field_fore"); begin - Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; - end Foreground; + Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; + end Foreground; - procedure Foreground (Fld : in Field; - Fore : out Character_Attribute_Set; - Color : out Color_Pair) + procedure Foreground (Fld : in Field; + Fore : out Character_Attribute_Set; + Color : out Color_Pair) is - function Field_Fore (Fld : Field) return C_Chtype; - pragma Import (C, Field_Fore, "field_fore"); + function Field_Fore (Fld : Field) return C_Chtype; + pragma Import (C, Field_Fore, "field_fore"); begin - Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; - Color := Chtype_To_AttrChar (Field_Fore (Fld)).Color; - end Foreground; + Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; + Color := Chtype_To_AttrChar (Field_Fore (Fld)).Color; + end Foreground; -- | -- | -- | - procedure Set_Background - (Fld : in Field; - Back : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Background + (Fld : in Field; + Back : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Set_Field_Back (Fld : Field; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Field_Back, "set_field_back"); - - Ch : constant Attributed_Character := (Ch => Character'First, - Color => Color, - Attr => Back); - Res : constant Eti_Error := - Set_Field_Back (Fld, AttrChar_To_Chtype (Ch)); + function Set_Field_Back (Fld : Field; + Attr : C_Chtype) return C_Int; + pragma Import (C, Set_Field_Back, "set_field_back"); + + Ch : constant Attributed_Character := (Ch => Character'First, + Color => Color, + Attr => Back); + Res : constant Eti_Error := + Set_Field_Back (Fld, AttrChar_To_Chtype (Ch)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Background; + end Set_Background; -- | -- | -- | - procedure Background (Fld : in Field; - Back : out Character_Attribute_Set) + procedure Background (Fld : in Field; + Back : out Character_Attribute_Set) is - function Field_Back (Fld : Field) return C_Chtype; - pragma Import (C, Field_Back, "field_back"); + function Field_Back (Fld : Field) return C_Chtype; + pragma Import (C, Field_Back, "field_back"); begin - Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; - end Background; + Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; + end Background; - procedure Background (Fld : in Field; - Back : out Character_Attribute_Set; - Color : out Color_Pair) + procedure Background (Fld : in Field; + Back : out Character_Attribute_Set; + Color : out Color_Pair) is - function Field_Back (Fld : Field) return C_Chtype; - pragma Import (C, Field_Back, "field_back"); + function Field_Back (Fld : Field) return C_Chtype; + pragma Import (C, Field_Back, "field_back"); begin - Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; - Color := Chtype_To_AttrChar (Field_Back (Fld)).Color; - end Background; + Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; + Color := Chtype_To_AttrChar (Field_Back (Fld)).Color; + end Background; -- | -- | -- | - procedure Set_Pad_Character (Fld : in Field; - Pad : in Character := Space) + procedure Set_Pad_Character (Fld : in Field; + Pad : in Character := Space) is - function Set_Field_Pad (Fld : Field; - Ch : C_Int) return C_Int; - pragma Import (C, Set_Field_Pad, "set_field_pad"); + function Set_Field_Pad (Fld : Field; + Ch : C_Int) return C_Int; + pragma Import (C, Set_Field_Pad, "set_field_pad"); - Res : constant Eti_Error := Set_Field_Pad (Fld, - C_Int (Character'Pos (Pad))); + Res : constant Eti_Error := Set_Field_Pad (Fld, + C_Int (Character'Pos (Pad))); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Pad_Character; + end Set_Pad_Character; -- | -- | -- | - procedure Pad_Character (Fld : in Field; - Pad : out Character) + procedure Pad_Character (Fld : in Field; + Pad : out Character) is - function Field_Pad (Fld : Field) return C_Int; - pragma Import (C, Field_Pad, "field_pad"); + function Field_Pad (Fld : Field) return C_Int; + pragma Import (C, Field_Pad, "field_pad"); begin - Pad := Character'Val (Field_Pad (Fld)); - end Pad_Character; + Pad := Character'Val (Field_Pad (Fld)); + end Pad_Character; -- | -- |===================================================================== -- | man page form_field_info.3x @@ -520,62 +519,62 @@ -- | -- | -- | - procedure Info (Fld : in Field; - Lines : out Line_Count; - Columns : out Column_Count; - First_Row : out Line_Position; - First_Column : out Column_Position; - Off_Screen : out Natural; - Additional_Buffers : out Buffer_Number) + procedure Info (Fld : in Field; + Lines : out Line_Count; + Columns : out Column_Count; + First_Row : out Line_Position; + First_Column : out Column_Position; + Off_Screen : out Natural; + Additional_Buffers : out Buffer_Number) is - type C_Int_Access is access all C_Int; - function Fld_Info (Fld : Field; - L, C, Fr, Fc, Os, Ab : C_Int_Access) - return C_Int; - pragma Import (C, Fld_Info, "field_info"); - - L, C, Fr, Fc, Os, Ab : aliased C_Int; - Res : constant Eti_Error := Fld_Info (Fld, - L'Access, C'Access, - Fr'Access, Fc'Access, - Os'Access, Ab'Access); + type C_Int_Access is access all C_Int; + function Fld_Info (Fld : Field; + L, C, Fr, Fc, Os, Ab : C_Int_Access) + return C_Int; + pragma Import (C, Fld_Info, "field_info"); + + L, C, Fr, Fc, Os, Ab : aliased C_Int; + Res : constant Eti_Error := Fld_Info (Fld, + L'Access, C'Access, + Fr'Access, Fc'Access, + Os'Access, Ab'Access); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); else - Lines := Line_Count (L); - Columns := Column_Count (C); - First_Row := Line_Position (Fr); - First_Column := Column_Position (Fc); - Off_Screen := Natural (Os); - Additional_Buffers := Buffer_Number (Ab); + Lines := Line_Count (L); + Columns := Column_Count (C); + First_Row := Line_Position (Fr); + First_Column := Column_Position (Fc); + Off_Screen := Natural (Os); + Additional_Buffers := Buffer_Number (Ab); end if; - end Info; + end Info; -- | -- | -- | - procedure Dynamic_Info (Fld : in Field; - Lines : out Line_Count; - Columns : out Column_Count; - Max : out Natural) + procedure Dynamic_Info (Fld : in Field; + Lines : out Line_Count; + Columns : out Column_Count; + Max : out Natural) is - type C_Int_Access is access all C_Int; - function Dyn_Info (Fld : Field; L, C, M : C_Int_Access) return C_Int; - pragma Import (C, Dyn_Info, "dynamic_field_info"); - - L, C, M : aliased C_Int; - Res : constant Eti_Error := Dyn_Info (Fld, - L'Access, C'Access, - M'Access); + type C_Int_Access is access all C_Int; + function Dyn_Info (Fld : Field; L, C, M : C_Int_Access) return C_Int; + pragma Import (C, Dyn_Info, "dynamic_field_info"); + + L, C, M : aliased C_Int; + Res : constant Eti_Error := Dyn_Info (Fld, + L'Access, C'Access, + M'Access); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); else - Lines := Line_Count (L); - Columns := Column_Count (C); - Max := Natural (M); + Lines := Line_Count (L); + Columns := Column_Count (C); + Max := Natural (M); end if; - end Dynamic_Info; + end Dynamic_Info; -- | -- |===================================================================== -- | man page form_win.3x @@ -583,79 +582,79 @@ -- | -- | -- | - procedure Set_Window (Frm : in Form; - Win : in Window) + procedure Set_Window (Frm : in Form; + Win : in Window) is - function Set_Form_Win (Frm : Form; - Win : Window) return C_Int; - pragma Import (C, Set_Form_Win, "set_form_win"); + function Set_Form_Win (Frm : Form; + Win : Window) return C_Int; + pragma Import (C, Set_Form_Win, "set_form_win"); - Res : constant Eti_Error := Set_Form_Win (Frm, Win); + Res : constant Eti_Error := Set_Form_Win (Frm, Win); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Window; + end Set_Window; -- | -- | -- | - function Get_Window (Frm : Form) return Window + function Get_Window (Frm : Form) return Window is - function Form_Win (Frm : Form) return Window; - pragma Import (C, Form_Win, "form_win"); + function Form_Win (Frm : Form) return Window; + pragma Import (C, Form_Win, "form_win"); - W : constant Window := Form_Win (Frm); + W : constant Window := Form_Win (Frm); begin - return W; - end Get_Window; + return W; + end Get_Window; -- | -- | -- | - procedure Set_Sub_Window (Frm : in Form; - Win : in Window) + procedure Set_Sub_Window (Frm : in Form; + Win : in Window) is - function Set_Form_Sub (Frm : Form; - Win : Window) return C_Int; - pragma Import (C, Set_Form_Sub, "set_form_sub"); + function Set_Form_Sub (Frm : Form; + Win : Window) return C_Int; + pragma Import (C, Set_Form_Sub, "set_form_sub"); - Res : constant Eti_Error := Set_Form_Sub (Frm, Win); + Res : constant Eti_Error := Set_Form_Sub (Frm, Win); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Sub_Window; + end Set_Sub_Window; -- | -- | -- | - function Get_Sub_Window (Frm : Form) return Window + function Get_Sub_Window (Frm : Form) return Window is - function Form_Sub (Frm : Form) return Window; - pragma Import (C, Form_Sub, "form_sub"); + function Form_Sub (Frm : Form) return Window; + pragma Import (C, Form_Sub, "form_sub"); - W : constant Window := Form_Sub (Frm); + W : constant Window := Form_Sub (Frm); begin - return W; - end Get_Sub_Window; + return W; + end Get_Sub_Window; -- | -- | -- | - procedure Scale (Frm : in Form; - Lines : out Line_Count; - Columns : out Column_Count) + procedure Scale (Frm : in Form; + Lines : out Line_Count; + Columns : out Column_Count) is - type C_Int_Access is access all C_Int; - function M_Scale (Frm : Form; Yp, Xp : C_Int_Access) return C_Int; - pragma Import (C, M_Scale, "scale_form"); + type C_Int_Access is access all C_Int; + function M_Scale (Frm : Form; Yp, Xp : C_Int_Access) return C_Int; + pragma Import (C, M_Scale, "scale_form"); - X, Y : aliased C_Int; - Res : constant Eti_Error := M_Scale (Frm, Y'Access, X'Access); + X, Y : aliased C_Int; + Res : constant Eti_Error := M_Scale (Frm, Y'Access, X'Access); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Lines := Line_Count (Y); - Columns := Column_Count (X); - end Scale; + Lines := Line_Count (Y); + Columns := Column_Count (X); + end Scale; -- | -- |===================================================================== -- | man page menu_hook.3x @@ -663,67 +662,67 @@ -- | -- | -- | - procedure Set_Field_Init_Hook (Frm : in Form; - Proc : in Form_Hook_Function) + procedure Set_Field_Init_Hook (Frm : in Form; + Proc : in Form_Hook_Function) is - function Set_Field_Init (Frm : Form; - Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Field_Init, "set_field_init"); + function Set_Field_Init (Frm : Form; + Proc : Form_Hook_Function) return C_Int; + pragma Import (C, Set_Field_Init, "set_field_init"); - Res : constant Eti_Error := Set_Field_Init (Frm, Proc); + Res : constant Eti_Error := Set_Field_Init (Frm, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Field_Init_Hook; + end Set_Field_Init_Hook; -- | -- | -- | - procedure Set_Field_Term_Hook (Frm : in Form; - Proc : in Form_Hook_Function) + procedure Set_Field_Term_Hook (Frm : in Form; + Proc : in Form_Hook_Function) is - function Set_Field_Term (Frm : Form; - Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Field_Term, "set_field_term"); + function Set_Field_Term (Frm : Form; + Proc : Form_Hook_Function) return C_Int; + pragma Import (C, Set_Field_Term, "set_field_term"); - Res : constant Eti_Error := Set_Field_Term (Frm, Proc); + Res : constant Eti_Error := Set_Field_Term (Frm, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Field_Term_Hook; + end Set_Field_Term_Hook; -- | -- | -- | - procedure Set_Form_Init_Hook (Frm : in Form; - Proc : in Form_Hook_Function) + procedure Set_Form_Init_Hook (Frm : in Form; + Proc : in Form_Hook_Function) is - function Set_Form_Init (Frm : Form; - Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Form_Init, "set_form_init"); + function Set_Form_Init (Frm : Form; + Proc : Form_Hook_Function) return C_Int; + pragma Import (C, Set_Form_Init, "set_form_init"); - Res : constant Eti_Error := Set_Form_Init (Frm, Proc); + Res : constant Eti_Error := Set_Form_Init (Frm, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Form_Init_Hook; + end Set_Form_Init_Hook; -- | -- | -- | - procedure Set_Form_Term_Hook (Frm : in Form; - Proc : in Form_Hook_Function) + procedure Set_Form_Term_Hook (Frm : in Form; + Proc : in Form_Hook_Function) is - function Set_Form_Term (Frm : Form; - Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Form_Term, "set_form_term"); + function Set_Form_Term (Frm : Form; + Proc : Form_Hook_Function) return C_Int; + pragma Import (C, Set_Form_Term, "set_form_term"); - Res : constant Eti_Error := Set_Form_Term (Frm, Proc); + Res : constant Eti_Error := Set_Form_Term (Frm, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Form_Term_Hook; + end Set_Form_Term_Hook; -- | -- |===================================================================== -- | man page form_fields.3x @@ -731,71 +730,71 @@ -- | -- | -- | - procedure Redefine (Frm : in Form; - Flds : in Field_Array_Access) + procedure Redefine (Frm : in Form; + Flds : in Field_Array_Access) is - function Set_Frm_Fields (Frm : Form; - Items : System.Address) return C_Int; - pragma Import (C, Set_Frm_Fields, "set_form_fields"); + function Set_Frm_Fields (Frm : Form; + Items : System.Address) return C_Int; + pragma Import (C, Set_Frm_Fields, "set_form_fields"); - Res : Eti_Error; + Res : Eti_Error; begin - pragma Assert (Flds (Flds'Last) = Null_Field); - if Flds (Flds'Last) /= Null_Field then - raise Form_Exception; + pragma Assert (Flds (Flds'Last) = Null_Field); + if Flds (Flds'Last) /= Null_Field then + raise Form_Exception; else - Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - end Redefine; + end Redefine; -- | -- | -- | - function Fields (Frm : Form; - Index : Positive) return Field + function Fields (Frm : Form; + Index : Positive) return Field is - use F_Array; + use F_Array; - function C_Fields (Frm : Form) return Pointer; - pragma Import (C, C_Fields, "form_fields"); + function C_Fields (Frm : Form) return Pointer; + pragma Import (C, C_Fields, "form_fields"); - P : Pointer := C_Fields (Frm); + P : Pointer := C_Fields (Frm); begin - if P = null or else Index not in 1 .. Field_Count (Frm) then - raise Form_Exception; + if P = null or else Index not in 1 .. Field_Count (Frm) then + raise Form_Exception; else - P := P + ptrdiff_t (C_Int (Index) - 1); - return P.all; + P := P + ptrdiff_t (C_Int (Index) - 1); + return P.all; end if; - end Fields; + end Fields; -- | -- | -- | - function Field_Count (Frm : Form) return Natural + function Field_Count (Frm : Form) return Natural is - function Count (Frm : Form) return C_Int; - pragma Import (C, Count, "field_count"); + function Count (Frm : Form) return C_Int; + pragma Import (C, Count, "field_count"); begin - return Natural (Count (Frm)); - end Field_Count; + return Natural (Count (Frm)); + end Field_Count; -- | -- | -- | - procedure Move (Fld : in Field; - Line : in Line_Position; - Column : in Column_Position) + procedure Move (Fld : in Field; + Line : in Line_Position; + Column : in Column_Position) is - function Move (Fld : Field; L, C : C_Int) return C_Int; - pragma Import (C, Move, "move_field"); + function Move (Fld : Field; L, C : C_Int) return C_Int; + pragma Import (C, Move, "move_field"); - Res : constant Eti_Error := Move (Fld, C_Int (Line), C_Int (Column)); + Res : constant Eti_Error := Move (Fld, C_Int (Line), C_Int (Column)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Move; + end Move; -- | -- |===================================================================== -- | man page form_new.3x @@ -803,39 +802,39 @@ -- | -- | -- | - function Create (Fields : Field_Array_Access) return Form + function Create (Fields : Field_Array_Access) return Form is - function NewForm (Fields : System.Address) return Form; - pragma Import (C, NewForm, "new_form"); + function NewForm (Fields : System.Address) return Form; + pragma Import (C, NewForm, "new_form"); - M : Form; + M : Form; begin - pragma Assert (Fields (Fields'Last) = Null_Field); - if Fields (Fields'Last) /= Null_Field then - raise Form_Exception; + pragma Assert (Fields (Fields'Last) = Null_Field); + if Fields (Fields'Last) /= Null_Field then + raise Form_Exception; else - M := NewForm (Fields (Fields'First)'Address); - if M = Null_Form then - raise Form_Exception; + M := NewForm (Fields (Fields'First)'Address); + if M = Null_Form then + raise Form_Exception; end if; - return M; + return M; end if; - end Create; + end Create; -- | -- | -- | - procedure Delete (Frm : in out Form) + procedure Delete (Frm : in out Form) is - function Free (Frm : Form) return C_Int; - pragma Import (C, Free, "free_form"); + function Free (Frm : Form) return C_Int; + pragma Import (C, Free, "free_form"); - Res : constant Eti_Error := Free (Frm); + Res : constant Eti_Error := Free (Frm); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Frm := Null_Form; - end Delete; + Frm := Null_Form; + end Delete; -- | -- |===================================================================== -- | man page form_opts.3x @@ -843,70 +842,70 @@ -- | -- | -- | - procedure Set_Options (Frm : in Form; - Options : in Form_Option_Set) + procedure Set_Options (Frm : in Form; + Options : in Form_Option_Set) is - function Set_Form_Opts (Frm : Form; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Form_Opts, "set_form_opts"); + function Set_Form_Opts (Frm : Form; + Opt : C_Int) return C_Int; + pragma Import (C, Set_Form_Opts, "set_form_opts"); - Opt : C_Int := FrmOS_2_CInt (Options); - Res : Eti_Error; + Opt : C_Int := FrmOS_2_CInt (Options); + Res : Eti_Error; begin - Res := Set_Form_Opts (Frm, Opt); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Form_Opts (Frm, Opt); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Options; + end Set_Options; -- | -- | -- | - procedure Switch_Options (Frm : in Form; - Options : in Form_Option_Set; - On : Boolean := True) + procedure Switch_Options (Frm : in Form; + Options : in Form_Option_Set; + On : Boolean := True) is - function Form_Opts_On (Frm : Form; - Opt : C_Int) return C_Int; - pragma Import (C, Form_Opts_On, "form_opts_on"); - function Form_Opts_Off (Frm : Form; - Opt : C_Int) return C_Int; - pragma Import (C, Form_Opts_Off, "form_opts_off"); - - Err : Eti_Error; - Opt : C_Int := FrmOS_2_CInt (Options); + function Form_Opts_On (Frm : Form; + Opt : C_Int) return C_Int; + pragma Import (C, Form_Opts_On, "form_opts_on"); + function Form_Opts_Off (Frm : Form; + Opt : C_Int) return C_Int; + pragma Import (C, Form_Opts_Off, "form_opts_off"); + + Err : Eti_Error; + Opt : C_Int := FrmOS_2_CInt (Options); begin - if On then - Err := Form_Opts_On (Frm, Opt); + if On then + Err := Form_Opts_On (Frm, Opt); else - Err := Form_Opts_Off (Frm, Opt); + Err := Form_Opts_Off (Frm, Opt); end if; - if Err /= E_Ok then - Eti_Exception (Err); + if Err /= E_Ok then + Eti_Exception (Err); end if; - end Switch_Options; + end Switch_Options; -- | -- | -- | - procedure Get_Options (Frm : in Form; - Options : out Form_Option_Set) + procedure Get_Options (Frm : in Form; + Options : out Form_Option_Set) is - function Form_Opts (Frm : Form) return C_Int; - pragma Import (C, Form_Opts, "form_opts"); + function Form_Opts (Frm : Form) return C_Int; + pragma Import (C, Form_Opts, "form_opts"); - Res : C_Int := Form_Opts (Frm); + Res : C_Int := Form_Opts (Frm); begin - Options := CInt_2_FrmOS (Res); - end Get_Options; + Options := CInt_2_FrmOS (Res); + end Get_Options; -- | -- | -- | - function Get_Options (Frm : Form := Null_Form) return Form_Option_Set + function Get_Options (Frm : Form := Null_Form) return Form_Option_Set is - Fos : Form_Option_Set; + Fos : Form_Option_Set; begin - Get_Options (Frm, Fos); - return Fos; - end Get_Options; + Get_Options (Frm, Fos); + return Fos; + end Get_Options; -- | -- |===================================================================== -- | man page form_post.3x @@ -914,25 +913,25 @@ -- | -- | -- | - procedure Post (Frm : in Form; - Post : in Boolean := True) + procedure Post (Frm : in Form; + Post : in Boolean := True) is - function M_Post (Frm : Form) return C_Int; - pragma Import (C, M_Post, "post_form"); - function M_Unpost (Frm : Form) return C_Int; - pragma Import (C, M_Unpost, "unpost_form"); + function M_Post (Frm : Form) return C_Int; + pragma Import (C, M_Post, "post_form"); + function M_Unpost (Frm : Form) return C_Int; + pragma Import (C, M_Unpost, "unpost_form"); - Res : Eti_Error; + Res : Eti_Error; begin - if Post then - Res := M_Post (Frm); + if Post then + Res := M_Post (Frm); else - Res := M_Unpost (Frm); + Res := M_Unpost (Frm); end if; - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Post; + end Post; -- | -- |===================================================================== -- | man page form_cursor.3x @@ -940,17 +939,17 @@ -- | -- | -- | - procedure Position_Cursor (Frm : Form) + procedure Position_Cursor (Frm : Form) is - function Pos_Form_Cursor (Frm : Form) return C_Int; - pragma Import (C, Pos_Form_Cursor, "pos_form_cursor"); + function Pos_Form_Cursor (Frm : Form) return C_Int; + pragma Import (C, Pos_Form_Cursor, "pos_form_cursor"); - Res : constant Eti_Error := Pos_Form_Cursor (Frm); + Res : constant Eti_Error := Pos_Form_Cursor (Frm); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Position_Cursor; + end Position_Cursor; -- | -- |===================================================================== -- | man page form_data.3x @@ -958,35 +957,35 @@ -- | -- | -- | - function Data_Ahead (Frm : Form) return Boolean + function Data_Ahead (Frm : Form) return Boolean is - function Ahead (Frm : Form) return C_Int; - pragma Import (C, Ahead, "data_ahead"); + function Ahead (Frm : Form) return C_Int; + pragma Import (C, Ahead, "data_ahead"); - Res : constant C_Int := Ahead (Frm); + Res : constant C_Int := Ahead (Frm); begin - if Res = Curses_False then + if Res = Curses_False then return False; else return True; end if; - end Data_Ahead; + end Data_Ahead; -- | -- | -- | - function Data_Behind (Frm : Form) return Boolean + function Data_Behind (Frm : Form) return Boolean is - function Behind (Frm : Form) return C_Int; - pragma Import (C, Behind, "data_behind"); + function Behind (Frm : Form) return C_Int; + pragma Import (C, Behind, "data_behind"); - Res : constant C_Int := Behind (Frm); + Res : constant C_Int := Behind (Frm); begin - if Res = Curses_False then + if Res = Curses_False then return False; else return True; end if; - end Data_Behind; + end Data_Behind; -- | -- |===================================================================== -- | man page form_driver.3x @@ -994,29 +993,29 @@ -- | -- | -- | - function Driver (Frm : Form; - Key : Key_Code) return Driver_Result + function Driver (Frm : Form; + Key : Key_Code) return Driver_Result is - function Frm_Driver (Frm : Form; Key : C_Int) return C_Int; - pragma Import (C, Frm_Driver, "form_driver"); + function Frm_Driver (Frm : Form; Key : C_Int) return C_Int; + pragma Import (C, Frm_Driver, "form_driver"); - R : Eti_Error := Frm_Driver (Frm, C_Int (Key)); + R : Eti_Error := Frm_Driver (Frm, C_Int (Key)); begin - if R /= E_Ok then - if R = E_Unknown_Command then - return Unknown_Request; - elsif R = E_Invalid_Field then - return Invalid_Field; - elsif R = E_Request_Denied then - return Request_Denied; + if R /= E_Ok then + if R = E_Unknown_Command then + return Unknown_Request; + elsif R = E_Invalid_Field then + return Invalid_Field; + elsif R = E_Request_Denied then + return Request_Denied; else - Eti_Exception (R); - return Form_Ok; + Eti_Exception (R); + return Form_Ok; end if; else - return Form_Ok; + return Form_Ok; end if; - end Driver; + end Driver; -- | -- |===================================================================== -- | man page form_page.3x @@ -1024,77 +1023,77 @@ -- | -- | -- | - procedure Set_Current (Frm : in Form; - Fld : in Field) + procedure Set_Current (Frm : in Form; + Fld : in Field) is - function Set_Current_Fld (Frm : Form; Fld : Field) return C_Int; - pragma Import (C, Set_Current_Fld, "set_current_field"); + function Set_Current_Fld (Frm : Form; Fld : Field) return C_Int; + pragma Import (C, Set_Current_Fld, "set_current_field"); - Res : constant Eti_Error := Set_Current_Fld (Frm, Fld); + Res : constant Eti_Error := Set_Current_Fld (Frm, Fld); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Current; + end Set_Current; -- | -- | -- | - function Current (Frm : in Form) return Field + function Current (Frm : in Form) return Field is - function Current_Fld (Frm : Form) return Field; - pragma Import (C, Current_Fld, "current_field"); + function Current_Fld (Frm : Form) return Field; + pragma Import (C, Current_Fld, "current_field"); - Fld : constant Field := Current_Fld (Frm); + Fld : constant Field := Current_Fld (Frm); begin - if Fld = Null_Field then - raise Form_Exception; + if Fld = Null_Field then + raise Form_Exception; end if; - return Fld; - end Current; + return Fld; + end Current; -- | -- | -- | - procedure Set_Page (Frm : in Form; - Page : in Page_Number := Page_Number'First) + procedure Set_Page (Frm : in Form; + Page : in Page_Number := Page_Number'First) is - function Set_Frm_Page (Frm : Form; Pg : C_Int) return C_Int; - pragma Import (C, Set_Frm_Page, "set_form_page"); + function Set_Frm_Page (Frm : Form; Pg : C_Int) return C_Int; + pragma Import (C, Set_Frm_Page, "set_form_page"); - Res : constant Eti_Error := Set_Frm_Page (Frm, C_Int (Page)); + Res : constant Eti_Error := Set_Frm_Page (Frm, C_Int (Page)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Page; + end Set_Page; -- | -- | -- | - function Page (Frm : Form) return Page_Number + function Page (Frm : Form) return Page_Number is - function Get_Page (Frm : Form) return C_Int; - pragma Import (C, Get_Page, "form_page"); + function Get_Page (Frm : Form) return C_Int; + pragma Import (C, Get_Page, "form_page"); - P : constant C_Int := Get_Page (Frm); + P : constant C_Int := Get_Page (Frm); begin - if P < 0 then - raise Form_Exception; + if P < 0 then + raise Form_Exception; else - return Page_Number (P); + return Page_Number (P); end if; - end Page; + end Page; - function Get_Index (Fld : Field) return Positive + function Get_Index (Fld : Field) return Positive is - function Get_Fieldindex (Fld : Field) return C_Int; - pragma Import (C, Get_Fieldindex, "field_index"); + function Get_Fieldindex (Fld : Field) return C_Int; + pragma Import (C, Get_Fieldindex, "field_index"); - Res : constant C_Int := Get_Fieldindex (Fld); + Res : constant C_Int := Get_Fieldindex (Fld); begin - if Res = Curses_Err then - raise Form_Exception; + if Res = Curses_Err then + raise Form_Exception; end if; - return Positive (Natural (Res) + Positive'First); - end Get_Index; + return Positive (Natural (Res) + Positive'First); + end Get_Index; -- | -- |===================================================================== @@ -1103,64 +1102,64 @@ -- | -- | -- | - procedure Set_New_Page (Fld : in Field; - New_Page : in Boolean := True) + procedure Set_New_Page (Fld : in Field; + New_Page : in Boolean := True) is - function Set_Page (Fld : Field; Flg : C_Int) return C_Int; - pragma Import (C, Set_Page, "set_new_page"); + function Set_Page (Fld : Field; Flg : C_Int) return C_Int; + pragma Import (C, Set_Page, "set_new_page"); - Res : constant Eti_Error := Set_Page (Fld, Boolean'Pos (New_Page)); + Res : constant Eti_Error := Set_Page (Fld, Boolean'Pos (New_Page)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_New_Page; + end Set_New_Page; -- | -- | -- | - function Is_New_Page (Fld : Field) return Boolean + function Is_New_Page (Fld : Field) return Boolean is - function Is_New (Fld : Field) return C_Int; - pragma Import (C, Is_New, "new_page"); + function Is_New (Fld : Field) return C_Int; + pragma Import (C, Is_New, "new_page"); - Res : constant C_Int := Is_New (Fld); + Res : constant C_Int := Is_New (Fld); begin - if Res = Curses_False then + if Res = Curses_False then return False; else return True; end if; - end Is_New_Page; + end Is_New_Page; - procedure Free (FA : in out Field_Array_Access; - Free_Fields : in Boolean := False) + procedure Free (FA : in out Field_Array_Access; + Free_Fields : in Boolean := False) is - procedure Release is new Ada.Unchecked_Deallocation - (Field_Array, Field_Array_Access); + procedure Release is new Ada.Unchecked_Deallocation + (Field_Array, Field_Array_Access); begin - if FA /= null and then Free_Fields then - for I in FA'First .. (FA'Last - 1) loop - if (FA (I) /= Null_Field) then - Delete (FA (I)); + if FA /= null and then Free_Fields then + for I in FA'First .. (FA'Last - 1) loop + if (FA (I) /= Null_Field) then + Delete (FA (I)); end if; end loop; end if; - Release (FA); - end Free; + Release (FA); + end Free; -- |===================================================================== - function Default_Field_Options return Field_Option_Set + function Default_Field_Options return Field_Option_Set is begin - return Get_Options (Null_Field); - end Default_Field_Options; + return Get_Options (Null_Field); + end Default_Field_Options; - function Default_Form_Options return Form_Option_Set + function Default_Form_Options return Form_Option_Set is begin - return Get_Options (Null_Form); - end Default_Form_Options; + return Get_Options (Null_Form); + end Default_Form_Options; -end Terminal_Interface.Curses.Forms; - \ No newline at end of file +end Terminal_Interface.Curses.Forms; + diff --git a/doc/html/ada/terminal_interface-curses-forms__ads.htm b/doc/html/ada/terminal_interface-curses-forms__ads.htm index b3e25ece..9bb9772f 100644 --- a/doc/html/ada/terminal_interface-curses-forms__ads.htm +++ b/doc/html/ada/terminal_interface-curses-forms__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.26 @ +-- @Revision: 1.27 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- form binding. @@ -58,31 +57,31 @@ Space : Character renames Ada.Characters.Latin_1.Space; - type Field is private; + type Field is private; type Form is private; - Null_Field : constant Field; + Null_Field : constant Field; Null_Form : constant Form; - type Field_Justification is (None, - Left, - Center, + type Field_Justification is (None, + Left, + Center, Right); pragma Warnings (Off); type Field_Option_Set is record - Visible : Boolean; - Active : Boolean; - Public : Boolean; - Edit : Boolean; - Wrap : Boolean; - Blank : Boolean; - Auto_Skip : Boolean; - Null_Ok : Boolean; - Pass_Ok : Boolean; - Static : Boolean; - end record; + Visible : Boolean; + Active : Boolean; + Public : Boolean; + Edit : Boolean; + Wrap : Boolean; + Blank : Boolean; + Auto_Skip : Boolean; + Null_Ok : Boolean; + Pass_Ok : Boolean; + Static : Boolean; + end record; pragma Pack (Field_Option_Set); pragma Convention (C, Field_Option_Set); @@ -112,9 +111,9 @@ pragma Warnings (Off); type Form_Option_Set is record - NL_Overload : Boolean; + NL_Overload : Boolean; BS_Overload : Boolean; - end record; + end record; pragma Pack (Form_Option_Set); pragma Convention (C, Form_Option_Set); @@ -140,7 +139,7 @@ type Field_Array_Access is access Field_Array; - procedure Free (FA : in out Field_Array_Access; + procedure Free (FA : in out Field_Array_Access; Free_Fields : in Boolean := False); -- Release the memory for an allocated field array -- If Free_Fields is True, call Delete() for all the fields in @@ -149,139 +148,139 @@ subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57); -- The prefix F_ stands for "Form Request" - F_Next_Page : constant Form_Request_Code := Key_Max + 1; - F_Previous_Page : constant Form_Request_Code := Key_Max + 2; - F_First_Page : constant Form_Request_Code := Key_Max + 3; + F_Next_Page : constant Form_Request_Code := Key_Max + 1; + F_Previous_Page : constant Form_Request_Code := Key_Max + 2; + F_First_Page : constant Form_Request_Code := Key_Max + 3; F_Last_Page : constant Form_Request_Code := Key_Max + 4; - F_Next_Field : constant Form_Request_Code := Key_Max + 5; - F_Previous_Field : constant Form_Request_Code := Key_Max + 6; - F_First_Field : constant Form_Request_Code := Key_Max + 7; - F_Last_Field : constant Form_Request_Code := Key_Max + 8; - F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9; - F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10; - F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11; - F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12; - F_Left_Field : constant Form_Request_Code := Key_Max + 13; - F_Right_Field : constant Form_Request_Code := Key_Max + 14; - F_Up_Field : constant Form_Request_Code := Key_Max + 15; + F_Next_Field : constant Form_Request_Code := Key_Max + 5; + F_Previous_Field : constant Form_Request_Code := Key_Max + 6; + F_First_Field : constant Form_Request_Code := Key_Max + 7; + F_Last_Field : constant Form_Request_Code := Key_Max + 8; + F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9; + F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10; + F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11; + F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12; + F_Left_Field : constant Form_Request_Code := Key_Max + 13; + F_Right_Field : constant Form_Request_Code := Key_Max + 14; + F_Up_Field : constant Form_Request_Code := Key_Max + 15; F_Down_Field : constant Form_Request_Code := Key_Max + 16; - F_Next_Char : constant Form_Request_Code := Key_Max + 17; - F_Previous_Char : constant Form_Request_Code := Key_Max + 18; - F_Next_Line : constant Form_Request_Code := Key_Max + 19; - F_Previous_Line : constant Form_Request_Code := Key_Max + 20; - F_Next_Word : constant Form_Request_Code := Key_Max + 21; - F_Previous_Word : constant Form_Request_Code := Key_Max + 22; - F_Begin_Field : constant Form_Request_Code := Key_Max + 23; - F_End_Field : constant Form_Request_Code := Key_Max + 24; - F_Begin_Line : constant Form_Request_Code := Key_Max + 25; - F_End_Line : constant Form_Request_Code := Key_Max + 26; - F_Left_Char : constant Form_Request_Code := Key_Max + 27; - F_Right_Char : constant Form_Request_Code := Key_Max + 28; - F_Up_Char : constant Form_Request_Code := Key_Max + 29; + F_Next_Char : constant Form_Request_Code := Key_Max + 17; + F_Previous_Char : constant Form_Request_Code := Key_Max + 18; + F_Next_Line : constant Form_Request_Code := Key_Max + 19; + F_Previous_Line : constant Form_Request_Code := Key_Max + 20; + F_Next_Word : constant Form_Request_Code := Key_Max + 21; + F_Previous_Word : constant Form_Request_Code := Key_Max + 22; + F_Begin_Field : constant Form_Request_Code := Key_Max + 23; + F_End_Field : constant Form_Request_Code := Key_Max + 24; + F_Begin_Line : constant Form_Request_Code := Key_Max + 25; + F_End_Line : constant Form_Request_Code := Key_Max + 26; + F_Left_Char : constant Form_Request_Code := Key_Max + 27; + F_Right_Char : constant Form_Request_Code := Key_Max + 28; + F_Up_Char : constant Form_Request_Code := Key_Max + 29; F_Down_Char : constant Form_Request_Code := Key_Max + 30; - F_New_Line : constant Form_Request_Code := Key_Max + 31; - F_Insert_Char : constant Form_Request_Code := Key_Max + 32; - F_Insert_Line : constant Form_Request_Code := Key_Max + 33; - F_Delete_Char : constant Form_Request_Code := Key_Max + 34; - F_Delete_Previous : constant Form_Request_Code := Key_Max + 35; - F_Delete_Line : constant Form_Request_Code := Key_Max + 36; - F_Delete_Word : constant Form_Request_Code := Key_Max + 37; - F_Clear_EOL : constant Form_Request_Code := Key_Max + 38; - F_Clear_EOF : constant Form_Request_Code := Key_Max + 39; - F_Clear_Field : constant Form_Request_Code := Key_Max + 40; - F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41; + F_New_Line : constant Form_Request_Code := Key_Max + 31; + F_Insert_Char : constant Form_Request_Code := Key_Max + 32; + F_Insert_Line : constant Form_Request_Code := Key_Max + 33; + F_Delete_Char : constant Form_Request_Code := Key_Max + 34; + F_Delete_Previous : constant Form_Request_Code := Key_Max + 35; + F_Delete_Line : constant Form_Request_Code := Key_Max + 36; + F_Delete_Word : constant Form_Request_Code := Key_Max + 37; + F_Clear_EOL : constant Form_Request_Code := Key_Max + 38; + F_Clear_EOF : constant Form_Request_Code := Key_Max + 39; + F_Clear_Field : constant Form_Request_Code := Key_Max + 40; + F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41; F_Insert_Mode : constant Form_Request_Code := Key_Max + 42; -- Vertical Scrolling - F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43; - F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44; - F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45; - F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46; - F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47; + F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43; + F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44; + F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45; + F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46; + F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47; F_ScrollBackward_HalfPage : constant Form_Request_Code := Key_Max + 48; -- Horizontal Scrolling - F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49; - F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50; - F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51; - F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52; - F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53; + F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49; + F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50; + F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51; + F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52; + F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53; F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54; - F_Validate_Field : constant Form_Request_Code := Key_Max + 55; - F_Next_Choice : constant Form_Request_Code := Key_Max + 56; + F_Validate_Field : constant Form_Request_Code := Key_Max + 55; + F_Next_Choice : constant Form_Request_Code := Key_Max + 56; F_Previous_Choice : constant Form_Request_Code := Key_Max + 57; -- For those who like the old 'C' style request names - REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page; - REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page; - REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page; + REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page; + REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page; + REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page; REQ_LAST_PAGE : Form_Request_Code renames F_Last_Page; - REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field; - REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field; - REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field; - REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field; - REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field; - REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field; - REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field; - REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field; - REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field; - REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field; - REQ_UP_FIELD : Form_Request_Code renames F_Up_Field; + REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field; + REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field; + REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field; + REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field; + REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field; + REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field; + REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field; + REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field; + REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field; + REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field; + REQ_UP_FIELD : Form_Request_Code renames F_Up_Field; REQ_DOWN_FIELD : Form_Request_Code renames F_Down_Field; - REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char; - REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char; - REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line; - REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line; - REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word; - REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word; - REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field; - REQ_END_FIELD : Form_Request_Code renames F_End_Field; - REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line; - REQ_END_LINE : Form_Request_Code renames F_End_Line; - REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char; - REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char; - REQ_UP_CHAR : Form_Request_Code renames F_Up_Char; + REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char; + REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char; + REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line; + REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line; + REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word; + REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word; + REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field; + REQ_END_FIELD : Form_Request_Code renames F_End_Field; + REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line; + REQ_END_LINE : Form_Request_Code renames F_End_Line; + REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char; + REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char; + REQ_UP_CHAR : Form_Request_Code renames F_Up_Char; REQ_DOWN_CHAR : Form_Request_Code renames F_Down_Char; - REQ_NEW_LINE : Form_Request_Code renames F_New_Line; - REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char; - REQ_INS_LINE : Form_Request_Code renames F_Insert_Line; - REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char; - REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous; - REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line; - REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word; - REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL; - REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF; - REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field; - REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode; + REQ_NEW_LINE : Form_Request_Code renames F_New_Line; + REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char; + REQ_INS_LINE : Form_Request_Code renames F_Insert_Line; + REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char; + REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous; + REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line; + REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word; + REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL; + REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF; + REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field; + REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode; REQ_INS_MODE : Form_Request_Code renames F_Insert_Mode; - REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line; - REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line; - REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page; - REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page; - REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage; + REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line; + REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line; + REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page; + REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page; + REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage; REQ_SCR_BHPAGE : Form_Request_Code renames F_ScrollBackward_HalfPage; - REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char; - REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char; - REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line; - REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line; - REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine; + REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char; + REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char; + REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line; + REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line; + REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine; REQ_SCR_HBHALF : Form_Request_Code renames F_HScrollBackward_HalfLine; - REQ_VALIDATION : Form_Request_Code renames F_Validate_Field; - REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice; + REQ_VALIDATION : Form_Request_Code renames F_Validate_Field; + REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice; REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice; - procedure Request_Name (Key : in Form_Request_Code; + procedure Request_Name (Key : in Form_Request_Code; Name : out String); function Request_Name (Key : Form_Request_Code) return String; @@ -298,22 +297,22 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - function Create (Height : Line_Count; - Width : Column_Count; - Top : Line_Position; - Left : Column_Position; - Off_Screen : Natural := 0; + function Create (Height : Line_Count; + Width : Column_Count; + Top : Line_Position; + Left : Column_Position; + Off_Screen : Natural := 0; More_Buffers : Buffer_Number := Buffer_Number'First) return Field; -- AKA: new_field() -- An overloaded Create is defined later. Pragma Inline appears there. -- #1A NAME="AFU_2"#2| - function New_Field (Height : Line_Count; - Width : Column_Count; - Top : Line_Position; - Left : Column_Position; - Off_Screen : Natural := 0; + function New_Field (Height : Line_Count; + Width : Column_Count; + Top : Line_Position; + Left : Column_Position; + Off_Screen : Natural := 0; More_Buffers : Buffer_Number := Buffer_Number'First) return Field renames Create; -- AKA: new_field() @@ -326,15 +325,15 @@ -- An overloaded Delete is defined later. Pragma Inline appears there. -- #1A NAME="AFU_4"#2| - function Duplicate (Fld : Field; - Top : Line_Position; + function Duplicate (Fld : Field; + Top : Line_Position; Left : Column_Position) return Field; -- AKA: dup_field() pragma Inline (Duplicate); -- #1A NAME="AFU_5"#2| - function Link (Fld : Field; - Top : Line_Position; + function Link (Fld : Field; + Top : Line_Position; Left : Column_Position) return Field; -- AKA: link_field() pragma Inline (Link); @@ -344,7 +343,7 @@ -- |===================================================================== -- #1A NAME="AFU_6"#2| - procedure Set_Justification (Fld : in Field; + procedure Set_Justification (Fld : in Field; Just : in Field_Justification := None); -- AKA: set_field_just() pragma Inline (Set_Justification); @@ -360,28 +359,28 @@ -- #1A NAME="AFU_8"#2| procedure Set_Buffer - (Fld : in Field; - Buffer : in Buffer_Number := Buffer_Number'First; + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First; Str : in String); -- AKA: set_field_buffer() -- Not inlined -- #1A NAME="AFU_9"#2| procedure Get_Buffer - (Fld : in Field; - Buffer : in Buffer_Number := Buffer_Number'First; + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First; Str : out String); -- AKA: field_buffer() function Get_Buffer - (Fld : in Field; + (Fld : in Field; Buffer : in Buffer_Number := Buffer_Number'First) return String; -- AKA: field_buffer() -- Same but as function pragma Inline (Get_Buffer); -- #1A NAME="AFU_10"#2| - procedure Set_Status (Fld : in Field; + procedure Set_Status (Fld : in Field; Status : in Boolean := True); -- AKA: set_field_status() pragma Inline (Set_Status); @@ -392,7 +391,7 @@ pragma Inline (Changed); -- #1A NAME="AFU_12"#2| - procedure Set_Maximum_Size (Fld : in Field; + procedure Set_Maximum_Size (Fld : in Field; Max : in Natural := 0); -- AKA: set_field_max() pragma Inline (Set_Maximum_Size); @@ -402,21 +401,21 @@ -- |===================================================================== -- #1A NAME="AFU_13"#2| - procedure Set_Options (Fld : in Field; + procedure Set_Options (Fld : in Field; Options : in Field_Option_Set); -- AKA: set_field_opts() -- An overloaded version is defined later. Pragma Inline appears there -- #1A NAME="AFU_14"#2| - procedure Switch_Options (Fld : in Field; - Options : in Field_Option_Set; + procedure Switch_Options (Fld : in Field; + Options : in Field_Option_Set; On : Boolean := True); -- AKA: field_opts_on() -- AKA: field_opts_off() -- An overloaded version is defined later. Pragma Inline appears there -- #1A NAME="AFU_15"#2| - procedure Get_Options (Fld : in Field; + procedure Get_Options (Fld : in Field; Options : out Field_Option_Set); -- AKA: field_opts() @@ -432,52 +431,52 @@ -- #1A NAME="AFU_17"#2| procedure Set_Foreground - (Fld : in Field; - Fore : in Character_Attribute_Set := Normal_Video; + (Fld : in Field; + Fore : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: set_field_fore() pragma Inline (Set_Foreground); -- #1A NAME="AFU_18"#2| - procedure Foreground (Fld : in Field; + procedure Foreground (Fld : in Field; Fore : out Character_Attribute_Set); -- AKA: field_fore() -- #1A NAME="AFU_19"#2| - procedure Foreground (Fld : in Field; - Fore : out Character_Attribute_Set; + procedure Foreground (Fld : in Field; + Fore : out Character_Attribute_Set; Color : out Color_Pair); -- AKA: field_fore() pragma Inline (Foreground); -- #1A NAME="AFU_20"#2| procedure Set_Background - (Fld : in Field; - Back : in Character_Attribute_Set := Normal_Video; + (Fld : in Field; + Back : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: set_field_back() pragma Inline (Set_Background); -- #1A NAME="AFU_21"#2| - procedure Background (Fld : in Field; + procedure Background (Fld : in Field; Back : out Character_Attribute_Set); -- AKA: field_back() -- #1A NAME="AFU_22"#2| - procedure Background (Fld : in Field; - Back : out Character_Attribute_Set; + procedure Background (Fld : in Field; + Back : out Character_Attribute_Set; Color : out Color_Pair); -- AKA: field_back() pragma Inline (Background); -- #1A NAME="AFU_23"#2| - procedure Set_Pad_Character (Fld : in Field; + procedure Set_Pad_Character (Fld : in Field; Pad : in Character := Space); -- AKA: set_field_pad() pragma Inline (Set_Pad_Character); -- #1A NAME="AFU_24"#2| - procedure Pad_Character (Fld : in Field; + procedure Pad_Character (Fld : in Field; Pad : out Character); -- AKA: field_pad() pragma Inline (Pad_Character); @@ -487,20 +486,20 @@ -- |===================================================================== -- #1A NAME="AFU_25"#2| - procedure Info (Fld : in Field; - Lines : out Line_Count; - Columns : out Column_Count; - First_Row : out Line_Position; - First_Column : out Column_Position; - Off_Screen : out Natural; + procedure Info (Fld : in Field; + Lines : out Line_Count; + Columns : out Column_Count; + First_Row : out Line_Position; + First_Column : out Column_Position; + Off_Screen : out Natural; Additional_Buffers : out Buffer_Number); -- AKA: field_info() pragma Inline (Info); -- #1A NAME="AFU_26"#2| - procedure Dynamic_Info (Fld : in Field; - Lines : out Line_Count; - Columns : out Column_Count; + procedure Dynamic_Info (Fld : in Field; + Lines : out Line_Count; + Columns : out Column_Count; Max : out Natural); -- AKA: dynamic_field_info() pragma Inline (Dynamic_Info); @@ -510,7 +509,7 @@ -- |===================================================================== -- #1A NAME="AFU_27"#2| - procedure Set_Window (Frm : in Form; + procedure Set_Window (Frm : in Form; Win : in Window); -- AKA: set_form_win() pragma Inline (Set_Window); @@ -521,7 +520,7 @@ pragma Inline (Get_Window); -- #1A NAME="AFU_29"#2| - procedure Set_Sub_Window (Frm : in Form; + procedure Set_Sub_Window (Frm : in Form; Win : in Window); -- AKA: set_form_sub() pragma Inline (Set_Sub_Window); @@ -532,8 +531,8 @@ pragma Inline (Get_Sub_Window); -- #1A NAME="AFU_31"#2| - procedure Scale (Frm : in Form; - Lines : out Line_Count; + procedure Scale (Frm : in Form; + Lines : out Line_Count; Columns : out Column_Count); -- AKA: scale_form() pragma Inline (Scale); @@ -546,25 +545,25 @@ pragma Convention (C, Form_Hook_Function); -- #1A NAME="AFU_32"#2| - procedure Set_Field_Init_Hook (Frm : in Form; + procedure Set_Field_Init_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA: set_field_init() pragma Inline (Set_Field_Init_Hook); -- #1A NAME="AFU_33"#2| - procedure Set_Field_Term_Hook (Frm : in Form; + procedure Set_Field_Term_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA: set_field_term() pragma Inline (Set_Field_Term_Hook); -- #1A NAME="AFU_34"#2| - procedure Set_Form_Init_Hook (Frm : in Form; + procedure Set_Form_Init_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA: set_form_init() pragma Inline (Set_Form_Init_Hook); -- #1A NAME="AFU_35"#2| - procedure Set_Form_Term_Hook (Frm : in Form; + procedure Set_Form_Term_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA: set_form_term() pragma Inline (Set_Form_Term_Hook); @@ -594,19 +593,19 @@ -- |===================================================================== -- #1A NAME="AFU_40"#2| - procedure Redefine (Frm : in Form; + procedure Redefine (Frm : in Form; Flds : in Field_Array_Access); -- AKA: set_form_fields() pragma Inline (Redefine); -- #1A NAME="AFU_41"#2| - procedure Set_Fields (Frm : in Form; + procedure Set_Fields (Frm : in Form; Flds : in Field_Array_Access) renames Redefine; -- AKA: set_form_fields() pragma Inline (Set_Fields); -- #1A NAME="AFU_42"#2| - function Fields (Frm : Form; + function Fields (Frm : Form; Index : Positive) return Field; -- AKA: form_fields() pragma Inline (Fields); @@ -617,8 +616,8 @@ pragma Inline (Field_Count); -- #1A NAME="AFU_44"#2| - procedure Move (Fld : in Field; - Line : in Line_Position; + procedure Move (Fld : in Field; + Line : in Line_Position; Column : in Column_Position); -- AKA: move_field() pragma Inline (Move); @@ -649,21 +648,21 @@ -- |===================================================================== -- #1A NAME="AFU_48"#2| - procedure Set_Options (Frm : in Form; + procedure Set_Options (Frm : in Form; Options : in Form_Option_Set); -- AKA: set_form_opts() pragma Inline (Set_Options); -- #1A NAME="AFU_49"#2| - procedure Switch_Options (Frm : in Form; - Options : in Form_Option_Set; + procedure Switch_Options (Frm : in Form; + Options : in Form_Option_Set; On : Boolean := True); -- AKA: form_opts_on() -- AKA: form_opts_off() pragma Inline (Switch_Options); -- #1A NAME="AFU_50"#2| - procedure Get_Options (Frm : in Form; + procedure Get_Options (Frm : in Form; Options : out Form_Option_Set); -- AKA: form_opts() @@ -677,7 +676,7 @@ -- |===================================================================== -- #1A NAME="AFU_52"#2| - procedure Post (Frm : in Form; + procedure Post (Frm : in Form; Post : in Boolean := True); -- AKA: post_form() -- AKA: unpost_form() @@ -710,13 +709,13 @@ -- | Man page form_driver.3x -- |===================================================================== - type Driver_Result is (Form_Ok, - Request_Denied, - Unknown_Request, + type Driver_Result is (Form_Ok, + Request_Denied, + Unknown_Request, Invalid_Field); -- #1A NAME="AFU_56"#2| - function Driver (Frm : Form; + function Driver (Frm : Form; Key : Key_Code) return Driver_Result; -- AKA: form_driver() -- Driver not inlined @@ -728,7 +727,7 @@ type Page_Number is new Natural; -- #1A NAME="AFU_57"#2| - procedure Set_Current (Frm : in Form; + procedure Set_Current (Frm : in Form; Fld : in Field); -- AKA: set_current_field() pragma Inline (Set_Current); @@ -739,7 +738,7 @@ pragma Inline (Current); -- #1A NAME="AFU_59"#2| - procedure Set_Page (Frm : in Form; + procedure Set_Page (Frm : in Form; Page : in Page_Number := Page_Number'First); -- AKA: set_form_page() pragma Inline (Set_Page); @@ -762,7 +761,7 @@ -- |===================================================================== -- #1A NAME="AFU_62"#2| - procedure Set_New_Page (Fld : in Field; + procedure Set_New_Page (Fld : in Field; New_Page : in Boolean := True); -- AKA: set_new_page() pragma Inline (Set_New_Page); @@ -779,11 +778,11 @@ ------------------------------------------------------------------------------ private - type Field is new System.Storage_Elements.Integer_Address; + type Field is new System.Storage_Elements.Integer_Address; type Form is new System.Storage_Elements.Integer_Address; - Null_Field : constant Field := 0; + Null_Field : constant Field := 0; Null_Form : constant Form := 0; end Terminal_Interface.Curses.Forms; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm b/doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm index 3dbd6248..e2e694cf 100644 --- a/doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm +++ b/doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm @@ -37,47 +37,46 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Menus.Item_User_Data is +package body Terminal_Interface.Curses.Menus.Item_User_Data is use type Interfaces.C.int; - procedure Set_User_Data (Itm : in Item; - Data : in User_Access) + procedure Set_User_Data (Itm : in Item; + Data : in User_Access) is - function Set_Item_Userptr (Itm : Item; - Addr : User_Access) return C_Int; - pragma Import (C, Set_Item_Userptr, "set_item_userptr"); + function Set_Item_Userptr (Itm : Item; + Addr : User_Access) return C_Int; + pragma Import (C, Set_Item_Userptr, "set_item_userptr"); - Res : constant Eti_Error := Set_Item_Userptr (Itm, Data); + Res : constant Eti_Error := Set_Item_Userptr (Itm, Data); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_User_Data; + end Set_User_Data; - function Get_User_Data (Itm : in Item) return User_Access + function Get_User_Data (Itm : in Item) return User_Access is - function Item_Userptr (Itm : Item) return User_Access; - pragma Import (C, Item_Userptr, "item_userptr"); + function Item_Userptr (Itm : Item) return User_Access; + pragma Import (C, Item_Userptr, "item_userptr"); begin - return Item_Userptr (Itm); - end Get_User_Data; + return Item_Userptr (Itm); + end Get_User_Data; - procedure Get_User_Data (Itm : in Item; - Data : out User_Access) + procedure Get_User_Data (Itm : in Item; + Data : out User_Access) is begin - Data := Get_User_Data (Itm); - end Get_User_Data; + Data := Get_User_Data (Itm); + end Get_User_Data; -end Terminal_Interface.Curses.Menus.Item_User_Data; - \ No newline at end of file +end Terminal_Interface.Curses.Menus.Item_User_Data; + diff --git a/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm b/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm index df6d8d07..38a06f20 100644 --- a/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm +++ b/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm @@ -38,16 +38,15 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type User is limited private; - type User_Access is access User; + type User is limited private; + type User_Access is access User; package Terminal_Interface.Curses.Menus.Item_User_Data is pragma Preelaborate (Terminal_Interface.Curses.Menus.Item_User_Data); @@ -60,13 +59,13 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - procedure Set_User_Data (Itm : in Item; + procedure Set_User_Data (Itm : in Item; Data : in User_Access); -- AKA: set_item_userptr pragma Inline (Set_User_Data); -- #1A NAME="AFU_2"#2| - procedure Get_User_Data (Itm : in Item; + procedure Get_User_Data (Itm : in Item; Data : out User_Access); -- AKA: item_userptr @@ -78,4 +77,4 @@ end Terminal_Interface.Curses.Menus.Item_User_Data; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm b/doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm index ad50af7a..be124612 100644 --- a/doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm +++ b/doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm @@ -37,46 +37,45 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.11 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Menus.Menu_User_Data is +package body Terminal_Interface.Curses.Menus.Menu_User_Data is use type Interfaces.C.int; - procedure Set_User_Data (Men : in Menu; - Data : in User_Access) + procedure Set_User_Data (Men : in Menu; + Data : in User_Access) is - function Set_Menu_Userptr (Men : Menu; - Data : User_Access) return C_Int; - pragma Import (C, Set_Menu_Userptr, "set_menu_userptr"); + function Set_Menu_Userptr (Men : Menu; + Data : User_Access) return C_Int; + pragma Import (C, Set_Menu_Userptr, "set_menu_userptr"); - Res : constant Eti_Error := Set_Menu_Userptr (Men, Data); + Res : constant Eti_Error := Set_Menu_Userptr (Men, Data); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_User_Data; + end Set_User_Data; - function Get_User_Data (Men : in Menu) return User_Access + function Get_User_Data (Men : in Menu) return User_Access is - function Menu_Userptr (Men : Menu) return User_Access; - pragma Import (C, Menu_Userptr, "menu_userptr"); + function Menu_Userptr (Men : Menu) return User_Access; + pragma Import (C, Menu_Userptr, "menu_userptr"); begin - return Menu_Userptr (Men); - end Get_User_Data; + return Menu_Userptr (Men); + end Get_User_Data; - procedure Get_User_Data (Men : in Menu; - Data : out User_Access) + procedure Get_User_Data (Men : in Menu; + Data : out User_Access) is begin - Data := Get_User_Data (Men); - end Get_User_Data; + Data := Get_User_Data (Men); + end Get_User_Data; -end Terminal_Interface.Curses.Menus.Menu_User_Data; - \ No newline at end of file +end Terminal_Interface.Curses.Menus.Menu_User_Data; + diff --git a/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm b/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm index 988b44e5..5a4bab9d 100644 --- a/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm +++ b/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm @@ -38,16 +38,15 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type User is limited private; - type User_Access is access User; + type User is limited private; + type User_Access is access User; package Terminal_Interface.Curses.Menus.Menu_User_Data is pragma Preelaborate (Terminal_Interface.Curses.Menus.Menu_User_Data); @@ -56,13 +55,13 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - procedure Set_User_Data (Men : in Menu; + procedure Set_User_Data (Men : in Menu; Data : in User_Access); -- AKA: set_menu_userptr pragma Inline (Set_User_Data); -- #1A NAME="AFU_2"#2| - procedure Get_User_Data (Men : in Menu; + procedure Get_User_Data (Men : in Menu; Data : out User_Access); -- AKA: menu_userptr @@ -73,4 +72,4 @@ pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Menus.Menu_User_Data; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-menus__adb.htm b/doc/html/ada/terminal_interface-curses-menus__adb.htm index f1338438..376052a4 100644 --- a/doc/html/ada/terminal_interface-curses-menus__adb.htm +++ b/doc/html/ada/terminal_interface-curses-menus__adb.htm @@ -37,14 +37,13 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.21 @ +-- @Revision: 1.22 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; @@ -52,976 +51,976 @@ with Ada.Unchecked_Conversion; -package body Terminal_Interface.Curses.Menus is +package body Terminal_Interface.Curses.Menus is - type C_Item_Array is array (Natural range <>) of aliased Item; - package I_Array is new - Interfaces.C.Pointers (Natural, Item, C_Item_Array, Null_Item); + type C_Item_Array is array (Natural range <>) of aliased Item; + package I_Array is new + Interfaces.C.Pointers (Natural, Item, C_Item_Array, Null_Item); use type System.Bit_Order; - subtype chars_ptr is Interfaces.C.Strings.chars_ptr; + subtype chars_ptr is Interfaces.C.Strings.chars_ptr; - function MOS_2_CInt is new - Ada.Unchecked_Conversion (Menu_Option_Set, - C_Int); + function MOS_2_CInt is new + Ada.Unchecked_Conversion (Menu_Option_Set, + C_Int); - function CInt_2_MOS is new - Ada.Unchecked_Conversion (C_Int, - Menu_Option_Set); + function CInt_2_MOS is new + Ada.Unchecked_Conversion (C_Int, + Menu_Option_Set); - function IOS_2_CInt is new - Ada.Unchecked_Conversion (Item_Option_Set, - C_Int); + function IOS_2_CInt is new + Ada.Unchecked_Conversion (Item_Option_Set, + C_Int); - function CInt_2_IOS is new - Ada.Unchecked_Conversion (C_Int, - Item_Option_Set); + function CInt_2_IOS is new + Ada.Unchecked_Conversion (C_Int, + Item_Option_Set); ------------------------------------------------------------------------------ - procedure Request_Name (Key : in Menu_Request_Code; - Name : out String) + procedure Request_Name (Key : in Menu_Request_Code; + Name : out String) is - function Request_Name (Key : C_Int) return chars_ptr; - pragma Import (C, Request_Name, "menu_request_name"); + function Request_Name (Key : C_Int) return chars_ptr; + pragma Import (C, Request_Name, "menu_request_name"); begin - Fill_String (Request_Name (C_Int (Key)), Name); - end Request_Name; + Fill_String (Request_Name (C_Int (Key)), Name); + end Request_Name; - function Request_Name (Key : Menu_Request_Code) return String + function Request_Name (Key : Menu_Request_Code) return String is - function Request_Name (Key : C_Int) return chars_ptr; - pragma Import (C, Request_Name, "menu_request_name"); + function Request_Name (Key : C_Int) return chars_ptr; + pragma Import (C, Request_Name, "menu_request_name"); begin - return Fill_String (Request_Name (C_Int (Key))); - end Request_Name; + return Fill_String (Request_Name (C_Int (Key))); + end Request_Name; - function Create (Name : String; - Description : String := "") return Item + function Create (Name : String; + Description : String := "") return Item is - type Char_Ptr is access all Interfaces.C.char; - function Newitem (Name, Desc : Char_Ptr) return Item; - pragma Import (C, Newitem, "new_item"); + type Char_Ptr is access all Interfaces.C.char; + function Newitem (Name, Desc : Char_Ptr) return Item; + pragma Import (C, Newitem, "new_item"); - type Name_String is new char_array (0 .. Name'Length); - type Name_String_Ptr is access Name_String; - pragma Controlled (Name_String_Ptr); + type Name_String is new char_array (0 .. Name'Length); + type Name_String_Ptr is access Name_String; + pragma Controlled (Name_String_Ptr); - type Desc_String is new char_array (0 .. Description'Length); - type Desc_String_Ptr is access Desc_String; - pragma Controlled (Desc_String_Ptr); + type Desc_String is new char_array (0 .. Description'Length); + type Desc_String_Ptr is access Desc_String; + pragma Controlled (Desc_String_Ptr); - Name_Str : Name_String_Ptr := new Name_String; - Desc_Str : Desc_String_Ptr := new Desc_String; - Name_Len, Desc_Len : size_t; - Result : Item; + Name_Str : Name_String_Ptr := new Name_String; + Desc_Str : Desc_String_Ptr := new Desc_String; + Name_Len, Desc_Len : size_t; + Result : Item; begin - To_C (Name, Name_Str.all, Name_Len); - To_C (Description, Desc_Str.all, Desc_Len); - Result := Newitem (Name_Str.all (Name_Str.all'First)'Access, - Desc_Str.all (Desc_Str.all'First)'Access); - if Result = Null_Item then - raise Eti_System_Error; + To_C (Name, Name_Str.all, Name_Len); + To_C (Description, Desc_Str.all, Desc_Len); + Result := Newitem (Name_Str.all (Name_Str.all'First)'Access, + Desc_Str.all (Desc_Str.all'First)'Access); + if Result = Null_Item then + raise Eti_System_Error; end if; - return Result; - end Create; + return Result; + end Create; - procedure Delete (Itm : in out Item) + procedure Delete (Itm : in out Item) is - function Descname (Itm : Item) return chars_ptr; - pragma Import (C, Descname, "item_description"); - function Itemname (Itm : Item) return chars_ptr; - pragma Import (C, Itemname, "item_name"); + function Descname (Itm : Item) return chars_ptr; + pragma Import (C, Descname, "item_description"); + function Itemname (Itm : Item) return chars_ptr; + pragma Import (C, Itemname, "item_name"); - function Freeitem (Itm : Item) return C_Int; - pragma Import (C, Freeitem, "free_item"); + function Freeitem (Itm : Item) return C_Int; + pragma Import (C, Freeitem, "free_item"); - Res : Eti_Error; - Ptr : chars_ptr; + Res : Eti_Error; + Ptr : chars_ptr; begin - Ptr := Descname (Itm); - if Ptr /= Null_Ptr then - Interfaces.C.Strings.Free (Ptr); + Ptr := Descname (Itm); + if Ptr /= Null_Ptr then + Interfaces.C.Strings.Free (Ptr); end if; - Ptr := Itemname (Itm); - if Ptr /= Null_Ptr then - Interfaces.C.Strings.Free (Ptr); + Ptr := Itemname (Itm); + if Ptr /= Null_Ptr then + Interfaces.C.Strings.Free (Ptr); end if; - Res := Freeitem (Itm); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Freeitem (Itm); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Itm := Null_Item; - end Delete; + Itm := Null_Item; + end Delete; ------------------------------------------------------------------------------- - procedure Set_Value (Itm : in Item; - Value : in Boolean := True) + procedure Set_Value (Itm : in Item; + Value : in Boolean := True) is - function Set_Item_Val (Itm : Item; - Val : C_Int) return C_Int; - pragma Import (C, Set_Item_Val, "set_item_value"); + function Set_Item_Val (Itm : Item; + Val : C_Int) return C_Int; + pragma Import (C, Set_Item_Val, "set_item_value"); - Res : constant Eti_Error := Set_Item_Val (Itm, Boolean'Pos (Value)); + Res : constant Eti_Error := Set_Item_Val (Itm, Boolean'Pos (Value)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Value; + end Set_Value; - function Value (Itm : Item) return Boolean + function Value (Itm : Item) return Boolean is - function Item_Val (Itm : Item) return C_Int; - pragma Import (C, Item_Val, "item_value"); + function Item_Val (Itm : Item) return C_Int; + pragma Import (C, Item_Val, "item_value"); begin - if Item_Val (Itm) = Curses_False then + if Item_Val (Itm) = Curses_False then return False; else return True; end if; - end Value; + end Value; ------------------------------------------------------------------------------- - function Visible (Itm : Item) return Boolean + function Visible (Itm : Item) return Boolean is - function Item_Vis (Itm : Item) return C_Int; - pragma Import (C, Item_Vis, "item_visible"); + function Item_Vis (Itm : Item) return C_Int; + pragma Import (C, Item_Vis, "item_visible"); begin - if Item_Vis (Itm) = Curses_False then + if Item_Vis (Itm) = Curses_False then return False; else return True; end if; - end Visible; + end Visible; ------------------------------------------------------------------------------- - procedure Set_Options (Itm : in Item; - Options : in Item_Option_Set) + procedure Set_Options (Itm : in Item; + Options : in Item_Option_Set) is - function Set_Item_Opts (Itm : Item; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Item_Opts, "set_item_opts"); + function Set_Item_Opts (Itm : Item; + Opt : C_Int) return C_Int; + pragma Import (C, Set_Item_Opts, "set_item_opts"); - Opt : C_Int := IOS_2_CInt (Options); - Res : Eti_Error; + Opt : C_Int := IOS_2_CInt (Options); + Res : Eti_Error; begin - Res := Set_Item_Opts (Itm, Opt); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Item_Opts (Itm, Opt); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Options; + end Set_Options; - procedure Switch_Options (Itm : in Item; - Options : in Item_Option_Set; - On : Boolean := True) + procedure Switch_Options (Itm : in Item; + Options : in Item_Option_Set; + On : Boolean := True) is - function Item_Opts_On (Itm : Item; - Opt : C_Int) return C_Int; - pragma Import (C, Item_Opts_On, "item_opts_on"); - function Item_Opts_Off (Itm : Item; - Opt : C_Int) return C_Int; - pragma Import (C, Item_Opts_Off, "item_opts_off"); + function Item_Opts_On (Itm : Item; + Opt : C_Int) return C_Int; + pragma Import (C, Item_Opts_On, "item_opts_on"); + function Item_Opts_Off (Itm : Item; + Opt : C_Int) return C_Int; + pragma Import (C, Item_Opts_Off, "item_opts_off"); - Opt : C_Int := IOS_2_CInt (Options); - Err : Eti_Error; + Opt : C_Int := IOS_2_CInt (Options); + Err : Eti_Error; begin - if On then - Err := Item_Opts_On (Itm, Opt); + if On then + Err := Item_Opts_On (Itm, Opt); else - Err := Item_Opts_Off (Itm, Opt); + Err := Item_Opts_Off (Itm, Opt); end if; - if Err /= E_Ok then - Eti_Exception (Err); + if Err /= E_Ok then + Eti_Exception (Err); end if; - end Switch_Options; + end Switch_Options; - procedure Get_Options (Itm : in Item; - Options : out Item_Option_Set) + procedure Get_Options (Itm : in Item; + Options : out Item_Option_Set) is - function Item_Opts (Itm : Item) return C_Int; - pragma Import (C, Item_Opts, "item_opts"); + function Item_Opts (Itm : Item) return C_Int; + pragma Import (C, Item_Opts, "item_opts"); - Res : C_Int := Item_Opts (Itm); + Res : C_Int := Item_Opts (Itm); begin - Options := CInt_2_IOS (Res); - end Get_Options; + Options := CInt_2_IOS (Res); + end Get_Options; - function Get_Options (Itm : Item := Null_Item) return Item_Option_Set + function Get_Options (Itm : Item := Null_Item) return Item_Option_Set is - Ios : Item_Option_Set; + Ios : Item_Option_Set; begin - Get_Options (Itm, Ios); - return Ios; - end Get_Options; + Get_Options (Itm, Ios); + return Ios; + end Get_Options; ------------------------------------------------------------------------------- - procedure Name (Itm : in Item; - Name : out String) + procedure Name (Itm : in Item; + Name : out String) is - function Itemname (Itm : Item) return chars_ptr; - pragma Import (C, Itemname, "item_name"); + function Itemname (Itm : Item) return chars_ptr; + pragma Import (C, Itemname, "item_name"); begin - Fill_String (Itemname (Itm), Name); - end Name; + Fill_String (Itemname (Itm), Name); + end Name; - function Name (Itm : in Item) return String + function Name (Itm : in Item) return String is - function Itemname (Itm : Item) return chars_ptr; - pragma Import (C, Itemname, "item_name"); + function Itemname (Itm : Item) return chars_ptr; + pragma Import (C, Itemname, "item_name"); begin - return Fill_String (Itemname (Itm)); - end Name; + return Fill_String (Itemname (Itm)); + end Name; - procedure Description (Itm : in Item; - Description : out String) + procedure Description (Itm : in Item; + Description : out String) is - function Descname (Itm : Item) return chars_ptr; - pragma Import (C, Descname, "item_description"); + function Descname (Itm : Item) return chars_ptr; + pragma Import (C, Descname, "item_description"); begin - Fill_String (Descname (Itm), Description); - end Description; + Fill_String (Descname (Itm), Description); + end Description; - function Description (Itm : in Item) return String + function Description (Itm : in Item) return String is - function Descname (Itm : Item) return chars_ptr; - pragma Import (C, Descname, "item_description"); + function Descname (Itm : Item) return chars_ptr; + pragma Import (C, Descname, "item_description"); begin - return Fill_String (Descname (Itm)); - end Description; + return Fill_String (Descname (Itm)); + end Description; ------------------------------------------------------------------------------- - procedure Set_Current (Men : in Menu; - Itm : in Item) + procedure Set_Current (Men : in Menu; + Itm : in Item) is - function Set_Curr_Item (Men : Menu; - Itm : Item) return C_Int; - pragma Import (C, Set_Curr_Item, "set_current_item"); + function Set_Curr_Item (Men : Menu; + Itm : Item) return C_Int; + pragma Import (C, Set_Curr_Item, "set_current_item"); - Res : constant Eti_Error := Set_Curr_Item (Men, Itm); + Res : constant Eti_Error := Set_Curr_Item (Men, Itm); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Current; + end Set_Current; - function Current (Men : Menu) return Item + function Current (Men : Menu) return Item is - function Curr_Item (Men : Menu) return Item; - pragma Import (C, Curr_Item, "current_item"); + function Curr_Item (Men : Menu) return Item; + pragma Import (C, Curr_Item, "current_item"); - Res : constant Item := Curr_Item (Men); + Res : constant Item := Curr_Item (Men); begin - if Res = Null_Item then - raise Menu_Exception; + if Res = Null_Item then + raise Menu_Exception; end if; - return Res; - end Current; + return Res; + end Current; - procedure Set_Top_Row (Men : in Menu; - Line : in Line_Position) + procedure Set_Top_Row (Men : in Menu; + Line : in Line_Position) is - function Set_Toprow (Men : Menu; - Line : C_Int) return C_Int; - pragma Import (C, Set_Toprow, "set_top_row"); + function Set_Toprow (Men : Menu; + Line : C_Int) return C_Int; + pragma Import (C, Set_Toprow, "set_top_row"); - Res : constant Eti_Error := Set_Toprow (Men, C_Int (Line)); + Res : constant Eti_Error := Set_Toprow (Men, C_Int (Line)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Top_Row; + end Set_Top_Row; - function Top_Row (Men : Menu) return Line_Position + function Top_Row (Men : Menu) return Line_Position is - function Toprow (Men : Menu) return C_Int; - pragma Import (C, Toprow, "top_row"); + function Toprow (Men : Menu) return C_Int; + pragma Import (C, Toprow, "top_row"); - Res : constant C_Int := Toprow (Men); + Res : constant C_Int := Toprow (Men); begin - if Res = Curses_Err then - raise Menu_Exception; + if Res = Curses_Err then + raise Menu_Exception; end if; - return Line_Position (Res); - end Top_Row; + return Line_Position (Res); + end Top_Row; - function Get_Index (Itm : Item) return Positive + function Get_Index (Itm : Item) return Positive is - function Get_Itemindex (Itm : Item) return C_Int; - pragma Import (C, Get_Itemindex, "item_index"); + function Get_Itemindex (Itm : Item) return C_Int; + pragma Import (C, Get_Itemindex, "item_index"); - Res : constant C_Int := Get_Itemindex (Itm); + Res : constant C_Int := Get_Itemindex (Itm); begin - if Res = Curses_Err then - raise Menu_Exception; + if Res = Curses_Err then + raise Menu_Exception; end if; - return Positive (Natural (Res) + Positive'First); - end Get_Index; + return Positive (Natural (Res) + Positive'First); + end Get_Index; ------------------------------------------------------------------------------- - procedure Post (Men : in Menu; - Post : in Boolean := True) + procedure Post (Men : in Menu; + Post : in Boolean := True) is - function M_Post (Men : Menu) return C_Int; - pragma Import (C, M_Post, "post_menu"); - function M_Unpost (Men : Menu) return C_Int; - pragma Import (C, M_Unpost, "unpost_menu"); + function M_Post (Men : Menu) return C_Int; + pragma Import (C, M_Post, "post_menu"); + function M_Unpost (Men : Menu) return C_Int; + pragma Import (C, M_Unpost, "unpost_menu"); - Res : Eti_Error; + Res : Eti_Error; begin - if Post then - Res := M_Post (Men); + if Post then + Res := M_Post (Men); else - Res := M_Unpost (Men); + Res := M_Unpost (Men); end if; - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Post; + end Post; ------------------------------------------------------------------------------- - procedure Set_Options (Men : in Menu; - Options : in Menu_Option_Set) + procedure Set_Options (Men : in Menu; + Options : in Menu_Option_Set) is - function Set_Menu_Opts (Men : Menu; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Menu_Opts, "set_menu_opts"); + function Set_Menu_Opts (Men : Menu; + Opt : C_Int) return C_Int; + pragma Import (C, Set_Menu_Opts, "set_menu_opts"); - Opt : C_Int := MOS_2_CInt (Options); - Res : Eti_Error; + Opt : C_Int := MOS_2_CInt (Options); + Res : Eti_Error; begin - Res := Set_Menu_Opts (Men, Opt); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Menu_Opts (Men, Opt); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Options; + end Set_Options; - procedure Switch_Options (Men : in Menu; - Options : in Menu_Option_Set; - On : in Boolean := True) + procedure Switch_Options (Men : in Menu; + Options : in Menu_Option_Set; + On : in Boolean := True) is - function Menu_Opts_On (Men : Menu; - Opt : C_Int) return C_Int; - pragma Import (C, Menu_Opts_On, "menu_opts_on"); - function Menu_Opts_Off (Men : Menu; - Opt : C_Int) return C_Int; - pragma Import (C, Menu_Opts_Off, "menu_opts_off"); + function Menu_Opts_On (Men : Menu; + Opt : C_Int) return C_Int; + pragma Import (C, Menu_Opts_On, "menu_opts_on"); + function Menu_Opts_Off (Men : Menu; + Opt : C_Int) return C_Int; + pragma Import (C, Menu_Opts_Off, "menu_opts_off"); - Opt : C_Int := MOS_2_CInt (Options); - Err : Eti_Error; + Opt : C_Int := MOS_2_CInt (Options); + Err : Eti_Error; begin - if On then - Err := Menu_Opts_On (Men, Opt); + if On then + Err := Menu_Opts_On (Men, Opt); else - Err := Menu_Opts_Off (Men, Opt); + Err := Menu_Opts_Off (Men, Opt); end if; - if Err /= E_Ok then - Eti_Exception (Err); + if Err /= E_Ok then + Eti_Exception (Err); end if; - end Switch_Options; + end Switch_Options; - procedure Get_Options (Men : in Menu; - Options : out Menu_Option_Set) + procedure Get_Options (Men : in Menu; + Options : out Menu_Option_Set) is - function Menu_Opts (Men : Menu) return C_Int; - pragma Import (C, Menu_Opts, "menu_opts"); + function Menu_Opts (Men : Menu) return C_Int; + pragma Import (C, Menu_Opts, "menu_opts"); - Res : C_Int := Menu_Opts (Men); + Res : C_Int := Menu_Opts (Men); begin - Options := CInt_2_MOS (Res); - end Get_Options; + Options := CInt_2_MOS (Res); + end Get_Options; - function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set + function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set is - Mos : Menu_Option_Set; + Mos : Menu_Option_Set; begin - Get_Options (Men, Mos); - return Mos; - end Get_Options; + Get_Options (Men, Mos); + return Mos; + end Get_Options; ------------------------------------------------------------------------------- - procedure Set_Window (Men : in Menu; - Win : in Window) + procedure Set_Window (Men : in Menu; + Win : in Window) is - function Set_Menu_Win (Men : Menu; - Win : Window) return C_Int; - pragma Import (C, Set_Menu_Win, "set_menu_win"); + function Set_Menu_Win (Men : Menu; + Win : Window) return C_Int; + pragma Import (C, Set_Menu_Win, "set_menu_win"); - Res : constant Eti_Error := Set_Menu_Win (Men, Win); + Res : constant Eti_Error := Set_Menu_Win (Men, Win); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Window; + end Set_Window; - function Get_Window (Men : Menu) return Window + function Get_Window (Men : Menu) return Window is - function Menu_Win (Men : Menu) return Window; - pragma Import (C, Menu_Win, "menu_win"); + function Menu_Win (Men : Menu) return Window; + pragma Import (C, Menu_Win, "menu_win"); - W : constant Window := Menu_Win (Men); + W : constant Window := Menu_Win (Men); begin - return W; - end Get_Window; + return W; + end Get_Window; - procedure Set_Sub_Window (Men : in Menu; - Win : in Window) + procedure Set_Sub_Window (Men : in Menu; + Win : in Window) is - function Set_Menu_Sub (Men : Menu; - Win : Window) return C_Int; - pragma Import (C, Set_Menu_Sub, "set_menu_sub"); + function Set_Menu_Sub (Men : Menu; + Win : Window) return C_Int; + pragma Import (C, Set_Menu_Sub, "set_menu_sub"); - Res : constant Eti_Error := Set_Menu_Sub (Men, Win); + Res : constant Eti_Error := Set_Menu_Sub (Men, Win); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Sub_Window; + end Set_Sub_Window; - function Get_Sub_Window (Men : Menu) return Window + function Get_Sub_Window (Men : Menu) return Window is - function Menu_Sub (Men : Menu) return Window; - pragma Import (C, Menu_Sub, "menu_sub"); + function Menu_Sub (Men : Menu) return Window; + pragma Import (C, Menu_Sub, "menu_sub"); - W : constant Window := Menu_Sub (Men); + W : constant Window := Menu_Sub (Men); begin - return W; - end Get_Sub_Window; + return W; + end Get_Sub_Window; - procedure Scale (Men : in Menu; - Lines : out Line_Count; - Columns : out Column_Count) + procedure Scale (Men : in Menu; + Lines : out Line_Count; + Columns : out Column_Count) is - type C_Int_Access is access all C_Int; - function M_Scale (Men : Menu; - Yp, Xp : C_Int_Access) return C_Int; - pragma Import (C, M_Scale, "scale_menu"); + type C_Int_Access is access all C_Int; + function M_Scale (Men : Menu; + Yp, Xp : C_Int_Access) return C_Int; + pragma Import (C, M_Scale, "scale_menu"); - X, Y : aliased C_Int; - Res : constant Eti_Error := M_Scale (Men, Y'Access, X'Access); + X, Y : aliased C_Int; + Res : constant Eti_Error := M_Scale (Men, Y'Access, X'Access); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Lines := Line_Count (Y); - Columns := Column_Count (X); - end Scale; + Lines := Line_Count (Y); + Columns := Column_Count (X); + end Scale; ------------------------------------------------------------------------------- - procedure Position_Cursor (Men : Menu) + procedure Position_Cursor (Men : Menu) is - function Pos_Menu_Cursor (Men : Menu) return C_Int; - pragma Import (C, Pos_Menu_Cursor, "pos_menu_cursor"); + function Pos_Menu_Cursor (Men : Menu) return C_Int; + pragma Import (C, Pos_Menu_Cursor, "pos_menu_cursor"); - Res : constant Eti_Error := Pos_Menu_Cursor (Men); + Res : constant Eti_Error := Pos_Menu_Cursor (Men); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Position_Cursor; + end Position_Cursor; ------------------------------------------------------------------------------- - procedure Set_Mark (Men : in Menu; - Mark : in String) - is - type Char_Ptr is access all Interfaces.C.char; - function Set_Mark (Men : Menu; - Mark : Char_Ptr) return C_Int; - pragma Import (C, Set_Mark, "set_menu_mark"); - - Txt : char_array (0 .. Mark'Length); - Len : size_t; - Res : Eti_Error; - begin - To_C (Mark, Txt, Len); - Res := Set_Mark (Men, Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); + procedure Set_Mark (Men : in Menu; + Mark : in String) + is + type Char_Ptr is access all Interfaces.C.char; + function Set_Mark (Men : Menu; + Mark : Char_Ptr) return C_Int; + pragma Import (C, Set_Mark, "set_menu_mark"); + + Txt : char_array (0 .. Mark'Length); + Len : size_t; + Res : Eti_Error; + begin + To_C (Mark, Txt, Len); + Res := Set_Mark (Men, Txt (Txt'First)'Access); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Mark; + end Set_Mark; - procedure Mark (Men : in Menu; - Mark : out String) + procedure Mark (Men : in Menu; + Mark : out String) is - function Get_Menu_Mark (Men : Menu) return chars_ptr; - pragma Import (C, Get_Menu_Mark, "menu_mark"); + function Get_Menu_Mark (Men : Menu) return chars_ptr; + pragma Import (C, Get_Menu_Mark, "menu_mark"); begin - Fill_String (Get_Menu_Mark (Men), Mark); - end Mark; + Fill_String (Get_Menu_Mark (Men), Mark); + end Mark; - function Mark (Men : Menu) return String + function Mark (Men : Menu) return String is - function Get_Menu_Mark (Men : Menu) return chars_ptr; - pragma Import (C, Get_Menu_Mark, "menu_mark"); + function Get_Menu_Mark (Men : Menu) return chars_ptr; + pragma Import (C, Get_Menu_Mark, "menu_mark"); begin - return Fill_String (Get_Menu_Mark (Men)); - end Mark; + return Fill_String (Get_Menu_Mark (Men)); + end Mark; ------------------------------------------------------------------------------- - procedure Set_Foreground - (Men : in Menu; - Fore : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) - is - function Set_Menu_Fore (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Fore, "set_menu_fore"); - - Ch : constant Attributed_Character := (Ch => Character'First, - Color => Color, - Attr => Fore); - Res : constant Eti_Error := Set_Menu_Fore (Men, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); + procedure Set_Foreground + (Men : in Menu; + Fore : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) + is + function Set_Menu_Fore (Men : Menu; + Attr : C_Chtype) return C_Int; + pragma Import (C, Set_Menu_Fore, "set_menu_fore"); + + Ch : constant Attributed_Character := (Ch => Character'First, + Color => Color, + Attr => Fore); + Res : constant Eti_Error := Set_Menu_Fore (Men, AttrChar_To_Chtype (Ch)); + begin + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Foreground; + end Set_Foreground; - procedure Foreground (Men : in Menu; - Fore : out Character_Attribute_Set) + procedure Foreground (Men : in Menu; + Fore : out Character_Attribute_Set) is - function Menu_Fore (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Fore, "menu_fore"); + function Menu_Fore (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Fore, "menu_fore"); begin - Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; - end Foreground; + Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; + end Foreground; - procedure Foreground (Men : in Menu; - Fore : out Character_Attribute_Set; - Color : out Color_Pair) + procedure Foreground (Men : in Menu; + Fore : out Character_Attribute_Set; + Color : out Color_Pair) is - function Menu_Fore (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Fore, "menu_fore"); + function Menu_Fore (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Fore, "menu_fore"); begin - Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; - Color := Chtype_To_AttrChar (Menu_Fore (Men)).Color; - end Foreground; + Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; + Color := Chtype_To_AttrChar (Menu_Fore (Men)).Color; + end Foreground; - procedure Set_Background - (Men : in Menu; - Back : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Background + (Men : in Menu; + Back : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Set_Menu_Back (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Back, "set_menu_back"); + function Set_Menu_Back (Men : Menu; + Attr : C_Chtype) return C_Int; + pragma Import (C, Set_Menu_Back, "set_menu_back"); - Ch : constant Attributed_Character := (Ch => Character'First, - Color => Color, - Attr => Back); - Res : constant Eti_Error := Set_Menu_Back (Men, AttrChar_To_Chtype (Ch)); + Ch : constant Attributed_Character := (Ch => Character'First, + Color => Color, + Attr => Back); + Res : constant Eti_Error := Set_Menu_Back (Men, AttrChar_To_Chtype (Ch)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Background; + end Set_Background; - procedure Background (Men : in Menu; - Back : out Character_Attribute_Set) + procedure Background (Men : in Menu; + Back : out Character_Attribute_Set) is - function Menu_Back (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Back, "menu_back"); + function Menu_Back (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Back, "menu_back"); begin - Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; - end Background; + Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; + end Background; - procedure Background (Men : in Menu; - Back : out Character_Attribute_Set; - Color : out Color_Pair) + procedure Background (Men : in Menu; + Back : out Character_Attribute_Set; + Color : out Color_Pair) is - function Menu_Back (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Back, "menu_back"); + function Menu_Back (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Back, "menu_back"); begin - Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; - Color := Chtype_To_AttrChar (Menu_Back (Men)).Color; - end Background; + Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; + Color := Chtype_To_AttrChar (Menu_Back (Men)).Color; + end Background; - procedure Set_Grey (Men : in Menu; - Grey : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Grey (Men : in Menu; + Grey : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Set_Menu_Grey (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Grey, "set_menu_grey"); + function Set_Menu_Grey (Men : Menu; + Attr : C_Chtype) return C_Int; + pragma Import (C, Set_Menu_Grey, "set_menu_grey"); - Ch : constant Attributed_Character := (Ch => Character'First, - Color => Color, - Attr => Grey); + Ch : constant Attributed_Character := (Ch => Character'First, + Color => Color, + Attr => Grey); - Res : constant Eti_Error := Set_Menu_Grey (Men, AttrChar_To_Chtype (Ch)); + Res : constant Eti_Error := Set_Menu_Grey (Men, AttrChar_To_Chtype (Ch)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Grey; + end Set_Grey; - procedure Grey (Men : in Menu; - Grey : out Character_Attribute_Set) + procedure Grey (Men : in Menu; + Grey : out Character_Attribute_Set) is - function Menu_Grey (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Grey, "menu_grey"); + function Menu_Grey (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Grey, "menu_grey"); begin - Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; - end Grey; + Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; + end Grey; - procedure Grey (Men : in Menu; - Grey : out Character_Attribute_Set; - Color : out Color_Pair) + procedure Grey (Men : in Menu; + Grey : out Character_Attribute_Set; + Color : out Color_Pair) is - function Menu_Grey (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Grey, "menu_grey"); + function Menu_Grey (Men : Menu) return C_Chtype; + pragma Import (C, Menu_Grey, "menu_grey"); begin - Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; - Color := Chtype_To_AttrChar (Menu_Grey (Men)).Color; - end Grey; + Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; + Color := Chtype_To_AttrChar (Menu_Grey (Men)).Color; + end Grey; - procedure Set_Pad_Character (Men : in Menu; - Pad : in Character := Space) + procedure Set_Pad_Character (Men : in Menu; + Pad : in Character := Space) is - function Set_Menu_Pad (Men : Menu; - Ch : C_Int) return C_Int; - pragma Import (C, Set_Menu_Pad, "set_menu_pad"); + function Set_Menu_Pad (Men : Menu; + Ch : C_Int) return C_Int; + pragma Import (C, Set_Menu_Pad, "set_menu_pad"); - Res : constant Eti_Error := Set_Menu_Pad (Men, - C_Int (Character'Pos (Pad))); + Res : constant Eti_Error := Set_Menu_Pad (Men, + C_Int (Character'Pos (Pad))); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Pad_Character; + end Set_Pad_Character; - procedure Pad_Character (Men : in Menu; - Pad : out Character) + procedure Pad_Character (Men : in Menu; + Pad : out Character) is - function Menu_Pad (Men : Menu) return C_Int; - pragma Import (C, Menu_Pad, "menu_pad"); + function Menu_Pad (Men : Menu) return C_Int; + pragma Import (C, Menu_Pad, "menu_pad"); begin - Pad := Character'Val (Menu_Pad (Men)); - end Pad_Character; + Pad := Character'Val (Menu_Pad (Men)); + end Pad_Character; ------------------------------------------------------------------------------- - procedure Set_Spacing (Men : in Menu; - Descr : in Column_Position := 0; - Row : in Line_Position := 0; - Col : in Column_Position := 0) - is - function Set_Spacing (Men : Menu; - D, R, C : C_Int) return C_Int; - pragma Import (C, Set_Spacing, "set_menu_spacing"); - - Res : constant Eti_Error := Set_Spacing (Men, - C_Int (Descr), - C_Int (Row), - C_Int (Col)); - begin - if Res /= E_Ok then - Eti_Exception (Res); + procedure Set_Spacing (Men : in Menu; + Descr : in Column_Position := 0; + Row : in Line_Position := 0; + Col : in Column_Position := 0) + is + function Set_Spacing (Men : Menu; + D, R, C : C_Int) return C_Int; + pragma Import (C, Set_Spacing, "set_menu_spacing"); + + Res : constant Eti_Error := Set_Spacing (Men, + C_Int (Descr), + C_Int (Row), + C_Int (Col)); + begin + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Spacing; - - procedure Spacing (Men : in Menu; - Descr : out Column_Position; - Row : out Line_Position; - Col : out Column_Position) - is - type C_Int_Access is access all C_Int; - function Get_Spacing (Men : Menu; - D, R, C : C_Int_Access) return C_Int; - pragma Import (C, Get_Spacing, "menu_spacing"); - - D, R, C : aliased C_Int; - Res : constant Eti_Error := Get_Spacing (Men, - D'Access, - R'Access, - C'Access); - begin - if Res /= E_Ok then - Eti_Exception (Res); + end Set_Spacing; + + procedure Spacing (Men : in Menu; + Descr : out Column_Position; + Row : out Line_Position; + Col : out Column_Position) + is + type C_Int_Access is access all C_Int; + function Get_Spacing (Men : Menu; + D, R, C : C_Int_Access) return C_Int; + pragma Import (C, Get_Spacing, "menu_spacing"); + + D, R, C : aliased C_Int; + Res : constant Eti_Error := Get_Spacing (Men, + D'Access, + R'Access, + C'Access); + begin + if Res /= E_Ok then + Eti_Exception (Res); else - Descr := Column_Position (D); - Row := Line_Position (R); - Col := Column_Position (C); + Descr := Column_Position (D); + Row := Line_Position (R); + Col := Column_Position (C); end if; - end Spacing; + end Spacing; ------------------------------------------------------------------------------- - function Set_Pattern (Men : Menu; - Text : String) return Boolean - is - type Char_Ptr is access all Interfaces.C.char; - function Set_Pattern (Men : Menu; - Pattern : Char_Ptr) return C_Int; - pragma Import (C, Set_Pattern, "set_menu_pattern"); - - S : char_array (0 .. Text'Length); - L : size_t; - Res : Eti_Error; - begin - To_C (Text, S, L); - Res := Set_Pattern (Men, S (S'First)'Access); - case Res is - when E_No_Match => return False; - when E_Ok => return True; + function Set_Pattern (Men : Menu; + Text : String) return Boolean + is + type Char_Ptr is access all Interfaces.C.char; + function Set_Pattern (Men : Menu; + Pattern : Char_Ptr) return C_Int; + pragma Import (C, Set_Pattern, "set_menu_pattern"); + + S : char_array (0 .. Text'Length); + L : size_t; + Res : Eti_Error; + begin + To_C (Text, S, L); + Res := Set_Pattern (Men, S (S'First)'Access); + case Res is + when E_No_Match => return False; + when E_Ok => return True; when others => - Eti_Exception (Res); + Eti_Exception (Res); return False; end case; - end Set_Pattern; + end Set_Pattern; - procedure Pattern (Men : in Menu; - Text : out String) + procedure Pattern (Men : in Menu; + Text : out String) is - function Get_Pattern (Men : Menu) return chars_ptr; - pragma Import (C, Get_Pattern, "menu_pattern"); + function Get_Pattern (Men : Menu) return chars_ptr; + pragma Import (C, Get_Pattern, "menu_pattern"); begin - Fill_String (Get_Pattern (Men), Text); - end Pattern; + Fill_String (Get_Pattern (Men), Text); + end Pattern; ------------------------------------------------------------------------------- - procedure Set_Format (Men : in Menu; - Lines : in Line_Count; - Columns : in Column_Count) + procedure Set_Format (Men : in Menu; + Lines : in Line_Count; + Columns : in Column_Count) is - function Set_Menu_Fmt (Men : Menu; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Set_Menu_Fmt, "set_menu_format"); + function Set_Menu_Fmt (Men : Menu; + Lin : C_Int; + Col : C_Int) return C_Int; + pragma Import (C, Set_Menu_Fmt, "set_menu_format"); - Res : constant Eti_Error := Set_Menu_Fmt (Men, - C_Int (Lines), - C_Int (Columns)); + Res : constant Eti_Error := Set_Menu_Fmt (Men, + C_Int (Lines), + C_Int (Columns)); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Format; + end Set_Format; - procedure Format (Men : in Menu; - Lines : out Line_Count; - Columns : out Column_Count) + procedure Format (Men : in Menu; + Lines : out Line_Count; + Columns : out Column_Count) is - type C_Int_Access is access all C_Int; - function Menu_Fmt (Men : Menu; - Y, X : C_Int_Access) return C_Int; - pragma Import (C, Menu_Fmt, "menu_format"); + type C_Int_Access is access all C_Int; + function Menu_Fmt (Men : Menu; + Y, X : C_Int_Access) return C_Int; + pragma Import (C, Menu_Fmt, "menu_format"); - L, C : aliased C_Int; - Res : constant Eti_Error := Menu_Fmt (Men, L'Access, C'Access); + L, C : aliased C_Int; + Res : constant Eti_Error := Menu_Fmt (Men, L'Access, C'Access); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); else - Lines := Line_Count (L); - Columns := Column_Count (C); + Lines := Line_Count (L); + Columns := Column_Count (C); end if; - end Format; + end Format; ------------------------------------------------------------------------------- - procedure Set_Item_Init_Hook (Men : in Menu; - Proc : in Menu_Hook_Function) + procedure Set_Item_Init_Hook (Men : in Menu; + Proc : in Menu_Hook_Function) is - function Set_Item_Init (Men : Menu; - Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Item_Init, "set_item_init"); + function Set_Item_Init (Men : Menu; + Proc : Menu_Hook_Function) return C_Int; + pragma Import (C, Set_Item_Init, "set_item_init"); - Res : constant Eti_Error := Set_Item_Init (Men, Proc); + Res : constant Eti_Error := Set_Item_Init (Men, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Item_Init_Hook; + end Set_Item_Init_Hook; - procedure Set_Item_Term_Hook (Men : in Menu; - Proc : in Menu_Hook_Function) + procedure Set_Item_Term_Hook (Men : in Menu; + Proc : in Menu_Hook_Function) is - function Set_Item_Term (Men : Menu; - Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Item_Term, "set_item_term"); + function Set_Item_Term (Men : Menu; + Proc : Menu_Hook_Function) return C_Int; + pragma Import (C, Set_Item_Term, "set_item_term"); - Res : constant Eti_Error := Set_Item_Term (Men, Proc); + Res : constant Eti_Error := Set_Item_Term (Men, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Item_Term_Hook; + end Set_Item_Term_Hook; - procedure Set_Menu_Init_Hook (Men : in Menu; - Proc : in Menu_Hook_Function) + procedure Set_Menu_Init_Hook (Men : in Menu; + Proc : in Menu_Hook_Function) is - function Set_Menu_Init (Men : Menu; - Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Menu_Init, "set_menu_init"); + function Set_Menu_Init (Men : Menu; + Proc : Menu_Hook_Function) return C_Int; + pragma Import (C, Set_Menu_Init, "set_menu_init"); - Res : constant Eti_Error := Set_Menu_Init (Men, Proc); + Res : constant Eti_Error := Set_Menu_Init (Men, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Menu_Init_Hook; + end Set_Menu_Init_Hook; - procedure Set_Menu_Term_Hook (Men : in Menu; - Proc : in Menu_Hook_Function) + procedure Set_Menu_Term_Hook (Men : in Menu; + Proc : in Menu_Hook_Function) is - function Set_Menu_Term (Men : Menu; - Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Menu_Term, "set_menu_term"); + function Set_Menu_Term (Men : Menu; + Proc : Menu_Hook_Function) return C_Int; + pragma Import (C, Set_Menu_Term, "set_menu_term"); - Res : constant Eti_Error := Set_Menu_Term (Men, Proc); + Res : constant Eti_Error := Set_Menu_Term (Men, Proc); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - end Set_Menu_Term_Hook; + end Set_Menu_Term_Hook; - function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function + function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function is - function Item_Init (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Item_Init, "item_init"); + function Item_Init (Men : Menu) return Menu_Hook_Function; + pragma Import (C, Item_Init, "item_init"); begin - return Item_Init (Men); - end Get_Item_Init_Hook; + return Item_Init (Men); + end Get_Item_Init_Hook; - function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function + function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function is - function Item_Term (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Item_Term, "item_term"); + function Item_Term (Men : Menu) return Menu_Hook_Function; + pragma Import (C, Item_Term, "item_term"); begin - return Item_Term (Men); - end Get_Item_Term_Hook; + return Item_Term (Men); + end Get_Item_Term_Hook; - function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function + function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function is - function Menu_Init (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Menu_Init, "menu_init"); + function Menu_Init (Men : Menu) return Menu_Hook_Function; + pragma Import (C, Menu_Init, "menu_init"); begin - return Menu_Init (Men); - end Get_Menu_Init_Hook; + return Menu_Init (Men); + end Get_Menu_Init_Hook; - function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function + function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function is - function Menu_Term (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Menu_Term, "menu_term"); + function Menu_Term (Men : Menu) return Menu_Hook_Function; + pragma Import (C, Menu_Term, "menu_term"); begin - return Menu_Term (Men); - end Get_Menu_Term_Hook; + return Menu_Term (Men); + end Get_Menu_Term_Hook; ------------------------------------------------------------------------------- - procedure Redefine (Men : in Menu; - Items : in Item_Array_Access) + procedure Redefine (Men : in Menu; + Items : in Item_Array_Access) is - function Set_Items (Men : Menu; - Items : System.Address) return C_Int; - pragma Import (C, Set_Items, "set_menu_items"); + function Set_Items (Men : Menu; + Items : System.Address) return C_Int; + pragma Import (C, Set_Items, "set_menu_items"); - Res : Eti_Error; + Res : Eti_Error; begin - pragma Assert (Items (Items'Last) = Null_Item); - if Items (Items'Last) /= Null_Item then - raise Menu_Exception; + pragma Assert (Items (Items'Last) = Null_Item); + if Items (Items'Last) /= Null_Item then + raise Menu_Exception; else - Res := Set_Items (Men, Items.all'Address); - if Res /= E_Ok then - Eti_Exception (Res); + Res := Set_Items (Men, Items.all'Address); + if Res /= E_Ok then + Eti_Exception (Res); end if; end if; - end Redefine; + end Redefine; - function Item_Count (Men : Menu) return Natural + function Item_Count (Men : Menu) return Natural is - function Count (Men : Menu) return C_Int; - pragma Import (C, Count, "item_count"); + function Count (Men : Menu) return C_Int; + pragma Import (C, Count, "item_count"); begin - return Natural (Count (Men)); - end Item_Count; + return Natural (Count (Men)); + end Item_Count; - function Items (Men : Menu; - Index : Positive) return Item + function Items (Men : Menu; + Index : Positive) return Item is - use I_Array; + use I_Array; - function C_Mitems (Men : Menu) return Pointer; - pragma Import (C, C_Mitems, "menu_items"); + function C_Mitems (Men : Menu) return Pointer; + pragma Import (C, C_Mitems, "menu_items"); - P : Pointer := C_Mitems (Men); + P : Pointer := C_Mitems (Men); begin - if P = null or else Index not in 1 .. Item_Count (Men) then - raise Menu_Exception; + if P = null or else Index not in 1 .. Item_Count (Men) then + raise Menu_Exception; else - P := P + ptrdiff_t (C_Int (Index) - 1); - return P.all; + P := P + ptrdiff_t (C_Int (Index) - 1); + return P.all; end if; - end Items; + end Items; ------------------------------------------------------------------------------- - function Create (Items : Item_Array_Access) return Menu + function Create (Items : Item_Array_Access) return Menu is - function Newmenu (Items : System.Address) return Menu; - pragma Import (C, Newmenu, "new_menu"); + function Newmenu (Items : System.Address) return Menu; + pragma Import (C, Newmenu, "new_menu"); - M : Menu; + M : Menu; begin - pragma Assert (Items (Items'Last) = Null_Item); - if Items (Items'Last) /= Null_Item then - raise Menu_Exception; + pragma Assert (Items (Items'Last) = Null_Item); + if Items (Items'Last) /= Null_Item then + raise Menu_Exception; else - M := Newmenu (Items.all'Address); - if M = Null_Menu then - raise Menu_Exception; + M := Newmenu (Items.all'Address); + if M = Null_Menu then + raise Menu_Exception; end if; - return M; + return M; end if; - end Create; + end Create; - procedure Delete (Men : in out Menu) + procedure Delete (Men : in out Menu) is - function Free (Men : Menu) return C_Int; - pragma Import (C, Free, "free_menu"); + function Free (Men : Menu) return C_Int; + pragma Import (C, Free, "free_menu"); - Res : constant Eti_Error := Free (Men); + Res : constant Eti_Error := Free (Men); begin - if Res /= E_Ok then - Eti_Exception (Res); + if Res /= E_Ok then + Eti_Exception (Res); end if; - Men := Null_Menu; - end Delete; + Men := Null_Menu; + end Delete; ------------------------------------------------------------------------------ - function Driver (Men : Menu; - Key : Key_Code) return Driver_Result + function Driver (Men : Menu; + Key : Key_Code) return Driver_Result is - function Driver (Men : Menu; - Key : C_Int) return C_Int; - pragma Import (C, Driver, "menu_driver"); + function Driver (Men : Menu; + Key : C_Int) return C_Int; + pragma Import (C, Driver, "menu_driver"); - R : Eti_Error := Driver (Men, C_Int (Key)); + R : Eti_Error := Driver (Men, C_Int (Key)); begin - if R /= E_Ok then - case R is - when E_Unknown_Command => return Unknown_Request; - when E_No_Match => return No_Match; - when E_Request_Denied | - E_Not_Selectable => return Request_Denied; + if R /= E_Ok then + case R is + when E_Unknown_Command => return Unknown_Request; + when E_No_Match => return No_Match; + when E_Request_Denied | + E_Not_Selectable => return Request_Denied; when others => - Eti_Exception (R); + Eti_Exception (R); end case; end if; - return Menu_Ok; - end Driver; + return Menu_Ok; + end Driver; - procedure Free (IA : in out Item_Array_Access; - Free_Items : in Boolean := False) + procedure Free (IA : in out Item_Array_Access; + Free_Items : in Boolean := False) is - procedure Release is new Ada.Unchecked_Deallocation - (Item_Array, Item_Array_Access); + procedure Release is new Ada.Unchecked_Deallocation + (Item_Array, Item_Array_Access); begin - if IA /= null and then Free_Items then - for I in IA'First .. (IA'Last - 1) loop - if (IA (I) /= Null_Item) then - Delete (IA (I)); + if IA /= null and then Free_Items then + for I in IA'First .. (IA'Last - 1) loop + if (IA (I) /= Null_Item) then + Delete (IA (I)); end if; end loop; end if; - Release (IA); - end Free; + Release (IA); + end Free; ------------------------------------------------------------------------------- - function Default_Menu_Options return Menu_Option_Set + function Default_Menu_Options return Menu_Option_Set is begin - return Get_Options (Null_Menu); - end Default_Menu_Options; + return Get_Options (Null_Menu); + end Default_Menu_Options; - function Default_Item_Options return Item_Option_Set + function Default_Item_Options return Item_Option_Set is begin - return Get_Options (Null_Item); - end Default_Item_Options; + return Get_Options (Null_Item); + end Default_Item_Options; ------------------------------------------------------------------------------- -end Terminal_Interface.Curses.Menus; - \ No newline at end of file +end Terminal_Interface.Curses.Menus; + diff --git a/doc/html/ada/terminal_interface-curses-menus__ads.htm b/doc/html/ada/terminal_interface-curses-menus__ads.htm index b34529be..4d5f290a 100644 --- a/doc/html/ada/terminal_interface-curses-menus__ads.htm +++ b/doc/html/ada/terminal_interface-curses-menus__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.23 @ +-- @Revision: 1.24 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- menu binding. @@ -58,57 +57,57 @@ Space : Character renames Ada.Characters.Latin_1.Space; - type Item is private; + type Item is private; type Menu is private; --------------------------- -- Interface constants -- --------------------------- - Null_Item : constant Item; + Null_Item : constant Item; Null_Menu : constant Menu; subtype Menu_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 17); -- The prefix M_ stands for "Menu Request" - M_Left_Item : constant Menu_Request_Code := Key_Max + 1; - M_Right_Item : constant Menu_Request_Code := Key_Max + 2; - M_Up_Item : constant Menu_Request_Code := Key_Max + 3; - M_Down_Item : constant Menu_Request_Code := Key_Max + 4; - M_ScrollUp_Line : constant Menu_Request_Code := Key_Max + 5; - M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6; - M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7; - M_ScrollUp_Page : constant Menu_Request_Code := Key_Max + 8; - M_First_Item : constant Menu_Request_Code := Key_Max + 9; - M_Last_Item : constant Menu_Request_Code := Key_Max + 10; - M_Next_Item : constant Menu_Request_Code := Key_Max + 11; - M_Previous_Item : constant Menu_Request_Code := Key_Max + 12; - M_Toggle_Item : constant Menu_Request_Code := Key_Max + 13; - M_Clear_Pattern : constant Menu_Request_Code := Key_Max + 14; - M_Back_Pattern : constant Menu_Request_Code := Key_Max + 15; - M_Next_Match : constant Menu_Request_Code := Key_Max + 16; + M_Left_Item : constant Menu_Request_Code := Key_Max + 1; + M_Right_Item : constant Menu_Request_Code := Key_Max + 2; + M_Up_Item : constant Menu_Request_Code := Key_Max + 3; + M_Down_Item : constant Menu_Request_Code := Key_Max + 4; + M_ScrollUp_Line : constant Menu_Request_Code := Key_Max + 5; + M_ScrollDown_Line : constant Menu_Request_Code := Key_Max + 6; + M_ScrollDown_Page : constant Menu_Request_Code := Key_Max + 7; + M_ScrollUp_Page : constant Menu_Request_Code := Key_Max + 8; + M_First_Item : constant Menu_Request_Code := Key_Max + 9; + M_Last_Item : constant Menu_Request_Code := Key_Max + 10; + M_Next_Item : constant Menu_Request_Code := Key_Max + 11; + M_Previous_Item : constant Menu_Request_Code := Key_Max + 12; + M_Toggle_Item : constant Menu_Request_Code := Key_Max + 13; + M_Clear_Pattern : constant Menu_Request_Code := Key_Max + 14; + M_Back_Pattern : constant Menu_Request_Code := Key_Max + 15; + M_Next_Match : constant Menu_Request_Code := Key_Max + 16; M_Previous_Match : constant Menu_Request_Code := Key_Max + 17; -- For those who like the old 'C' names for the request codes - REQ_LEFT_ITEM : Menu_Request_Code renames M_Left_Item; - REQ_RIGHT_ITEM : Menu_Request_Code renames M_Right_Item; - REQ_UP_ITEM : Menu_Request_Code renames M_Up_Item; - REQ_DOWN_ITEM : Menu_Request_Code renames M_Down_Item; - REQ_SCR_ULINE : Menu_Request_Code renames M_ScrollUp_Line; - REQ_SCR_DLINE : Menu_Request_Code renames M_ScrollDown_Line; - REQ_SCR_DPAGE : Menu_Request_Code renames M_ScrollDown_Page; - REQ_SCR_UPAGE : Menu_Request_Code renames M_ScrollUp_Page; - REQ_FIRST_ITEM : Menu_Request_Code renames M_First_Item; - REQ_LAST_ITEM : Menu_Request_Code renames M_Last_Item; - REQ_NEXT_ITEM : Menu_Request_Code renames M_Next_Item; - REQ_PREV_ITEM : Menu_Request_Code renames M_Previous_Item; - REQ_TOGGLE_ITEM : Menu_Request_Code renames M_Toggle_Item; - REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern; - REQ_BACK_PATTERN : Menu_Request_Code renames M_Back_Pattern; - REQ_NEXT_MATCH : Menu_Request_Code renames M_Next_Match; + REQ_LEFT_ITEM : Menu_Request_Code renames M_Left_Item; + REQ_RIGHT_ITEM : Menu_Request_Code renames M_Right_Item; + REQ_UP_ITEM : Menu_Request_Code renames M_Up_Item; + REQ_DOWN_ITEM : Menu_Request_Code renames M_Down_Item; + REQ_SCR_ULINE : Menu_Request_Code renames M_ScrollUp_Line; + REQ_SCR_DLINE : Menu_Request_Code renames M_ScrollDown_Line; + REQ_SCR_DPAGE : Menu_Request_Code renames M_ScrollDown_Page; + REQ_SCR_UPAGE : Menu_Request_Code renames M_ScrollUp_Page; + REQ_FIRST_ITEM : Menu_Request_Code renames M_First_Item; + REQ_LAST_ITEM : Menu_Request_Code renames M_Last_Item; + REQ_NEXT_ITEM : Menu_Request_Code renames M_Next_Item; + REQ_PREV_ITEM : Menu_Request_Code renames M_Previous_Item; + REQ_TOGGLE_ITEM : Menu_Request_Code renames M_Toggle_Item; + REQ_CLEAR_PATTERN : Menu_Request_Code renames M_Clear_Pattern; + REQ_BACK_PATTERN : Menu_Request_Code renames M_Back_Pattern; + REQ_NEXT_MATCH : Menu_Request_Code renames M_Next_Match; REQ_PREV_MATCH : Menu_Request_Code renames M_Previous_Match; - procedure Request_Name (Key : in Menu_Request_Code; + procedure Request_Name (Key : in Menu_Request_Code; Name : out String); function Request_Name (Key : Menu_Request_Code) return String; @@ -125,13 +124,13 @@ pragma Warnings (Off); type Menu_Option_Set is record - One_Valued : Boolean; - Show_Descriptions : Boolean; - Row_Major_Order : Boolean; - Ignore_Case : Boolean; - Show_Matches : Boolean; + One_Valued : Boolean; + Show_Descriptions : Boolean; + Row_Major_Order : Boolean; + Ignore_Case : Boolean; + Show_Matches : Boolean; Non_Cyclic : Boolean; - end record; + end record; pragma Pack (Menu_Option_Set); pragma Convention (C, Menu_Option_Set); @@ -159,7 +158,7 @@ type Item_Option_Set is record Selectable : Boolean; - end record; + end record; pragma Pack (Item_Option_Set); pragma Convention (C, Item_Option_Set); @@ -184,7 +183,7 @@ type Item_Array_Access is access Item_Array; - procedure Free (IA : in out Item_Array_Access; + procedure Free (IA : in out Item_Array_Access; Free_Items : Boolean := False); -- Release the memory for an allocated item array -- If Free_Items is True, call Delete() for all the items in @@ -195,14 +194,14 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - function Create (Name : String; + function Create (Name : String; Description : String := "") return Item; -- AKA: new_item() -- Not inlined. -- #1A NAME="AFU_2"#2| - function New_Item (Name : String; - Description : String := "") return Item + function New_Item (Name : String; + Description : String := "") return Item renames Create; -- AKA: new_item() @@ -216,7 +215,7 @@ -- |===================================================================== -- #1A NAME="AFU_4"#2| - procedure Set_Value (Itm : in Item; + procedure Set_Value (Itm : in Item; Value : in Boolean := True); -- AKA: set_item_value() pragma Inline (Set_Value); @@ -240,14 +239,14 @@ -- |===================================================================== -- #1A NAME="AFU_7"#2| - procedure Set_Options (Itm : in Item; + procedure Set_Options (Itm : in Item; Options : in Item_Option_Set); -- AKA: set_item_opts() -- An overloaded Set_Options is defined later. Pragma Inline appears there -- #1A NAME="AFU_8"#2| - procedure Switch_Options (Itm : in Item; - Options : in Item_Option_Set; + procedure Switch_Options (Itm : in Item; + Options : in Item_Option_Set; On : Boolean := True); -- AKA: item_opts_on() -- AKA: item_opts_off() @@ -255,7 +254,7 @@ -- Pragma Inline appears there -- #1A NAME="AFU_9"#2| - procedure Get_Options (Itm : in Item; + procedure Get_Options (Itm : in Item; Options : out Item_Option_Set); -- AKA: item_opts() @@ -269,7 +268,7 @@ -- |===================================================================== -- #1A NAME="AFU_11"#2| - procedure Name (Itm : in Item; + procedure Name (Itm : in Item; Name : out String); -- AKA: item_name() function Name (Itm : Item) return String; @@ -278,7 +277,7 @@ pragma Inline (Name); -- #1A NAME="AFU_12"#2| - procedure Description (Itm : in Item; + procedure Description (Itm : in Item; Description : out String); -- AKA: item_description(); @@ -292,7 +291,7 @@ -- |===================================================================== -- #1A NAME="AFU_13"#2| - procedure Set_Current (Men : in Menu; + procedure Set_Current (Men : in Menu; Itm : in Item); -- AKA: set_current_item() pragma Inline (Set_Current); @@ -303,7 +302,7 @@ pragma Inline (Current); -- #1A NAME="AFU_15"#2| - procedure Set_Top_Row (Men : in Menu; + procedure Set_Top_Row (Men : in Menu; Line : in Line_Position); -- AKA: set_top_row() pragma Inline (Set_Top_Row); @@ -326,7 +325,7 @@ -- |===================================================================== -- #1A NAME="AFU_18"#2| - procedure Post (Men : in Menu; + procedure Post (Men : in Menu; Post : in Boolean := True); -- AKA: post_menu() -- AKA: unpost_menu() @@ -337,21 +336,21 @@ -- |===================================================================== -- #1A NAME="AFU_19"#2| - procedure Set_Options (Men : in Menu; + procedure Set_Options (Men : in Menu; Options : in Menu_Option_Set); -- AKA: set_menu_opts() pragma Inline (Set_Options); -- #1A NAME="AFU_20"#2| - procedure Switch_Options (Men : in Menu; - Options : in Menu_Option_Set; + procedure Switch_Options (Men : in Menu; + Options : in Menu_Option_Set; On : Boolean := True); -- AKA: menu_opts_on() -- AKA: menu_opts_off() pragma Inline (Switch_Options); -- #1A NAME="AFU_21"#2| - procedure Get_Options (Men : in Menu; + procedure Get_Options (Men : in Menu; Options : out Menu_Option_Set); -- AKA: menu_opts() @@ -365,7 +364,7 @@ -- |===================================================================== -- #1A NAME="AFU_23"#2| - procedure Set_Window (Men : in Menu; + procedure Set_Window (Men : in Menu; Win : in Window); -- AKA: set_menu_win() pragma Inline (Set_Window); @@ -376,7 +375,7 @@ pragma Inline (Get_Window); -- #1A NAME="AFU_25"#2| - procedure Set_Sub_Window (Men : in Menu; + procedure Set_Sub_Window (Men : in Menu; Win : in Window); -- AKA: set_menu_sub() pragma Inline (Set_Sub_Window); @@ -387,8 +386,8 @@ pragma Inline (Get_Sub_Window); -- #1A NAME="AFU_27"#2| - procedure Scale (Men : in Menu; - Lines : out Line_Count; + procedure Scale (Men : in Menu; + Lines : out Line_Count; Columns : out Column_Count); -- AKA: scale_menu() pragma Inline (Scale); @@ -407,13 +406,13 @@ -- |===================================================================== -- #1A NAME="AFU_29"#2| - procedure Set_Mark (Men : in Menu; + procedure Set_Mark (Men : in Menu; Mark : in String); -- AKA: set_menu_mark() pragma Inline (Set_Mark); -- #1A NAME="AFU_30"#2| - procedure Mark (Men : in Menu; + procedure Mark (Men : in Menu; Mark : out String); -- AKA: menu_mark() @@ -428,73 +427,73 @@ -- #1A NAME="AFU_31"#2| procedure Set_Foreground - (Men : in Menu; - Fore : in Character_Attribute_Set := Normal_Video; + (Men : in Menu; + Fore : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: set_menu_fore() pragma Inline (Set_Foreground); -- #1A NAME="AFU_32"#2| - procedure Foreground (Men : in Menu; + procedure Foreground (Men : in Menu; Fore : out Character_Attribute_Set); -- AKA: menu_fore() -- #1A NAME="AFU_33"#2| - procedure Foreground (Men : in Menu; - Fore : out Character_Attribute_Set; + procedure Foreground (Men : in Menu; + Fore : out Character_Attribute_Set; Color : out Color_Pair); -- AKA: menu_fore() pragma Inline (Foreground); -- #1A NAME="AFU_34"#2| procedure Set_Background - (Men : in Menu; - Back : in Character_Attribute_Set := Normal_Video; + (Men : in Menu; + Back : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: set_menu_back() pragma Inline (Set_Background); -- #1A NAME="AFU_35"#2| - procedure Background (Men : in Menu; + procedure Background (Men : in Menu; Back : out Character_Attribute_Set); -- AKA: menu_back() -- #1A NAME="AFU_36"#2| - procedure Background (Men : in Menu; - Back : out Character_Attribute_Set; + procedure Background (Men : in Menu; + Back : out Character_Attribute_Set; Color : out Color_Pair); -- AKA: menu_back() pragma Inline (Background); -- #1A NAME="AFU_37"#2| procedure Set_Grey - (Men : in Menu; - Grey : in Character_Attribute_Set := Normal_Video; + (Men : in Menu; + Grey : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: set_menu_grey() pragma Inline (Set_Grey); -- #1A NAME="AFU_38"#2| - procedure Grey (Men : in Menu; + procedure Grey (Men : in Menu; Grey : out Character_Attribute_Set); -- AKA: menu_grey() -- #1A NAME="AFU_39"#2| procedure Grey - (Men : in Menu; - Grey : out Character_Attribute_Set; + (Men : in Menu; + Grey : out Character_Attribute_Set; Color : out Color_Pair); -- AKA: menu_grey() pragma Inline (Grey); -- #1A NAME="AFU_40"#2| - procedure Set_Pad_Character (Men : in Menu; + procedure Set_Pad_Character (Men : in Menu; Pad : in Character := Space); -- AKA: set_menu_pad() pragma Inline (Set_Pad_Character); -- #1A NAME="AFU_41"#2| - procedure Pad_Character (Men : in Menu; + procedure Pad_Character (Men : in Menu; Pad : out Character); -- AKA: menu_pad() pragma Inline (Pad_Character); @@ -504,17 +503,17 @@ -- |===================================================================== -- #1A NAME="AFU_42"#2| - procedure Set_Spacing (Men : in Menu; - Descr : in Column_Position := 0; - Row : in Line_Position := 0; + procedure Set_Spacing (Men : in Menu; + Descr : in Column_Position := 0; + Row : in Line_Position := 0; Col : in Column_Position := 0); -- AKA: set_menu_spacing() pragma Inline (Set_Spacing); -- #1A NAME="AFU_43"#2| - procedure Spacing (Men : in Menu; - Descr : out Column_Position; - Row : out Line_Position; + procedure Spacing (Men : in Menu; + Descr : out Column_Position; + Row : out Line_Position; Col : out Column_Position); -- AKA: menu_spacing() pragma Inline (Spacing); @@ -524,14 +523,14 @@ -- |===================================================================== -- #1A NAME="AFU_44"#2| - function Set_Pattern (Men : Menu; + function Set_Pattern (Men : Menu; Text : String) return Boolean; -- AKA: set_menu_pattern() -- Return TRUE if the pattern matches, FALSE otherwise pragma Inline (Set_Pattern); -- #1A NAME="AFU_45"#2| - procedure Pattern (Men : in Menu; + procedure Pattern (Men : in Menu; Text : out String); -- AKA: menu_pattern() pragma Inline (Pattern); @@ -541,8 +540,8 @@ -- |===================================================================== -- #1A NAME="AFU_46"#2| - procedure Set_Format (Men : in Menu; - Lines : in Line_Count; + procedure Set_Format (Men : in Menu; + Lines : in Line_Count; Columns : in Column_Count); -- Not implemented: 0 argument for Lines or Columns; -- instead use Format to get the current sizes @@ -555,8 +554,8 @@ pragma Inline (Set_Format); -- #1A NAME="AFU_47"#2| - procedure Format (Men : in Menu; - Lines : out Line_Count; + procedure Format (Men : in Menu; + Lines : out Line_Count; Columns : out Column_Count); -- AKA: menu_format() pragma Inline (Format); @@ -569,25 +568,25 @@ pragma Convention (C, Menu_Hook_Function); -- #1A NAME="AFU_48"#2| - procedure Set_Item_Init_Hook (Men : in Menu; + procedure Set_Item_Init_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA: set_item_init() pragma Inline (Set_Item_Init_Hook); -- #1A NAME="AFU_49"#2| - procedure Set_Item_Term_Hook (Men : in Menu; + procedure Set_Item_Term_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA: set_item_term() pragma Inline (Set_Item_Term_Hook); -- #1A NAME="AFU_50"#2| - procedure Set_Menu_Init_Hook (Men : in Menu; + procedure Set_Menu_Init_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA: set_menu_init() pragma Inline (Set_Menu_Init_Hook); -- #1A NAME="AFU_51"#2| - procedure Set_Menu_Term_Hook (Men : in Menu; + procedure Set_Menu_Term_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA: set_menu_term() pragma Inline (Set_Menu_Term_Hook); @@ -617,17 +616,17 @@ -- |===================================================================== -- #1A NAME="AFU_56"#2| - procedure Redefine (Men : in Menu; + procedure Redefine (Men : in Menu; Items : in Item_Array_Access); -- AKA: set_menu_items() pragma Inline (Redefine); - procedure Set_Items (Men : in Menu; - Items : in Item_Array_Access) renames Redefine; + procedure Set_Items (Men : in Menu; + Items : in Item_Array_Access) renames Redefine; pragma Inline (Set_Items); -- #1A NAME="AFU_57"#2| - function Items (Men : Menu; + function Items (Men : Menu; Index : Positive) return Item; -- AKA: menu_items() pragma Inline (Items); @@ -658,13 +657,13 @@ -- | Man page menu_driver.3x -- |===================================================================== - type Driver_Result is (Menu_Ok, - Request_Denied, - Unknown_Request, + type Driver_Result is (Menu_Ok, + Request_Denied, + Unknown_Request, No_Match); -- #1A NAME="AFU_61"#2| - function Driver (Men : Menu; + function Driver (Men : Menu; Key : Key_Code) return Driver_Result; -- AKA: menu_driver() -- Driver is not inlined @@ -673,11 +672,11 @@ -- Not Implemented: menu_request_name, menu_request_by_name ------------------------------------------------------------------------------- private - type Item is new System.Storage_Elements.Integer_Address; + type Item is new System.Storage_Elements.Integer_Address; type Menu is new System.Storage_Elements.Integer_Address; - Null_Item : constant Item := 0; + Null_Item : constant Item := 0; Null_Menu : constant Menu := 0; end Terminal_Interface.Curses.Menus; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-mouse__adb.htm b/doc/html/ada/terminal_interface-curses-mouse__adb.htm index a8137c43..4312cbf1 100644 --- a/doc/html/ada/terminal_interface-curses-mouse__adb.htm +++ b/doc/html/ada/terminal_interface-curses-mouse__adb.htm @@ -37,184 +37,183 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.17 @ +-- @Revision: 1.18 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; use Interfaces; -package body Terminal_Interface.Curses.Mouse is +package body Terminal_Interface.Curses.Mouse is use type System.Bit_Order; use type Interfaces.C.int; - function Has_Mouse return Boolean + function Has_Mouse return Boolean is - function Mouse_Avail return C_Int; - pragma Import (C, Mouse_Avail, "_nc_has_mouse"); + function Mouse_Avail return C_Int; + pragma Import (C, Mouse_Avail, "_nc_has_mouse"); begin - if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then + if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then return True; else return False; end if; - end Has_Mouse; + end Has_Mouse; - function Get_Mouse return Mouse_Event + function Get_Mouse return Mouse_Event is - type Event_Access is access all Mouse_Event; + type Event_Access is access all Mouse_Event; - function Getmouse (Ev : Event_Access) return C_Int; - pragma Import (C, Getmouse, "getmouse"); + function Getmouse (Ev : Event_Access) return C_Int; + pragma Import (C, Getmouse, "getmouse"); - Event : aliased Mouse_Event; + Event : aliased Mouse_Event; begin - if Getmouse (Event'Access) = Curses_Err then - raise Curses_Exception; + if Getmouse (Event'Access) = Curses_Err then + raise Curses_Exception; end if; - return Event; - end Get_Mouse; + return Event; + end Get_Mouse; - procedure Register_Reportable_Event (Button : in Mouse_Button; - State : in Button_State; - Mask : in out Event_Mask) + procedure Register_Reportable_Event (Button : in Mouse_Button; + State : in Button_State; + Mask : in out Event_Mask) is - Button_Nr : constant Natural := Mouse_Button'Pos (Button); - State_Nr : constant Natural := Button_State'Pos (State); + Button_Nr : constant Natural := Mouse_Button'Pos (Button); + State_Nr : constant Natural := Button_State'Pos (State); begin - if Button in Modifier_Keys and then State /= Pressed then - raise Curses_Exception; + if Button in Modifier_Keys and then State /= Pressed then + raise Curses_Exception; else - if Button in Real_Buttons then - Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); + if Button in Real_Buttons then + Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); else - Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); + Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); end if; end if; - end Register_Reportable_Event; + end Register_Reportable_Event; - procedure Register_Reportable_Events (Button : in Mouse_Button; - State : in Button_States; - Mask : in out Event_Mask) + procedure Register_Reportable_Events (Button : in Mouse_Button; + State : in Button_States; + Mask : in out Event_Mask) is begin - for S in Button_States'Range loop - if State (S) then - Register_Reportable_Event (Button, S, Mask); + for S in Button_States'Range loop + if State (S) then + Register_Reportable_Event (Button, S, Mask); end if; end loop; - end Register_Reportable_Events; + end Register_Reportable_Events; - function Start_Mouse (Mask : Event_Mask := All_Events) - return Event_Mask + function Start_Mouse (Mask : Event_Mask := All_Events) + return Event_Mask is - function MMask (M : Event_Mask; - O : access Event_Mask) return Event_Mask; - pragma Import (C, MMask, "mousemask"); - R : Event_Mask; - Old : aliased Event_Mask; + function MMask (M : Event_Mask; + O : access Event_Mask) return Event_Mask; + pragma Import (C, MMask, "mousemask"); + R : Event_Mask; + Old : aliased Event_Mask; begin - R := MMask (Mask, Old'Access); - return Old; - end Start_Mouse; + R := MMask (Mask, Old'Access); + return Old; + end Start_Mouse; - procedure End_Mouse (Mask : in Event_Mask := No_Events) + procedure End_Mouse (Mask : in Event_Mask := No_Events) is begin null; - end End_Mouse; + end End_Mouse; - procedure Dispatch_Event (Mask : in Event_Mask; - Button : out Mouse_Button; - State : out Button_State); + procedure Dispatch_Event (Mask : in Event_Mask; + Button : out Mouse_Button; + State : out Button_State); - procedure Dispatch_Event (Mask : in Event_Mask; - Button : out Mouse_Button; - State : out Button_State) is - L : Event_Mask; + procedure Dispatch_Event (Mask : in Event_Mask; + Button : out Mouse_Button; + State : out Button_State) is + L : Event_Mask; begin - Button := Alt; -- preset to non real button; - if (Mask and BUTTON1_EVENTS) /= 0 then - Button := Left; - elsif (Mask and BUTTON2_EVENTS) /= 0 then - Button := Middle; - elsif (Mask and BUTTON3_EVENTS) /= 0 then - Button := Right; - elsif (Mask and BUTTON4_EVENTS) /= 0 then - Button := Button4; + Button := Alt; -- preset to non real button; + if (Mask and BUTTON1_EVENTS) /= 0 then + Button := Left; + elsif (Mask and BUTTON2_EVENTS) /= 0 then + Button := Middle; + elsif (Mask and BUTTON3_EVENTS) /= 0 then + Button := Right; + elsif (Mask and BUTTON4_EVENTS) /= 0 then + Button := Button4; end if; - if Button in Real_Buttons then - L := 2 ** (6 * Mouse_Button'Pos (Button)); - for I in Button_State'Range loop - if (Mask and L) /= 0 then - State := I; + if Button in Real_Buttons then + L := 2 ** (6 * Mouse_Button'Pos (Button)); + for I in Button_State'Range loop + if (Mask and L) /= 0 then + State := I; exit; end if; - L := 2 * L; + L := 2 * L; end loop; else - State := Pressed; - if (Mask and BUTTON_CTRL) /= 0 then - Button := Control; - elsif (Mask and BUTTON_SHIFT) /= 0 then - Button := Shift; - elsif (Mask and BUTTON_ALT) /= 0 then - Button := Alt; + State := Pressed; + if (Mask and BUTTON_CTRL) /= 0 then + Button := Control; + elsif (Mask and BUTTON_SHIFT) /= 0 then + Button := Shift; + elsif (Mask and BUTTON_ALT) /= 0 then + Button := Alt; end if; end if; - end Dispatch_Event; + end Dispatch_Event; - procedure Get_Event (Event : in Mouse_Event; - Y : out Line_Position; - X : out Column_Position; - Button : out Mouse_Button; - State : out Button_State) + procedure Get_Event (Event : in Mouse_Event; + Y : out Line_Position; + X : out Column_Position; + Button : out Mouse_Button; + State : out Button_State) is - Mask : constant Event_Mask := Event.Bstate; + Mask : constant Event_Mask := Event.Bstate; begin - X := Column_Position (Event.X); - Y := Line_Position (Event.Y); - Dispatch_Event (Mask, Button, State); - end Get_Event; + X := Column_Position (Event.X); + Y := Line_Position (Event.Y); + Dispatch_Event (Mask, Button, State); + end Get_Event; - procedure Unget_Mouse (Event : in Mouse_Event) + procedure Unget_Mouse (Event : in Mouse_Event) is - function Ungetmouse (Ev : Mouse_Event) return C_Int; - pragma Import (C, Ungetmouse, "ungetmouse"); + function Ungetmouse (Ev : Mouse_Event) return C_Int; + pragma Import (C, Ungetmouse, "ungetmouse"); begin - if Ungetmouse (Event) = Curses_Err then - raise Curses_Exception; + if Ungetmouse (Event) = Curses_Err then + raise Curses_Exception; end if; - end Unget_Mouse; + end Unget_Mouse; - function Enclosed_In_Window (Win : Window := Standard_Window; - Event : Mouse_Event) return Boolean + function Enclosed_In_Window (Win : Window := Standard_Window; + Event : Mouse_Event) return Boolean is - function Wenclose (Win : Window; Y : C_Int; X : C_Int) - return Curses_Bool; - pragma Import (C, Wenclose, "wenclose"); + function Wenclose (Win : Window; Y : C_Int; X : C_Int) + return Curses_Bool; + pragma Import (C, Wenclose, "wenclose"); begin - if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) - = Curses_Bool_False then + if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) + = Curses_Bool_False then return False; else return True; end if; - end Enclosed_In_Window; + end Enclosed_In_Window; - function Mouse_Interval (Msec : Natural := 200) return Natural + function Mouse_Interval (Msec : Natural := 200) return Natural is - function Mouseinterval (Msec : C_Int) return C_Int; - pragma Import (C, Mouseinterval, "mouseinterval"); + function Mouseinterval (Msec : C_Int) return C_Int; + pragma Import (C, Mouseinterval, "mouseinterval"); begin - return Natural (Mouseinterval (C_Int (Msec))); - end Mouse_Interval; + return Natural (Mouseinterval (C_Int (Msec))); + end Mouse_Interval; -end Terminal_Interface.Curses.Mouse; - \ No newline at end of file +end Terminal_Interface.Curses.Mouse; + diff --git a/doc/html/ada/terminal_interface-curses-mouse__ads.htm b/doc/html/ada/terminal_interface-curses-mouse__ads.htm index d562e906..50edd934 100644 --- a/doc/html/ada/terminal_interface-curses-mouse__ads.htm +++ b/doc/html/ada/terminal_interface-curses-mouse__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.21 @ +-- @Revision: 1.22 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- mouse binding. @@ -67,31 +66,31 @@ -- REPORT_MOUSE_POSITION (i.e. as a parameter to Register_Reportable_Event -- or Start_Mouse) type Event_Mask is private; - No_Events : constant Event_Mask; + No_Events : constant Event_Mask; All_Events : constant Event_Mask; - type Mouse_Button is (Left, -- aka: Button 1 - Middle, -- aka: Button 2 - Right, -- aka: Button 3 - Button4, -- aka: Button 4 - Control, -- Control Key - Shift, -- Shift Key + type Mouse_Button is (Left, -- aka: Button 1 + Middle, -- aka: Button 2 + Right, -- aka: Button 3 + Button4, -- aka: Button 4 + Control, -- Control Key + Shift, -- Shift Key Alt); -- ALT Key - subtype Real_Buttons is Mouse_Button range Left .. Button4; + subtype Real_Buttons is Mouse_Button range Left .. Button4; subtype Modifier_Keys is Mouse_Button range Control .. Alt; - type Button_State is (Released, - Pressed, - Clicked, - Double_Clicked, + type Button_State is (Released, + Pressed, + Clicked, + Double_Clicked, Triple_Clicked); type Button_States is array (Button_State) of Boolean; pragma Pack (Button_States); All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True, - others => False); + others => False); All_States : constant Button_States := (others => True); type Mouse_Event is private; @@ -104,8 +103,8 @@ -- Return true if a mouse device is supported, false otherwise. procedure Register_Reportable_Event - (Button : in Mouse_Button; - State : in Button_State; + (Button : in Mouse_Button; + State : in Button_State; Mask : in out Event_Mask); -- Stores the event described by the button and the state in the mask. -- Before you call this the first time, you should init the mask @@ -113,8 +112,8 @@ pragma Inline (Register_Reportable_Event); procedure Register_Reportable_Events - (Button : in Mouse_Button; - State : in Button_States; + (Button : in Mouse_Button; + State : in Button_States; Mask : in out Event_Mask); -- Register all events described by the Button and the State bitmap. -- Before you call this the first time, you should init the mask @@ -125,7 +124,7 @@ -- old mask, that means the event mask value before this call. -- Not Implemented: The library version -- returns a Mouse_Mask that tells which events are reported. - function Start_Mouse (Mask : Event_Mask := All_Events) + function Start_Mouse (Mask : Event_Mask := All_Events) return Event_Mask; -- AKA: mousemask() pragma Inline (Start_Mouse); @@ -139,10 +138,10 @@ -- AKA: getmouse() pragma Inline (Get_Mouse); - procedure Get_Event (Event : in Mouse_Event; - Y : out Line_Position; - X : out Column_Position; - Button : out Mouse_Button; + procedure Get_Event (Event : in Mouse_Event; + Y : out Line_Position; + X : out Column_Position; + Button : out Mouse_Button; State : out Button_State); -- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they -- may not be identical to window coordinates. @@ -156,7 +155,7 @@ pragma Inline (Unget_Mouse); -- #1A NAME="AFU_4"#2| - function Enclosed_In_Window (Win : Window := Standard_Window; + function Enclosed_In_Window (Win : Window := Standard_Window; Event : Mouse_Event) return Boolean; -- AKA: wenclose() -- But : use event instead of screen coordinates. @@ -173,10 +172,10 @@ type Mouse_Event is record Id : Integer range Integer (Interfaces.C.short'First) .. - Integer (Interfaces.C.short'Last); + Integer (Interfaces.C.short'Last); X, Y, Z : Integer range Integer (Interfaces.C.int'First) .. - Integer (Interfaces.C.int'Last); - Bstate : Event_Mask; + Integer (Interfaces.C.int'Last); + Bstate : Event_Mask; end record; pragma Convention (C, Mouse_Event); pragma Pack (Mouse_Event); @@ -195,43 +194,43 @@ Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First; -- This constant may be different on your system. - BUTTON1_RELEASED : constant Event_Mask := 8#00000000001#; - BUTTON1_PRESSED : constant Event_Mask := 8#00000000002#; - BUTTON1_CLICKED : constant Event_Mask := 8#00000000004#; - BUTTON1_DOUBLE_CLICKED : constant Event_Mask := 8#00000000010#; - BUTTON1_TRIPLE_CLICKED : constant Event_Mask := 8#00000000020#; - BUTTON1_RESERVED_EVENT : constant Event_Mask := 8#00000000040#; - BUTTON2_RELEASED : constant Event_Mask := 8#00000000100#; - BUTTON2_PRESSED : constant Event_Mask := 8#00000000200#; - BUTTON2_CLICKED : constant Event_Mask := 8#00000000400#; - BUTTON2_DOUBLE_CLICKED : constant Event_Mask := 8#00000001000#; - BUTTON2_TRIPLE_CLICKED : constant Event_Mask := 8#00000002000#; - BUTTON2_RESERVED_EVENT : constant Event_Mask := 8#00000004000#; - BUTTON3_RELEASED : constant Event_Mask := 8#00000010000#; - BUTTON3_PRESSED : constant Event_Mask := 8#00000020000#; - BUTTON3_CLICKED : constant Event_Mask := 8#00000040000#; - BUTTON3_DOUBLE_CLICKED : constant Event_Mask := 8#00000100000#; - BUTTON3_TRIPLE_CLICKED : constant Event_Mask := 8#00000200000#; - BUTTON3_RESERVED_EVENT : constant Event_Mask := 8#00000400000#; - BUTTON4_RELEASED : constant Event_Mask := 8#00001000000#; - BUTTON4_PRESSED : constant Event_Mask := 8#00002000000#; - BUTTON4_CLICKED : constant Event_Mask := 8#00004000000#; - BUTTON4_DOUBLE_CLICKED : constant Event_Mask := 8#00010000000#; - BUTTON4_TRIPLE_CLICKED : constant Event_Mask := 8#00020000000#; - BUTTON4_RESERVED_EVENT : constant Event_Mask := 8#00040000000#; - BUTTON_CTRL : constant Event_Mask := 8#00100000000#; - BUTTON_SHIFT : constant Event_Mask := 8#00200000000#; - BUTTON_ALT : constant Event_Mask := 8#00400000000#; - REPORT_MOUSE_POSITION : constant Event_Mask := 8#01000000000#; - ALL_MOUSE_EVENTS : constant Event_Mask := 8#00777777777#; - BUTTON1_EVENTS : constant Event_Mask := 8#00000000077#; - BUTTON2_EVENTS : constant Event_Mask := 8#00000007700#; - BUTTON3_EVENTS : constant Event_Mask := 8#00000770000#; + BUTTON1_RELEASED : constant Event_Mask := 8#00000000001#; + BUTTON1_PRESSED : constant Event_Mask := 8#00000000002#; + BUTTON1_CLICKED : constant Event_Mask := 8#00000000004#; + BUTTON1_DOUBLE_CLICKED : constant Event_Mask := 8#00000000010#; + BUTTON1_TRIPLE_CLICKED : constant Event_Mask := 8#00000000020#; + BUTTON1_RESERVED_EVENT : constant Event_Mask := 8#00000000040#; + BUTTON2_RELEASED : constant Event_Mask := 8#00000000100#; + BUTTON2_PRESSED : constant Event_Mask := 8#00000000200#; + BUTTON2_CLICKED : constant Event_Mask := 8#00000000400#; + BUTTON2_DOUBLE_CLICKED : constant Event_Mask := 8#00000001000#; + BUTTON2_TRIPLE_CLICKED : constant Event_Mask := 8#00000002000#; + BUTTON2_RESERVED_EVENT : constant Event_Mask := 8#00000004000#; + BUTTON3_RELEASED : constant Event_Mask := 8#00000010000#; + BUTTON3_PRESSED : constant Event_Mask := 8#00000020000#; + BUTTON3_CLICKED : constant Event_Mask := 8#00000040000#; + BUTTON3_DOUBLE_CLICKED : constant Event_Mask := 8#00000100000#; + BUTTON3_TRIPLE_CLICKED : constant Event_Mask := 8#00000200000#; + BUTTON3_RESERVED_EVENT : constant Event_Mask := 8#00000400000#; + BUTTON4_RELEASED : constant Event_Mask := 8#00001000000#; + BUTTON4_PRESSED : constant Event_Mask := 8#00002000000#; + BUTTON4_CLICKED : constant Event_Mask := 8#00004000000#; + BUTTON4_DOUBLE_CLICKED : constant Event_Mask := 8#00010000000#; + BUTTON4_TRIPLE_CLICKED : constant Event_Mask := 8#00020000000#; + BUTTON4_RESERVED_EVENT : constant Event_Mask := 8#00040000000#; + BUTTON_CTRL : constant Event_Mask := 8#00100000000#; + BUTTON_SHIFT : constant Event_Mask := 8#00200000000#; + BUTTON_ALT : constant Event_Mask := 8#00400000000#; + REPORT_MOUSE_POSITION : constant Event_Mask := 8#01000000000#; + ALL_MOUSE_EVENTS : constant Event_Mask := 8#00777777777#; + BUTTON1_EVENTS : constant Event_Mask := 8#00000000077#; + BUTTON2_EVENTS : constant Event_Mask := 8#00000007700#; + BUTTON3_EVENTS : constant Event_Mask := 8#00000770000#; BUTTON4_EVENTS : constant Event_Mask := 8#00077000000#; - No_Events : constant Event_Mask := 0; + No_Events : constant Event_Mask := 0; All_Events : constant Event_Mask := ALL_MOUSE_EVENTS; end Terminal_Interface.Curses.Mouse; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm b/doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm index dedbdb7f..7f9b1674 100644 --- a/doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm +++ b/doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm @@ -37,48 +37,47 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -with Terminal_Interface.Curses.Aux; -use Terminal_Interface.Curses.Aux; -with Terminal_Interface.Curses.Panels; -use Terminal_Interface.Curses.Panels; +with Terminal_Interface.Curses.Aux; +use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Panels; +use Terminal_Interface.Curses.Panels; -package body Terminal_Interface.Curses.Panels.User_Data is +package body Terminal_Interface.Curses.Panels.User_Data is use type Interfaces.C.int; - procedure Set_User_Data (Pan : in Panel; - Data : in User_Access) + procedure Set_User_Data (Pan : in Panel; + Data : in User_Access) is - function Set_Panel_Userptr (Pan : Panel; - Addr : User_Access) return C_Int; - pragma Import (C, Set_Panel_Userptr, "set_panel_userptr"); + function Set_Panel_Userptr (Pan : Panel; + Addr : User_Access) return C_Int; + pragma Import (C, Set_Panel_Userptr, "set_panel_userptr"); begin - if Set_Panel_Userptr (Pan, Data) = Curses_Err then - raise Panel_Exception; + if Set_Panel_Userptr (Pan, Data) = Curses_Err then + raise Panel_Exception; end if; - end Set_User_Data; + end Set_User_Data; - function Get_User_Data (Pan : in Panel) return User_Access + function Get_User_Data (Pan : in Panel) return User_Access is - function Panel_Userptr (Pan : Panel) return User_Access; - pragma Import (C, Panel_Userptr, "panel_userptr"); + function Panel_Userptr (Pan : Panel) return User_Access; + pragma Import (C, Panel_Userptr, "panel_userptr"); begin - return Panel_Userptr (Pan); - end Get_User_Data; + return Panel_Userptr (Pan); + end Get_User_Data; - procedure Get_User_Data (Pan : in Panel; - Data : out User_Access) + procedure Get_User_Data (Pan : in Panel; + Data : out User_Access) is begin - Data := Get_User_Data (Pan); - end Get_User_Data; + Data := Get_User_Data (Pan); + end Get_User_Data; -end Terminal_Interface.Curses.Panels.User_Data; - \ No newline at end of file +end Terminal_Interface.Curses.Panels.User_Data; + diff --git a/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm b/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm index 90810b68..1aa8d914 100644 --- a/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm +++ b/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm @@ -38,17 +38,16 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type User is limited private; - type User_Access is access all User; -package Terminal_Interface.Curses.Panels.User_Data is + type User is limited private; + type User_Access is access all User; +package Terminal_Interface.Curses.Panels.User_Data is pragma Preelaborate (Terminal_Interface.Curses.Panels.User_Data); -- |===================================================================== @@ -56,13 +55,13 @@ -- |===================================================================== -- #1A NAME="AFU_1"#2| - procedure Set_User_Data (Pan : in Panel; + procedure Set_User_Data (Pan : in Panel; Data : in User_Access); -- AKA: set_panel_userptr pragma Inline (Set_User_Data); -- #1A NAME="AFU_2"#2| - procedure Get_User_Data (Pan : in Panel; + procedure Get_User_Data (Pan : in Panel; Data : out User_Access); -- AKA: panel_userptr @@ -73,4 +72,4 @@ pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Panels.User_Data; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-panels__adb.htm b/doc/html/ada/terminal_interface-curses-panels__adb.htm index d7214638..ba131bee 100644 --- a/doc/html/ada/terminal_interface-curses-panels__adb.htm +++ b/doc/html/ada/terminal_interface-curses-panels__adb.htm @@ -37,134 +37,133 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; -package body Terminal_Interface.Curses.Panels is +package body Terminal_Interface.Curses.Panels is use type Interfaces.C.int; - function Create (Win : Window) return Panel + function Create (Win : Window) return Panel is - function Newpanel (Win : Window) return Panel; - pragma Import (C, Newpanel, "new_panel"); + function Newpanel (Win : Window) return Panel; + pragma Import (C, Newpanel, "new_panel"); - Pan : Panel; + Pan : Panel; begin - Pan := Newpanel (Win); - if Pan = Null_Panel then - raise Panel_Exception; + Pan := Newpanel (Win); + if Pan = Null_Panel then + raise Panel_Exception; end if; - return Pan; - end Create; + return Pan; + end Create; - procedure Bottom (Pan : in Panel) + procedure Bottom (Pan : in Panel) is - function Bottompanel (Pan : Panel) return C_Int; - pragma Import (C, Bottompanel, "bottom_panel"); + function Bottompanel (Pan : Panel) return C_Int; + pragma Import (C, Bottompanel, "bottom_panel"); begin - if Bottompanel (Pan) = Curses_Err then - raise Panel_Exception; + if Bottompanel (Pan) = Curses_Err then + raise Panel_Exception; end if; - end Bottom; + end Bottom; - procedure Top (Pan : in Panel) + procedure Top (Pan : in Panel) is - function Toppanel (Pan : Panel) return C_Int; - pragma Import (C, Toppanel, "top_panel"); + function Toppanel (Pan : Panel) return C_Int; + pragma Import (C, Toppanel, "top_panel"); begin - if Toppanel (Pan) = Curses_Err then - raise Panel_Exception; + if Toppanel (Pan) = Curses_Err then + raise Panel_Exception; end if; - end Top; + end Top; - procedure Show (Pan : in Panel) + procedure Show (Pan : in Panel) is - function Showpanel (Pan : Panel) return C_Int; - pragma Import (C, Showpanel, "show_panel"); + function Showpanel (Pan : Panel) return C_Int; + pragma Import (C, Showpanel, "show_panel"); begin - if Showpanel (Pan) = Curses_Err then - raise Panel_Exception; + if Showpanel (Pan) = Curses_Err then + raise Panel_Exception; end if; - end Show; + end Show; - procedure Hide (Pan : in Panel) + procedure Hide (Pan : in Panel) is - function Hidepanel (Pan : Panel) return C_Int; - pragma Import (C, Hidepanel, "hide_panel"); + function Hidepanel (Pan : Panel) return C_Int; + pragma Import (C, Hidepanel, "hide_panel"); begin - if Hidepanel (Pan) = Curses_Err then - raise Panel_Exception; + if Hidepanel (Pan) = Curses_Err then + raise Panel_Exception; end if; - end Hide; + end Hide; - function Get_Window (Pan : Panel) return Window + function Get_Window (Pan : Panel) return Window is - function Panel_Win (Pan : Panel) return Window; - pragma Import (C, Panel_Win, "panel_window"); + function Panel_Win (Pan : Panel) return Window; + pragma Import (C, Panel_Win, "panel_window"); - Win : Window := Panel_Win (Pan); + Win : Window := Panel_Win (Pan); begin - if Win = Null_Window then - raise Panel_Exception; + if Win = Null_Window then + raise Panel_Exception; end if; - return Win; - end Get_Window; + return Win; + end Get_Window; - procedure Replace (Pan : in Panel; - Win : in Window) + procedure Replace (Pan : in Panel; + Win : in Window) is - function Replace_Pan (Pan : Panel; - Win : Window) return C_Int; - pragma Import (C, Replace_Pan, "replace_panel"); + function Replace_Pan (Pan : Panel; + Win : Window) return C_Int; + pragma Import (C, Replace_Pan, "replace_panel"); begin - if Replace_Pan (Pan, Win) = Curses_Err then - raise Panel_Exception; + if Replace_Pan (Pan, Win) = Curses_Err then + raise Panel_Exception; end if; - end Replace; + end Replace; - procedure Move (Pan : in Panel; - Line : in Line_Position; - Column : in Column_Position) + procedure Move (Pan : in Panel; + Line : in Line_Position; + Column : in Column_Position) is - function Move (Pan : Panel; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Move, "move_panel"); + function Move (Pan : Panel; + Line : C_Int; + Column : C_Int) return C_Int; + pragma Import (C, Move, "move_panel"); begin - if Move (Pan, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Panel_Exception; + if Move (Pan, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Panel_Exception; end if; - end Move; + end Move; - function Is_Hidden (Pan : Panel) return Boolean + function Is_Hidden (Pan : Panel) return Boolean is - function Panel_Hidden (Pan : Panel) return C_Int; - pragma Import (C, Panel_Hidden, "panel_hidden"); + function Panel_Hidden (Pan : Panel) return C_Int; + pragma Import (C, Panel_Hidden, "panel_hidden"); begin - if Panel_Hidden (Pan) = Curses_False then + if Panel_Hidden (Pan) = Curses_False then return False; else return True; end if; - end Is_Hidden; + end Is_Hidden; - procedure Delete (Pan : in out Panel) + procedure Delete (Pan : in out Panel) is - function Del_Panel (Pan : Panel) return C_Int; - pragma Import (C, Del_Panel, "del_panel"); + function Del_Panel (Pan : Panel) return C_Int; + pragma Import (C, Del_Panel, "del_panel"); begin - if Del_Panel (Pan) = Curses_Err then - raise Panel_Exception; + if Del_Panel (Pan) = Curses_Err then + raise Panel_Exception; end if; - Pan := Null_Panel; - end Delete; + Pan := Null_Panel; + end Delete; -end Terminal_Interface.Curses.Panels; - \ No newline at end of file +end Terminal_Interface.Curses.Panels; + diff --git a/doc/html/ada/terminal_interface-curses-panels__ads.htm b/doc/html/ada/terminal_interface-curses-panels__ads.htm index c7790ae8..c16e58f6 100644 --- a/doc/html/ada/terminal_interface-curses-panels__ads.htm +++ b/doc/html/ada/terminal_interface-curses-panels__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.16 @ +-- @Revision: 1.17 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; @@ -113,14 +112,14 @@ pragma Inline (Panel_Window); -- #1A NAME="AFU_10"#2| - procedure Replace (Pan : in Panel; + procedure Replace (Pan : in Panel; Win : in Window); -- AKA: replace_panel() pragma Inline (Replace); -- #1A NAME="AFU_11"#2| - procedure Move (Pan : in Panel; - Line : in Line_Position; + procedure Move (Pan : in Panel; + Line : in Line_Position; Column : in Column_Position); -- AKA: move_panel() pragma Inline (Move); @@ -150,4 +149,4 @@ Null_Panel : constant Panel := 0; end Terminal_Interface.Curses.Panels; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-putwin__adb.htm b/doc/html/ada/terminal_interface-curses-putwin__adb.htm index 1e857b33..57eeba1a 100644 --- a/doc/html/ada/terminal_interface-curses-putwin__adb.htm +++ b/doc/html/ada/terminal_interface-curses-putwin__adb.htm @@ -37,47 +37,46 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @ -- Binding Version 01.00 with Ada.Streams.Stream_IO.C_Streams; with Interfaces.C_Streams; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.PutWin is +package body Terminal_Interface.Curses.PutWin is - package ICS renames Interfaces.C_Streams; - package ACS renames Ada.Streams.Stream_IO.C_Streams; - use type C_Int; + package ICS renames Interfaces.C_Streams; + package ACS renames Ada.Streams.Stream_IO.C_Streams; + use type C_Int; - procedure Put_Window (Win : Window; - File : Ada.Streams.Stream_IO.File_Type) is - function putwin (Win : Window; f : ICS.FILEs) return C_Int; - pragma Import (C, putwin, "putwin"); + procedure Put_Window (Win : Window; + File : Ada.Streams.Stream_IO.File_Type) is + function putwin (Win : Window; f : ICS.FILEs) return C_Int; + pragma Import (C, putwin, "putwin"); - R : constant C_Int := putwin (Win, ACS.C_Stream (File)); + R : constant C_Int := putwin (Win, ACS.C_Stream (File)); begin - if R /= Curses_Ok then - raise Curses_Exception; + if R /= Curses_Ok then + raise Curses_Exception; end if; - end Put_Window; + end Put_Window; - function Get_Window (File : Ada.Streams.Stream_IO.File_Type) - return Window is - function getwin (f : ICS.FILEs) return Window; - pragma Import (C, getwin, "getwin"); + function Get_Window (File : Ada.Streams.Stream_IO.File_Type) + return Window is + function getwin (f : ICS.FILEs) return Window; + pragma Import (C, getwin, "getwin"); - W : constant Window := getwin (ACS.C_Stream (File)); + W : constant Window := getwin (ACS.C_Stream (File)); begin - if W = Null_Window then - raise Curses_Exception; + if W = Null_Window then + raise Curses_Exception; else - return W; + return W; end if; - end Get_Window; + end Get_Window; -end Terminal_Interface.Curses.PutWin; - \ No newline at end of file +end Terminal_Interface.Curses.PutWin; + diff --git a/doc/html/ada/terminal_interface-curses-putwin__ads.htm b/doc/html/ada/terminal_interface-curses-putwin__ads.htm index 8358e0ef..8f353d22 100644 --- a/doc/html/ada/terminal_interface-curses-putwin__ads.htm +++ b/doc/html/ada/terminal_interface-curses-putwin__ads.htm @@ -37,20 +37,19 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @ -- Binding Version 01.00 with Ada.Streams.Stream_IO; -package Terminal_Interface.Curses.PutWin is +package Terminal_Interface.Curses.PutWin is - procedure Put_Window (Win : Window; - File : Ada.Streams.Stream_IO.File_Type); + procedure Put_Window (Win : Window; + File : Ada.Streams.Stream_IO.File_Type); - function Get_Window (File : Ada.Streams.Stream_IO.File_Type) return Window; + function Get_Window (File : Ada.Streams.Stream_IO.File_Type) return Window; -end Terminal_Interface.Curses.PutWin; - \ No newline at end of file +end Terminal_Interface.Curses.PutWin; + diff --git a/doc/html/ada/terminal_interface-curses-termcap__adb.htm b/doc/html/ada/terminal_interface-curses-termcap__adb.htm index 47ab7bda..2756b442 100644 --- a/doc/html/ada/terminal_interface-curses-termcap__adb.htm +++ b/doc/html/ada/terminal_interface-curses-termcap__adb.htm @@ -37,133 +37,132 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; -package body Terminal_Interface.Curses.Termcap is +package body Terminal_Interface.Curses.Termcap is - function Get_Entry (Name : String) return Boolean + function Get_Entry (Name : String) return Boolean is - function tgetent (name : char_array; val : char_array) - return C_Int; - pragma Import (C, tgetent, "tgetent"); - NameTxt : char_array (0 .. Name'Length); - Length : size_t; - ignored : char_array (0 .. 0) := (0 => nul); - result : C_Int; + function tgetent (name : char_array; val : char_array) + return C_Int; + pragma Import (C, tgetent, "tgetent"); + NameTxt : char_array (0 .. Name'Length); + Length : size_t; + ignored : char_array (0 .. 0) := (0 => nul); + result : C_Int; begin - To_C (Name, NameTxt, Length); - result := tgetent (char_array (ignored), NameTxt); - if result = -1 then - raise Curses_Exception; + To_C (Name, NameTxt, Length); + result := tgetent (char_array (ignored), NameTxt); + if result = -1 then + raise Curses_Exception; else - return Boolean'Val (result); + return Boolean'Val (result); end if; - end Get_Entry; + end Get_Entry; ------------------------------------------------------------------------------ - function Get_Flag (Name : String) return Boolean + function Get_Flag (Name : String) return Boolean is - function tgetflag (id : char_array) return C_Int; - pragma Import (C, tgetflag, "tgetflag"); - Txt : char_array (0 .. Name'Length); - Length : size_t; + function tgetflag (id : char_array) return C_Int; + pragma Import (C, tgetflag, "tgetflag"); + Txt : char_array (0 .. Name'Length); + Length : size_t; begin - To_C (Name, Txt, Length); - if tgetflag (Txt) = 0 then + To_C (Name, Txt, Length); + if tgetflag (Txt) = 0 then return False; else return True; end if; - end Get_Flag; + end Get_Flag; ------------------------------------------------------------------------------ - procedure Get_Number (Name : in String; - Value : out Integer; - Result : out Boolean) + procedure Get_Number (Name : in String; + Value : out Integer; + Result : out Boolean) is - function tgetnum (id : char_array) return C_Int; - pragma Import (C, tgetnum, "tgetnum"); - Txt : char_array (0 .. Name'Length); - Length : size_t; + function tgetnum (id : char_array) return C_Int; + pragma Import (C, tgetnum, "tgetnum"); + Txt : char_array (0 .. Name'Length); + Length : size_t; begin - To_C (Name, Txt, Length); - Value := Integer (tgetnum (Txt)); - if Value = -1 then - Result := False; + To_C (Name, Txt, Length); + Value := Integer (tgetnum (Txt)); + if Value = -1 then + Result := False; else - Result := True; + Result := True; end if; - end Get_Number; + end Get_Number; ------------------------------------------------------------------------------ - procedure Get_String (Name : String; - Value : out String; - Result : out Boolean) + procedure Get_String (Name : String; + Value : out String; + Result : out Boolean) is - function tgetstr (id : char_array; - buf : char_array) return chars_ptr; - pragma Import (C, tgetstr, "tgetstr"); - Txt : char_array (0 .. Name'Length); - Length : size_t; - Txt2 : chars_ptr; - type t is new char_array (0 .. 1024); -- does it need to be 1024? - Return_Buffer : t := (0 => nul); + function tgetstr (id : char_array; + buf : char_array) return chars_ptr; + pragma Import (C, tgetstr, "tgetstr"); + Txt : char_array (0 .. Name'Length); + Length : size_t; + Txt2 : chars_ptr; + type t is new char_array (0 .. 1024); -- does it need to be 1024? + Return_Buffer : t := (0 => nul); begin - To_C (Name, Txt, Length); - Txt2 := tgetstr (Txt, char_array (Return_Buffer)); - if Txt2 = Null_Ptr then - Result := False; + To_C (Name, Txt, Length); + Txt2 := tgetstr (Txt, char_array (Return_Buffer)); + if Txt2 = Null_Ptr then + Result := False; else - Value := Fill_String (Txt2); - Result := True; + Value := Fill_String (Txt2); + Result := True; end if; - end Get_String; + end Get_String; - function Get_String (Name : String) return Boolean + function Get_String (Name : String) return Boolean is - function tgetstr (Id : char_array; - buf : char_array) return chars_ptr; - pragma Import (C, tgetstr, "tgetstr"); - Txt : char_array (0 .. Name'Length); - Length : size_t; - Txt2 : chars_ptr; - type t is new char_array (0 .. 1024); -- does it need to be 1024? - Phony_Txt : t := (0 => nul); + function tgetstr (Id : char_array; + buf : char_array) return chars_ptr; + pragma Import (C, tgetstr, "tgetstr"); + Txt : char_array (0 .. Name'Length); + Length : size_t; + Txt2 : chars_ptr; + type t is new char_array (0 .. 1024); -- does it need to be 1024? + Phony_Txt : t := (0 => nul); begin - To_C (Name, Txt, Length); - Txt2 := tgetstr (Txt, char_array (Phony_Txt)); - if Txt2 = Null_Ptr then + To_C (Name, Txt, Length); + Txt2 := tgetstr (Txt, char_array (Phony_Txt)); + if Txt2 = Null_Ptr then return False; else return True; end if; - end Get_String; + end Get_String; ------------------------------------------------------------------------------ - function TGoto (Cap : String; - Col : Column_Position; - Row : Line_Position) return Termcap_String is - function tgoto (cap : char_array; - col : C_Int; - row : C_Int) return chars_ptr; - pragma Import (C, tgoto); - Txt : char_array (0 .. Cap'Length); - Length : size_t; + function TGoto (Cap : String; + Col : Column_Position; + Row : Line_Position) return Termcap_String is + function tgoto (cap : char_array; + col : C_Int; + row : C_Int) return chars_ptr; + pragma Import (C, tgoto); + Txt : char_array (0 .. Cap'Length); + Length : size_t; begin - To_C (Cap, Txt, Length); - return Termcap_String (Fill_String - (tgoto (Txt, C_Int (Col), C_Int (Row)))); - end TGoto; + To_C (Cap, Txt, Length); + return Termcap_String (Fill_String + (tgoto (Txt, C_Int (Col), C_Int (Row)))); + end TGoto; -end Terminal_Interface.Curses.Termcap; - \ No newline at end of file +end Terminal_Interface.Curses.Termcap; + diff --git a/doc/html/ada/terminal_interface-curses-termcap__ads.htm b/doc/html/ada/terminal_interface-curses-termcap__ads.htm index a601a0f9..4fd3ae62 100644 --- a/doc/html/ada/terminal_interface-curses-termcap__ads.htm +++ b/doc/html/ada/terminal_interface-curses-termcap__ads.htm @@ -37,50 +37,49 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface.Curses.Termcap is - pragma Preelaborate (Terminal_Interface.Curses.Termcap); +package Terminal_Interface.Curses.Termcap is + pragma Preelaborate (Terminal_Interface.Curses.Termcap); -- |===================================================================== -- | Man page curs_termcap.3x -- |===================================================================== -- Not implemented: tputs (see curs_terminfo) - type Termcap_String is new String; + type Termcap_String is new String; -- | - function TGoto (Cap : String; - Col : Column_Position; - Row : Line_Position) return Termcap_String; + function TGoto (Cap : String; + Col : Column_Position; + Row : Line_Position) return Termcap_String; -- AKA: tgoto() -- | - function Get_Entry (Name : String) return Boolean; + function Get_Entry (Name : String) return Boolean; -- AKA: tgetent() -- | - function Get_Flag (Name : String) return Boolean; + function Get_Flag (Name : String) return Boolean; -- AKA: tgetflag() -- | - procedure Get_Number (Name : String; - Value : out Integer; - Result : out Boolean); + procedure Get_Number (Name : String; + Value : out Integer; + Result : out Boolean); -- AKA: tgetnum() -- | - procedure Get_String (Name : String; - Value : out String; - Result : out Boolean); - function Get_String (Name : String) return Boolean; + procedure Get_String (Name : String; + Value : out String; + Result : out Boolean); + function Get_String (Name : String) return Boolean; -- Returns True if the string is found. -- AKA: tgetstr() -end Terminal_Interface.Curses.Termcap; - \ No newline at end of file +end Terminal_Interface.Curses.Termcap; + diff --git a/doc/html/ada/terminal_interface-curses-terminfo__adb.htm b/doc/html/ada/terminal_interface-curses-terminfo__adb.htm index 0e6979a5..fdc68efd 100644 --- a/doc/html/ada/terminal_interface-curses-terminfo__adb.htm +++ b/doc/html/ada/terminal_interface-curses-terminfo__adb.htm @@ -37,131 +37,130 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Ada.Unchecked_Conversion; -package body Terminal_Interface.Curses.Terminfo is +package body Terminal_Interface.Curses.Terminfo is - function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean; + function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean; - function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean is - type Weird_Address is new System.Storage_Elements.Integer_Address; - Invalid_Pointer : constant Weird_Address := -1; - function To_Weird is new Ada.Unchecked_Conversion - (Source => chars_ptr, Target => Weird_Address); + function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean is + type Weird_Address is new System.Storage_Elements.Integer_Address; + Invalid_Pointer : constant Weird_Address := -1; + function To_Weird is new Ada.Unchecked_Conversion + (Source => chars_ptr, Target => Weird_Address); begin - if To_Weird (P) = Invalid_Pointer then + if To_Weird (P) = Invalid_Pointer then return True; else return False; end if; - end Is_MinusOne_Pointer; - pragma Inline (Is_MinusOne_Pointer); + end Is_MinusOne_Pointer; + pragma Inline (Is_MinusOne_Pointer); ------------------------------------------------------------------------------ - function Get_Flag (Name : String) return Boolean + function Get_Flag (Name : String) return Boolean is - function tigetflag (id : char_array) return Curses_Bool; - pragma Import (C, tigetflag); - Txt : char_array (0 .. Name'Length); - Length : size_t; + function tigetflag (id : char_array) return Curses_Bool; + pragma Import (C, tigetflag); + Txt : char_array (0 .. Name'Length); + Length : size_t; begin - To_C (Name, Txt, Length); - if tigetflag (Txt) = Curses_Bool (Curses_True) then + To_C (Name, Txt, Length); + if tigetflag (Txt) = Curses_Bool (Curses_True) then return True; else return False; end if; - end Get_Flag; + end Get_Flag; ------------------------------------------------------------------------------ - procedure Get_String (Name : String; - Value : out Terminfo_String; - Result : out Boolean) + procedure Get_String (Name : String; + Value : out Terminfo_String; + Result : out Boolean) is - function tigetstr (id : char_array) return chars_ptr; - pragma Import (C, tigetstr, "tigetstr"); - Txt : char_array (0 .. Name'Length); - Length : size_t; - Txt2 : chars_ptr; + function tigetstr (id : char_array) return chars_ptr; + pragma Import (C, tigetstr, "tigetstr"); + Txt : char_array (0 .. Name'Length); + Length : size_t; + Txt2 : chars_ptr; begin - To_C (Name, Txt, Length); - Txt2 := tigetstr (Txt); - if Txt2 = Null_Ptr then - Result := False; - elsif Is_MinusOne_Pointer (Txt2) then - raise Curses_Exception; + To_C (Name, Txt, Length); + Txt2 := tigetstr (Txt); + if Txt2 = Null_Ptr then + Result := False; + elsif Is_MinusOne_Pointer (Txt2) then + raise Curses_Exception; else - Value := Terminfo_String (Fill_String (Txt2)); - Result := True; + Value := Terminfo_String (Fill_String (Txt2)); + Result := True; end if; - end Get_String; + end Get_String; ------------------------------------------------------------------------------ - function Has_String (Name : String) return Boolean + function Has_String (Name : String) return Boolean is - function tigetstr (id : char_array) return chars_ptr; - pragma Import (C, tigetstr, "tigetstr"); - Txt : char_array (0 .. Name'Length); - Length : size_t; - Txt2 : chars_ptr; + function tigetstr (id : char_array) return chars_ptr; + pragma Import (C, tigetstr, "tigetstr"); + Txt : char_array (0 .. Name'Length); + Length : size_t; + Txt2 : chars_ptr; begin - To_C (Name, Txt, Length); - Txt2 := tigetstr (Txt); - if Txt2 = Null_Ptr then + To_C (Name, Txt, Length); + Txt2 := tigetstr (Txt); + if Txt2 = Null_Ptr then return False; - elsif Is_MinusOne_Pointer (Txt2) then - raise Curses_Exception; + elsif Is_MinusOne_Pointer (Txt2) then + raise Curses_Exception; else return True; end if; - end Has_String; + end Has_String; ------------------------------------------------------------------------------ - function Get_Number (Name : String) return Integer is - function tigetstr (s : char_array) return C_Int; - pragma Import (C, tigetstr); - Txt : char_array (0 .. Name'Length); - Length : size_t; + function Get_Number (Name : String) return Integer is + function tigetstr (s : char_array) return C_Int; + pragma Import (C, tigetstr); + Txt : char_array (0 .. Name'Length); + Length : size_t; begin - To_C (Name, Txt, Length); - return Integer (tigetstr (Txt)); - end Get_Number; + To_C (Name, Txt, Length); + return Integer (tigetstr (Txt)); + end Get_Number; ------------------------------------------------------------------------------ - procedure Put_String (Str : Terminfo_String; - affcnt : Natural := 1; - putc : putctype := null) is - function tputs (str : char_array; - affcnt : C_Int; - putc : putctype) return C_Int; - function putp (str : char_array) return C_Int; - pragma Import (C, tputs); - pragma Import (C, putp); - Txt : char_array (0 .. Str'Length); - Length : size_t; - Err : C_Int; + procedure Put_String (Str : Terminfo_String; + affcnt : Natural := 1; + putc : putctype := null) is + function tputs (str : char_array; + affcnt : C_Int; + putc : putctype) return C_Int; + function putp (str : char_array) return C_Int; + pragma Import (C, tputs); + pragma Import (C, putp); + Txt : char_array (0 .. Str'Length); + Length : size_t; + Err : C_Int; begin - To_C (String (Str), Txt, Length); - if putc = null then - Err := putp (Txt); + To_C (String (Str), Txt, Length); + if putc = null then + Err := putp (Txt); else - Err := tputs (Txt, C_Int (affcnt), putc); + Err := tputs (Txt, C_Int (affcnt), putc); end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Put_String; + end Put_String; -end Terminal_Interface.Curses.Terminfo; - \ No newline at end of file +end Terminal_Interface.Curses.Terminfo; + diff --git a/doc/html/ada/terminal_interface-curses-terminfo__ads.htm b/doc/html/ada/terminal_interface-curses-terminfo__ads.htm index b75149e6..4cd242a7 100644 --- a/doc/html/ada/terminal_interface-curses-terminfo__ads.htm +++ b/doc/html/ada/terminal_interface-curses-terminfo__ads.htm @@ -37,17 +37,16 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; -package Terminal_Interface.Curses.Terminfo is - pragma Preelaborate (Terminal_Interface.Curses.Terminfo); +package Terminal_Interface.Curses.Terminfo is + pragma Preelaborate (Terminal_Interface.Curses.Terminfo); -- |===================================================================== -- | Man page curs_terminfo.3x @@ -56,32 +55,32 @@ -- restartterm, tparm, putp, vidputs, vidattr, -- mvcur - type Terminfo_String is new String; + type Terminfo_String is new String; -- | - procedure Get_String (Name : String; - Value : out Terminfo_String; - Result : out Boolean); - function Has_String (Name : String) return Boolean; + procedure Get_String (Name : String; + Value : out Terminfo_String; + Result : out Boolean); + function Has_String (Name : String) return Boolean; -- AKA: tigetstr() -- | - function Get_Flag (Name : String) return Boolean; + function Get_Flag (Name : String) return Boolean; -- AKA: tigetflag() -- | - function Get_Number (Name : String) return Integer; + function Get_Number (Name : String) return Integer; -- AKA: tigetnum() - type putctype is access function (c : Interfaces.C.int) + type putctype is access function (c : Interfaces.C.int) return Interfaces.C.int; - pragma Convention (C, putctype); + pragma Convention (C, putctype); -- | - procedure Put_String (Str : Terminfo_String; - affcnt : Natural := 1; - putc : putctype := null); + procedure Put_String (Str : Terminfo_String; + affcnt : Natural := 1; + putc : putctype := null); -- AKA: tputs() -end Terminal_Interface.Curses.Terminfo; - \ No newline at end of file +end Terminal_Interface.Curses.Terminfo; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm index ac4415cd..09cbf10a 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm @@ -37,98 +37,97 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package body Terminal_Interface.Curses.Text_IO.Aux is +package body Terminal_Interface.Curses.Text_IO.Aux is - procedure Put_Buf - (Win : in Window; - Buf : in String; - Width : in Field; - Signal : in Boolean := True; - Ljust : in Boolean := False) + procedure Put_Buf + (Win : in Window; + Buf : in String; + Width : in Field; + Signal : in Boolean := True; + Ljust : in Boolean := False) is - L : Field; - Len : Field; - W : Field := Width; - LC : Line_Count; - CC : Column_Count; - Y : Line_Position; - X : Column_Position; + L : Field; + Len : Field; + W : Field := Width; + LC : Line_Count; + CC : Column_Count; + Y : Line_Position; + X : Column_Position; - procedure Output (From, To : Field); + procedure Output (From, To : Field); - procedure Output (From, To : Field) + procedure Output (From, To : Field) is begin - if Len > 0 then - if W = 0 then - W := Len; + if Len > 0 then + if W = 0 then + W := Len; end if; - if Len > W then + if Len > W then -- LRM A10.6 (7) says this - W := Len; + W := Len; end if; - pragma Assert (Len <= W); - Get_Size (Win, LC, CC); - if Column_Count (Len) > CC then - if Signal then - raise Layout_Error; + pragma Assert (Len <= W); + Get_Size (Win, LC, CC); + if Column_Count (Len) > CC then + if Signal then + raise Layout_Error; else return; end if; else - if Len < W and then not Ljust then + if Len < W and then not Ljust then declare - Filler : constant String (1 .. (W - Len)) + Filler : constant String (1 .. (W - Len)) := (others => ' '); begin - Put (Win, Filler); + Put (Win, Filler); end; end if; - Get_Cursor_Position (Win, Y, X); - if (X + Column_Position (Len)) > CC then - New_Line (Win); + Get_Cursor_Position (Win, Y, X); + if (X + Column_Position (Len)) > CC then + New_Line (Win); end if; - Put (Win, Buf (From .. To)); - if Len < W and then Ljust then + Put (Win, Buf (From .. To)); + if Len < W and then Ljust then declare - Filler : constant String (1 .. (W - Len)) + Filler : constant String (1 .. (W - Len)) := (others => ' '); begin - Put (Win, Filler); + Put (Win, Filler); end; end if; end if; end if; - end Output; + end Output; begin - pragma Assert (Win /= Null_Window); - if Ljust then - L := 1; - for I in 1 .. Buf'Length loop - exit when Buf (L) = ' '; - L := L + 1; + pragma Assert (Win /= Null_Window); + if Ljust then + L := 1; + for I in 1 .. Buf'Length loop + exit when Buf (L) = ' '; + L := L + 1; end loop; - Len := L - 1; - Output (1, Len); + Len := L - 1; + Output (1, Len); else -- input buffer is not left justified - L := Buf'Length; - for I in 1 .. Buf'Length loop - exit when Buf (L) = ' '; - L := L - 1; + L := Buf'Length; + for I in 1 .. Buf'Length loop + exit when Buf (L) = ' '; + L := L - 1; end loop; - Len := Buf'Length - L; - Output (L + 1, Buf'Length); + Len := Buf'Length - L; + Output (L + 1, Buf'Length); end if; - end Put_Buf; + end Put_Buf; -end Terminal_Interface.Curses.Text_IO.Aux; +end Terminal_Interface.Curses.Text_IO.Aux; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm index 31b6806d..c64199ee 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm @@ -37,25 +37,24 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.11 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -private package Terminal_Interface.Curses.Text_IO.Aux is +private package Terminal_Interface.Curses.Text_IO.Aux is -- pragma Preelaborate (Aux); -- This routine is called from the Text_IO output routines for numeric -- and enumeration types. -- - procedure Put_Buf - (Win : in Window; -- The output window - Buf : in String; -- The buffer containing the text - Width : in Field; -- The width of the output field - Signal : in Boolean := True; -- If true, we raise Layout_Error - Ljust : in Boolean := False); -- The Buf is left justified + procedure Put_Buf + (Win : in Window; -- The output window + Buf : in String; -- The buffer containing the text + Width : in Field; -- The width of the output field + Signal : in Boolean := True; -- If true, we raise Layout_Error + Ljust : in Boolean := False); -- The Buf is left justified -end Terminal_Interface.Curses.Text_IO.Aux; +end Terminal_Interface.Curses.Text_IO.Aux; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm index 8aed31a1..d746d072 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm @@ -37,43 +37,42 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -with Terminal_Interface.Curses.Text_IO.Float_IO; +with Terminal_Interface.Curses.Text_IO.Float_IO; -package body Terminal_Interface.Curses.Text_IO.Complex_IO is +package body Terminal_Interface.Curses.Text_IO.Complex_IO is - package FIO is new - Terminal_Interface.Curses.Text_IO.Float_IO (Complex_Types.Real'Base); + package FIO is new + Terminal_Interface.Curses.Text_IO.Float_IO (Complex_Types.Real'Base); - procedure Put - (Win : in Window; - Item : in Complex; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Win : in Window; + Item : in Complex; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is begin - Put (Win, '('); - FIO.Put (Win, Item.Re, Fore, Aft, Exp); - Put (Win, ','); - FIO.Put (Win, Item.Im, Fore, Aft, Exp); - Put (Win, ')'); - end Put; + Put (Win, '('); + FIO.Put (Win, Item.Re, Fore, Aft, Exp); + Put (Win, ','); + FIO.Put (Win, Item.Im, Fore, Aft, Exp); + Put (Win, ')'); + end Put; - procedure Put - (Item : in Complex; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Item : in Complex; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is begin - Put (Get_Window, Item, Fore, Aft, Exp); - end Put; + Put (Get_Window, Item, Fore, Aft, Exp); + end Put; -end Terminal_Interface.Curses.Text_IO.Complex_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Complex_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm index 2d9149e0..fda930e8 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm @@ -37,40 +37,39 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Types; generic - with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); + with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); -package Terminal_Interface.Curses.Text_IO.Complex_IO is +package Terminal_Interface.Curses.Text_IO.Complex_IO is - use Complex_Types; + use Complex_Types; - Default_Fore : Field := 2; - Default_Aft : Field := Real'Digits - 1; - Default_Exp : Field := 3; + Default_Fore : Field := 2; + Default_Aft : Field := Real'Digits - 1; + Default_Exp : Field := 3; - procedure Put - (Win : in Window; - Item : in Complex; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Win : in Window; + Item : in Complex; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); - procedure Put - (Item : in Complex; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Item : in Complex; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Complex_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Complex_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm index 9cfb1ab3..c353ad59 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm @@ -37,45 +37,44 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Decimal_IO is +package body Terminal_Interface.Curses.Text_IO.Decimal_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package DIO is new Ada.Text_IO.Decimal_IO (Num); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package DIO is new Ada.Text_IO.Decimal_IO (Num); - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is - Buf : String (1 .. Field'Last); - Len : Field := Fore + 1 + Aft; + Buf : String (1 .. Field'Last); + Len : Field := Fore + 1 + Aft; begin - if Exp > 0 then - Len := Len + 1 + Exp; + if Exp > 0 then + Len := Len + 1 + Exp; end if; - DIO.Put (Buf, Item, Aft, Exp); - Aux.Put_Buf (Win, Buf, Len, False); - end Put; + DIO.Put (Buf, Item, Aft, Exp); + Aux.Put_Buf (Win, Buf, Len, False); + end Put; - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) is + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is begin - Put (Get_Window, Item, Fore, Aft, Exp); - end Put; + Put (Get_Window, Item, Fore, Aft, Exp); + end Put; -end Terminal_Interface.Curses.Text_IO.Decimal_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Decimal_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm index 53122850..3675631b 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm @@ -37,36 +37,35 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Num is delta <> digits <>; + type Num is delta <> digits <>; -package Terminal_Interface.Curses.Text_IO.Decimal_IO is +package Terminal_Interface.Curses.Text_IO.Decimal_IO is - Default_Fore : Field := Num'Fore; - Default_Aft : Field := Num'Aft; - Default_Exp : Field := 0; + Default_Fore : Field := Num'Fore; + Default_Aft : Field := Num'Aft; + Default_Exp : Field := 0; - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Decimal_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Decimal_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm index 12fc5555..3dea5ff9 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm @@ -37,50 +37,49 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; with Ada.Characters.Handling; use Ada.Characters.Handling; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Enumeration_IO is +package body Terminal_Interface.Curses.Text_IO.Enumeration_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package EIO is new Ada.Text_IO.Enumeration_IO (Enum); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package EIO is new Ada.Text_IO.Enumeration_IO (Enum); - procedure Put - (Win : in Window; - Item : in Enum; - Width : in Field := Default_Width; - Set : in Type_Set := Default_Setting) + procedure Put + (Win : in Window; + Item : in Enum; + Width : in Field := Default_Width; + Set : in Type_Set := Default_Setting) is - Buf : String (1 .. Field'Last); - Tset : Ada.Text_IO.Type_Set; + Buf : String (1 .. Field'Last); + Tset : Ada.Text_IO.Type_Set; begin - if Set /= Mixed_Case then - Tset := Ada.Text_IO.Type_Set'Val (Type_Set'Pos (Set)); + if Set /= Mixed_Case then + Tset := Ada.Text_IO.Type_Set'Val (Type_Set'Pos (Set)); else - Tset := Ada.Text_IO.Lower_Case; + Tset := Ada.Text_IO.Lower_Case; end if; - EIO.Put (Buf, Item, Tset); - if Set = Mixed_Case then - Buf (Buf'First) := To_Upper (Buf (Buf'First)); + EIO.Put (Buf, Item, Tset); + if Set = Mixed_Case then + Buf (Buf'First) := To_Upper (Buf (Buf'First)); end if; - Aux.Put_Buf (Win, Buf, Width, True, True); - end Put; + Aux.Put_Buf (Win, Buf, Width, True, True); + end Put; - procedure Put - (Item : in Enum; - Width : in Field := Default_Width; - Set : in Type_Set := Default_Setting) + procedure Put + (Item : in Enum; + Width : in Field := Default_Width; + Set : in Type_Set := Default_Setting) is begin - Put (Get_Window, Item, Width, Set); - end Put; + Put (Get_Window, Item, Width, Set); + end Put; -end Terminal_Interface.Curses.Text_IO.Enumeration_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Enumeration_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm index 5b0bdaa0..52f78f7d 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm @@ -37,33 +37,32 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Enum is (<>); + type Enum is (<>); -package Terminal_Interface.Curses.Text_IO.Enumeration_IO is +package Terminal_Interface.Curses.Text_IO.Enumeration_IO is - Default_Width : Field := 0; - Default_Setting : Type_Set := Mixed_Case; + Default_Width : Field := 0; + Default_Setting : Type_Set := Mixed_Case; - procedure Put - (Win : in Window; - Item : in Enum; - Width : in Field := Default_Width; - Set : in Type_Set := Default_Setting); + procedure Put + (Win : in Window; + Item : in Enum; + Width : in Field := Default_Width; + Set : in Type_Set := Default_Setting); - procedure Put - (Item : in Enum; - Width : in Field := Default_Width; - Set : in Type_Set := Default_Setting); + procedure Put + (Item : in Enum; + Width : in Field := Default_Width; + Set : in Type_Set := Default_Setting); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Enumeration_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Enumeration_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm index 75efa920..d6023c16 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm @@ -37,45 +37,44 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Fixed_IO is +package body Terminal_Interface.Curses.Text_IO.Fixed_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package FIXIO is new Ada.Text_IO.Fixed_IO (Num); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package FIXIO is new Ada.Text_IO.Fixed_IO (Num); - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is - Buf : String (1 .. Field'Last); - Len : Field := Fore + 1 + Aft; + Buf : String (1 .. Field'Last); + Len : Field := Fore + 1 + Aft; begin - if Exp > 0 then - Len := Len + 1 + Exp; + if Exp > 0 then + Len := Len + 1 + Exp; end if; - FIXIO.Put (Buf, Item, Aft, Exp); - Aux.Put_Buf (Win, Buf, Len, False); - end Put; + FIXIO.Put (Buf, Item, Aft, Exp); + Aux.Put_Buf (Win, Buf, Len, False); + end Put; - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) is + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is begin - Put (Get_Window, Item, Fore, Aft, Exp); - end Put; + Put (Get_Window, Item, Fore, Aft, Exp); + end Put; -end Terminal_Interface.Curses.Text_IO.Fixed_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Fixed_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm index fd159a18..812d80e7 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm @@ -37,36 +37,35 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Num is delta <>; + type Num is delta <>; -package Terminal_Interface.Curses.Text_IO.Fixed_IO is +package Terminal_Interface.Curses.Text_IO.Fixed_IO is - Default_Fore : Field := Num'Fore; - Default_Aft : Field := Num'Aft; - Default_Exp : Field := 0; + Default_Fore : Field := Num'Fore; + Default_Aft : Field := Num'Aft; + Default_Exp : Field := 0; - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Fixed_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Fixed_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm index 8e0b28b3..75769aba 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm @@ -37,46 +37,45 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Float_IO is +package body Terminal_Interface.Curses.Text_IO.Float_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package FIO is new Ada.Text_IO.Float_IO (Num); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package FIO is new Ada.Text_IO.Float_IO (Num); - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is - Buf : String (1 .. Field'Last); - Len : Field := Fore + 1 + Aft; + Buf : String (1 .. Field'Last); + Len : Field := Fore + 1 + Aft; begin - if Exp > 0 then - Len := Len + 1 + Exp; + if Exp > 0 then + Len := Len + 1 + Exp; end if; - FIO.Put (Buf, Item, Aft, Exp); - Aux.Put_Buf (Win, Buf, Len, False); - end Put; + FIO.Put (Buf, Item, Aft, Exp); + Aux.Put_Buf (Win, Buf, Len, False); + end Put; - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp) + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp) is begin - Put (Get_Window, Item, Fore, Aft, Exp); - end Put; + Put (Get_Window, Item, Fore, Aft, Exp); + end Put; -end Terminal_Interface.Curses.Text_IO.Float_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Float_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm index 39d1358d..bb8abaf4 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm @@ -37,36 +37,35 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Num is digits <>; + type Num is digits <>; -package Terminal_Interface.Curses.Text_IO.Float_IO is +package Terminal_Interface.Curses.Text_IO.Float_IO is - Default_Fore : Field := 2; - Default_Aft : Field := Num'Digits - 1; - Default_Exp : Field := 3; + Default_Fore : Field := 2; + Default_Aft : Field := Num'Digits - 1; + Default_Exp : Field := 3; - procedure Put - (Win : in Window; - Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Win : in Window; + Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); - procedure Put - (Item : in Num; - Fore : in Field := Default_Fore; - Aft : in Field := Default_Aft; - Exp : in Field := Default_Exp); + procedure Put + (Item : in Num; + Fore : in Field := Default_Fore; + Aft : in Field := Default_Aft; + Exp : in Field := Default_Exp); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Float_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Float_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm index 1ef1b4ba..69c32157 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm @@ -37,40 +37,39 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Integer_IO is +package body Terminal_Interface.Curses.Text_IO.Integer_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package IIO is new Ada.Text_IO.Integer_IO (Num); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package IIO is new Ada.Text_IO.Integer_IO (Num); - procedure Put - (Win : in Window; - Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base) + procedure Put + (Win : in Window; + Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base) is - Buf : String (1 .. Field'Last); + Buf : String (1 .. Field'Last); begin - IIO.Put (Buf, Item, Base); - Aux.Put_Buf (Win, Buf, Width); - end Put; + IIO.Put (Buf, Item, Base); + Aux.Put_Buf (Win, Buf, Width); + end Put; - procedure Put - (Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base) + procedure Put + (Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base) is begin - Put (Get_Window, Item, Width, Base); - end Put; + Put (Get_Window, Item, Width, Base); + end Put; -end Terminal_Interface.Curses.Text_IO.Integer_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Integer_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm index fa07b637..a06d5316 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm @@ -37,33 +37,32 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Num is range <>; + type Num is range <>; -package Terminal_Interface.Curses.Text_IO.Integer_IO is +package Terminal_Interface.Curses.Text_IO.Integer_IO is - Default_Width : Field := Num'Width; - Default_Base : Number_Base := 10; + Default_Width : Field := Num'Width; + Default_Base : Number_Base := 10; - procedure Put - (Win : in Window; - Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base); + procedure Put + (Win : in Window; + Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base); - procedure Put - (Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base); + procedure Put + (Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Integer_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Integer_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm index e7a9085f..a960b2d0 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm @@ -37,40 +37,39 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; -with Terminal_Interface.Curses.Text_IO.Aux; +with Terminal_Interface.Curses.Text_IO.Aux; -package body Terminal_Interface.Curses.Text_IO.Modular_IO is +package body Terminal_Interface.Curses.Text_IO.Modular_IO is - package Aux renames Terminal_Interface.Curses.Text_IO.Aux; - package MIO is new Ada.Text_IO.Modular_IO (Num); + package Aux renames Terminal_Interface.Curses.Text_IO.Aux; + package MIO is new Ada.Text_IO.Modular_IO (Num); - procedure Put - (Win : in Window; - Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base) + procedure Put + (Win : in Window; + Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base) is - Buf : String (1 .. Field'Last); + Buf : String (1 .. Field'Last); begin - MIO.Put (Buf, Item, Base); - Aux.Put_Buf (Win, Buf, Width); - end Put; + MIO.Put (Buf, Item, Base); + Aux.Put_Buf (Win, Buf, Width); + end Put; - procedure Put - (Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base) + procedure Put + (Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base) is begin - Put (Get_Window, Item, Width, Base); - end Put; + Put (Get_Window, Item, Width, Base); + end Put; -end Terminal_Interface.Curses.Text_IO.Modular_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Modular_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm index f63b9bd5..e5d6ef8a 100644 --- a/doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm @@ -37,33 +37,32 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.11 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic - type Num is mod <>; + type Num is mod <>; -package Terminal_Interface.Curses.Text_IO.Modular_IO is +package Terminal_Interface.Curses.Text_IO.Modular_IO is - Default_Width : Field := Num'Width; - Default_Base : Number_Base := 10; + Default_Width : Field := Num'Width; + Default_Base : Number_Base := 10; - procedure Put - (Win : in Window; - Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base); + procedure Put + (Win : in Window; + Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base); - procedure Put - (Item : in Num; - Width : in Field := Default_Width; - Base : in Number_Base := Default_Base); + procedure Put + (Item : in Num; + Width : in Field := Default_Width; + Base : in Number_Base := Default_Base); private pragma Inline (Put); -end Terminal_Interface.Curses.Text_IO.Modular_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO.Modular_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io__adb.htm b/doc/html/ada/terminal_interface-curses-text_io__adb.htm index 0166ab46..edf46182 100644 --- a/doc/html/ada/terminal_interface-curses-text_io__adb.htm +++ b/doc/html/ada/terminal_interface-curses-text_io__adb.htm @@ -37,44 +37,43 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.13 @ +-- @Revision: 1.14 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package body Terminal_Interface.Curses.Text_IO is +package body Terminal_Interface.Curses.Text_IO is - Default_Window : Window := Null_Window; + Default_Window : Window := Null_Window; - procedure Set_Window (Win : in Window) + procedure Set_Window (Win : in Window) is begin - Default_Window := Win; - end Set_Window; + Default_Window := Win; + end Set_Window; - function Get_Window return Window + function Get_Window return Window is begin - if Default_Window = Null_Window then - return Standard_Window; + if Default_Window = Null_Window then + return Standard_Window; else - return Default_Window; + return Default_Window; end if; - end Get_Window; - pragma Inline (Get_Window); + end Get_Window; + pragma Inline (Get_Window); - procedure Flush (Win : in Window) + procedure Flush (Win : in Window) is begin - Refresh (Win); - end Flush; + Refresh (Win); + end Flush; - procedure Flush + procedure Flush is begin - Flush (Get_Window); - end Flush; + Flush (Get_Window); + end Flush; -------------------------------------------- -- Specification of line and page lengths -- @@ -85,258 +84,258 @@ -- A scroll-window is interpreted as an page with unbounded page length, -- i.e. it returns the conventional 0 as page length. - function Line_Length (Win : in Window) return Count + function Line_Length (Win : in Window) return Count is - N_Lines : Line_Count; - N_Cols : Column_Count; + N_Lines : Line_Count; + N_Cols : Column_Count; begin - Get_Size (Win, N_Lines, N_Cols); - if Natural (N_Cols) > Natural (Count'Last) then - raise Layout_Error; + Get_Size (Win, N_Lines, N_Cols); + if Natural (N_Cols) > Natural (Count'Last) then + raise Layout_Error; end if; - return Count (N_Cols); - end Line_Length; + return Count (N_Cols); + end Line_Length; - function Line_Length return Count + function Line_Length return Count is begin - return Line_Length (Get_Window); - end Line_Length; + return Line_Length (Get_Window); + end Line_Length; - function Page_Length (Win : in Window) return Count + function Page_Length (Win : in Window) return Count is - N_Lines : Line_Count; - N_Cols : Column_Count; + N_Lines : Line_Count; + N_Cols : Column_Count; begin - if Scrolling_Allowed (Win) then + if Scrolling_Allowed (Win) then return 0; else - Get_Size (Win, N_Lines, N_Cols); - if Natural (N_Lines) > Natural (Count'Last) then - raise Layout_Error; + Get_Size (Win, N_Lines, N_Cols); + if Natural (N_Lines) > Natural (Count'Last) then + raise Layout_Error; end if; - return Count (N_Lines); + return Count (N_Lines); end if; - end Page_Length; + end Page_Length; - function Page_Length return Count + function Page_Length return Count is begin - return Page_Length (Get_Window); - end Page_Length; + return Page_Length (Get_Window); + end Page_Length; ------------------------------------ -- Column, Line, and Page Control -- ------------------------------------ - procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1) + procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1) is - P_Size : constant Count := Page_Length (Win); + P_Size : constant Count := Page_Length (Win); begin - if Spacing not in Positive_Count then + if Spacing not in Positive_Count then raise Constraint_Error; end if; - for I in 1 .. Spacing loop - if P_Size > 0 and then Line (Win) >= P_Size then - New_Page (Win); + for I in 1 .. Spacing loop + if P_Size > 0 and then Line (Win) >= P_Size then + New_Page (Win); else - Add (Win, ASCII.LF); + Add (Win, ASCII.LF); end if; end loop; - end New_Line; + end New_Line; - procedure New_Line (Spacing : in Positive_Count := 1) + procedure New_Line (Spacing : in Positive_Count := 1) is begin - New_Line (Get_Window, Spacing); - end New_Line; + New_Line (Get_Window, Spacing); + end New_Line; - procedure New_Page (Win : in Window) + procedure New_Page (Win : in Window) is begin - Clear (Win); - end New_Page; + Clear (Win); + end New_Page; - procedure New_Page + procedure New_Page is begin - New_Page (Get_Window); - end New_Page; + New_Page (Get_Window); + end New_Page; - procedure Set_Col (Win : in Window; To : in Positive_Count) + procedure Set_Col (Win : in Window; To : in Positive_Count) is - Y : Line_Position; - X1 : Column_Position; - X2 : Column_Position; - N : Natural; + Y : Line_Position; + X1 : Column_Position; + X2 : Column_Position; + N : Natural; begin - if To not in Positive_Count then + if To not in Positive_Count then raise Constraint_Error; end if; - Get_Cursor_Position (Win, Y, X1); - N := Natural (To); N := N - 1; - X2 := Column_Position (N); - if X1 > X2 then - New_Line (Win, 1); - X1 := 0; + Get_Cursor_Position (Win, Y, X1); + N := Natural (To); N := N - 1; + X2 := Column_Position (N); + if X1 > X2 then + New_Line (Win, 1); + X1 := 0; end if; - if X1 < X2 then + if X1 < X2 then declare - Filler : constant String (Integer (X1) .. (Integer (X2) - 1)) + Filler : constant String (Integer (X1) .. (Integer (X2) - 1)) := (others => ' '); begin - Put (Win, Filler); + Put (Win, Filler); end; end if; - end Set_Col; + end Set_Col; - procedure Set_Col (To : in Positive_Count) + procedure Set_Col (To : in Positive_Count) is begin - Set_Col (Get_Window, To); - end Set_Col; + Set_Col (Get_Window, To); + end Set_Col; - procedure Set_Line (Win : in Window; To : in Positive_Count) + procedure Set_Line (Win : in Window; To : in Positive_Count) is - Y1 : Line_Position; - Y2 : Line_Position; - X : Column_Position; - N : Natural; + Y1 : Line_Position; + Y2 : Line_Position; + X : Column_Position; + N : Natural; begin - if To not in Positive_Count then + if To not in Positive_Count then raise Constraint_Error; end if; - Get_Cursor_Position (Win, Y1, X); - N := Natural (To); N := N - 1; - Y2 := Line_Position (N); - if Y2 < Y1 then - New_Page (Win); - Y1 := 0; + Get_Cursor_Position (Win, Y1, X); + N := Natural (To); N := N - 1; + Y2 := Line_Position (N); + if Y2 < Y1 then + New_Page (Win); + Y1 := 0; end if; - if Y1 < Y2 then - New_Line (Win, Positive_Count (Y2 - Y1)); + if Y1 < Y2 then + New_Line (Win, Positive_Count (Y2 - Y1)); end if; - end Set_Line; + end Set_Line; - procedure Set_Line (To : in Positive_Count) + procedure Set_Line (To : in Positive_Count) is begin - Set_Line (Get_Window, To); - end Set_Line; + Set_Line (Get_Window, To); + end Set_Line; - function Col (Win : in Window) return Positive_Count + function Col (Win : in Window) return Positive_Count is - Y : Line_Position; - X : Column_Position; - N : Natural; + Y : Line_Position; + X : Column_Position; + N : Natural; begin - Get_Cursor_Position (Win, Y, X); - N := Natural (X); N := N + 1; - if N > Natural (Count'Last) then - raise Layout_Error; + Get_Cursor_Position (Win, Y, X); + N := Natural (X); N := N + 1; + if N > Natural (Count'Last) then + raise Layout_Error; end if; - return Positive_Count (N); - end Col; + return Positive_Count (N); + end Col; - function Col return Positive_Count + function Col return Positive_Count is begin - return Col (Get_Window); - end Col; + return Col (Get_Window); + end Col; - function Line (Win : in Window) return Positive_Count + function Line (Win : in Window) return Positive_Count is - Y : Line_Position; - X : Column_Position; - N : Natural; + Y : Line_Position; + X : Column_Position; + N : Natural; begin - Get_Cursor_Position (Win, Y, X); - N := Natural (Y); N := N + 1; - if N > Natural (Count'Last) then - raise Layout_Error; + Get_Cursor_Position (Win, Y, X); + N := Natural (Y); N := N + 1; + if N > Natural (Count'Last) then + raise Layout_Error; end if; - return Positive_Count (N); - end Line; + return Positive_Count (N); + end Line; - function Line return Positive_Count + function Line return Positive_Count is begin - return Line (Get_Window); - end Line; + return Line (Get_Window); + end Line; ----------------------- -- Characters Output -- ----------------------- - procedure Put (Win : in Window; Item : in Character) + procedure Put (Win : in Window; Item : in Character) is - P_Size : constant Count := Page_Length (Win); - Y : Line_Position; - X : Column_Position; - L : Line_Count; - C : Column_Count; + P_Size : constant Count := Page_Length (Win); + Y : Line_Position; + X : Column_Position; + L : Line_Count; + C : Column_Count; begin - if P_Size > 0 then - Get_Cursor_Position (Win, Y, X); - Get_Size (Win, L, C); - if (Y + 1) = L and then (X + 1) = C then - New_Page (Win); + if P_Size > 0 then + Get_Cursor_Position (Win, Y, X); + Get_Size (Win, L, C); + if (Y + 1) = L and then (X + 1) = C then + New_Page (Win); end if; end if; - Add (Win, Item); - end Put; + Add (Win, Item); + end Put; - procedure Put (Item : in Character) + procedure Put (Item : in Character) is begin - Put (Get_Window, Item); - end Put; + Put (Get_Window, Item); + end Put; -------------------- -- Strings-Output -- -------------------- - procedure Put (Win : in Window; Item : in String) + procedure Put (Win : in Window; Item : in String) is - P_Size : constant Count := Page_Length (Win); - Y : Line_Position; - X : Column_Position; - L : Line_Count; - C : Column_Count; + P_Size : constant Count := Page_Length (Win); + Y : Line_Position; + X : Column_Position; + L : Line_Count; + C : Column_Count; begin - if P_Size > 0 then - Get_Cursor_Position (Win, Y, X); - Get_Size (Win, L, C); - if (Y + 1) = L and then (X + 1 + Item'Length) >= C then - New_Page (Win); + if P_Size > 0 then + Get_Cursor_Position (Win, Y, X); + Get_Size (Win, L, C); + if (Y + 1) = L and then (X + 1 + Item'Length) >= C then + New_Page (Win); end if; end if; - Add (Win, Item); - end Put; + Add (Win, Item); + end Put; - procedure Put (Item : in String) + procedure Put (Item : in String) is begin - Put (Get_Window, Item); - end Put; + Put (Get_Window, Item); + end Put; - procedure Put_Line - (Win : in Window; - Item : in String) + procedure Put_Line + (Win : in Window; + Item : in String) is begin - Put (Win, Item); - New_Line (Win, 1); - end Put_Line; + Put (Win, Item); + New_Line (Win, 1); + end Put_Line; - procedure Put_Line - (Item : in String) + procedure Put_Line + (Item : in String) is begin - Put_Line (Get_Window, Item); - end Put_Line; + Put_Line (Get_Window, Item); + end Put_Line; -end Terminal_Interface.Curses.Text_IO; - \ No newline at end of file +end Terminal_Interface.Curses.Text_IO; + diff --git a/doc/html/ada/terminal_interface-curses-text_io__ads.htm b/doc/html/ada/terminal_interface-curses-text_io__ads.htm index 07797d8f..c18a3804 100644 --- a/doc/html/ada/terminal_interface-curses-text_io__ads.htm +++ b/doc/html/ada/terminal_interface-curses-text_io__ads.htm @@ -37,38 +37,37 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.12 @ +-- @Revision: 1.13 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; with Ada.IO_Exceptions; -package Terminal_Interface.Curses.Text_IO is +package Terminal_Interface.Curses.Text_IO is use type Ada.Text_IO.Count; - subtype Count is Ada.Text_IO.Count; - subtype Positive_Count is Count range 1 .. Count'Last; + subtype Count is Ada.Text_IO.Count; + subtype Positive_Count is Count range 1 .. Count'Last; - subtype Field is Ada.Text_IO.Field; - subtype Number_Base is Integer range 2 .. 16; + subtype Field is Ada.Text_IO.Field; + subtype Number_Base is Integer range 2 .. 16; - type Type_Set is (Lower_Case, Upper_Case, Mixed_Case); + type Type_Set is (Lower_Case, Upper_Case, Mixed_Case); -- For most of the routines you will see a version without a Window -- type parameter. They will operate on a default window, which can -- be set by the user. It is initially equal to Standard_Window. - procedure Set_Window (Win : in Window); + procedure Set_Window (Win : in Window); -- Set Win as the default window - function Get_Window return Window; + function Get_Window return Window; -- Get the current default window - procedure Flush (Win : in Window); - procedure Flush; + procedure Flush (Win : in Window); + procedure Flush; -------------------------------------------- -- Specification of line and page lengths -- @@ -79,64 +78,64 @@ -- A scroll-window is interpreted as an page with unbounded page length, -- i.e. it returns the conventional 0 as page length. - function Line_Length (Win : in Window) return Count; - function Line_Length return Count; + function Line_Length (Win : in Window) return Count; + function Line_Length return Count; - function Page_Length (Win : in Window) return Count; - function Page_Length return Count; + function Page_Length (Win : in Window) return Count; + function Page_Length return Count; ------------------------------------ -- Column, Line, and Page Control -- ------------------------------------ - procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1); - procedure New_Line (Spacing : in Positive_Count := 1); + procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1); + procedure New_Line (Spacing : in Positive_Count := 1); - procedure New_Page (Win : in Window); - procedure New_Page; + procedure New_Page (Win : in Window); + procedure New_Page; - procedure Set_Col (Win : in Window; To : in Positive_Count); - procedure Set_Col (To : in Positive_Count); + procedure Set_Col (Win : in Window; To : in Positive_Count); + procedure Set_Col (To : in Positive_Count); - procedure Set_Line (Win : in Window; To : in Positive_Count); - procedure Set_Line (To : in Positive_Count); + procedure Set_Line (Win : in Window; To : in Positive_Count); + procedure Set_Line (To : in Positive_Count); - function Col (Win : in Window) return Positive_Count; - function Col return Positive_Count; + function Col (Win : in Window) return Positive_Count; + function Col return Positive_Count; - function Line (Win : in Window) return Positive_Count; - function Line return Positive_Count; + function Line (Win : in Window) return Positive_Count; + function Line return Positive_Count; ----------------------- -- Characters-Output -- ----------------------- - procedure Put (Win : in Window; Item : in Character); - procedure Put (Item : in Character); + procedure Put (Win : in Window; Item : in Character); + procedure Put (Item : in Character); -------------------- -- Strings-Output -- -------------------- - procedure Put (Win : in Window; Item : in String); - procedure Put (Item : in String); + procedure Put (Win : in Window; Item : in String); + procedure Put (Item : in String); - procedure Put_Line - (Win : in Window; - Item : in String); + procedure Put_Line + (Win : in Window; + Item : in String); - procedure Put_Line - (Item : in String); + procedure Put_Line + (Item : in String); -- Exceptions - Status_Error : exception renames Ada.IO_Exceptions.Status_Error; - Mode_Error : exception renames Ada.IO_Exceptions.Mode_Error; - Name_Error : exception renames Ada.IO_Exceptions.Name_Error; - Use_Error : exception renames Ada.IO_Exceptions.Use_Error; - Device_Error : exception renames Ada.IO_Exceptions.Device_Error; - End_Error : exception renames Ada.IO_Exceptions.End_Error; - Data_Error : exception renames Ada.IO_Exceptions.Data_Error; - Layout_Error : exception renames Ada.IO_Exceptions.Layout_Error; - -end Terminal_Interface.Curses.Text_IO; - \ No newline at end of file + Status_Error : exception renames Ada.IO_Exceptions.Status_Error; + Mode_Error : exception renames Ada.IO_Exceptions.Mode_Error; + Name_Error : exception renames Ada.IO_Exceptions.Name_Error; + Use_Error : exception renames Ada.IO_Exceptions.Use_Error; + Device_Error : exception renames Ada.IO_Exceptions.Device_Error; + End_Error : exception renames Ada.IO_Exceptions.End_Error; + Data_Error : exception renames Ada.IO_Exceptions.Data_Error; + Layout_Error : exception renames Ada.IO_Exceptions.Layout_Error; + +end Terminal_Interface.Curses.Text_IO; + diff --git a/doc/html/ada/terminal_interface-curses-trace__adb.htm b/doc/html/ada/terminal_interface-curses-trace__adb.htm index 6ff73fe8..cbba24a0 100644 --- a/doc/html/ada/terminal_interface-curses-trace__adb.htm +++ b/doc/html/ada/terminal_interface-curses-trace__adb.htm @@ -37,24 +37,23 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.3 @ +-- @Revision: 1.4 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package body Terminal_Interface.Curses.Trace is +package body Terminal_Interface.Curses.Trace is - procedure Trace_On (x : Trace_Attribute_Set) is + procedure Trace_On (x : Trace_Attribute_Set) is begin null; - end Trace_On; + end Trace_On; - procedure Trace_Put (str : String) is + procedure Trace_Put (str : String) is begin null; - end Trace_Put; + end Trace_Put; -end Terminal_Interface.Curses.Trace; - \ No newline at end of file +end Terminal_Interface.Curses.Trace; + diff --git a/doc/html/ada/terminal_interface-curses__adb.htm b/doc/html/ada/terminal_interface-curses__adb.htm index 6d548853..c3080358 100644 --- a/doc/html/ada/terminal_interface-curses__adb.htm +++ b/doc/html/ada/terminal_interface-curses__adb.htm @@ -37,15 +37,14 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.28 @ +-- @Revision: 1.29 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; -with Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C.Pointers; @@ -53,2514 +52,2514 @@ with Ada.Strings.Fixed; with Ada.Unchecked_Conversion; -package body Terminal_Interface.Curses is +package body Terminal_Interface.Curses is - use Aux; + use Aux; use type System.Bit_Order; - package ASF renames Ada.Strings.Fixed; + package ASF renames Ada.Strings.Fixed; - type chtype_array is array (size_t range <>) - of aliased Attributed_Character; - pragma Convention (C, chtype_array); + type chtype_array is array (size_t range <>) + of aliased Attributed_Character; + pragma Convention (C, chtype_array); ------------------------------------------------------------------------------ generic - type Element is (<>); - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element; + type Element is (<>); + function W_Get_Element (Win : in Window; + Offset : in Natural) return Element; - function W_Get_Element (Win : in Window; - Offset : in Natural) return Element is - type E_Array is array (Natural range <>) of aliased Element; - package C_E_Array is new - Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); - use C_E_Array; + function W_Get_Element (Win : in Window; + Offset : in Natural) return Element is + type E_Array is array (Natural range <>) of aliased Element; + package C_E_Array is new + Interfaces.C.Pointers (Natural, Element, E_Array, Element'Val (0)); + use C_E_Array; - function To_Pointer is new - Ada.Unchecked_Conversion (Window, Pointer); + function To_Pointer is new + Ada.Unchecked_Conversion (Window, Pointer); - P : Pointer := To_Pointer (Win); + P : Pointer := To_Pointer (Win); begin - if Win = Null_Window then - raise Curses_Exception; + if Win = Null_Window then + raise Curses_Exception; else - P := P + ptrdiff_t (Offset); - return P.all; + P := P + ptrdiff_t (Offset); + return P.all; end if; end W_Get_Element; - function W_Get_Int is new W_Get_Element (C_Int); - function W_Get_Short is new W_Get_Element (C_Short); - function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); + function W_Get_Int is new W_Get_Element (C_Int); + function W_Get_Short is new W_Get_Element (C_Short); + function W_Get_Byte is new W_Get_Element (Interfaces.C.unsigned_char); - function Get_Flag (Win : Window; - Offset : Natural) return Boolean; + function Get_Flag (Win : Window; + Offset : Natural) return Boolean; - function Get_Flag (Win : Window; - Offset : Natural) return Boolean + function Get_Flag (Win : Window; + Offset : Natural) return Boolean is - Res : C_Int; + Res : C_Int; begin - case Sizeof_bool is - when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); - when 2 => Res := C_Int (W_Get_Short (Win, Offset)); - when 4 => Res := C_Int (W_Get_Int (Win, Offset)); - when others => raise Curses_Exception; + case Sizeof_bool is + when 1 => Res := C_Int (W_Get_Byte (Win, Offset)); + when 2 => Res := C_Int (W_Get_Short (Win, Offset)); + when 4 => Res := C_Int (W_Get_Int (Win, Offset)); + when others => raise Curses_Exception; end case; - case Res is + case Res is when 0 => return False; when others => return True; end case; - end Get_Flag; + end Get_Flag; ------------------------------------------------------------------------------ - function Key_Name (Key : in Real_Key_Code) return String + function Key_Name (Key : in Real_Key_Code) return String is - function Keyname (K : C_Int) return chars_ptr; - pragma Import (C, Keyname, "keyname"); + function Keyname (K : C_Int) return chars_ptr; + pragma Import (C, Keyname, "keyname"); - Ch : Character; + Ch : Character; begin - if Key <= Character'Pos (Character'Last) then - Ch := Character'Val (Key); - if Is_Control (Ch) then - return Un_Control (Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - elsif Is_Graphic (Ch) then + if Key <= Character'Pos (Character'Last) then + Ch := Character'Val (Key); + if Is_Control (Ch) then + return Un_Control (Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + elsif Is_Graphic (Ch) then declare - S : String (1 .. 1); + S : String (1 .. 1); begin - S (1) := Ch; - return S; + S (1) := Ch; + return S; end; else return ""; end if; else - return Fill_String (Keyname (C_Int (Key))); + return Fill_String (Keyname (C_Int (Key))); end if; - end Key_Name; + end Key_Name; - procedure Key_Name (Key : in Real_Key_Code; - Name : out String) + procedure Key_Name (Key : in Real_Key_Code; + Name : out String) is begin - ASF.Move (Key_Name (Key), Name); - end Key_Name; + ASF.Move (Key_Name (Key), Name); + end Key_Name; ------------------------------------------------------------------------------ - procedure Init_Screen + procedure Init_Screen is - function Initscr return Window; - pragma Import (C, Initscr, "initscr"); + function Initscr return Window; + pragma Import (C, Initscr, "initscr"); - W : Window; + W : Window; begin - W := Initscr; - if W = Null_Window then - raise Curses_Exception; + W := Initscr; + if W = Null_Window then + raise Curses_Exception; end if; - end Init_Screen; + end Init_Screen; - procedure End_Windows + procedure End_Windows is - function Endwin return C_Int; - pragma Import (C, Endwin, "endwin"); + function Endwin return C_Int; + pragma Import (C, Endwin, "endwin"); begin - if Endwin = Curses_Err then - raise Curses_Exception; + if Endwin = Curses_Err then + raise Curses_Exception; end if; - end End_Windows; + end End_Windows; - function Is_End_Window return Boolean + function Is_End_Window return Boolean is - function Isendwin return Curses_Bool; - pragma Import (C, Isendwin, "isendwin"); + function Isendwin return Curses_Bool; + pragma Import (C, Isendwin, "isendwin"); begin - if Isendwin = Curses_Bool_False then + if Isendwin = Curses_Bool_False then return False; else return True; end if; - end Is_End_Window; + end Is_End_Window; ------------------------------------------------------------------------------ - procedure Move_Cursor (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Move_Cursor (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) is - function Wmove (Win : Window; - Line : C_Int; - Column : C_Int - ) return C_Int; - pragma Import (C, Wmove, "wmove"); + function Wmove (Win : Window; + Line : C_Int; + Column : C_Int + ) return C_Int; + pragma Import (C, Wmove, "wmove"); begin - if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; + if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; end if; - end Move_Cursor; + end Move_Cursor; ------------------------------------------------------------------------------ - procedure Add (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Add (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Waddch (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Waddch, "waddch"); + function Waddch (W : Window; + Ch : C_Chtype) return C_Int; + pragma Import (C, Waddch, "waddch"); begin - if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Add; + end Add; - procedure Add (Win : in Window := Standard_Window; - Ch : in Character) + procedure Add (Win : in Window := Standard_Window; + Ch : in Character) is begin - Add (Win, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add; + Add (Win, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) is - function mvwaddch (W : Window; - Y : C_Int; - X : C_Int; - Ch : C_Chtype) return C_Int; - pragma Import (C, mvwaddch, "mvwaddch"); + function mvwaddch (W : Window; + Y : C_Int; + X : C_Int; + Ch : C_Chtype) return C_Int; + pragma Import (C, mvwaddch, "mvwaddch"); begin - if mvwaddch (Win, C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if mvwaddch (Win, C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Character) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Character) is begin - Add (Win, - Line, - Column, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add; + Add (Win, + Line, + Column, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add; - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Wechochar (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Wechochar, "wechochar"); + function Wechochar (W : Window; + Ch : C_Chtype) return C_Int; + pragma Import (C, Wechochar, "wechochar"); begin - if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Add_With_Immediate_Echo; + end Add_With_Immediate_Echo; - procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; - Ch : in Character) + procedure Add_With_Immediate_Echo + (Win : in Window := Standard_Window; + Ch : in Character) is begin - Add_With_Immediate_Echo - (Win, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add_With_Immediate_Echo; + Add_With_Immediate_Echo + (Win, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add_With_Immediate_Echo; ------------------------------------------------------------------------------ - function Create (Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Newwin (Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Newwin, "newwin"); - - W : Window; - begin - W := Newwin (C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Create; - - procedure Delete (Win : in out Window) - is - function Wdelwin (W : Window) return C_Int; - pragma Import (C, Wdelwin, "delwin"); - begin - if Wdelwin (Win) = Curses_Err then - raise Curses_Exception; + function Create (Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Newwin (Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Newwin, "newwin"); + + W : Window; + begin + W := Newwin (C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Create; + + procedure Delete (Win : in out Window) + is + function Wdelwin (W : Window) return C_Int; + pragma Import (C, Wdelwin, "delwin"); + begin + if Wdelwin (Win) = Curses_Err then + raise Curses_Exception; end if; - Win := Null_Window; - end Delete; + Win := Null_Window; + end Delete; - function Sub_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window + function Sub_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window is - function Subwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Subwin, "subwin"); + function Subwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Subwin, "subwin"); - W : Window; + W : Window; begin - W := Subwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; + W := Subwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; end if; - return W; - end Sub_Window; + return W; + end Sub_Window; - function Derived_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window + function Derived_Window + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window is - function Derwin - (Win : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Derwin, "derwin"); + function Derwin + (Win : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Derwin, "derwin"); - W : Window; + W : Window; begin - W := Derwin (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; + W := Derwin (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; end if; - return W; - end Derived_Window; + return W; + end Derived_Window; - function Duplicate (Win : Window) return Window + function Duplicate (Win : Window) return Window is - function Dupwin (Win : Window) return Window; - pragma Import (C, Dupwin, "dupwin"); + function Dupwin (Win : Window) return Window; + pragma Import (C, Dupwin, "dupwin"); - W : Window := Dupwin (Win); + W : Window := Dupwin (Win); begin - if W = Null_Window then - raise Curses_Exception; + if W = Null_Window then + raise Curses_Exception; end if; - return W; - end Duplicate; + return W; + end Duplicate; - procedure Move_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Move_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvwin, "mvwin"); + function Mvwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; + pragma Import (C, Mvwin, "mvwin"); begin - if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; + if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; end if; - end Move_Window; + end Move_Window; - procedure Move_Derived_Window (Win : in Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Move_Derived_Window (Win : in Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvderwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvderwin, "mvderwin"); + function Mvderwin (Win : Window; + Line : C_Int; + Column : C_Int) return C_Int; + pragma Import (C, Mvderwin, "mvderwin"); begin - if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; + if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; end if; - end Move_Derived_Window; + end Move_Derived_Window; - procedure Set_Synch_Mode (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Set_Synch_Mode (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Syncok (Win : Window; - Mode : Curses_Bool) return C_Int; - pragma Import (C, Syncok, "syncok"); + function Syncok (Win : Window; + Mode : Curses_Bool) return C_Int; + pragma Import (C, Syncok, "syncok"); begin - if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; + if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; end if; - end Set_Synch_Mode; + end Set_Synch_Mode; ------------------------------------------------------------------------------ - procedure Add (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) + procedure Add (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) is - function Waddnstr (Win : Window; - Str : char_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddnstr, "waddnstr"); + function Waddnstr (Win : Window; + Str : char_array; + Len : C_Int := -1) return C_Int; + pragma Import (C, Waddnstr, "waddnstr"); - Txt : char_array (0 .. Str'Length); - Length : size_t; + Txt : char_array (0 .. Str'Length); + Length : size_t; begin - To_C (Str, Txt, Length); - if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then - raise Curses_Exception; + To_C (Str, Txt, Length); + if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then + raise Curses_Exception; end if; - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; ------------------------------------------------------------------------------ - procedure Add - (Win : in Window := Standard_Window; - Str : in Attributed_String; - Len : in Integer := -1) + procedure Add + (Win : in Window := Standard_Window; + Str : in Attributed_String; + Len : in Integer := -1) is - function Waddchnstr (Win : Window; - Str : chtype_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddchnstr, "waddchnstr"); + function Waddchnstr (Win : Window; + Str : chtype_array; + Len : C_Int := -1) return C_Int; + pragma Import (C, Waddchnstr, "waddchnstr"); - Txt : chtype_array (0 .. Str'Length); + Txt : chtype_array (0 .. Str'Length); begin - for Length in 1 .. size_t (Str'Length) loop - Txt (Length - 1) := Str (Natural (Length)); + for Length in 1 .. size_t (Str'Length) loop + Txt (Length - 1) := Str (Natural (Length)); end loop; - Txt (Str'Length) := Default_Character; - if Waddchnstr (Win, - Txt, - C_Int (Len)) = Curses_Err then - raise Curses_Exception; + Txt (Str'Length) := Default_Character; + if Waddchnstr (Win, + Txt, + C_Int (Len)) = Curses_Err then + raise Curses_Exception; end if; - end Add; + end Add; - procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in Attributed_String; - Len : in Integer := -1) + procedure Add + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in Attributed_String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Add (Win, Str, Len); - end Add; + Move_Cursor (Win, Line, Column); + Add (Win, Str, Len); + end Add; ------------------------------------------------------------------------------ - procedure Border - (Win : in Window := Standard_Window; - Left_Side_Symbol : in Attributed_Character := Default_Character; - Right_Side_Symbol : in Attributed_Character := Default_Character; - Top_Side_Symbol : in Attributed_Character := Default_Character; - Bottom_Side_Symbol : in Attributed_Character := Default_Character; - Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) - is - function Wborder (W : Window; - LS : C_Chtype; - RS : C_Chtype; - TS : C_Chtype; - BS : C_Chtype; - ULC : C_Chtype; - URC : C_Chtype; - LLC : C_Chtype; - LRC : C_Chtype) return C_Int; - pragma Import (C, Wborder, "wborder"); - begin - if Wborder (Win, - AttrChar_To_Chtype (Left_Side_Symbol), - AttrChar_To_Chtype (Right_Side_Symbol), - AttrChar_To_Chtype (Top_Side_Symbol), - AttrChar_To_Chtype (Bottom_Side_Symbol), - AttrChar_To_Chtype (Upper_Left_Corner_Symbol), - AttrChar_To_Chtype (Upper_Right_Corner_Symbol), - AttrChar_To_Chtype (Lower_Left_Corner_Symbol), - AttrChar_To_Chtype (Lower_Right_Corner_Symbol) - ) = Curses_Err + procedure Border + (Win : in Window := Standard_Window; + Left_Side_Symbol : in Attributed_Character := Default_Character; + Right_Side_Symbol : in Attributed_Character := Default_Character; + Top_Side_Symbol : in Attributed_Character := Default_Character; + Bottom_Side_Symbol : in Attributed_Character := Default_Character; + Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character) + is + function Wborder (W : Window; + LS : C_Chtype; + RS : C_Chtype; + TS : C_Chtype; + BS : C_Chtype; + ULC : C_Chtype; + URC : C_Chtype; + LLC : C_Chtype; + LRC : C_Chtype) return C_Int; + pragma Import (C, Wborder, "wborder"); + begin + if Wborder (Win, + AttrChar_To_Chtype (Left_Side_Symbol), + AttrChar_To_Chtype (Right_Side_Symbol), + AttrChar_To_Chtype (Top_Side_Symbol), + AttrChar_To_Chtype (Bottom_Side_Symbol), + AttrChar_To_Chtype (Upper_Left_Corner_Symbol), + AttrChar_To_Chtype (Upper_Right_Corner_Symbol), + AttrChar_To_Chtype (Lower_Left_Corner_Symbol), + AttrChar_To_Chtype (Lower_Right_Corner_Symbol) + ) = Curses_Err then - raise Curses_Exception; + raise Curses_Exception; end if; - end Border; + end Border; - procedure Box - (Win : in Window := Standard_Window; - Vertical_Symbol : in Attributed_Character := Default_Character; - Horizontal_Symbol : in Attributed_Character := Default_Character) + procedure Box + (Win : in Window := Standard_Window; + Vertical_Symbol : in Attributed_Character := Default_Character; + Horizontal_Symbol : in Attributed_Character := Default_Character) is begin - Border (Win, - Vertical_Symbol, Vertical_Symbol, - Horizontal_Symbol, Horizontal_Symbol); - end Box; + Border (Win, + Vertical_Symbol, Vertical_Symbol, + Horizontal_Symbol, Horizontal_Symbol); + end Box; - procedure Horizontal_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) + procedure Horizontal_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) is - function Whline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Whline, "whline"); + function Whline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; + pragma Import (C, Whline, "whline"); begin - if Whline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then - raise Curses_Exception; + if Whline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; end if; - end Horizontal_Line; + end Horizontal_Line; - procedure Vertical_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; - Line_Symbol : in Attributed_Character := Default_Character) + procedure Vertical_Line + (Win : in Window := Standard_Window; + Line_Size : in Natural; + Line_Symbol : in Attributed_Character := Default_Character) is - function Wvline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Wvline, "wvline"); + function Wvline (W : Window; + Ch : C_Chtype; + Len : C_Int) return C_Int; + pragma Import (C, Wvline, "wvline"); begin - if Wvline (Win, - AttrChar_To_Chtype (Line_Symbol), - C_Int (Line_Size)) = Curses_Err then - raise Curses_Exception; + if Wvline (Win, + AttrChar_To_Chtype (Line_Symbol), + C_Int (Line_Size)) = Curses_Err then + raise Curses_Exception; end if; - end Vertical_Line; + end Vertical_Line; ------------------------------------------------------------------------------ - function Get_Keystroke (Win : Window := Standard_Window) - return Real_Key_Code + function Get_Keystroke (Win : Window := Standard_Window) + return Real_Key_Code is - function Wgetch (W : Window) return C_Int; - pragma Import (C, Wgetch, "wgetch"); + function Wgetch (W : Window) return C_Int; + pragma Import (C, Wgetch, "wgetch"); - C : constant C_Int := Wgetch (Win); + C : constant C_Int := Wgetch (Win); begin - if C = Curses_Err then - return Key_None; + if C = Curses_Err then + return Key_None; else - return Real_Key_Code (C); + return Real_Key_Code (C); end if; - end Get_Keystroke; + end Get_Keystroke; - procedure Undo_Keystroke (Key : in Real_Key_Code) + procedure Undo_Keystroke (Key : in Real_Key_Code) is - function Ungetch (Ch : C_Int) return C_Int; - pragma Import (C, Ungetch, "ungetch"); + function Ungetch (Ch : C_Int) return C_Int; + pragma Import (C, Ungetch, "ungetch"); begin - if Ungetch (C_Int (Key)) = Curses_Err then - raise Curses_Exception; + if Ungetch (C_Int (Key)) = Curses_Err then + raise Curses_Exception; end if; - end Undo_Keystroke; + end Undo_Keystroke; - function Has_Key (Key : Special_Key_Code) return Boolean + function Has_Key (Key : Special_Key_Code) return Boolean is - function Haskey (Key : C_Int) return C_Int; - pragma Import (C, Haskey, "has_key"); + function Haskey (Key : C_Int) return C_Int; + pragma Import (C, Haskey, "has_key"); begin - if Haskey (C_Int (Key)) = Curses_False then + if Haskey (C_Int (Key)) = Curses_False then return False; else return True; end if; - end Has_Key; + end Has_Key; - function Is_Function_Key (Key : Special_Key_Code) return Boolean + function Is_Function_Key (Key : Special_Key_Code) return Boolean is - L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + - Natural (Function_Key_Number'Last)); + L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + + Natural (Function_Key_Number'Last)); begin - if (Key >= Key_F0) and then (Key <= L) then + if (Key >= Key_F0) and then (Key <= L) then return True; else return False; end if; - end Is_Function_Key; + end Is_Function_Key; - function Function_Key (Key : Real_Key_Code) - return Function_Key_Number + function Function_Key (Key : Real_Key_Code) + return Function_Key_Number is begin - if Is_Function_Key (Key) then - return Function_Key_Number (Key - Key_F0); + if Is_Function_Key (Key) then + return Function_Key_Number (Key - Key_F0); else raise Constraint_Error; end if; - end Function_Key; + end Function_Key; - function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code + function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code is begin - return Real_Key_Code (Natural (Key_F0) + Natural (Key)); - end Function_Key_Code; + return Real_Key_Code (Natural (Key_F0) + Natural (Key)); + end Function_Key_Code; ------------------------------------------------------------------------------ - procedure Standout (Win : Window := Standard_Window; - On : Boolean := True) + procedure Standout (Win : Window := Standard_Window; + On : Boolean := True) is - function wstandout (Win : Window) return C_Int; - pragma Import (C, wstandout, "wstandout"); - function wstandend (Win : Window) return C_Int; - pragma Import (C, wstandend, "wstandend"); + function wstandout (Win : Window) return C_Int; + pragma Import (C, wstandout, "wstandout"); + function wstandend (Win : Window) return C_Int; + pragma Import (C, wstandend, "wstandend"); - Err : C_Int; + Err : C_Int; begin - if On then - Err := wstandout (Win); + if On then + Err := wstandout (Win); else - Err := wstandend (Win); + Err := wstandend (Win); end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Standout; + end Standout; - procedure Switch_Character_Attribute - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - On : in Boolean := True) + procedure Switch_Character_Attribute + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + On : in Boolean := True) is - function Wattron (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattron, "wattr_on"); - function Wattroff (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattroff, "wattr_off"); + function Wattron (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattron, "wattr_on"); + function Wattroff (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattroff, "wattr_off"); -- In Ada we use the On Boolean to control whether or not we want to -- switch on or off the attributes in the set. - Err : C_Int; - AC : constant Attributed_Character := (Ch => Character'First, - Color => Color_Pair'First, - Attr => Attr); + Err : C_Int; + AC : constant Attributed_Character := (Ch => Character'First, + Color => Color_Pair'First, + Attr => Attr); begin - if On then - Err := Wattron (Win, AttrChar_To_AttrType (AC)); + if On then + Err := Wattron (Win, AttrChar_To_AttrType (AC)); else - Err := Wattroff (Win, AttrChar_To_AttrType (AC)); + Err := Wattroff (Win, AttrChar_To_AttrType (AC)); end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Switch_Character_Attribute; + end Switch_Character_Attribute; - procedure Set_Character_Attributes - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Character_Attributes + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Wattrset (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set + function Wattrset (Win : Window; + C_Attr : C_AttrType) return C_Int; + pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set begin - if Wattrset (Win, - AttrChar_To_AttrType (Attributed_Character' + if Wattrset (Win, + AttrChar_To_AttrType (Attributed_Character' (Ch => Character'First, - Color => Color, - Attr => Attr))) = Curses_Err then - raise Curses_Exception; + Color => Color, + Attr => Attr))) = Curses_Err then + raise Curses_Exception; end if; - end Set_Character_Attributes; + end Set_Character_Attributes; - function Get_Character_Attribute (Win : Window := Standard_Window) - return Character_Attribute_Set + function Get_Character_Attribute (Win : Window := Standard_Window) + return Character_Attribute_Set is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; - pragma Import (C, Wattrget, "wattr_get"); + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); - Ch : Attributed_Character; + Ch : Attributed_Character; begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Attr; + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Attr; else - raise Curses_Exception; + raise Curses_Exception; end if; - end Get_Character_Attribute; + end Get_Character_Attribute; - function Get_Character_Attribute (Win : Window := Standard_Window) - return Color_Pair + function Get_Character_Attribute (Win : Window := Standard_Window) + return Color_Pair is - function Wattrget (Win : Window; - Atr : access C_AttrType; - Col : access C_Short; - Opt : System.Address) return C_Int; - pragma Import (C, Wattrget, "wattr_get"); + function Wattrget (Win : Window; + Atr : access C_AttrType; + Col : access C_Short; + Opt : System.Address) return C_Int; + pragma Import (C, Wattrget, "wattr_get"); - Attr : aliased C_AttrType; - Col : aliased C_Short; - Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, + Attr : aliased C_AttrType; + Col : aliased C_Short; + Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, System.Null_Address); - Ch : Attributed_Character; + Ch : Attributed_Character; begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); - return Ch.Color; + if Res = Curses_Ok then + Ch := AttrType_To_AttrChar (Attr); + return Ch.Color; else - raise Curses_Exception; + raise Curses_Exception; end if; - end Get_Character_Attribute; + end Get_Character_Attribute; - procedure Set_Color (Win : in Window := Standard_Window; - Pair : in Color_Pair) + procedure Set_Color (Win : in Window := Standard_Window; + Pair : in Color_Pair) is - function Wset_Color (Win : Window; - Color : C_Short; - Opts : C_Void_Ptr) return C_Int; - pragma Import (C, Wset_Color, "wcolor_set"); + function Wset_Color (Win : Window; + Color : C_Short; + Opts : C_Void_Ptr) return C_Int; + pragma Import (C, Wset_Color, "wcolor_set"); begin - if Wset_Color (Win, - C_Short (Pair), - C_Void_Ptr (System.Null_Address)) = Curses_Err then - raise Curses_Exception; + if Wset_Color (Win, + C_Short (Pair), + C_Void_Ptr (System.Null_Address)) = Curses_Err then + raise Curses_Exception; end if; - end Set_Color; + end Set_Color; - procedure Change_Attributes - (Win : in Window := Standard_Window; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Change_Attributes + (Win : in Window := Standard_Window; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Wchgat (Win : Window; - Cnt : C_Int; - Attr : C_AttrType; - Color : C_Short; - Opts : System.Address := System.Null_Address) - return C_Int; - pragma Import (C, Wchgat, "wchgat"); + function Wchgat (Win : Window; + Cnt : C_Int; + Attr : C_AttrType; + Color : C_Short; + Opts : System.Address := System.Null_Address) + return C_Int; + pragma Import (C, Wchgat, "wchgat"); - Ch : constant Attributed_Character := - (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); + Ch : constant Attributed_Character := + (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); begin - if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), - C_Short (Color)) = Curses_Err then - raise Curses_Exception; + if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), + C_Short (Color)) = Curses_Err then + raise Curses_Exception; end if; - end Change_Attributes; + end Change_Attributes; - procedure Change_Attributes - (Win : in Window := Standard_Window; - Line : in Line_Position := Line_Position'First; - Column : in Column_Position := Column_Position'First; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Change_Attributes + (Win : in Window := Standard_Window; + Line : in Line_Position := Line_Position'First; + Column : in Column_Position := Column_Position'First; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is begin - Move_Cursor (Win, Line, Column); - Change_Attributes (Win, Count, Attr, Color); - end Change_Attributes; + Move_Cursor (Win, Line, Column); + Change_Attributes (Win, Count, Attr, Color); + end Change_Attributes; ------------------------------------------------------------------------------ - procedure Beep + procedure Beep is - function Beeper return C_Int; - pragma Import (C, Beeper, "beep"); + function Beeper return C_Int; + pragma Import (C, Beeper, "beep"); begin - if Beeper = Curses_Err then - raise Curses_Exception; + if Beeper = Curses_Err then + raise Curses_Exception; end if; - end Beep; + end Beep; - procedure Flash_Screen + procedure Flash_Screen is - function Flash return C_Int; - pragma Import (C, Flash, "flash"); + function Flash return C_Int; + pragma Import (C, Flash, "flash"); begin - if Flash = Curses_Err then - raise Curses_Exception; + if Flash = Curses_Err then + raise Curses_Exception; end if; - end Flash_Screen; + end Flash_Screen; ------------------------------------------------------------------------------ - procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) + procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True) is - function Cbreak return C_Int; - pragma Import (C, Cbreak, "cbreak"); - function NoCbreak return C_Int; - pragma Import (C, NoCbreak, "nocbreak"); + function Cbreak return C_Int; + pragma Import (C, Cbreak, "cbreak"); + function NoCbreak return C_Int; + pragma Import (C, NoCbreak, "nocbreak"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Cbreak; + if SwitchOn then + Err := Cbreak; else - Err := NoCbreak; + Err := NoCbreak; end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Set_Cbreak_Mode; + end Set_Cbreak_Mode; - procedure Set_Raw_Mode (SwitchOn : in Boolean := True) + procedure Set_Raw_Mode (SwitchOn : in Boolean := True) is - function Raw return C_Int; - pragma Import (C, Raw, "raw"); - function NoRaw return C_Int; - pragma Import (C, NoRaw, "noraw"); + function Raw return C_Int; + pragma Import (C, Raw, "raw"); + function NoRaw return C_Int; + pragma Import (C, NoRaw, "noraw"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Raw; + if SwitchOn then + Err := Raw; else - Err := NoRaw; + Err := NoRaw; end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Set_Raw_Mode; + end Set_Raw_Mode; - procedure Set_Echo_Mode (SwitchOn : in Boolean := True) + procedure Set_Echo_Mode (SwitchOn : in Boolean := True) is - function Echo return C_Int; - pragma Import (C, Echo, "echo"); - function NoEcho return C_Int; - pragma Import (C, NoEcho, "noecho"); + function Echo return C_Int; + pragma Import (C, Echo, "echo"); + function NoEcho return C_Int; + pragma Import (C, NoEcho, "noecho"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := Echo; + if SwitchOn then + Err := Echo; else - Err := NoEcho; + Err := NoEcho; end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Set_Echo_Mode; + end Set_Echo_Mode; - procedure Set_Meta_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) + procedure Set_Meta_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) is - function Meta (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Meta, "meta"); + function Meta (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Meta, "meta"); begin - if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then - raise Curses_Exception; + if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; end if; - end Set_Meta_Mode; + end Set_Meta_Mode; - procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; - SwitchOn : in Boolean := True) + procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; + SwitchOn : in Boolean := True) is - function Keypad (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Keypad, "keypad"); + function Keypad (W : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Keypad, "keypad"); begin - if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then - raise Curses_Exception; + if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then + raise Curses_Exception; end if; - end Set_KeyPad_Mode; + end Set_KeyPad_Mode; - function Get_KeyPad_Mode (Win : in Window := Standard_Window) + function Get_KeyPad_Mode (Win : in Window := Standard_Window) return Boolean is begin - return Get_Flag (Win, Offset_use_keypad); - end Get_KeyPad_Mode; + return Get_Flag (Win, Offset_use_keypad); + end Get_KeyPad_Mode; - procedure Half_Delay (Amount : in Half_Delay_Amount) + procedure Half_Delay (Amount : in Half_Delay_Amount) is - function Halfdelay (Amount : C_Int) return C_Int; - pragma Import (C, Halfdelay, "halfdelay"); + function Halfdelay (Amount : C_Int) return C_Int; + pragma Import (C, Halfdelay, "halfdelay"); begin - if Halfdelay (C_Int (Amount)) = Curses_Err then - raise Curses_Exception; + if Halfdelay (C_Int (Amount)) = Curses_Err then + raise Curses_Exception; end if; - end Half_Delay; + end Half_Delay; - procedure Set_Flush_On_Interrupt_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := True) + procedure Set_Flush_On_Interrupt_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := True) is - function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Intrflush, "intrflush"); + function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Intrflush, "intrflush"); begin - if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; + if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; end if; - end Set_Flush_On_Interrupt_Mode; + end Set_Flush_On_Interrupt_Mode; - procedure Set_Queue_Interrupt_Mode - (Win : in Window := Standard_Window; - Flush : in Boolean := True) + procedure Set_Queue_Interrupt_Mode + (Win : in Window := Standard_Window; + Flush : in Boolean := True) is - procedure Qiflush; - pragma Import (C, Qiflush, "qiflush"); - procedure No_Qiflush; - pragma Import (C, No_Qiflush, "noqiflush"); + procedure Qiflush; + pragma Import (C, Qiflush, "qiflush"); + procedure No_Qiflush; + pragma Import (C, No_Qiflush, "noqiflush"); begin - if Flush then - Qiflush; + if Flush then + Qiflush; else - No_Qiflush; + No_Qiflush; end if; - end Set_Queue_Interrupt_Mode; + end Set_Queue_Interrupt_Mode; - procedure Set_NoDelay_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Set_NoDelay_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Nodelay, "nodelay"); + function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Nodelay, "nodelay"); begin - if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; + if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; end if; - end Set_NoDelay_Mode; + end Set_NoDelay_Mode; - procedure Set_Timeout_Mode (Win : in Window := Standard_Window; - Mode : in Timeout_Mode; - Amount : in Natural) + procedure Set_Timeout_Mode (Win : in Window := Standard_Window; + Mode : in Timeout_Mode; + Amount : in Natural) is - function Wtimeout (Win : Window; Amount : C_Int) return C_Int; - pragma Import (C, Wtimeout, "wtimeout"); + function Wtimeout (Win : Window; Amount : C_Int) return C_Int; + pragma Import (C, Wtimeout, "wtimeout"); - Time : C_Int; + Time : C_Int; begin - case Mode is - when Blocking => Time := -1; - when Non_Blocking => Time := 0; - when Delayed => - if Amount = 0 then + case Mode is + when Blocking => Time := -1; + when Non_Blocking => Time := 0; + when Delayed => + if Amount = 0 then raise Constraint_Error; end if; - Time := C_Int (Amount); + Time := C_Int (Amount); end case; - if Wtimeout (Win, Time) = Curses_Err then - raise Curses_Exception; + if Wtimeout (Win, Time) = Curses_Err then + raise Curses_Exception; end if; - end Set_Timeout_Mode; + end Set_Timeout_Mode; - procedure Set_Escape_Timer_Mode - (Win : in Window := Standard_Window; - Timer_Off : in Boolean := False) + procedure Set_Escape_Timer_Mode + (Win : in Window := Standard_Window; + Timer_Off : in Boolean := False) is - function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Notimeout, "notimeout"); + function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Notimeout, "notimeout"); begin - if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) - = Curses_Err then - raise Curses_Exception; + if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) + = Curses_Err then + raise Curses_Exception; end if; - end Set_Escape_Timer_Mode; + end Set_Escape_Timer_Mode; ------------------------------------------------------------------------------ - procedure Set_NL_Mode (SwitchOn : in Boolean := True) + procedure Set_NL_Mode (SwitchOn : in Boolean := True) is - function NL return C_Int; - pragma Import (C, NL, "nl"); - function NoNL return C_Int; - pragma Import (C, NoNL, "nonl"); + function NL return C_Int; + pragma Import (C, NL, "nl"); + function NoNL return C_Int; + pragma Import (C, NoNL, "nonl"); - Err : C_Int; + Err : C_Int; begin - if SwitchOn then - Err := NL; + if SwitchOn then + Err := NL; else - Err := NoNL; + Err := NoNL; end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Set_NL_Mode; + end Set_NL_Mode; - procedure Clear_On_Next_Update - (Win : in Window := Standard_Window; - Do_Clear : in Boolean := True) + procedure Clear_On_Next_Update + (Win : in Window := Standard_Window; + Do_Clear : in Boolean := True) is - function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Clear_Ok, "clearok"); + function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Clear_Ok, "clearok"); begin - if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then - raise Curses_Exception; + if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then + raise Curses_Exception; end if; - end Clear_On_Next_Update; + end Clear_On_Next_Update; - procedure Use_Insert_Delete_Line - (Win : in Window := Standard_Window; - Do_Idl : in Boolean := True) + procedure Use_Insert_Delete_Line + (Win : in Window := Standard_Window; + Do_Idl : in Boolean := True) is - function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, IDL_Ok, "idlok"); + function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, IDL_Ok, "idlok"); begin - if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then - raise Curses_Exception; + if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then + raise Curses_Exception; end if; - end Use_Insert_Delete_Line; + end Use_Insert_Delete_Line; - procedure Use_Insert_Delete_Character - (Win : in Window := Standard_Window; - Do_Idc : in Boolean := True) + procedure Use_Insert_Delete_Character + (Win : in Window := Standard_Window; + Do_Idc : in Boolean := True) is - function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, IDC_Ok, "idcok"); + function IDC_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, IDC_Ok, "idcok"); begin - if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then - raise Curses_Exception; + if IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))) = Curses_Err then + raise Curses_Exception; end if; - end Use_Insert_Delete_Character; + end Use_Insert_Delete_Character; - procedure Leave_Cursor_After_Update - (Win : in Window := Standard_Window; - Do_Leave : in Boolean := True) + procedure Leave_Cursor_After_Update + (Win : in Window := Standard_Window; + Do_Leave : in Boolean := True) is - function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Leave_Ok, "leaveok"); + function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; + pragma Import (C, Leave_Ok, "leaveok"); begin - if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then - raise Curses_Exception; + if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then + raise Curses_Exception; end if; - end Leave_Cursor_After_Update; + end Leave_Cursor_After_Update; - procedure Immediate_Update_Mode - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Immediate_Update_Mode + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Immedok, "immedok"); + function Immedok (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Immedok, "immedok"); begin - if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; + if Immedok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; end if; - end Immediate_Update_Mode; + end Immediate_Update_Mode; - procedure Allow_Scrolling - (Win : in Window := Standard_Window; - Mode : in Boolean := False) + procedure Allow_Scrolling + (Win : in Window := Standard_Window; + Mode : in Boolean := False) is - function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Scrollok, "scrollok"); + function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; + pragma Import (C, Scrollok, "scrollok"); begin - if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then - raise Curses_Exception; + if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then + raise Curses_Exception; end if; - end Allow_Scrolling; + end Allow_Scrolling; - function Scrolling_Allowed (Win : Window := Standard_Window) + function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean is begin - return Get_Flag (Win, Offset_scroll); - end Scrolling_Allowed; + return Get_Flag (Win, Offset_scroll); + end Scrolling_Allowed; - procedure Set_Scroll_Region - (Win : in Window := Standard_Window; - Top_Line : in Line_Position; - Bottom_Line : in Line_Position) + procedure Set_Scroll_Region + (Win : in Window := Standard_Window; + Top_Line : in Line_Position; + Bottom_Line : in Line_Position) is - function Wsetscrreg (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Wsetscrreg, "wsetscrreg"); + function Wsetscrreg (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; + pragma Import (C, Wsetscrreg, "wsetscrreg"); begin - if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) - = Curses_Err then - raise Curses_Exception; + if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) + = Curses_Err then + raise Curses_Exception; end if; - end Set_Scroll_Region; + end Set_Scroll_Region; ------------------------------------------------------------------------------ - procedure Update_Screen + procedure Update_Screen is - function Do_Update return C_Int; - pragma Import (C, Do_Update, "doupdate"); + function Do_Update return C_Int; + pragma Import (C, Do_Update, "doupdate"); begin - if Do_Update = Curses_Err then - raise Curses_Exception; + if Do_Update = Curses_Err then + raise Curses_Exception; end if; - end Update_Screen; + end Update_Screen; - procedure Refresh (Win : in Window := Standard_Window) + procedure Refresh (Win : in Window := Standard_Window) is - function Wrefresh (W : Window) return C_Int; - pragma Import (C, Wrefresh, "wrefresh"); + function Wrefresh (W : Window) return C_Int; + pragma Import (C, Wrefresh, "wrefresh"); begin - if Wrefresh (Win) = Curses_Err then - raise Curses_Exception; + if Wrefresh (Win) = Curses_Err then + raise Curses_Exception; end if; - end Refresh; + end Refresh; - procedure Refresh_Without_Update - (Win : in Window := Standard_Window) + procedure Refresh_Without_Update + (Win : in Window := Standard_Window) is - function Wnoutrefresh (W : Window) return C_Int; - pragma Import (C, Wnoutrefresh, "wnoutrefresh"); + function Wnoutrefresh (W : Window) return C_Int; + pragma Import (C, Wnoutrefresh, "wnoutrefresh"); begin - if Wnoutrefresh (Win) = Curses_Err then - raise Curses_Exception; + if Wnoutrefresh (Win) = Curses_Err then + raise Curses_Exception; end if; - end Refresh_Without_Update; + end Refresh_Without_Update; - procedure Redraw (Win : in Window := Standard_Window) + procedure Redraw (Win : in Window := Standard_Window) is - function Redrawwin (Win : Window) return C_Int; - pragma Import (C, Redrawwin, "redrawwin"); + function Redrawwin (Win : Window) return C_Int; + pragma Import (C, Redrawwin, "redrawwin"); begin - if Redrawwin (Win) = Curses_Err then - raise Curses_Exception; + if Redrawwin (Win) = Curses_Err then + raise Curses_Exception; end if; - end Redraw; + end Redraw; - procedure Redraw - (Win : in Window := Standard_Window; - Begin_Line : in Line_Position; - Line_Count : in Positive) + procedure Redraw + (Win : in Window := Standard_Window; + Begin_Line : in Line_Position; + Line_Count : in Positive) is - function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) - return C_Int; - pragma Import (C, Wredrawln, "wredrawln"); + function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) + return C_Int; + pragma Import (C, Wredrawln, "wredrawln"); begin - if Wredrawln (Win, - C_Int (Begin_Line), - C_Int (Line_Count)) = Curses_Err then - raise Curses_Exception; + if Wredrawln (Win, + C_Int (Begin_Line), + C_Int (Line_Count)) = Curses_Err then + raise Curses_Exception; end if; - end Redraw; + end Redraw; ------------------------------------------------------------------------------ - procedure Erase (Win : in Window := Standard_Window) + procedure Erase (Win : in Window := Standard_Window) is - function Werase (W : Window) return C_Int; - pragma Import (C, Werase, "werase"); + function Werase (W : Window) return C_Int; + pragma Import (C, Werase, "werase"); begin - if Werase (Win) = Curses_Err then - raise Curses_Exception; + if Werase (Win) = Curses_Err then + raise Curses_Exception; end if; - end Erase; + end Erase; - procedure Clear (Win : in Window := Standard_Window) + procedure Clear (Win : in Window := Standard_Window) is - function Wclear (W : Window) return C_Int; - pragma Import (C, Wclear, "wclear"); + function Wclear (W : Window) return C_Int; + pragma Import (C, Wclear, "wclear"); begin - if Wclear (Win) = Curses_Err then - raise Curses_Exception; + if Wclear (Win) = Curses_Err then + raise Curses_Exception; end if; - end Clear; + end Clear; - procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) + procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window) is - function Wclearbot (W : Window) return C_Int; - pragma Import (C, Wclearbot, "wclrtobot"); + function Wclearbot (W : Window) return C_Int; + pragma Import (C, Wclearbot, "wclrtobot"); begin - if Wclearbot (Win) = Curses_Err then - raise Curses_Exception; + if Wclearbot (Win) = Curses_Err then + raise Curses_Exception; end if; - end Clear_To_End_Of_Screen; + end Clear_To_End_Of_Screen; - procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) + procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window) is - function Wcleareol (W : Window) return C_Int; - pragma Import (C, Wcleareol, "wclrtoeol"); + function Wcleareol (W : Window) return C_Int; + pragma Import (C, Wcleareol, "wclrtoeol"); begin - if Wcleareol (Win) = Curses_Err then - raise Curses_Exception; + if Wcleareol (Win) = Curses_Err then + raise Curses_Exception; end if; - end Clear_To_End_Of_Line; + end Clear_To_End_Of_Line; ------------------------------------------------------------------------------ - procedure Set_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Set_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - procedure WBackground (W : in Window; Ch : in C_Chtype); - pragma Import (C, WBackground, "wbkgdset"); + procedure WBackground (W : in Window; Ch : in C_Chtype); + pragma Import (C, WBackground, "wbkgdset"); begin - WBackground (Win, AttrChar_To_Chtype (Ch)); - end Set_Background; + WBackground (Win, AttrChar_To_Chtype (Ch)); + end Set_Background; - procedure Change_Background - (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Change_Background + (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, WChangeBkgd, "wbkgd"); + function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, WChangeBkgd, "wbkgd"); begin - if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Change_Background; + end Change_Background; - function Get_Background (Win : Window := Standard_Window) - return Attributed_Character + function Get_Background (Win : Window := Standard_Window) + return Attributed_Character is - function Wgetbkgd (Win : Window) return C_Chtype; - pragma Import (C, Wgetbkgd, "getbkgd"); + function Wgetbkgd (Win : Window) return C_Chtype; + pragma Import (C, Wgetbkgd, "getbkgd"); begin - return Chtype_To_AttrChar (Wgetbkgd (Win)); - end Get_Background; + return Chtype_To_AttrChar (Wgetbkgd (Win)); + end Get_Background; ------------------------------------------------------------------------------ - procedure Change_Lines_Status (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive; - State : in Boolean) + procedure Change_Lines_Status (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive; + State : in Boolean) is - function Wtouchln (Win : Window; - Sta : C_Int; - Cnt : C_Int; - Chg : C_Int) return C_Int; - pragma Import (C, Wtouchln, "wtouchln"); + function Wtouchln (Win : Window; + Sta : C_Int; + Cnt : C_Int; + Chg : C_Int) return C_Int; + pragma Import (C, Wtouchln, "wtouchln"); begin - if Wtouchln (Win, C_Int (Start), C_Int (Count), - C_Int (Boolean'Pos (State))) = Curses_Err then - raise Curses_Exception; + if Wtouchln (Win, C_Int (Start), C_Int (Count), + C_Int (Boolean'Pos (State))) = Curses_Err then + raise Curses_Exception; end if; - end Change_Lines_Status; + end Change_Lines_Status; - procedure Touch (Win : in Window := Standard_Window) + procedure Touch (Win : in Window := Standard_Window) is - Y : Line_Position; - X : Column_Position; + Y : Line_Position; + X : Column_Position; begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), True); - end Touch; + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), True); + end Touch; - procedure Untouch (Win : in Window := Standard_Window) + procedure Untouch (Win : in Window := Standard_Window) is - Y : Line_Position; - X : Column_Position; + Y : Line_Position; + X : Column_Position; begin - Get_Size (Win, Y, X); - Change_Lines_Status (Win, 0, Positive (Y), False); - end Untouch; + Get_Size (Win, Y, X); + Change_Lines_Status (Win, 0, Positive (Y), False); + end Untouch; - procedure Touch (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive) + procedure Touch (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive) is begin - Change_Lines_Status (Win, Start, Count, True); - end Touch; + Change_Lines_Status (Win, Start, Count, True); + end Touch; - function Is_Touched - (Win : Window := Standard_Window; - Line : Line_Position) return Boolean + function Is_Touched + (Win : Window := Standard_Window; + Line : Line_Position) return Boolean is - function WLineTouched (W : Window; L : C_Int) return Curses_Bool; - pragma Import (C, WLineTouched, "is_linetouched"); + function WLineTouched (W : Window; L : C_Int) return Curses_Bool; + pragma Import (C, WLineTouched, "is_linetouched"); begin - if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then + if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then return False; else return True; end if; - end Is_Touched; + end Is_Touched; - function Is_Touched - (Win : Window := Standard_Window) return Boolean + function Is_Touched + (Win : Window := Standard_Window) return Boolean is - function WWinTouched (W : Window) return Curses_Bool; - pragma Import (C, WWinTouched, "is_wintouched"); + function WWinTouched (W : Window) return Curses_Bool; + pragma Import (C, WWinTouched, "is_wintouched"); begin - if WWinTouched (Win) = Curses_Bool_False then + if WWinTouched (Win) = Curses_Bool_False then return False; else return True; end if; - end Is_Touched; + end Is_Touched; ------------------------------------------------------------------------------ - procedure Copy - (Source_Window : in Window; - Destination_Window : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position; - Non_Destructive_Mode : in Boolean := True) - is - function Copywin (Src : Window; - Dst : Window; - Str : C_Int; - Slc : C_Int; - Dtr : C_Int; - Dlc : C_Int; - Dbr : C_Int; - Drc : C_Int; - Ndm : C_Int) return C_Int; - pragma Import (C, Copywin, "copywin"); - begin - if Copywin (Source_Window, - Destination_Window, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column), - Boolean'Pos (Non_Destructive_Mode) - ) = Curses_Err then - raise Curses_Exception; - end if; - end Copy; - - procedure Overwrite - (Source_Window : in Window; - Destination_Window : in Window) - is - function Overwrite (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overwrite, "overwrite"); - begin - if Overwrite (Source_Window, Destination_Window) = Curses_Err then - raise Curses_Exception; - end if; - end Overwrite; - - procedure Overlay - (Source_Window : in Window; - Destination_Window : in Window) - is - function Overlay (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overlay, "overlay"); - begin - if Overlay (Source_Window, Destination_Window) = Curses_Err then - raise Curses_Exception; - end if; - end Overlay; + procedure Copy + (Source_Window : in Window; + Destination_Window : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position; + Non_Destructive_Mode : in Boolean := True) + is + function Copywin (Src : Window; + Dst : Window; + Str : C_Int; + Slc : C_Int; + Dtr : C_Int; + Dlc : C_Int; + Dbr : C_Int; + Drc : C_Int; + Ndm : C_Int) return C_Int; + pragma Import (C, Copywin, "copywin"); + begin + if Copywin (Source_Window, + Destination_Window, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column), + Boolean'Pos (Non_Destructive_Mode) + ) = Curses_Err then + raise Curses_Exception; + end if; + end Copy; + + procedure Overwrite + (Source_Window : in Window; + Destination_Window : in Window) + is + function Overwrite (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overwrite, "overwrite"); + begin + if Overwrite (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; + end Overwrite; + + procedure Overlay + (Source_Window : in Window; + Destination_Window : in Window) + is + function Overlay (Src : Window; Dst : Window) return C_Int; + pragma Import (C, Overlay, "overlay"); + begin + if Overlay (Source_Window, Destination_Window) = Curses_Err then + raise Curses_Exception; + end if; + end Overlay; ------------------------------------------------------------------------------ - procedure Insert_Delete_Lines - (Win : in Window := Standard_Window; - Lines : in Integer := 1) -- default is to insert one line above + procedure Insert_Delete_Lines + (Win : in Window := Standard_Window; + Lines : in Integer := 1) -- default is to insert one line above is - function Winsdelln (W : Window; N : C_Int) return C_Int; - pragma Import (C, Winsdelln, "winsdelln"); + function Winsdelln (W : Window; N : C_Int) return C_Int; + pragma Import (C, Winsdelln, "winsdelln"); begin - if Winsdelln (Win, C_Int (Lines)) = Curses_Err then - raise Curses_Exception; + if Winsdelln (Win, C_Int (Lines)) = Curses_Err then + raise Curses_Exception; end if; - end Insert_Delete_Lines; + end Insert_Delete_Lines; - procedure Delete_Line (Win : in Window := Standard_Window) + procedure Delete_Line (Win : in Window := Standard_Window) is begin - Insert_Delete_Lines (Win, -1); - end Delete_Line; + Insert_Delete_Lines (Win, -1); + end Delete_Line; - procedure Insert_Line (Win : in Window := Standard_Window) + procedure Insert_Line (Win : in Window := Standard_Window) is begin - Insert_Delete_Lines (Win, 1); - end Insert_Line; + Insert_Delete_Lines (Win, 1); + end Insert_Line; ------------------------------------------------------------------------------ - procedure Get_Size - (Win : in Window := Standard_Window; - Number_Of_Lines : out Line_Count; - Number_Of_Columns : out Column_Count) + procedure Get_Size + (Win : in Window := Standard_Window; + Number_Of_Lines : out Line_Count; + Number_Of_Columns : out Column_Count) is -- Please note: in ncurses they are one off. -- This might be different in other implementations of curses - Y : C_Int := C_Int (W_Get_Short (Win, Offset_maxy)) + C_Int (Offset_XY); - X : C_Int := C_Int (W_Get_Short (Win, Offset_maxx)) + C_Int (Offset_XY); - begin - Number_Of_Lines := Line_Count (Y); - Number_Of_Columns := Column_Count (X); - end Get_Size; - - procedure Get_Window_Position - (Win : in Window := Standard_Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position) - is - Y : C_Short := W_Get_Short (Win, Offset_begy); - X : C_Short := W_Get_Short (Win, Offset_begx); - begin - Top_Left_Line := Line_Position (Y); - Top_Left_Column := Column_Position (X); - end Get_Window_Position; - - procedure Get_Cursor_Position - (Win : in Window := Standard_Window; - Line : out Line_Position; - Column : out Column_Position) - is - Y : C_Short := W_Get_Short (Win, Offset_cury); - X : C_Short := W_Get_Short (Win, Offset_curx); - begin - Line := Line_Position (Y); - Column := Column_Position (X); - end Get_Cursor_Position; - - procedure Get_Origin_Relative_To_Parent - (Win : in Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position; - Is_Not_A_Subwindow : out Boolean) - is - Y : C_Int := W_Get_Int (Win, Offset_pary); - X : C_Int := W_Get_Int (Win, Offset_parx); - begin - if Y = -1 then - Top_Left_Line := Line_Position'Last; - Top_Left_Column := Column_Position'Last; - Is_Not_A_Subwindow := True; + Y : C_Int := C_Int (W_Get_Short (Win, Offset_maxy)) + C_Int (Offset_XY); + X : C_Int := C_Int (W_Get_Short (Win, Offset_maxx)) + C_Int (Offset_XY); + begin + Number_Of_Lines := Line_Count (Y); + Number_Of_Columns := Column_Count (X); + end Get_Size; + + procedure Get_Window_Position + (Win : in Window := Standard_Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position) + is + Y : C_Short := W_Get_Short (Win, Offset_begy); + X : C_Short := W_Get_Short (Win, Offset_begx); + begin + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + end Get_Window_Position; + + procedure Get_Cursor_Position + (Win : in Window := Standard_Window; + Line : out Line_Position; + Column : out Column_Position) + is + Y : C_Short := W_Get_Short (Win, Offset_cury); + X : C_Short := W_Get_Short (Win, Offset_curx); + begin + Line := Line_Position (Y); + Column := Column_Position (X); + end Get_Cursor_Position; + + procedure Get_Origin_Relative_To_Parent + (Win : in Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position; + Is_Not_A_Subwindow : out Boolean) + is + Y : C_Int := W_Get_Int (Win, Offset_pary); + X : C_Int := W_Get_Int (Win, Offset_parx); + begin + if Y = -1 then + Top_Left_Line := Line_Position'Last; + Top_Left_Column := Column_Position'Last; + Is_Not_A_Subwindow := True; else - Top_Left_Line := Line_Position (Y); - Top_Left_Column := Column_Position (X); - Is_Not_A_Subwindow := False; + Top_Left_Line := Line_Position (Y); + Top_Left_Column := Column_Position (X); + Is_Not_A_Subwindow := False; end if; - end Get_Origin_Relative_To_Parent; + end Get_Origin_Relative_To_Parent; ------------------------------------------------------------------------------ - function New_Pad (Lines : Line_Count; - Columns : Column_Count) return Window - is - function Newpad (Lines : C_Int; Columns : C_Int) return Window; - pragma Import (C, Newpad, "newpad"); - - W : Window; - begin - W := Newpad (C_Int (Lines), C_Int (Columns)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end New_Pad; - - function Sub_Pad - (Pad : Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; - First_Column_Position : Column_Position) return Window - is - function Subpad - (Pad : Window; - Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; - First_Line_Position : C_Int; - First_Column_Position : C_Int) return Window; - pragma Import (C, Subpad, "subpad"); - - W : Window; - begin - W := Subpad (Pad, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns), - C_Int (First_Line_Position), - C_Int (First_Column_Position)); - if W = Null_Window then - raise Curses_Exception; - end if; - return W; - end Sub_Pad; - - procedure Refresh - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Prefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Prefresh, "prefresh"); - begin - if Prefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh; - - procedure Refresh_Without_Update - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position) - is - function Pnoutrefresh - (Pad : Window; - Source_Top_Row : C_Int; - Source_Left_Column : C_Int; - Destination_Top_Row : C_Int; - Destination_Left_Column : C_Int; - Destination_Bottom_Row : C_Int; - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Pnoutrefresh, "pnoutrefresh"); - begin - if Pnoutrefresh (Pad, - C_Int (Source_Top_Row), - C_Int (Source_Left_Column), - C_Int (Destination_Top_Row), - C_Int (Destination_Left_Column), - C_Int (Destination_Bottom_Row), - C_Int (Destination_Right_Column)) = Curses_Err then - raise Curses_Exception; - end if; - end Refresh_Without_Update; - - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Attributed_Character) - is - function Pechochar (Pad : Window; Ch : C_Chtype) - return C_Int; - pragma Import (C, Pechochar, "pechochar"); - begin - if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; - end if; - end Add_Character_To_Pad_And_Echo_It; - - procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; - Ch : in Character) - is - begin - Add_Character_To_Pad_And_Echo_It - (Pad, - Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video)); - end Add_Character_To_Pad_And_Echo_It; + function New_Pad (Lines : Line_Count; + Columns : Column_Count) return Window + is + function Newpad (Lines : C_Int; Columns : C_Int) return Window; + pragma Import (C, Newpad, "newpad"); + + W : Window; + begin + W := Newpad (C_Int (Lines), C_Int (Columns)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end New_Pad; + + function Sub_Pad + (Pad : Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; + First_Column_Position : Column_Position) return Window + is + function Subpad + (Pad : Window; + Number_Of_Lines : C_Int; + Number_Of_Columns : C_Int; + First_Line_Position : C_Int; + First_Column_Position : C_Int) return Window; + pragma Import (C, Subpad, "subpad"); + + W : Window; + begin + W := Subpad (Pad, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns), + C_Int (First_Line_Position), + C_Int (First_Column_Position)); + if W = Null_Window then + raise Curses_Exception; + end if; + return W; + end Sub_Pad; + + procedure Refresh + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Prefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Prefresh, "prefresh"); + begin + if Prefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh; + + procedure Refresh_Without_Update + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position) + is + function Pnoutrefresh + (Pad : Window; + Source_Top_Row : C_Int; + Source_Left_Column : C_Int; + Destination_Top_Row : C_Int; + Destination_Left_Column : C_Int; + Destination_Bottom_Row : C_Int; + Destination_Right_Column : C_Int) return C_Int; + pragma Import (C, Pnoutrefresh, "pnoutrefresh"); + begin + if Pnoutrefresh (Pad, + C_Int (Source_Top_Row), + C_Int (Source_Left_Column), + C_Int (Destination_Top_Row), + C_Int (Destination_Left_Column), + C_Int (Destination_Bottom_Row), + C_Int (Destination_Right_Column)) = Curses_Err then + raise Curses_Exception; + end if; + end Refresh_Without_Update; + + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Attributed_Character) + is + function Pechochar (Pad : Window; Ch : C_Chtype) + return C_Int; + pragma Import (C, Pechochar, "pechochar"); + begin + if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; + end if; + end Add_Character_To_Pad_And_Echo_It; + + procedure Add_Character_To_Pad_And_Echo_It + (Pad : in Window; + Ch : in Character) + is + begin + Add_Character_To_Pad_And_Echo_It + (Pad, + Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); + end Add_Character_To_Pad_And_Echo_It; ------------------------------------------------------------------------------ - procedure Scroll (Win : in Window := Standard_Window; - Amount : in Integer := 1) + procedure Scroll (Win : in Window := Standard_Window; + Amount : in Integer := 1) is - function Wscrl (Win : Window; N : C_Int) return C_Int; - pragma Import (C, Wscrl, "wscrl"); + function Wscrl (Win : Window; N : C_Int) return C_Int; + pragma Import (C, Wscrl, "wscrl"); begin - if Wscrl (Win, C_Int (Amount)) = Curses_Err then - raise Curses_Exception; + if Wscrl (Win, C_Int (Amount)) = Curses_Err then + raise Curses_Exception; end if; - end Scroll; + end Scroll; ------------------------------------------------------------------------------ - procedure Delete_Character (Win : in Window := Standard_Window) + procedure Delete_Character (Win : in Window := Standard_Window) is - function Wdelch (Win : Window) return C_Int; - pragma Import (C, Wdelch, "wdelch"); + function Wdelch (Win : Window) return C_Int; + pragma Import (C, Wdelch, "wdelch"); begin - if Wdelch (Win) = Curses_Err then - raise Curses_Exception; + if Wdelch (Win) = Curses_Err then + raise Curses_Exception; end if; - end Delete_Character; + end Delete_Character; - procedure Delete_Character - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position) + procedure Delete_Character + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position) is - function Mvwdelch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Mvwdelch, "mvwdelch"); + function Mvwdelch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Int; + pragma Import (C, Mvwdelch, "mvwdelch"); begin - if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then - raise Curses_Exception; + if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then + raise Curses_Exception; end if; - end Delete_Character; + end Delete_Character; ------------------------------------------------------------------------------ - function Peek (Win : Window := Standard_Window) - return Attributed_Character + function Peek (Win : Window := Standard_Window) + return Attributed_Character is - function Winch (Win : Window) return C_Chtype; - pragma Import (C, Winch, "winch"); + function Winch (Win : Window) return C_Chtype; + pragma Import (C, Winch, "winch"); begin - return Chtype_To_AttrChar (Winch (Win)); - end Peek; + return Chtype_To_AttrChar (Winch (Win)); + end Peek; - function Peek - (Win : Window := Standard_Window; - Line : Line_Position; - Column : Column_Position) return Attributed_Character + function Peek + (Win : Window := Standard_Window; + Line : Line_Position; + Column : Column_Position) return Attributed_Character is - function Mvwinch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Chtype; - pragma Import (C, Mvwinch, "mvwinch"); + function Mvwinch (Win : Window; + Lin : C_Int; + Col : C_Int) return C_Chtype; + pragma Import (C, Mvwinch, "mvwinch"); begin - return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); - end Peek; + return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); + end Peek; ------------------------------------------------------------------------------ - procedure Insert (Win : in Window := Standard_Window; - Ch : in Attributed_Character) + procedure Insert (Win : in Window := Standard_Window; + Ch : in Attributed_Character) is - function Winsch (Win : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, Winsch, "winsch"); + function Winsch (Win : Window; Ch : C_Chtype) return C_Int; + pragma Import (C, Winsch, "winsch"); begin - if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Insert; + end Insert; - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Ch : in Attributed_Character) + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Ch : in Attributed_Character) is - function Mvwinsch (Win : Window; - Lin : C_Int; - Col : C_Int; - Ch : C_Chtype) return C_Int; - pragma Import (C, Mvwinsch, "mvwinsch"); + function Mvwinsch (Win : Window; + Lin : C_Int; + Col : C_Int; + Ch : C_Chtype) return C_Int; + pragma Import (C, Mvwinsch, "mvwinsch"); begin - if Mvwinsch (Win, - C_Int (Line), - C_Int (Column), - AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if Mvwinsch (Win, + C_Int (Line), + C_Int (Column), + AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Insert; + end Insert; ------------------------------------------------------------------------------ - procedure Insert (Win : in Window := Standard_Window; - Str : in String; - Len : in Integer := -1) - is - function Winsnstr (Win : Window; - Str : char_array; - Len : Integer := -1) return C_Int; - pragma Import (C, Winsnstr, "winsnstr"); - - Txt : char_array (0 .. Str'Length); - Length : size_t; - begin - To_C (Str, Txt, Length); - if Winsnstr (Win, Txt, Len) = Curses_Err then - raise Curses_Exception; - end if; - end Insert; - - procedure Insert - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; - Len : in Integer := -1) - is - function Mvwinsnstr (Win : Window; - Line : C_Int; - Column : C_Int; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Mvwinsnstr, "mvwinsnstr"); - - Txt : char_array (0 .. Str'Length); - Length : size_t; - begin - To_C (Str, Txt, Length); - if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) - = Curses_Err then - raise Curses_Exception; - end if; - end Insert; + procedure Insert (Win : in Window := Standard_Window; + Str : in String; + Len : in Integer := -1) + is + function Winsnstr (Win : Window; + Str : char_array; + Len : Integer := -1) return C_Int; + pragma Import (C, Winsnstr, "winsnstr"); + + Txt : char_array (0 .. Str'Length); + Length : size_t; + begin + To_C (Str, Txt, Length); + if Winsnstr (Win, Txt, Len) = Curses_Err then + raise Curses_Exception; + end if; + end Insert; + + procedure Insert + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; + Len : in Integer := -1) + is + function Mvwinsnstr (Win : Window; + Line : C_Int; + Column : C_Int; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Mvwinsnstr, "mvwinsnstr"); + + Txt : char_array (0 .. Str'Length); + Length : size_t; + begin + To_C (Str, Txt, Length); + if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) + = Curses_Err then + raise Curses_Exception; + end if; + end Insert; ------------------------------------------------------------------------------ - procedure Peek (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) + procedure Peek (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) is - function Winnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Winnstr, "winnstr"); + function Winnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Winnstr, "winnstr"); - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - Txt (0) := Interfaces.C.char'First; - if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; + Txt (0) := Interfaces.C.char'First; + if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; - end Peek; + end Peek; - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; ------------------------------------------------------------------------------ - procedure Peek - (Win : in Window := Standard_Window; - Str : out Attributed_String; - Len : in Integer := -1) + procedure Peek + (Win : in Window := Standard_Window; + Str : out Attributed_String; + Len : in Integer := -1) is - function Winchnstr (Win : Window; - Str : chtype_array; -- out - Len : C_Int) return C_Int; - pragma Import (C, Winchnstr, "winchnstr"); + function Winchnstr (Win : Window; + Str : chtype_array; -- out + Len : C_Int) return C_Int; + pragma Import (C, Winchnstr, "winchnstr"); - N : Integer := Len; - Txt : chtype_array (0 .. Str'Length) := (0 => Default_Character); - Cnt : Natural := 0; + N : Integer := Len; + Txt : chtype_array (0 .. Str'Length) := (0 => Default_Character); + Cnt : Natural := 0; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; + if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; end if; - for To in Str'Range loop - exit when Txt (size_t (Cnt)) = Default_Character; - Str (To) := Txt (size_t (Cnt)); - Cnt := Cnt + 1; + for To in Str'Range loop + exit when Txt (size_t (Cnt)) = Default_Character; + Str (To) := Txt (size_t (Cnt)); + Cnt := Cnt + 1; end loop; - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => (Ch => ' ', - Color => Color_Pair'First, - Attr => Normal_Video)); + Color => Color_Pair'First, + Attr => Normal_Video)); end if; - end Peek; + end Peek; - procedure Peek - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out Attributed_String; - Len : in Integer := -1) + procedure Peek + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out Attributed_String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Peek (Win, Str, Len); - end Peek; + Move_Cursor (Win, Line, Column); + Peek (Win, Str, Len); + end Peek; ------------------------------------------------------------------------------ - procedure Get (Win : in Window := Standard_Window; - Str : out String; - Len : in Integer := -1) + procedure Get (Win : in Window := Standard_Window; + Str : out String; + Len : in Integer := -1) is - function Wgetnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Wgetnstr, "wgetnstr"); + function Wgetnstr (Win : Window; + Str : char_array; + Len : C_Int) return C_Int; + pragma Import (C, Wgetnstr, "wgetnstr"); - N : Integer := Len; - Txt : char_array (0 .. Str'Length); - Cnt : Natural; + N : Integer := Len; + Txt : char_array (0 .. Str'Length); + Cnt : Natural; begin - if N < 0 then - N := Str'Length; + if N < 0 then + N := Str'Length; end if; - if N > Str'Length then + if N > Str'Length then raise Constraint_Error; end if; - Txt (0) := Interfaces.C.char'First; - if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then - raise Curses_Exception; + Txt (0) := Interfaces.C.char'First; + if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then + raise Curses_Exception; end if; - To_Ada (Txt, Str, Cnt, True); - if Cnt < Str'Length then - Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); + To_Ada (Txt, Str, Cnt, True); + if Cnt < Str'Length then + Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); end if; - end Get; + end Get; - procedure Get - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; - Len : in Integer := -1) + procedure Get + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; + Len : in Integer := -1) is begin - Move_Cursor (Win, Line, Column); - Get (Win, Str, Len); - end Get; + Move_Cursor (Win, Line, Column); + Get (Win, Str, Len); + end Get; ------------------------------------------------------------------------------ - procedure Init_Soft_Label_Keys - (Format : in Soft_Label_Key_Format := Three_Two_Three) + procedure Init_Soft_Label_Keys + (Format : in Soft_Label_Key_Format := Three_Two_Three) is - function Slk_Init (Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Init, "slk_init"); + function Slk_Init (Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Init, "slk_init"); begin - if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then - raise Curses_Exception; + if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then + raise Curses_Exception; end if; - end Init_Soft_Label_Keys; + end Init_Soft_Label_Keys; - procedure Set_Soft_Label_Key (Label : in Label_Number; - Text : in String; - Fmt : in Label_Justification := Left) + procedure Set_Soft_Label_Key (Label : in Label_Number; + Text : in String; + Fmt : in Label_Justification := Left) is - function Slk_Set (Label : C_Int; - Txt : char_array; - Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Set, "slk_set"); + function Slk_Set (Label : C_Int; + Txt : char_array; + Fmt : C_Int) return C_Int; + pragma Import (C, Slk_Set, "slk_set"); - Txt : char_array (0 .. Text'Length); - Len : size_t; + Txt : char_array (0 .. Text'Length); + Len : size_t; begin - To_C (Text, Txt, Len); - if Slk_Set (C_Int (Label), Txt, - C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then - raise Curses_Exception; + To_C (Text, Txt, Len); + if Slk_Set (C_Int (Label), Txt, + C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then + raise Curses_Exception; end if; - end Set_Soft_Label_Key; + end Set_Soft_Label_Key; - procedure Refresh_Soft_Label_Keys + procedure Refresh_Soft_Label_Keys is - function Slk_Refresh return C_Int; - pragma Import (C, Slk_Refresh, "slk_refresh"); + function Slk_Refresh return C_Int; + pragma Import (C, Slk_Refresh, "slk_refresh"); begin - if Slk_Refresh = Curses_Err then - raise Curses_Exception; + if Slk_Refresh = Curses_Err then + raise Curses_Exception; end if; - end Refresh_Soft_Label_Keys; + end Refresh_Soft_Label_Keys; - procedure Refresh_Soft_Label_Keys_Without_Update + procedure Refresh_Soft_Label_Keys_Without_Update is - function Slk_Noutrefresh return C_Int; - pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); + function Slk_Noutrefresh return C_Int; + pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); begin - if Slk_Noutrefresh = Curses_Err then - raise Curses_Exception; + if Slk_Noutrefresh = Curses_Err then + raise Curses_Exception; end if; - end Refresh_Soft_Label_Keys_Without_Update; + end Refresh_Soft_Label_Keys_Without_Update; - procedure Get_Soft_Label_Key (Label : in Label_Number; - Text : out String) + procedure Get_Soft_Label_Key (Label : in Label_Number; + Text : out String) is - function Slk_Label (Label : C_Int) return chars_ptr; - pragma Import (C, Slk_Label, "slk_label"); + function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); begin - Fill_String (Slk_Label (C_Int (Label)), Text); - end Get_Soft_Label_Key; + Fill_String (Slk_Label (C_Int (Label)), Text); + end Get_Soft_Label_Key; - function Get_Soft_Label_Key (Label : in Label_Number) return String + function Get_Soft_Label_Key (Label : in Label_Number) return String is - function Slk_Label (Label : C_Int) return chars_ptr; - pragma Import (C, Slk_Label, "slk_label"); + function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); begin - return Fill_String (Slk_Label (C_Int (Label))); - end Get_Soft_Label_Key; + return Fill_String (Slk_Label (C_Int (Label))); + end Get_Soft_Label_Key; - procedure Clear_Soft_Label_Keys + procedure Clear_Soft_Label_Keys is - function Slk_Clear return C_Int; - pragma Import (C, Slk_Clear, "slk_clear"); + function Slk_Clear return C_Int; + pragma Import (C, Slk_Clear, "slk_clear"); begin - if Slk_Clear = Curses_Err then - raise Curses_Exception; + if Slk_Clear = Curses_Err then + raise Curses_Exception; end if; - end Clear_Soft_Label_Keys; + end Clear_Soft_Label_Keys; - procedure Restore_Soft_Label_Keys + procedure Restore_Soft_Label_Keys is - function Slk_Restore return C_Int; - pragma Import (C, Slk_Restore, "slk_restore"); + function Slk_Restore return C_Int; + pragma Import (C, Slk_Restore, "slk_restore"); begin - if Slk_Restore = Curses_Err then - raise Curses_Exception; + if Slk_Restore = Curses_Err then + raise Curses_Exception; end if; - end Restore_Soft_Label_Keys; + end Restore_Soft_Label_Keys; - procedure Touch_Soft_Label_Keys + procedure Touch_Soft_Label_Keys is - function Slk_Touch return C_Int; - pragma Import (C, Slk_Touch, "slk_touch"); + function Slk_Touch return C_Int; + pragma Import (C, Slk_Touch, "slk_touch"); begin - if Slk_Touch = Curses_Err then - raise Curses_Exception; + if Slk_Touch = Curses_Err then + raise Curses_Exception; end if; - end Touch_Soft_Label_Keys; + end Touch_Soft_Label_Keys; - procedure Switch_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set; - On : in Boolean := True) + procedure Switch_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set; + On : in Boolean := True) is - function Slk_Attron (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attron, "slk_attron"); - function Slk_Attroff (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attroff, "slk_attroff"); + function Slk_Attron (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attron, "slk_attron"); + function Slk_Attroff (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attroff, "slk_attroff"); - Err : C_Int; - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, - Color => Color_Pair'First); + Err : C_Int; + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, + Color => Color_Pair'First); begin - if On then - Err := Slk_Attron (AttrChar_To_Chtype (Ch)); + if On then + Err := Slk_Attron (AttrChar_To_Chtype (Ch)); else - Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); + Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); end if; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Switch_Soft_Label_Key_Attributes; + end Switch_Soft_Label_Key_Attributes; - procedure Set_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set := Normal_Video; - Color : in Color_Pair := Color_Pair'First) + procedure Set_Soft_Label_Key_Attributes + (Attr : in Character_Attribute_Set := Normal_Video; + Color : in Color_Pair := Color_Pair'First) is - function Slk_Attrset (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attrset, "slk_attrset"); + function Slk_Attrset (Ch : C_Chtype) return C_Int; + pragma Import (C, Slk_Attrset, "slk_attrset"); - Ch : constant Attributed_Character := (Ch => Character'First, - Attr => Attr, - Color => Color); + Ch : constant Attributed_Character := (Ch => Character'First, + Attr => Attr, + Color => Color); begin - if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then - raise Curses_Exception; + if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then + raise Curses_Exception; end if; - end Set_Soft_Label_Key_Attributes; + end Set_Soft_Label_Key_Attributes; - function Get_Soft_Label_Key_Attributes return Character_Attribute_Set + function Get_Soft_Label_Key_Attributes return Character_Attribute_Set is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); + function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); - Attr : constant C_Chtype := Slk_Attr; + Attr : constant C_Chtype := Slk_Attr; begin - return Chtype_To_AttrChar (Attr).Attr; - end Get_Soft_Label_Key_Attributes; + return Chtype_To_AttrChar (Attr).Attr; + end Get_Soft_Label_Key_Attributes; - function Get_Soft_Label_Key_Attributes return Color_Pair + function Get_Soft_Label_Key_Attributes return Color_Pair is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); + function Slk_Attr return C_Chtype; + pragma Import (C, Slk_Attr, "slk_attr"); - Attr : constant C_Chtype := Slk_Attr; + Attr : constant C_Chtype := Slk_Attr; begin - return Chtype_To_AttrChar (Attr).Color; - end Get_Soft_Label_Key_Attributes; + return Chtype_To_AttrChar (Attr).Color; + end Get_Soft_Label_Key_Attributes; - procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) + procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair) is - function Slk_Color (Color : in C_Short) return C_Int; - pragma Import (C, Slk_Color, "slk_color"); + function Slk_Color (Color : in C_Short) return C_Int; + pragma Import (C, Slk_Color, "slk_color"); begin - if Slk_Color (C_Short (Pair)) = Curses_Err then - raise Curses_Exception; + if Slk_Color (C_Short (Pair)) = Curses_Err then + raise Curses_Exception; end if; - end Set_Soft_Label_Key_Color; + end Set_Soft_Label_Key_Color; ------------------------------------------------------------------------------ - procedure Enable_Key (Key : in Special_Key_Code; - Enable : in Boolean := True) + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True) is - function Keyok (Keycode : C_Int; - On_Off : Curses_Bool) return C_Int; - pragma Import (C, Keyok, "keyok"); + function Keyok (Keycode : C_Int; + On_Off : Curses_Bool) return C_Int; + pragma Import (C, Keyok, "keyok"); begin - if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) - = Curses_Err then - raise Curses_Exception; + if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) + = Curses_Err then + raise Curses_Exception; end if; - end Enable_Key; + end Enable_Key; ------------------------------------------------------------------------------ - procedure Define_Key (Definition : in String; - Key : in Special_Key_Code) + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code) is - function Defkey (Def : char_array; - Key : C_Int) return C_Int; - pragma Import (C, Defkey, "define_key"); + function Defkey (Def : char_array; + Key : C_Int) return C_Int; + pragma Import (C, Defkey, "define_key"); - Txt : char_array (0 .. Definition'Length); - Length : size_t; + Txt : char_array (0 .. Definition'Length); + Length : size_t; begin - To_C (Definition, Txt, Length); - if Defkey (Txt, C_Int (Key)) = Curses_Err then - raise Curses_Exception; + To_C (Definition, Txt, Length); + if Defkey (Txt, C_Int (Key)) = Curses_Err then + raise Curses_Exception; end if; - end Define_Key; + end Define_Key; ------------------------------------------------------------------------------ - procedure Un_Control (Ch : in Attributed_Character; - Str : out String) + procedure Un_Control (Ch : in Attributed_Character; + Str : out String) is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); + function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); begin - Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); - end Un_Control; + Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); + end Un_Control; - function Un_Control (Ch : in Attributed_Character) return String + function Un_Control (Ch : in Attributed_Character) return String is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); + function Unctrl (Ch : C_Chtype) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); begin - return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); - end Un_Control; + return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); + end Un_Control; - procedure Delay_Output (Msecs : in Natural) + procedure Delay_Output (Msecs : in Natural) is - function Delayoutput (Msecs : C_Int) return C_Int; - pragma Import (C, Delayoutput, "delay_output"); + function Delayoutput (Msecs : C_Int) return C_Int; + pragma Import (C, Delayoutput, "delay_output"); begin - if Delayoutput (C_Int (Msecs)) = Curses_Err then - raise Curses_Exception; + if Delayoutput (C_Int (Msecs)) = Curses_Err then + raise Curses_Exception; end if; - end Delay_Output; + end Delay_Output; - procedure Flush_Input + procedure Flush_Input is - function Flushinp return C_Int; - pragma Import (C, Flushinp, "flushinp"); + function Flushinp return C_Int; + pragma Import (C, Flushinp, "flushinp"); begin - if Flushinp = Curses_Err then -- docu says that never happens, but... - raise Curses_Exception; + if Flushinp = Curses_Err then -- docu says that never happens, but... + raise Curses_Exception; end if; - end Flush_Input; + end Flush_Input; ------------------------------------------------------------------------------ - function Baudrate return Natural + function Baudrate return Natural is - function Baud return C_Int; - pragma Import (C, Baud, "baudrate"); + function Baud return C_Int; + pragma Import (C, Baud, "baudrate"); begin - return Natural (Baud); - end Baudrate; + return Natural (Baud); + end Baudrate; - function Erase_Character return Character + function Erase_Character return Character is - function Erasechar return C_Int; - pragma Import (C, Erasechar, "erasechar"); + function Erasechar return C_Int; + pragma Import (C, Erasechar, "erasechar"); begin - return Character'Val (Erasechar); - end Erase_Character; + return Character'Val (Erasechar); + end Erase_Character; - function Kill_Character return Character + function Kill_Character return Character is - function Killchar return C_Int; - pragma Import (C, Killchar, "killchar"); + function Killchar return C_Int; + pragma Import (C, Killchar, "killchar"); begin - return Character'Val (Killchar); - end Kill_Character; + return Character'Val (Killchar); + end Kill_Character; - function Has_Insert_Character return Boolean + function Has_Insert_Character return Boolean is - function Has_Ic return Curses_Bool; - pragma Import (C, Has_Ic, "has_ic"); + function Has_Ic return Curses_Bool; + pragma Import (C, Has_Ic, "has_ic"); begin - if Has_Ic = Curses_Bool_False then + if Has_Ic = Curses_Bool_False then return False; else return True; end if; - end Has_Insert_Character; + end Has_Insert_Character; - function Has_Insert_Line return Boolean + function Has_Insert_Line return Boolean is - function Has_Il return Curses_Bool; - pragma Import (C, Has_Il, "has_il"); + function Has_Il return Curses_Bool; + pragma Import (C, Has_Il, "has_il"); begin - if Has_Il = Curses_Bool_False then + if Has_Il = Curses_Bool_False then return False; else return True; end if; - end Has_Insert_Line; + end Has_Insert_Line; - function Supported_Attributes return Character_Attribute_Set + function Supported_Attributes return Character_Attribute_Set is - function Termattrs return C_Chtype; - pragma Import (C, Termattrs, "termattrs"); + function Termattrs return C_Chtype; + pragma Import (C, Termattrs, "termattrs"); - Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); + Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); begin - return Ch.Attr; - end Supported_Attributes; + return Ch.Attr; + end Supported_Attributes; - procedure Long_Name (Name : out String) + procedure Long_Name (Name : out String) is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); + function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); begin - Fill_String (Longname, Name); - end Long_Name; + Fill_String (Longname, Name); + end Long_Name; - function Long_Name return String + function Long_Name return String is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); + function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); begin - return Fill_String (Longname); - end Long_Name; + return Fill_String (Longname); + end Long_Name; - procedure Terminal_Name (Name : out String) + procedure Terminal_Name (Name : out String) is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); + function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); begin - Fill_String (Termname, Name); - end Terminal_Name; + Fill_String (Termname, Name); + end Terminal_Name; - function Terminal_Name return String + function Terminal_Name return String is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); + function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); begin - return Fill_String (Termname); - end Terminal_Name; + return Fill_String (Termname); + end Terminal_Name; ------------------------------------------------------------------------------ - procedure Init_Pair (Pair : in Redefinable_Color_Pair; - Fore : in Color_Number; - Back : in Color_Number) + procedure Init_Pair (Pair : in Redefinable_Color_Pair; + Fore : in Color_Number; + Back : in Color_Number) is - function Initpair (Pair : C_Short; - Fore : C_Short; - Back : C_Short) return C_Int; - pragma Import (C, Initpair, "init_pair"); + function Initpair (Pair : C_Short; + Fore : C_Short; + Back : C_Short) return C_Int; + pragma Import (C, Initpair, "init_pair"); begin - if Integer (Pair) >= Number_Of_Color_Pairs then + if Integer (Pair) >= Number_Of_Color_Pairs then raise Constraint_Error; end if; - if Integer (Fore) >= Number_Of_Colors or else - Integer (Back) >= Number_Of_Colors then raise Constraint_Error; + if Integer (Fore) >= Number_Of_Colors or else + Integer (Back) >= Number_Of_Colors then raise Constraint_Error; end if; - if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) - = Curses_Err then - raise Curses_Exception; + if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) + = Curses_Err then + raise Curses_Exception; end if; - end Init_Pair; + end Init_Pair; - procedure Pair_Content (Pair : in Color_Pair; - Fore : out Color_Number; - Back : out Color_Number) + procedure Pair_Content (Pair : in Color_Pair; + Fore : out Color_Number; + Back : out Color_Number) is - type C_Short_Access is access all C_Short; - function Paircontent (Pair : C_Short; - Fp : C_Short_Access; - Bp : C_Short_Access) return C_Int; - pragma Import (C, Paircontent, "pair_content"); + type C_Short_Access is access all C_Short; + function Paircontent (Pair : C_Short; + Fp : C_Short_Access; + Bp : C_Short_Access) return C_Int; + pragma Import (C, Paircontent, "pair_content"); - F, B : aliased C_Short; + F, B : aliased C_Short; begin - if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then - raise Curses_Exception; + if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then + raise Curses_Exception; else - Fore := Color_Number (F); - Back := Color_Number (B); + Fore := Color_Number (F); + Back := Color_Number (B); end if; - end Pair_Content; + end Pair_Content; - function Has_Colors return Boolean + function Has_Colors return Boolean is - function Hascolors return Curses_Bool; - pragma Import (C, Hascolors, "has_colors"); + function Hascolors return Curses_Bool; + pragma Import (C, Hascolors, "has_colors"); begin - if Hascolors = Curses_Bool_False then + if Hascolors = Curses_Bool_False then return False; else return True; end if; - end Has_Colors; + end Has_Colors; - procedure Init_Color (Color : in Color_Number; - Red : in RGB_Value; - Green : in RGB_Value; - Blue : in RGB_Value) + procedure Init_Color (Color : in Color_Number; + Red : in RGB_Value; + Green : in RGB_Value; + Blue : in RGB_Value) is - function Initcolor (Col : C_Short; - Red : C_Short; - Green : C_Short; - Blue : C_Short) return C_Int; - pragma Import (C, Initcolor, "init_color"); + function Initcolor (Col : C_Short; + Red : C_Short; + Green : C_Short; + Blue : C_Short) return C_Int; + pragma Import (C, Initcolor, "init_color"); begin - if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), - C_Short (Blue)) = Curses_Err then - raise Curses_Exception; + if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), + C_Short (Blue)) = Curses_Err then + raise Curses_Exception; end if; - end Init_Color; + end Init_Color; - function Can_Change_Color return Boolean + function Can_Change_Color return Boolean is - function Canchangecolor return Curses_Bool; - pragma Import (C, Canchangecolor, "can_change_color"); + function Canchangecolor return Curses_Bool; + pragma Import (C, Canchangecolor, "can_change_color"); begin - if Canchangecolor = Curses_Bool_False then + if Canchangecolor = Curses_Bool_False then return False; else return True; end if; - end Can_Change_Color; + end Can_Change_Color; - procedure Color_Content (Color : in Color_Number; - Red : out RGB_Value; - Green : out RGB_Value; - Blue : out RGB_Value) + procedure Color_Content (Color : in Color_Number; + Red : out RGB_Value; + Green : out RGB_Value; + Blue : out RGB_Value) is - type C_Short_Access is access all C_Short; + type C_Short_Access is access all C_Short; - function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) - return C_Int; - pragma Import (C, Colorcontent, "color_content"); + function Colorcontent (Color : C_Short; R, G, B : C_Short_Access) + return C_Int; + pragma Import (C, Colorcontent, "color_content"); - R, G, B : aliased C_Short; + R, G, B : aliased C_Short; begin - if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = - Curses_Err then - raise Curses_Exception; + if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = + Curses_Err then + raise Curses_Exception; else - Red := RGB_Value (R); - Green := RGB_Value (G); - Blue := RGB_Value (B); + Red := RGB_Value (R); + Green := RGB_Value (G); + Blue := RGB_Value (B); end if; - end Color_Content; + end Color_Content; ------------------------------------------------------------------------------ - procedure Save_Curses_Mode (Mode : in Curses_Mode) + procedure Save_Curses_Mode (Mode : in Curses_Mode) is - function Def_Prog_Mode return C_Int; - pragma Import (C, Def_Prog_Mode, "def_prog_mode"); - function Def_Shell_Mode return C_Int; - pragma Import (C, Def_Shell_Mode, "def_shell_mode"); + function Def_Prog_Mode return C_Int; + pragma Import (C, Def_Prog_Mode, "def_prog_mode"); + function Def_Shell_Mode return C_Int; + pragma Import (C, Def_Shell_Mode, "def_shell_mode"); - Err : C_Int; + Err : C_Int; begin - case Mode is - when Curses => Err := Def_Prog_Mode; - when Shell => Err := Def_Shell_Mode; + case Mode is + when Curses => Err := Def_Prog_Mode; + when Shell => Err := Def_Shell_Mode; end case; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Save_Curses_Mode; + end Save_Curses_Mode; - procedure Reset_Curses_Mode (Mode : in Curses_Mode) + procedure Reset_Curses_Mode (Mode : in Curses_Mode) is - function Reset_Prog_Mode return C_Int; - pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); - function Reset_Shell_Mode return C_Int; - pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); + function Reset_Prog_Mode return C_Int; + pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); + function Reset_Shell_Mode return C_Int; + pragma Import (C, Reset_Shell_Mode, "reset_shell_mode"); - Err : C_Int; + Err : C_Int; begin - case Mode is - when Curses => Err := Reset_Prog_Mode; - when Shell => Err := Reset_Shell_Mode; + case Mode is + when Curses => Err := Reset_Prog_Mode; + when Shell => Err := Reset_Shell_Mode; end case; - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Reset_Curses_Mode; + end Reset_Curses_Mode; - procedure Save_Terminal_State + procedure Save_Terminal_State is - function Savetty return C_Int; - pragma Import (C, Savetty, "savetty"); + function Savetty return C_Int; + pragma Import (C, Savetty, "savetty"); begin - if Savetty = Curses_Err then - raise Curses_Exception; + if Savetty = Curses_Err then + raise Curses_Exception; end if; - end Save_Terminal_State; + end Save_Terminal_State; - procedure Reset_Terminal_State + procedure Reset_Terminal_State is - function Resetty return C_Int; - pragma Import (C, Resetty, "resetty"); + function Resetty return C_Int; + pragma Import (C, Resetty, "resetty"); begin - if Resetty = Curses_Err then - raise Curses_Exception; + if Resetty = Curses_Err then + raise Curses_Exception; end if; - end Reset_Terminal_State; + end Reset_Terminal_State; - procedure Rip_Off_Lines (Lines : in Integer; - Proc : in Stdscr_Init_Proc) + procedure Rip_Off_Lines (Lines : in Integer; + Proc : in Stdscr_Init_Proc) is - function Ripoffline (Lines : C_Int; - Proc : Stdscr_Init_Proc) return C_Int; - pragma Import (C, Ripoffline, "_nc_ripoffline"); + function Ripoffline (Lines : C_Int; + Proc : Stdscr_Init_Proc) return C_Int; + pragma Import (C, Ripoffline, "_nc_ripoffline"); begin - if Ripoffline (C_Int (Lines), Proc) = Curses_Err then - raise Curses_Exception; + if Ripoffline (C_Int (Lines), Proc) = Curses_Err then + raise Curses_Exception; end if; - end Rip_Off_Lines; + end Rip_Off_Lines; - procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) + procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) is - function Curs_Set (Curs : C_Int) return C_Int; - pragma Import (C, Curs_Set, "curs_set"); + function Curs_Set (Curs : C_Int) return C_Int; + pragma Import (C, Curs_Set, "curs_set"); - Res : C_Int; + Res : C_Int; begin - Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); - if Res /= Curses_Err then - Visibility := Cursor_Visibility'Val (Res); + Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); + if Res /= Curses_Err then + Visibility := Cursor_Visibility'Val (Res); end if; - end Set_Cursor_Visibility; + end Set_Cursor_Visibility; - procedure Nap_Milli_Seconds (Ms : in Natural) + procedure Nap_Milli_Seconds (Ms : in Natural) is - function Napms (Ms : C_Int) return C_Int; - pragma Import (C, Napms, "napms"); + function Napms (Ms : C_Int) return C_Int; + pragma Import (C, Napms, "napms"); begin - if Napms (C_Int (Ms)) = Curses_Err then - raise Curses_Exception; + if Napms (C_Int (Ms)) = Curses_Err then + raise Curses_Exception; end if; - end Nap_Milli_Seconds; + end Nap_Milli_Seconds; ------------------------------------------------------------------------------ - function Standard_Window return Window + function Standard_Window return Window is - Stdscr : Window; - pragma Import (C, Stdscr, "stdscr"); + Stdscr : Window; + pragma Import (C, Stdscr, "stdscr"); begin - return Stdscr; - end Standard_Window; + return Stdscr; + end Standard_Window; - function Lines return Line_Count + function Lines return Line_Count is - C_Lines : C_Int; - pragma Import (C, C_Lines, "LINES"); + C_Lines : C_Int; + pragma Import (C, C_Lines, "LINES"); begin - return Line_Count (C_Lines); - end Lines; + return Line_Count (C_Lines); + end Lines; - function Columns return Column_Count + function Columns return Column_Count is - C_Columns : C_Int; - pragma Import (C, C_Columns, "COLS"); + C_Columns : C_Int; + pragma Import (C, C_Columns, "COLS"); begin - return Column_Count (C_Columns); - end Columns; + return Column_Count (C_Columns); + end Columns; - function Tab_Size return Natural + function Tab_Size return Natural is - C_Tab_Size : C_Int; - pragma Import (C, C_Tab_Size, "TABSIZE"); + C_Tab_Size : C_Int; + pragma Import (C, C_Tab_Size, "TABSIZE"); begin - return Natural (C_Tab_Size); - end Tab_Size; + return Natural (C_Tab_Size); + end Tab_Size; - function Number_Of_Colors return Natural + function Number_Of_Colors return Natural is - C_Number_Of_Colors : C_Int; - pragma Import (C, C_Number_Of_Colors, "COLORS"); + C_Number_Of_Colors : C_Int; + pragma Import (C, C_Number_Of_Colors, "COLORS"); begin - return Natural (C_Number_Of_Colors); - end Number_Of_Colors; + return Natural (C_Number_Of_Colors); + end Number_Of_Colors; - function Number_Of_Color_Pairs return Natural + function Number_Of_Color_Pairs return Natural is - C_Number_Of_Color_Pairs : C_Int; - pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); + C_Number_Of_Color_Pairs : C_Int; + pragma Import (C, C_Number_Of_Color_Pairs, "COLOR_PAIRS"); begin - return Natural (C_Number_Of_Color_Pairs); - end Number_Of_Color_Pairs; + return Natural (C_Number_Of_Color_Pairs); + end Number_Of_Color_Pairs; ------------------------------------------------------------------------------ - procedure Transform_Coordinates - (W : in Window := Standard_Window; - Line : in out Line_Position; - Column : in out Column_Position; - Dir : in Transform_Direction := From_Screen) - is - type Int_Access is access all C_Int; - function Transform (W : Window; - Y, X : Int_Access; - Dir : Curses_Bool) return C_Int; - pragma Import (C, Transform, "wmouse_trafo"); - - X : aliased C_Int := C_Int (Column); - Y : aliased C_Int := C_Int (Line); - D : Curses_Bool := Curses_Bool_False; - R : C_Int; - begin - if Dir = To_Screen then - D := 1; - end if; - R := Transform (W, Y'Access, X'Access, D); - if R = Curses_False then - raise Curses_Exception; + procedure Transform_Coordinates + (W : in Window := Standard_Window; + Line : in out Line_Position; + Column : in out Column_Position; + Dir : in Transform_Direction := From_Screen) + is + type Int_Access is access all C_Int; + function Transform (W : Window; + Y, X : Int_Access; + Dir : Curses_Bool) return C_Int; + pragma Import (C, Transform, "wmouse_trafo"); + + X : aliased C_Int := C_Int (Column); + Y : aliased C_Int := C_Int (Line); + D : Curses_Bool := Curses_Bool_False; + R : C_Int; + begin + if Dir = To_Screen then + D := 1; + end if; + R := Transform (W, Y'Access, X'Access, D); + if R = Curses_False then + raise Curses_Exception; else - Line := Line_Position (Y); - Column := Column_Position (X); + Line := Line_Position (Y); + Column := Column_Position (X); end if; - end Transform_Coordinates; + end Transform_Coordinates; ------------------------------------------------------------------------------ - procedure Use_Default_Colors is - function C_Use_Default_Colors return C_Int; - pragma Import (C, C_Use_Default_Colors, "use_default_colors"); - Err : constant C_Int := C_Use_Default_Colors; + procedure Use_Default_Colors is + function C_Use_Default_Colors return C_Int; + pragma Import (C, C_Use_Default_Colors, "use_default_colors"); + Err : constant C_Int := C_Use_Default_Colors; begin - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Use_Default_Colors; + end Use_Default_Colors; - procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; - Back : Color_Number := Default_Color) + procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; + Back : Color_Number := Default_Color) is - function C_Assume_Default_Colors (Fore : C_Int; - Back : C_Int) return C_Int; - pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); + function C_Assume_Default_Colors (Fore : C_Int; + Back : C_Int) return C_Int; + pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); - Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), - C_Int (Black)); + Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), + C_Int (Black)); begin - if Err = Curses_Err then - raise Curses_Exception; + if Err = Curses_Err then + raise Curses_Exception; end if; - end Assume_Default_Colors; + end Assume_Default_Colors; ------------------------------------------------------------------------------ - function Curses_Version return String + function Curses_Version return String is - function curses_versionC return chars_ptr; - pragma Import (C, curses_versionC, "curses_version"); - Result : constant chars_ptr := curses_versionC; + function curses_versionC return chars_ptr; + pragma Import (C, curses_versionC, "curses_version"); + Result : constant chars_ptr := curses_versionC; begin - return Fill_String (Result); - end Curses_Version; + return Fill_String (Result); + end Curses_Version; ------------------------------------------------------------------------------ - function Use_Extended_Names (Enable : Boolean) return Boolean + function Use_Extended_Names (Enable : Boolean) return Boolean is - function use_extended_namesC (e : Curses_Bool) return C_Int; - pragma Import (C, use_extended_namesC, "use_extended_names"); + function use_extended_namesC (e : Curses_Bool) return C_Int; + pragma Import (C, use_extended_namesC, "use_extended_names"); - Res : constant C_Int := - use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); + Res : constant C_Int := + use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); begin - if Res = C_Int (Curses_Bool_False) then + if Res = C_Int (Curses_Bool_False) then return False; else return True; end if; - end Use_Extended_Names; + end Use_Extended_Names; ------------------------------------------------------------------------------ - procedure Screen_Dump_To_File (Filename : in String) + procedure Screen_Dump_To_File (Filename : in String) is - function scr_dump (f : char_array) return C_Int; - pragma Import (C, scr_dump, "scr_dump"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + function scr_dump (f : char_array) return C_Int; + pragma Import (C, scr_dump, "scr_dump"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_dump (Txt) then - raise Curses_Exception; + To_C (Filename, Txt, Length); + if Curses_Err = scr_dump (Txt) then + raise Curses_Exception; end if; - end Screen_Dump_To_File; + end Screen_Dump_To_File; - procedure Screen_Restore_From_File (Filename : in String) + procedure Screen_Restore_From_File (Filename : in String) is - function scr_restore (f : char_array) return C_Int; - pragma Import (C, scr_restore, "scr_restore"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + function scr_restore (f : char_array) return C_Int; + pragma Import (C, scr_restore, "scr_restore"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_restore (Txt) then - raise Curses_Exception; + To_C (Filename, Txt, Length); + if Curses_Err = scr_restore (Txt) then + raise Curses_Exception; end if; - end Screen_Restore_From_File; + end Screen_Restore_From_File; - procedure Screen_Init_From_File (Filename : in String) + procedure Screen_Init_From_File (Filename : in String) is - function scr_init (f : char_array) return C_Int; - pragma Import (C, scr_init, "scr_init"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + function scr_init (f : char_array) return C_Int; + pragma Import (C, scr_init, "scr_init"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_init (Txt) then - raise Curses_Exception; + To_C (Filename, Txt, Length); + if Curses_Err = scr_init (Txt) then + raise Curses_Exception; end if; - end Screen_Init_From_File; + end Screen_Init_From_File; - procedure Screen_Set_File (Filename : in String) + procedure Screen_Set_File (Filename : in String) is - function scr_set (f : char_array) return C_Int; - pragma Import (C, scr_set, "scr_set"); - Txt : char_array (0 .. Filename'Length); - Length : size_t; + function scr_set (f : char_array) return C_Int; + pragma Import (C, scr_set, "scr_set"); + Txt : char_array (0 .. Filename'Length); + Length : size_t; begin - To_C (Filename, Txt, Length); - if Curses_Err = scr_set (Txt) then - raise Curses_Exception; + To_C (Filename, Txt, Length); + if Curses_Err = scr_set (Txt) then + raise Curses_Exception; end if; - end Screen_Set_File; + end Screen_Set_File; ------------------------------------------------------------------------------ - procedure Resize (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count) is - function wresize (win : Window; - lines : C_Int; - columns : C_Int) return C_Int; - pragma Import (C, wresize); - begin - if wresize (Win, - C_Int (Number_Of_Lines), - C_Int (Number_Of_Columns)) = Curses_Err then - raise Curses_Exception; - end if; - end Resize; + procedure Resize (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count) is + function wresize (win : Window; + lines : C_Int; + columns : C_Int) return C_Int; + pragma Import (C, wresize); + begin + if wresize (Win, + C_Int (Number_Of_Lines), + C_Int (Number_Of_Columns)) = Curses_Err then + raise Curses_Exception; + end if; + end Resize; ------------------------------------------------------------------------------ -end Terminal_Interface.Curses; +end Terminal_Interface.Curses; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface-curses__ads.htm b/doc/html/ada/terminal_interface-curses__ads.htm index 5acab555..b45b93c8 100644 --- a/doc/html/ada/terminal_interface-curses__ads.htm +++ b/doc/html/ada/terminal_interface-curses__ads.htm @@ -38,10 +38,9 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.30 @ +-- @Revision: 1.31 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- curses binding. @@ -55,14 +54,14 @@ pragma Preelaborate (Terminal_Interface.Curses); pragma Linker_Options ("-lncurses"); - NC_Major_Version : constant := 5; -- Major version of the library - NC_Minor_Version : constant := 2; -- Minor version of the library - NC_Version : constant String := "5.2"; -- Version of library + NC_Major_Version : constant := 5; -- Major version of the library + NC_Minor_Version : constant := 3; -- Minor version of the library + NC_Version : constant String := "5.3"; -- Version of library type Window is private; Null_Window : constant Window; - type Line_Position is new Natural; -- line coordinate + type Line_Position is new Natural; -- line coordinate type Column_Position is new Natural; -- column coordinate subtype Line_Count is Line_Position range 1 .. Line_Position'Last; @@ -89,123 +88,123 @@ -- Constants for function- and special keys -- - Key_None : constant Special_Key_Code := 8#400#; - Key_Code_Yes : constant Special_Key_Code := 8#400#; - Key_Min : constant Special_Key_Code := 8#401#; - Key_Break : constant Special_Key_Code := 8#401#; - Key_Cursor_Down : constant Special_Key_Code := 8#402#; - Key_Cursor_Up : constant Special_Key_Code := 8#403#; - Key_Cursor_Left : constant Special_Key_Code := 8#404#; - Key_Cursor_Right : constant Special_Key_Code := 8#405#; - Key_Home : constant Special_Key_Code := 8#406#; - Key_Backspace : constant Special_Key_Code := 8#407#; - Key_F0 : constant Special_Key_Code := 8#410#; - Key_F1 : constant Special_Key_Code := 8#411#; - Key_F2 : constant Special_Key_Code := 8#412#; - Key_F3 : constant Special_Key_Code := 8#413#; - Key_F4 : constant Special_Key_Code := 8#414#; - Key_F5 : constant Special_Key_Code := 8#415#; - Key_F6 : constant Special_Key_Code := 8#416#; - Key_F7 : constant Special_Key_Code := 8#417#; - Key_F8 : constant Special_Key_Code := 8#420#; - Key_F9 : constant Special_Key_Code := 8#421#; - Key_F10 : constant Special_Key_Code := 8#422#; - Key_F11 : constant Special_Key_Code := 8#423#; - Key_F12 : constant Special_Key_Code := 8#424#; - Key_F13 : constant Special_Key_Code := 8#425#; - Key_F14 : constant Special_Key_Code := 8#426#; - Key_F15 : constant Special_Key_Code := 8#427#; - Key_F16 : constant Special_Key_Code := 8#430#; - Key_F17 : constant Special_Key_Code := 8#431#; - Key_F18 : constant Special_Key_Code := 8#432#; - Key_F19 : constant Special_Key_Code := 8#433#; - Key_F20 : constant Special_Key_Code := 8#434#; - Key_F21 : constant Special_Key_Code := 8#435#; - Key_F22 : constant Special_Key_Code := 8#436#; - Key_F23 : constant Special_Key_Code := 8#437#; - Key_F24 : constant Special_Key_Code := 8#440#; - Key_Delete_Line : constant Special_Key_Code := 8#510#; - Key_Insert_Line : constant Special_Key_Code := 8#511#; - Key_Delete_Char : constant Special_Key_Code := 8#512#; - Key_Insert_Char : constant Special_Key_Code := 8#513#; - Key_Exit_Insert_Mode : constant Special_Key_Code := 8#514#; - Key_Clear_Screen : constant Special_Key_Code := 8#515#; - Key_Clear_End_Of_Screen : constant Special_Key_Code := 8#516#; - Key_Clear_End_Of_Line : constant Special_Key_Code := 8#517#; - Key_Scroll_1_Forward : constant Special_Key_Code := 8#520#; - Key_Scroll_1_Backward : constant Special_Key_Code := 8#521#; - Key_Next_Page : constant Special_Key_Code := 8#522#; - Key_Previous_Page : constant Special_Key_Code := 8#523#; - Key_Set_Tab : constant Special_Key_Code := 8#524#; - Key_Clear_Tab : constant Special_Key_Code := 8#525#; - Key_Clear_All_Tabs : constant Special_Key_Code := 8#526#; - Key_Enter_Or_Send : constant Special_Key_Code := 8#527#; - Key_Soft_Reset : constant Special_Key_Code := 8#530#; - Key_Reset : constant Special_Key_Code := 8#531#; - Key_Print : constant Special_Key_Code := 8#532#; - Key_Bottom : constant Special_Key_Code := 8#533#; - Key_Upper_Left_Of_Keypad : constant Special_Key_Code := 8#534#; - Key_Upper_Right_Of_Keypad : constant Special_Key_Code := 8#535#; - Key_Center_Of_Keypad : constant Special_Key_Code := 8#536#; - Key_Lower_Left_Of_Keypad : constant Special_Key_Code := 8#537#; - Key_Lower_Right_Of_Keypad : constant Special_Key_Code := 8#540#; - Key_Back_Tab : constant Special_Key_Code := 8#541#; - Key_Beginning : constant Special_Key_Code := 8#542#; - Key_Cancel : constant Special_Key_Code := 8#543#; - Key_Close : constant Special_Key_Code := 8#544#; - Key_Command : constant Special_Key_Code := 8#545#; - Key_Copy : constant Special_Key_Code := 8#546#; - Key_Create : constant Special_Key_Code := 8#547#; - Key_End : constant Special_Key_Code := 8#550#; - Key_Exit : constant Special_Key_Code := 8#551#; - Key_Find : constant Special_Key_Code := 8#552#; - Key_Help : constant Special_Key_Code := 8#553#; - Key_Mark : constant Special_Key_Code := 8#554#; - Key_Message : constant Special_Key_Code := 8#555#; - Key_Move : constant Special_Key_Code := 8#556#; - Key_Next : constant Special_Key_Code := 8#557#; - Key_Open : constant Special_Key_Code := 8#560#; - Key_Options : constant Special_Key_Code := 8#561#; - Key_Previous : constant Special_Key_Code := 8#562#; - Key_Redo : constant Special_Key_Code := 8#563#; - Key_Reference : constant Special_Key_Code := 8#564#; - Key_Refresh : constant Special_Key_Code := 8#565#; - Key_Replace : constant Special_Key_Code := 8#566#; - Key_Restart : constant Special_Key_Code := 8#567#; - Key_Resume : constant Special_Key_Code := 8#570#; - Key_Save : constant Special_Key_Code := 8#571#; - Key_Shift_Begin : constant Special_Key_Code := 8#572#; - Key_Shift_Cancel : constant Special_Key_Code := 8#573#; - Key_Shift_Command : constant Special_Key_Code := 8#574#; - Key_Shift_Copy : constant Special_Key_Code := 8#575#; - Key_Shift_Create : constant Special_Key_Code := 8#576#; - Key_Shift_Delete_Char : constant Special_Key_Code := 8#577#; - Key_Shift_Delete_Line : constant Special_Key_Code := 8#600#; - Key_Select : constant Special_Key_Code := 8#601#; - Key_Shift_End : constant Special_Key_Code := 8#602#; - Key_Shift_Clear_End_Of_Line : constant Special_Key_Code := 8#603#; - Key_Shift_Exit : constant Special_Key_Code := 8#604#; - Key_Shift_Find : constant Special_Key_Code := 8#605#; - Key_Shift_Help : constant Special_Key_Code := 8#606#; - Key_Shift_Home : constant Special_Key_Code := 8#607#; - Key_Shift_Insert_Char : constant Special_Key_Code := 8#610#; - Key_Shift_Cursor_Left : constant Special_Key_Code := 8#611#; - Key_Shift_Message : constant Special_Key_Code := 8#612#; - Key_Shift_Move : constant Special_Key_Code := 8#613#; - Key_Shift_Next_Page : constant Special_Key_Code := 8#614#; - Key_Shift_Options : constant Special_Key_Code := 8#615#; - Key_Shift_Previous_Page : constant Special_Key_Code := 8#616#; - Key_Shift_Print : constant Special_Key_Code := 8#617#; - Key_Shift_Redo : constant Special_Key_Code := 8#620#; - Key_Shift_Replace : constant Special_Key_Code := 8#621#; - Key_Shift_Cursor_Right : constant Special_Key_Code := 8#622#; - Key_Shift_Resume : constant Special_Key_Code := 8#623#; - Key_Shift_Save : constant Special_Key_Code := 8#624#; - Key_Shift_Suspend : constant Special_Key_Code := 8#625#; - Key_Shift_Undo : constant Special_Key_Code := 8#626#; - Key_Suspend : constant Special_Key_Code := 8#627#; - Key_Undo : constant Special_Key_Code := 8#630#; - Key_Mouse : constant Special_Key_Code := 8#631#; + Key_None : constant Special_Key_Code := 8#400#; + Key_Code_Yes : constant Special_Key_Code := 8#400#; + Key_Min : constant Special_Key_Code := 8#401#; + Key_Break : constant Special_Key_Code := 8#401#; + Key_Cursor_Down : constant Special_Key_Code := 8#402#; + Key_Cursor_Up : constant Special_Key_Code := 8#403#; + Key_Cursor_Left : constant Special_Key_Code := 8#404#; + Key_Cursor_Right : constant Special_Key_Code := 8#405#; + Key_Home : constant Special_Key_Code := 8#406#; + Key_Backspace : constant Special_Key_Code := 8#407#; + Key_F0 : constant Special_Key_Code := 8#410#; + Key_F1 : constant Special_Key_Code := 8#411#; + Key_F2 : constant Special_Key_Code := 8#412#; + Key_F3 : constant Special_Key_Code := 8#413#; + Key_F4 : constant Special_Key_Code := 8#414#; + Key_F5 : constant Special_Key_Code := 8#415#; + Key_F6 : constant Special_Key_Code := 8#416#; + Key_F7 : constant Special_Key_Code := 8#417#; + Key_F8 : constant Special_Key_Code := 8#420#; + Key_F9 : constant Special_Key_Code := 8#421#; + Key_F10 : constant Special_Key_Code := 8#422#; + Key_F11 : constant Special_Key_Code := 8#423#; + Key_F12 : constant Special_Key_Code := 8#424#; + Key_F13 : constant Special_Key_Code := 8#425#; + Key_F14 : constant Special_Key_Code := 8#426#; + Key_F15 : constant Special_Key_Code := 8#427#; + Key_F16 : constant Special_Key_Code := 8#430#; + Key_F17 : constant Special_Key_Code := 8#431#; + Key_F18 : constant Special_Key_Code := 8#432#; + Key_F19 : constant Special_Key_Code := 8#433#; + Key_F20 : constant Special_Key_Code := 8#434#; + Key_F21 : constant Special_Key_Code := 8#435#; + Key_F22 : constant Special_Key_Code := 8#436#; + Key_F23 : constant Special_Key_Code := 8#437#; + Key_F24 : constant Special_Key_Code := 8#440#; + Key_Delete_Line : constant Special_Key_Code := 8#510#; + Key_Insert_Line : constant Special_Key_Code := 8#511#; + Key_Delete_Char : constant Special_Key_Code := 8#512#; + Key_Insert_Char : constant Special_Key_Code := 8#513#; + Key_Exit_Insert_Mode : constant Special_Key_Code := 8#514#; + Key_Clear_Screen : constant Special_Key_Code := 8#515#; + Key_Clear_End_Of_Screen : constant Special_Key_Code := 8#516#; + Key_Clear_End_Of_Line : constant Special_Key_Code := 8#517#; + Key_Scroll_1_Forward : constant Special_Key_Code := 8#520#; + Key_Scroll_1_Backward : constant Special_Key_Code := 8#521#; + Key_Next_Page : constant Special_Key_Code := 8#522#; + Key_Previous_Page : constant Special_Key_Code := 8#523#; + Key_Set_Tab : constant Special_Key_Code := 8#524#; + Key_Clear_Tab : constant Special_Key_Code := 8#525#; + Key_Clear_All_Tabs : constant Special_Key_Code := 8#526#; + Key_Enter_Or_Send : constant Special_Key_Code := 8#527#; + Key_Soft_Reset : constant Special_Key_Code := 8#530#; + Key_Reset : constant Special_Key_Code := 8#531#; + Key_Print : constant Special_Key_Code := 8#532#; + Key_Bottom : constant Special_Key_Code := 8#533#; + Key_Upper_Left_Of_Keypad : constant Special_Key_Code := 8#534#; + Key_Upper_Right_Of_Keypad : constant Special_Key_Code := 8#535#; + Key_Center_Of_Keypad : constant Special_Key_Code := 8#536#; + Key_Lower_Left_Of_Keypad : constant Special_Key_Code := 8#537#; + Key_Lower_Right_Of_Keypad : constant Special_Key_Code := 8#540#; + Key_Back_Tab : constant Special_Key_Code := 8#541#; + Key_Beginning : constant Special_Key_Code := 8#542#; + Key_Cancel : constant Special_Key_Code := 8#543#; + Key_Close : constant Special_Key_Code := 8#544#; + Key_Command : constant Special_Key_Code := 8#545#; + Key_Copy : constant Special_Key_Code := 8#546#; + Key_Create : constant Special_Key_Code := 8#547#; + Key_End : constant Special_Key_Code := 8#550#; + Key_Exit : constant Special_Key_Code := 8#551#; + Key_Find : constant Special_Key_Code := 8#552#; + Key_Help : constant Special_Key_Code := 8#553#; + Key_Mark : constant Special_Key_Code := 8#554#; + Key_Message : constant Special_Key_Code := 8#555#; + Key_Move : constant Special_Key_Code := 8#556#; + Key_Next : constant Special_Key_Code := 8#557#; + Key_Open : constant Special_Key_Code := 8#560#; + Key_Options : constant Special_Key_Code := 8#561#; + Key_Previous : constant Special_Key_Code := 8#562#; + Key_Redo : constant Special_Key_Code := 8#563#; + Key_Reference : constant Special_Key_Code := 8#564#; + Key_Refresh : constant Special_Key_Code := 8#565#; + Key_Replace : constant Special_Key_Code := 8#566#; + Key_Restart : constant Special_Key_Code := 8#567#; + Key_Resume : constant Special_Key_Code := 8#570#; + Key_Save : constant Special_Key_Code := 8#571#; + Key_Shift_Begin : constant Special_Key_Code := 8#572#; + Key_Shift_Cancel : constant Special_Key_Code := 8#573#; + Key_Shift_Command : constant Special_Key_Code := 8#574#; + Key_Shift_Copy : constant Special_Key_Code := 8#575#; + Key_Shift_Create : constant Special_Key_Code := 8#576#; + Key_Shift_Delete_Char : constant Special_Key_Code := 8#577#; + Key_Shift_Delete_Line : constant Special_Key_Code := 8#600#; + Key_Select : constant Special_Key_Code := 8#601#; + Key_Shift_End : constant Special_Key_Code := 8#602#; + Key_Shift_Clear_End_Of_Line : constant Special_Key_Code := 8#603#; + Key_Shift_Exit : constant Special_Key_Code := 8#604#; + Key_Shift_Find : constant Special_Key_Code := 8#605#; + Key_Shift_Help : constant Special_Key_Code := 8#606#; + Key_Shift_Home : constant Special_Key_Code := 8#607#; + Key_Shift_Insert_Char : constant Special_Key_Code := 8#610#; + Key_Shift_Cursor_Left : constant Special_Key_Code := 8#611#; + Key_Shift_Message : constant Special_Key_Code := 8#612#; + Key_Shift_Move : constant Special_Key_Code := 8#613#; + Key_Shift_Next_Page : constant Special_Key_Code := 8#614#; + Key_Shift_Options : constant Special_Key_Code := 8#615#; + Key_Shift_Previous_Page : constant Special_Key_Code := 8#616#; + Key_Shift_Print : constant Special_Key_Code := 8#617#; + Key_Shift_Redo : constant Special_Key_Code := 8#620#; + Key_Shift_Replace : constant Special_Key_Code := 8#621#; + Key_Shift_Cursor_Right : constant Special_Key_Code := 8#622#; + Key_Shift_Resume : constant Special_Key_Code := 8#623#; + Key_Shift_Save : constant Special_Key_Code := 8#624#; + Key_Shift_Suspend : constant Special_Key_Code := 8#625#; + Key_Shift_Undo : constant Special_Key_Code := 8#626#; + Key_Suspend : constant Special_Key_Code := 8#627#; + Key_Undo : constant Special_Key_Code := 8#630#; + Key_Mouse : constant Special_Key_Code := 8#631#; Key_Resize : constant Special_Key_Code := 8#632#; Key_Max : constant Special_Key_Code @@ -219,88 +218,88 @@ -- For those who like to use the original key names we produce them were -- they differ from the original. Please note that they may differ in -- lower/upper case. - KEY_DOWN : Special_Key_Code renames Key_Cursor_Down; - KEY_UP : Special_Key_Code renames Key_Cursor_Up; - KEY_LEFT : Special_Key_Code renames Key_Cursor_Left; - KEY_RIGHT : Special_Key_Code renames Key_Cursor_Right; - KEY_DL : Special_Key_Code renames Key_Delete_Line; - KEY_IL : Special_Key_Code renames Key_Insert_Line; - KEY_DC : Special_Key_Code renames Key_Delete_Char; - KEY_IC : Special_Key_Code renames Key_Insert_Char; - KEY_EIC : Special_Key_Code renames Key_Exit_Insert_Mode; - KEY_CLEAR : Special_Key_Code renames Key_Clear_Screen; - KEY_EOS : Special_Key_Code renames Key_Clear_End_Of_Screen; - KEY_EOL : Special_Key_Code renames Key_Clear_End_Of_Line; - KEY_SF : Special_Key_Code renames Key_Scroll_1_Forward; - KEY_SR : Special_Key_Code renames Key_Scroll_1_Backward; - KEY_NPAGE : Special_Key_Code renames Key_Next_Page; - KEY_PPAGE : Special_Key_Code renames Key_Previous_Page; - KEY_STAB : Special_Key_Code renames Key_Set_Tab; - KEY_CTAB : Special_Key_Code renames Key_Clear_Tab; - KEY_CATAB : Special_Key_Code renames Key_Clear_All_Tabs; - KEY_ENTER : Special_Key_Code renames Key_Enter_Or_Send; - KEY_SRESET : Special_Key_Code renames Key_Soft_Reset; - KEY_LL : Special_Key_Code renames Key_Bottom; - KEY_A1 : Special_Key_Code renames Key_Upper_Left_Of_Keypad; - KEY_A3 : Special_Key_Code renames Key_Upper_Right_Of_Keypad; - KEY_B2 : Special_Key_Code renames Key_Center_Of_Keypad; - KEY_C1 : Special_Key_Code renames Key_Lower_Left_Of_Keypad; - KEY_C3 : Special_Key_Code renames Key_Lower_Right_Of_Keypad; - KEY_BTAB : Special_Key_Code renames Key_Back_Tab; - KEY_BEG : Special_Key_Code renames Key_Beginning; - KEY_SBEG : Special_Key_Code renames Key_Shift_Begin; - KEY_SCANCEL : Special_Key_Code renames Key_Shift_Cancel; - KEY_SCOMMAND : Special_Key_Code renames Key_Shift_Command; - KEY_SCOPY : Special_Key_Code renames Key_Shift_Copy; - KEY_SCREATE : Special_Key_Code renames Key_Shift_Create; - KEY_SDC : Special_Key_Code renames Key_Shift_Delete_Char; - KEY_SDL : Special_Key_Code renames Key_Shift_Delete_Line; - KEY_SEND : Special_Key_Code renames Key_Shift_End; - KEY_SEOL : Special_Key_Code renames Key_Shift_Clear_End_Of_Line; - KEY_SEXIT : Special_Key_Code renames Key_Shift_Exit; - KEY_SFIND : Special_Key_Code renames Key_Shift_Find; - KEY_SHELP : Special_Key_Code renames Key_Shift_Help; - KEY_SHOME : Special_Key_Code renames Key_Shift_Home; - KEY_SIC : Special_Key_Code renames Key_Shift_Insert_Char; - KEY_SLEFT : Special_Key_Code renames Key_Shift_Cursor_Left; - KEY_SMESSAGE : Special_Key_Code renames Key_Shift_Message; - KEY_SMOVE : Special_Key_Code renames Key_Shift_Move; - KEY_SNEXT : Special_Key_Code renames Key_Shift_Next_Page; - KEY_SOPTIONS : Special_Key_Code renames Key_Shift_Options; - KEY_SPREVIOUS : Special_Key_Code renames Key_Shift_Previous_Page; - KEY_SPRINT : Special_Key_Code renames Key_Shift_Print; - KEY_SREDO : Special_Key_Code renames Key_Shift_Redo; - KEY_SREPLACE : Special_Key_Code renames Key_Shift_Replace; - KEY_SRIGHT : Special_Key_Code renames Key_Shift_Cursor_Right; - KEY_SRSUME : Special_Key_Code renames Key_Shift_Resume; - KEY_SSAVE : Special_Key_Code renames Key_Shift_Save; - KEY_SSUSPEND : Special_Key_Code renames Key_Shift_Suspend; + KEY_DOWN : Special_Key_Code renames Key_Cursor_Down; + KEY_UP : Special_Key_Code renames Key_Cursor_Up; + KEY_LEFT : Special_Key_Code renames Key_Cursor_Left; + KEY_RIGHT : Special_Key_Code renames Key_Cursor_Right; + KEY_DL : Special_Key_Code renames Key_Delete_Line; + KEY_IL : Special_Key_Code renames Key_Insert_Line; + KEY_DC : Special_Key_Code renames Key_Delete_Char; + KEY_IC : Special_Key_Code renames Key_Insert_Char; + KEY_EIC : Special_Key_Code renames Key_Exit_Insert_Mode; + KEY_CLEAR : Special_Key_Code renames Key_Clear_Screen; + KEY_EOS : Special_Key_Code renames Key_Clear_End_Of_Screen; + KEY_EOL : Special_Key_Code renames Key_Clear_End_Of_Line; + KEY_SF : Special_Key_Code renames Key_Scroll_1_Forward; + KEY_SR : Special_Key_Code renames Key_Scroll_1_Backward; + KEY_NPAGE : Special_Key_Code renames Key_Next_Page; + KEY_PPAGE : Special_Key_Code renames Key_Previous_Page; + KEY_STAB : Special_Key_Code renames Key_Set_Tab; + KEY_CTAB : Special_Key_Code renames Key_Clear_Tab; + KEY_CATAB : Special_Key_Code renames Key_Clear_All_Tabs; + KEY_ENTER : Special_Key_Code renames Key_Enter_Or_Send; + KEY_SRESET : Special_Key_Code renames Key_Soft_Reset; + KEY_LL : Special_Key_Code renames Key_Bottom; + KEY_A1 : Special_Key_Code renames Key_Upper_Left_Of_Keypad; + KEY_A3 : Special_Key_Code renames Key_Upper_Right_Of_Keypad; + KEY_B2 : Special_Key_Code renames Key_Center_Of_Keypad; + KEY_C1 : Special_Key_Code renames Key_Lower_Left_Of_Keypad; + KEY_C3 : Special_Key_Code renames Key_Lower_Right_Of_Keypad; + KEY_BTAB : Special_Key_Code renames Key_Back_Tab; + KEY_BEG : Special_Key_Code renames Key_Beginning; + KEY_SBEG : Special_Key_Code renames Key_Shift_Begin; + KEY_SCANCEL : Special_Key_Code renames Key_Shift_Cancel; + KEY_SCOMMAND : Special_Key_Code renames Key_Shift_Command; + KEY_SCOPY : Special_Key_Code renames Key_Shift_Copy; + KEY_SCREATE : Special_Key_Code renames Key_Shift_Create; + KEY_SDC : Special_Key_Code renames Key_Shift_Delete_Char; + KEY_SDL : Special_Key_Code renames Key_Shift_Delete_Line; + KEY_SEND : Special_Key_Code renames Key_Shift_End; + KEY_SEOL : Special_Key_Code renames Key_Shift_Clear_End_Of_Line; + KEY_SEXIT : Special_Key_Code renames Key_Shift_Exit; + KEY_SFIND : Special_Key_Code renames Key_Shift_Find; + KEY_SHELP : Special_Key_Code renames Key_Shift_Help; + KEY_SHOME : Special_Key_Code renames Key_Shift_Home; + KEY_SIC : Special_Key_Code renames Key_Shift_Insert_Char; + KEY_SLEFT : Special_Key_Code renames Key_Shift_Cursor_Left; + KEY_SMESSAGE : Special_Key_Code renames Key_Shift_Message; + KEY_SMOVE : Special_Key_Code renames Key_Shift_Move; + KEY_SNEXT : Special_Key_Code renames Key_Shift_Next_Page; + KEY_SOPTIONS : Special_Key_Code renames Key_Shift_Options; + KEY_SPREVIOUS : Special_Key_Code renames Key_Shift_Previous_Page; + KEY_SPRINT : Special_Key_Code renames Key_Shift_Print; + KEY_SREDO : Special_Key_Code renames Key_Shift_Redo; + KEY_SREPLACE : Special_Key_Code renames Key_Shift_Replace; + KEY_SRIGHT : Special_Key_Code renames Key_Shift_Cursor_Right; + KEY_SRSUME : Special_Key_Code renames Key_Shift_Resume; + KEY_SSAVE : Special_Key_Code renames Key_Shift_Save; + KEY_SSUSPEND : Special_Key_Code renames Key_Shift_Suspend; KEY_SUNDO : Special_Key_Code renames Key_Shift_Undo; ------------------------------------------------------------------------------ - type Color_Number is range -1 .. Integer (Interfaces.C.short'Last); + type Color_Number is range -1 .. Integer (Interfaces.C.short'Last); for Color_Number'Size use Interfaces.C.short'Size; -- (n)curses uses a short for the color index -- The model is, that a Color_Number is an index into an array of -- (potentially) definable colors. Some of those indices are -- predefined (see below), although they may not really exist. - Default_Color : constant Color_Number := -1; - Black : constant Color_Number := 0; - Red : constant Color_Number := 1; - Green : constant Color_Number := 2; - Yellow : constant Color_Number := 3; - Blue : constant Color_Number := 4; - Magenta : constant Color_Number := 5; - Cyan : constant Color_Number := 6; + Default_Color : constant Color_Number := -1; + Black : constant Color_Number := 0; + Red : constant Color_Number := 1; + Green : constant Color_Number := 2; + Yellow : constant Color_Number := 3; + Blue : constant Color_Number := 4; + Magenta : constant Color_Number := 5; + Cyan : constant Color_Number := 6; White : constant Color_Number := 7; - type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last); + type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last); for RGB_Value'Size use Interfaces.C.short'Size; -- Some system may allow to redefine a color by setting RGB values. - type Color_Pair is range 0 .. 255; + type Color_Pair is range 0 .. 255; for Color_Pair'Size use 8; subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255; -- (n)curses reserves 1 Byte for the color-pair number. Color Pair 0 @@ -310,22 +309,22 @@ type Character_Attribute_Set is record - Stand_Out : Boolean; - Under_Line : Boolean; - Reverse_Video : Boolean; - Blink : Boolean; - Dim_Character : Boolean; - Bold_Character : Boolean; - Alternate_Character_Set : Boolean; - Invisible_Character : Boolean; - Protected_Character : Boolean; - Horizontal : Boolean; - Left : Boolean; - Low : Boolean; - Right : Boolean; - Top : Boolean; + Stand_Out : Boolean; + Under_Line : Boolean; + Reverse_Video : Boolean; + Blink : Boolean; + Dim_Character : Boolean; + Bold_Character : Boolean; + Alternate_Character_Set : Boolean; + Invisible_Character : Boolean; + Protected_Character : Boolean; + Horizontal : Boolean; + Left : Boolean; + Low : Boolean; + Right : Boolean; + Top : Boolean; Vertical : Boolean; - end record; + end record; pragma Pack (Character_Attribute_Set); pragma Convention (C, Character_Attribute_Set); @@ -356,9 +355,9 @@ type Attributed_Character is record - Attr : Character_Attribute_Set; - Color : Color_Pair; - Ch : Character; + Attr : Character_Attribute_Set; + Color : Color_Pair; + Ch : Character; end record; pragma Convention (C, Attributed_Character); -- This is the counterpart for the chtype in C. @@ -374,7 +373,7 @@ -- different on your system. Default_Character : constant Attributed_Character - := (Ch => Character'First, + := (Ch => Character'First, Color => Color_Pair'First, Attr => (others => False)); -- preelaboratable Normal_Video @@ -385,25 +384,25 @@ ------------------ -- Exceptions -- ------------------ - Curses_Exception : exception; + Curses_Exception : exception; Wrong_Curses_Version : exception; -- Those exceptions are raised by the ETI (Extended Terminal Interface) -- subpackets for Menu and Forms handling. -- - Eti_System_Error : exception; - Eti_Bad_Argument : exception; - Eti_Posted : exception; - Eti_Connected : exception; - Eti_Bad_State : exception; - Eti_No_Room : exception; - Eti_Not_Posted : exception; - Eti_Unknown_Command : exception; - Eti_No_Match : exception; - Eti_Not_Selectable : exception; - Eti_Not_Connected : exception; - Eti_Request_Denied : exception; - Eti_Invalid_Field : exception; + Eti_System_Error : exception; + Eti_Bad_Argument : exception; + Eti_Posted : exception; + Eti_Connected : exception; + Eti_Bad_State : exception; + Eti_No_Room : exception; + Eti_Not_Posted : exception; + Eti_Unknown_Command : exception; + Eti_No_Match : exception; + Eti_Not_Selectable : exception; + Eti_Not_Connected : exception; + Eti_Request_Denied : exception; + Eti_Invalid_Field : exception; Eti_Current : exception; -------------------------------------------------------------------------- @@ -414,7 +413,7 @@ -- this is to use functions. -------------------------------------------------------------------------- - function Lines return Line_Count; + function Lines return Line_Count; pragma Inline (Lines); function Columns return Column_Count; @@ -438,37 +437,37 @@ -- You must use this constants as indices into the ACS_Map array -- to get the corresponding attributed character at runtime. -- - ACS_Upper_Left_Corner : constant Character := 'l'; - ACS_Lower_Left_Corner : constant Character := 'm'; - ACS_Upper_Right_Corner : constant Character := 'k'; - ACS_Lower_Right_Corner : constant Character := 'j'; - ACS_Left_Tee : constant Character := 't'; - ACS_Right_Tee : constant Character := 'u'; - ACS_Bottom_Tee : constant Character := 'v'; - ACS_Top_Tee : constant Character := 'w'; - ACS_Horizontal_Line : constant Character := 'q'; - ACS_Vertical_Line : constant Character := 'x'; - ACS_Plus_Symbol : constant Character := 'n'; - ACS_Scan_Line_1 : constant Character := 'o'; - ACS_Scan_Line_9 : constant Character := 's'; - ACS_Diamond : constant Character := Character'Val (96); - ACS_Checker_Board : constant Character := 'a'; - ACS_Degree : constant Character := 'f'; - ACS_Plus_Minus : constant Character := 'g'; - ACS_Bullet : constant Character := '~'; - ACS_Left_Arrow : constant Character := ','; - ACS_Right_Arrow : constant Character := '+'; - ACS_Down_Arrow : constant Character := '.'; - ACS_Up_Arrow : constant Character := '-'; - ACS_Board_Of_Squares : constant Character := 'h'; - ACS_Lantern : constant Character := 'i'; - ACS_Solid_Block : constant Character := '0'; - ACS_Scan_Line_3 : constant Character := 'p'; - ACS_Scan_Line_7 : constant Character := 'r'; - ACS_Less_Or_Equal : constant Character := 'y'; - ACS_Greater_Or_Equal : constant Character := 'z'; - ACS_PI : constant Character := '{'; - ACS_Not_Equal : constant Character := '|'; + ACS_Upper_Left_Corner : constant Character := 'l'; + ACS_Lower_Left_Corner : constant Character := 'm'; + ACS_Upper_Right_Corner : constant Character := 'k'; + ACS_Lower_Right_Corner : constant Character := 'j'; + ACS_Left_Tee : constant Character := 't'; + ACS_Right_Tee : constant Character := 'u'; + ACS_Bottom_Tee : constant Character := 'v'; + ACS_Top_Tee : constant Character := 'w'; + ACS_Horizontal_Line : constant Character := 'q'; + ACS_Vertical_Line : constant Character := 'x'; + ACS_Plus_Symbol : constant Character := 'n'; + ACS_Scan_Line_1 : constant Character := 'o'; + ACS_Scan_Line_9 : constant Character := 's'; + ACS_Diamond : constant Character := Character'Val (96); + ACS_Checker_Board : constant Character := 'a'; + ACS_Degree : constant Character := 'f'; + ACS_Plus_Minus : constant Character := 'g'; + ACS_Bullet : constant Character := '~'; + ACS_Left_Arrow : constant Character := ','; + ACS_Right_Arrow : constant Character := '+'; + ACS_Down_Arrow : constant Character := '.'; + ACS_Up_Arrow : constant Character := '-'; + ACS_Board_Of_Squares : constant Character := 'h'; + ACS_Lantern : constant Character := 'i'; + ACS_Solid_Block : constant Character := '0'; + ACS_Scan_Line_3 : constant Character := 'p'; + ACS_Scan_Line_7 : constant Character := 'r'; + ACS_Less_Or_Equal : constant Character := 'y'; + ACS_Greater_Or_Equal : constant Character := 'z'; + ACS_PI : constant Character := '{'; + ACS_Not_Equal : constant Character := '|'; ACS_Sterling : constant Character := '}'; -- |===================================================================== @@ -487,14 +486,14 @@ -- #1A NAME="AFU_3"#2| procedure Init_Windows renames Init_Screen; -- AKA: initscr() - pragma Inline (Init_Screen); + pragma Inline (Init_Screen); pragma Inline (Init_Windows); -- #1A NAME="AFU_4"#2| procedure End_Windows; -- AKA: endwin() procedure End_Screen renames End_Windows; - pragma Inline (End_Windows); + pragma Inline (End_Windows); pragma Inline (End_Screen); -- #1A NAME="AFU_5"#2| @@ -507,8 +506,8 @@ -- |===================================================================== -- #1A NAME="AFU_6"#2| - procedure Move_Cursor (Win : in Window := Standard_Window; - Line : in Line_Position; + procedure Move_Cursor (Win : in Window := Standard_Window; + Line : in Line_Position; Column : in Column_Position); -- AKA: wmove() -- AKA: move() @@ -519,42 +518,42 @@ -- |===================================================================== -- #1A NAME="AFU_7"#2| - procedure Add (Win : in Window := Standard_Window; + procedure Add (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA: waddch() -- AKA: addch() - procedure Add (Win : in Window := Standard_Window; + procedure Add (Win : in Window := Standard_Window; Ch : in Character); -- Add a single character at the current logical cursor position to -- the window. Use the current windows attributes. -- #1A NAME="AFU_8"#2| procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; Ch : in Attributed_Character); -- AKA: mvwaddch() -- AKA: mvaddch() procedure Add - (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; + (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; Ch : in Character); -- Move to the position and add a single character into the window -- There are more Add routines, so the Inline pragma follows later -- #1A NAME="AFU_9"#2| procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA: wechochar() -- AKA: echochar() procedure Add_With_Immediate_Echo - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Ch : in Character); -- Add a character and do an immediate refresh of the screen. pragma Inline (Add_With_Immediate_Echo); @@ -566,9 +565,9 @@ -- #1A NAME="AFU_10"#2| function Create - (Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; + (Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- Not Implemented: Default Number_Of_Lines, Number_Of_Columns -- the C version lets them be 0, see the man page. @@ -576,9 +575,9 @@ pragma Inline (Create); function New_Window - (Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; + (Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window renames Create; pragma Inline (New_Window); @@ -591,20 +590,20 @@ -- #1A NAME="AFU_12"#2| function Sub_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA: subwin() pragma Inline (Sub_Window); -- #1A NAME="AFU_13"#2| function Derived_Window - (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; + (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA: derwin() pragma Inline (Derived_Window); @@ -615,15 +614,15 @@ pragma Inline (Duplicate); -- #1A NAME="AFU_15"#2| - procedure Move_Window (Win : in Window; - Line : in Line_Position; + procedure Move_Window (Win : in Window; + Line : in Line_Position; Column : in Column_Position); -- AKA: mvwin() pragma Inline (Move_Window); -- #1A NAME="AFU_16"#2| - procedure Move_Derived_Window (Win : in Window; - Line : in Line_Position; + procedure Move_Derived_Window (Win : in Window; + Line : in Line_Position; Column : in Column_Position); -- AKA: mvderwin() pragma Inline (Move_Derived_Window); @@ -639,7 +638,7 @@ pragma Import (C, Synchronize_Downwards, "wsyncdown"); -- #1A NAME="AFU_19"#2| - procedure Set_Synch_Mode (Win : in Window := Standard_Window; + procedure Set_Synch_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA: syncok() pragma Inline (Set_Synch_Mode); @@ -649,8 +648,8 @@ -- |===================================================================== -- #1A NAME="AFU_20"#2| - procedure Add (Win : in Window := Standard_Window; - Str : in String; + procedure Add (Win : in Window := Standard_Window; + Str : in String; Len : in Integer := -1); -- AKA: waddnstr() -- AKA: waddstr() @@ -658,10 +657,10 @@ -- AKA: addstr() -- #1A NAME="AFU_21"#2| - procedure Add (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; + procedure Add (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; Len : in Integer := -1); -- AKA: mvwaddnstr() -- AKA: mvwaddstr() @@ -673,8 +672,8 @@ -- |===================================================================== -- #1A NAME="AFU_22"#2| - procedure Add (Win : in Window := Standard_Window; - Str : in Attributed_String; + procedure Add (Win : in Window := Standard_Window; + Str : in Attributed_String; Len : in Integer := -1); -- AKA: waddchnstr() -- AKA: waddchstr() @@ -682,10 +681,10 @@ -- AKA: addchstr() -- #1A NAME="AFU_23"#2| - procedure Add (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in Attributed_String; + procedure Add (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in Attributed_String; Len : in Integer := -1); -- AKA: mvwaddchnstr() -- AKA: mvwaddchstr() @@ -701,14 +700,14 @@ -- #1A NAME="AFU_24"#2| procedure Border - (Win : in Window := Standard_Window; - Left_Side_Symbol : in Attributed_Character := Default_Character; - Right_Side_Symbol : in Attributed_Character := Default_Character; - Top_Side_Symbol : in Attributed_Character := Default_Character; - Bottom_Side_Symbol : in Attributed_Character := Default_Character; - Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; - Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; - Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; + (Win : in Window := Standard_Window; + Left_Side_Symbol : in Attributed_Character := Default_Character; + Right_Side_Symbol : in Attributed_Character := Default_Character; + Top_Side_Symbol : in Attributed_Character := Default_Character; + Bottom_Side_Symbol : in Attributed_Character := Default_Character; + Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; + Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; + Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character ); -- AKA: wborder() @@ -717,16 +716,16 @@ -- #1A NAME="AFU_25"#2| procedure Box - (Win : in Window := Standard_Window; - Vertical_Symbol : in Attributed_Character := Default_Character; + (Win : in Window := Standard_Window; + Vertical_Symbol : in Attributed_Character := Default_Character; Horizontal_Symbol : in Attributed_Character := Default_Character); -- AKA: box() pragma Inline (Box); -- #1A NAME="AFU_26"#2| procedure Horizontal_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; + (Win : in Window := Standard_Window; + Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA: whline() -- AKA: hline() @@ -734,8 +733,8 @@ -- #1A NAME="AFU_27"#2| procedure Vertical_Line - (Win : in Window := Standard_Window; - Line_Size : in Natural; + (Win : in Window := Standard_Window; + Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA: wvline() -- AKA: vline() @@ -796,15 +795,15 @@ -- PAIR_NUMBER(c) is the same as c.Color -- #1A NAME="AFU_31"#2| - procedure Standout (Win : Window := Standard_Window; + procedure Standout (Win : Window := Standard_Window; On : Boolean := True); -- AKA: wstandout() -- AKA: wstandend() -- #1A NAME="AFU_32"#2| procedure Switch_Character_Attribute - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; On : in Boolean := True); -- if False we switch Off. -- Switches those Attributes set to true in the list. -- AKA: wattron() @@ -814,8 +813,8 @@ -- #1A NAME="AFU_33"#2| procedure Set_Character_Attributes - (Win : in Window := Standard_Window; - Attr : in Character_Attribute_Set := Normal_Video; + (Win : in Window := Standard_Window; + Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: wattrset() -- AKA: attrset() @@ -834,7 +833,7 @@ pragma Inline (Get_Character_Attribute); -- #1A NAME="AFU_36"#2| - procedure Set_Color (Win : in Window := Standard_Window; + procedure Set_Color (Win : in Window := Standard_Window; Pair : in Color_Pair); -- AKA: wcolor_set() -- AKA: color_set() @@ -842,20 +841,20 @@ -- #1A NAME="AFU_37"#2| procedure Change_Attributes - (Win : in Window := Standard_Window; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; + (Win : in Window := Standard_Window; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: wchgat() -- AKA: chgat() -- #1A NAME="AFU_38"#2| procedure Change_Attributes - (Win : in Window := Standard_Window; - Line : in Line_Position := Line_Position'First; - Column : in Column_Position := Column_Position'First; - Count : in Integer := -1; - Attr : in Character_Attribute_Set := Normal_Video; + (Win : in Window := Standard_Window; + Line : in Line_Position := Line_Position'First; + Column : in Column_Position := Column_Position'First; + Count : in Integer := -1; + Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: mvwchgat() -- AKA: mvchgat() @@ -900,13 +899,13 @@ pragma Inline (Set_Echo_Mode); -- #1A NAME="AFU_44"#2| - procedure Set_Meta_Mode (Win : in Window := Standard_Window; + procedure Set_Meta_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA: meta() pragma Inline (Set_Meta_Mode); -- #1A NAME="AFU_45"#2| - procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; + procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA: keypad() pragma Inline (Set_KeyPad_Mode); @@ -925,14 +924,14 @@ -- #1A NAME="AFU_47"#2| procedure Set_Flush_On_Interrupt_Mode - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Mode : in Boolean := True); -- AKA: intrflush() pragma Inline (Set_Flush_On_Interrupt_Mode); -- #1A NAME="AFU_48"#2| procedure Set_Queue_Interrupt_Mode - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Flush : in Boolean := True); -- AKA: qiflush() -- AKA: noqiflush() @@ -940,7 +939,7 @@ -- #1A NAME="AFU_49"#2| procedure Set_NoDelay_Mode - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA: nodelay() pragma Inline (Set_NoDelay_Mode); @@ -948,8 +947,8 @@ type Timeout_Mode is (Blocking, Non_Blocking, Delayed); -- #1A NAME="AFU_50"#2| - procedure Set_Timeout_Mode (Win : in Window := Standard_Window; - Mode : in Timeout_Mode; + procedure Set_Timeout_Mode (Win : in Window := Standard_Window; + Mode : in Timeout_Mode; Amount : in Natural); -- in Milliseconds -- AKA: wtimeout() -- AKA: timeout() @@ -961,7 +960,7 @@ -- #1A NAME="AFU_51"#2| procedure Set_Escape_Timer_Mode - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Timer_Off : in Boolean := False); -- AKA: notimeout() pragma Inline (Set_Escape_Timer_Mode); @@ -978,42 +977,42 @@ -- #1A NAME="AFU_53"#2| procedure Clear_On_Next_Update - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Do_Clear : in Boolean := True); -- AKA: clearok() pragma Inline (Clear_On_Next_Update); -- #1A NAME="AFU_54"#2| procedure Use_Insert_Delete_Line - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Do_Idl : in Boolean := True); -- AKA: idlok() pragma Inline (Use_Insert_Delete_Line); -- #1A NAME="AFU_55"#2| procedure Use_Insert_Delete_Character - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Do_Idc : in Boolean := True); -- AKA: idcok() pragma Inline (Use_Insert_Delete_Character); -- #1A NAME="AFU_56"#2| procedure Leave_Cursor_After_Update - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Do_Leave : in Boolean := True); -- AKA: leaveok() pragma Inline (Leave_Cursor_After_Update); -- #1A NAME="AFU_57"#2| procedure Immediate_Update_Mode - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA: immedok() pragma Inline (Immediate_Update_Mode); -- #1A NAME="AFU_58"#2| procedure Allow_Scrolling - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA: scrollok() pragma Inline (Allow_Scrolling); @@ -1024,8 +1023,8 @@ -- #1A NAME="AFU_59"#2| procedure Set_Scroll_Region - (Win : in Window := Standard_Window; - Top_Line : in Line_Position; + (Win : in Window := Standard_Window; + Top_Line : in Line_Position; Bottom_Line : in Line_Position); -- AKA: wsetscrreg() -- AKA: setscrreg() @@ -1059,8 +1058,8 @@ -- AKA: redrawwin() -- #1A NAME="AFU_64"#2| - procedure Redraw (Win : in Window := Standard_Window; - Begin_Line : in Line_Position; + procedure Redraw (Win : in Window := Standard_Window; + Begin_Line : in Line_Position; Line_Count : in Positive); -- AKA: wredrawln() pragma Inline (Redraw); @@ -1105,7 +1104,7 @@ -- because in C it is common to see bkgdset(A_BOLD) or -- bkgdset(COLOR_PAIR(n)) procedure Set_Background - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA: wbkgdset() -- AKA: bkgdset() @@ -1113,7 +1112,7 @@ -- #1A NAME="AFU_70"#2| procedure Change_Background - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA: wbkgd() -- AKA: bkgd() @@ -1121,7 +1120,7 @@ -- #1A NAME="AFU_71"#2| -- ? wbkgdget is not listed in curs_bkgd, getbkgd is thpough. - function Get_Background (Win : Window := Standard_Window) + function Get_Background (Win : Window := Standard_Window) return Attributed_Character; -- AKA: wbkgdget() -- AKA: bkgdget() @@ -1141,22 +1140,22 @@ -- AKA: touchwin() -- #1A NAME="AFU_74"#2| - procedure Touch (Win : in Window := Standard_Window; - Start : in Line_Position; + procedure Touch (Win : in Window := Standard_Window; + Start : in Line_Position; Count : in Positive); -- AKA: touchline() pragma Inline (Touch); -- #1A NAME="AFU_75"#2| - procedure Change_Lines_Status (Win : in Window := Standard_Window; - Start : in Line_Position; - Count : in Positive; + procedure Change_Lines_Status (Win : in Window := Standard_Window; + Start : in Line_Position; + Count : in Positive; State : in Boolean); -- AKA: wtouchln() pragma Inline (Change_Lines_Status); -- #1A NAME="AFU_76"#2| - function Is_Touched (Win : Window := Standard_Window; + function Is_Touched (Win : Window := Standard_Window; Line : Line_Position) return Boolean; -- AKA: is_linetouched() @@ -1171,26 +1170,26 @@ -- #1A NAME="AFU_78"#2| procedure Copy - (Source_Window : in Window; - Destination_Window : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; - Destination_Right_Column : in Column_Position; + (Source_Window : in Window; + Destination_Window : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; + Destination_Right_Column : in Column_Position; Non_Destructive_Mode : in Boolean := True); -- AKA: copywin() pragma Inline (Copy); -- #1A NAME="AFU_79"#2| - procedure Overwrite (Source_Window : in Window; + procedure Overwrite (Source_Window : in Window; Destination_Window : in Window); -- AKA: overwrite() pragma Inline (Overwrite); -- #1A NAME="AFU_80"#2| - procedure Overlay (Source_Window : in Window; + procedure Overlay (Source_Window : in Window; Destination_Window : in Window); -- AKA: overlay() pragma Inline (Overlay); @@ -1201,7 +1200,7 @@ -- #1A NAME="AFU_81"#2| procedure Insert_Delete_Lines - (Win : in Window := Standard_Window; + (Win : in Window := Standard_Window; Lines : in Integer := 1); -- default is to insert one line above -- AKA: winsdelln() -- AKA: insdelln() @@ -1225,33 +1224,33 @@ -- #1A NAME="AFU_84"#2| procedure Get_Size - (Win : in Window := Standard_Window; - Number_Of_Lines : out Line_Count; + (Win : in Window := Standard_Window; + Number_Of_Lines : out Line_Count; Number_Of_Columns : out Column_Count); -- AKA: getmaxyx() pragma Inline (Get_Size); -- #1A NAME="AFU_85"#2| procedure Get_Window_Position - (Win : in Window := Standard_Window; - Top_Left_Line : out Line_Position; + (Win : in Window := Standard_Window; + Top_Left_Line : out Line_Position; Top_Left_Column : out Column_Position); -- AKA: getbegyx() pragma Inline (Get_Window_Position); -- #1A NAME="AFU_86"#2| procedure Get_Cursor_Position - (Win : in Window := Standard_Window; - Line : out Line_Position; + (Win : in Window := Standard_Window; + Line : out Line_Position; Column : out Column_Position); -- AKA: getyx() pragma Inline (Get_Cursor_Position); -- #1A NAME="AFU_87"#2| procedure Get_Origin_Relative_To_Parent - (Win : in Window; - Top_Left_Line : out Line_Position; - Top_Left_Column : out Column_Position; + (Win : in Window; + Top_Left_Line : out Line_Position; + Top_Left_Column : out Column_Position; Is_Not_A_Subwindow : out Boolean); -- AKA: getparyx() -- Instead of placing -1 in the coordinates as return, we use a boolean @@ -1263,53 +1262,53 @@ -- |===================================================================== -- #1A NAME="AFU_88"#2| - function New_Pad (Lines : Line_Count; + function New_Pad (Lines : Line_Count; Columns : Column_Count) return Window; -- AKA: newpad() pragma Inline (New_Pad); -- #1A NAME="AFU_89"#2| function Sub_Pad - (Pad : Window; - Number_Of_Lines : Line_Count; - Number_Of_Columns : Column_Count; - First_Line_Position : Line_Position; + (Pad : Window; + Number_Of_Lines : Line_Count; + Number_Of_Columns : Column_Count; + First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA: subpad() pragma Inline (Sub_Pad); -- #1A NAME="AFU_90"#2| procedure Refresh - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position); -- AKA: prefresh() pragma Inline (Refresh); -- #1A NAME="AFU_91"#2| procedure Refresh_Without_Update - (Pad : in Window; - Source_Top_Row : in Line_Position; - Source_Left_Column : in Column_Position; - Destination_Top_Row : in Line_Position; - Destination_Left_Column : in Column_Position; - Destination_Bottom_Row : in Line_Position; + (Pad : in Window; + Source_Top_Row : in Line_Position; + Source_Left_Column : in Column_Position; + Destination_Top_Row : in Line_Position; + Destination_Left_Column : in Column_Position; + Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position); -- AKA: pnoutrefresh() pragma Inline (Refresh_Without_Update); -- #1A NAME="AFU_92"#2| procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; + (Pad : in Window; Ch : in Attributed_Character); -- AKA: pechochar() procedure Add_Character_To_Pad_And_Echo_It - (Pad : in Window; + (Pad : in Window; Ch : in Character); pragma Inline (Add_Character_To_Pad_And_Echo_It); @@ -1318,7 +1317,7 @@ -- |===================================================================== -- #1A NAME="AFU_93"#2| - procedure Scroll (Win : in Window := Standard_Window; + procedure Scroll (Win : in Window := Standard_Window; Amount : in Integer := 1); -- AKA: wscrl() -- AKA: scroll() @@ -1336,8 +1335,8 @@ -- #1A NAME="AFU_95"#2| procedure Delete_Character - (Win : in Window := Standard_Window; - Line : in Line_Position; + (Win : in Window := Standard_Window; + Line : in Line_Position; Column : in Column_Position); -- AKA: mvwdelch() -- AKA: mvdelch() @@ -1348,15 +1347,15 @@ -- |===================================================================== -- #1A NAME="AFU_96"#2| - function Peek (Win : Window := Standard_Window) + function Peek (Win : Window := Standard_Window) return Attributed_Character; -- AKA: inch() -- AKA: winch() -- #1A NAME="AFU_97"#2| function Peek - (Win : Window := Standard_Window; - Line : Line_Position; + (Win : Window := Standard_Window; + Line : Line_Position; Column : Column_Position) return Attributed_Character; -- AKA: mvwinch() -- AKA: mvinch() @@ -1367,15 +1366,15 @@ -- |===================================================================== -- #1A NAME="AFU_98"#2| - procedure Insert (Win : in Window := Standard_Window; + procedure Insert (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA: winsch() -- AKA: insch() -- #1A NAME="AFU_99"#2| - procedure Insert (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; + procedure Insert (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; Ch : in Attributed_Character); -- AKA: mvwinsch() -- AKA: mvinsch() @@ -1385,8 +1384,8 @@ -- |===================================================================== -- #1A NAME="AFU_100"#2| - procedure Insert (Win : in Window := Standard_Window; - Str : in String; + procedure Insert (Win : in Window := Standard_Window; + Str : in String; Len : in Integer := -1); -- AKA: winsnstr() -- AKA: winsstr() @@ -1394,10 +1393,10 @@ -- AKA: insstr() -- #1A NAME="AFU_101"#2| - procedure Insert (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : in String; + procedure Insert (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : in String; Len : in Integer := -1); -- AKA: mvwinsnstr() -- AKA: mvwinsstr() @@ -1410,8 +1409,8 @@ -- |===================================================================== -- #1A NAME="AFU_102"#2| - procedure Peek (Win : in Window := Standard_Window; - Str : out String; + procedure Peek (Win : in Window := Standard_Window; + Str : out String; Len : in Integer := -1); -- AKA: winnstr() -- AKA: winstr() @@ -1419,10 +1418,10 @@ -- AKA: instr() -- #1A NAME="AFU_103"#2| - procedure Peek (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; + procedure Peek (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; Len : in Integer := -1); -- AKA: mvwinnstr() -- AKA: mvwinstr() @@ -1434,8 +1433,8 @@ -- |===================================================================== -- #1A NAME="AFU_104"#2| - procedure Peek (Win : in Window := Standard_Window; - Str : out Attributed_String; + procedure Peek (Win : in Window := Standard_Window; + Str : out Attributed_String; Len : in Integer := -1); -- AKA: winchnstr() -- AKA: winchstr() @@ -1443,10 +1442,10 @@ -- AKA: inchstr() -- #1A NAME="AFU_105"#2| - procedure Peek (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out Attributed_String; + procedure Peek (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out Attributed_String; Len : in Integer := -1); -- AKA: mvwinchnstr() -- AKA: mvwinchstr() @@ -1459,8 +1458,8 @@ -- |===================================================================== -- #1A NAME="AFU_106"#2| - procedure Get (Win : in Window := Standard_Window; - Str : out String; + procedure Get (Win : in Window := Standard_Window; + Str : out String; Len : in Integer := -1); -- AKA: wgetnstr() -- AKA: wgetstr() @@ -1470,10 +1469,10 @@ -- overflows. -- #1A NAME="AFU_107"#2| - procedure Get (Win : in Window := Standard_Window; - Line : in Line_Position; - Column : in Column_Position; - Str : out String; + procedure Get (Win : in Window := Standard_Window; + Line : in Line_Position; + Column : in Column_Position; + Str : out String; Len : in Integer := -1); -- AKA: mvwgetnstr() -- AKA: mvwgetstr() @@ -1487,11 +1486,11 @@ -- Not Implemented: slk_attr_on, slk_attr_off, slk_attr_set - type Soft_Label_Key_Format is (Three_Two_Three, - Four_Four, - PC_Style, -- ncurses specific - PC_Style_With_Index); -- " - type Label_Number is new Positive range 1 .. 12; + type Soft_Label_Key_Format is (Three_Two_Three, + Four_Four, + PC_Style, -- ncurses specific + PC_Style_With_Index); -- " + type Label_Number is new Positive range 1 .. 12; type Label_Justification is (Left, Centered, Right); -- #1A NAME="AFU_108"#2| @@ -1501,8 +1500,8 @@ pragma Inline (Init_Soft_Label_Keys); -- #1A NAME="AFU_109"#2| - procedure Set_Soft_Label_Key (Label : in Label_Number; - Text : in String; + procedure Set_Soft_Label_Key (Label : in Label_Number; + Text : in String; Fmt : in Label_Justification := Left); -- AKA: slk_set() -- We don't inline this procedure @@ -1518,7 +1517,7 @@ pragma Inline (Refresh_Soft_Label_Keys_Without_Update); -- #1A NAME="AFU_112"#2| - procedure Get_Soft_Label_Key (Label : in Label_Number; + procedure Get_Soft_Label_Key (Label : in Label_Number; Text : out String); -- AKA: slk_label() @@ -1545,7 +1544,7 @@ -- #1A NAME="AFU_117"#2| procedure Switch_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set; + (Attr : in Character_Attribute_Set; On : in Boolean := True); -- AKA: slk_attron() -- AKA: slk_attroff() @@ -1553,7 +1552,7 @@ -- #1A NAME="AFU_118"#2| procedure Set_Soft_Label_Key_Attributes - (Attr : in Character_Attribute_Set := Normal_Video; + (Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA: slk_attrset() pragma Inline (Set_Soft_Label_Key_Attributes); @@ -1582,7 +1581,7 @@ -- |===================================================================== -- #1A NAME="AFU_122"#2| - procedure Enable_Key (Key : in Special_Key_Code; + procedure Enable_Key (Key : in Special_Key_Code; Enable : in Boolean := True); -- AKA: keyok() pragma Inline (Enable_Key); @@ -1592,7 +1591,7 @@ -- |===================================================================== -- #1A NAME="AFU_123"#2| - procedure Define_Key (Definition : in String; + procedure Define_Key (Definition : in String; Key : in Special_Key_Code); -- AKA: define_key() pragma Inline (Define_Key); @@ -1606,7 +1605,7 @@ -- -- #1A NAME="AFU_124"#2| - procedure Key_Name (Key : in Real_Key_Code; + procedure Key_Name (Key : in Real_Key_Code; Name : out String); -- AKA: keyname() -- The external name for a real keystroke. @@ -1618,7 +1617,7 @@ -- We don't inline this routine -- #1A NAME="AFU_126"#2| - procedure Un_Control (Ch : in Attributed_Character; + procedure Un_Control (Ch : in Attributed_Character; Str : out String); -- AKA: unctrl() @@ -1708,15 +1707,15 @@ pragma Import (C, Start_Color, "start_color"); -- #1A NAME="AFU_141"#2| - procedure Init_Pair (Pair : in Redefinable_Color_Pair; - Fore : in Color_Number; + procedure Init_Pair (Pair : in Redefinable_Color_Pair; + Fore : in Color_Number; Back : in Color_Number); -- AKA: init_pair() pragma Inline (Init_Pair); -- #1A NAME="AFU_142"#2| - procedure Pair_Content (Pair : in Color_Pair; - Fore : out Color_Number; + procedure Pair_Content (Pair : in Color_Pair; + Fore : out Color_Number; Back : out Color_Number); -- AKA: pair_content() pragma Inline (Pair_Content); @@ -1727,9 +1726,9 @@ pragma Inline (Has_Colors); -- #1A NAME="AFU_144"#2| - procedure Init_Color (Color : in Color_Number; - Red : in RGB_Value; - Green : in RGB_Value; + procedure Init_Color (Color : in Color_Number; + Red : in RGB_Value; + Green : in RGB_Value; Blue : in RGB_Value); -- AKA: init_color() pragma Inline (Init_Color); @@ -1740,9 +1739,9 @@ pragma Inline (Can_Change_Color); -- #1A NAME="AFU_146"#2| - procedure Color_Content (Color : in Color_Number; - Red : out RGB_Value; - Green : out RGB_Value; + procedure Color_Content (Color : in Color_Number; + Red : out RGB_Value; + Green : out RGB_Value; Blue : out RGB_Value); -- AKA: color_content() pragma Inline (Color_Content); @@ -1777,15 +1776,15 @@ pragma Inline (Reset_Terminal_State); type Stdscr_Init_Proc is access - function (Win : Window; - Columns : Column_Count) return Integer; + function (Win : Window; + Columns : Column_Count) return Integer; pragma Convention (C, Stdscr_Init_Proc); -- N.B.: the return value is actually ignored, but it seems to be -- a good practice to return 0 if you think all went fine -- and -1 otherwise. -- #1A NAME="AFU_151"#2| - procedure Rip_Off_Lines (Lines : in Integer; + procedure Rip_Off_Lines (Lines : in Integer; Proc : in Stdscr_Init_Proc); -- AKA: ripoffline() -- N.B.: to be more precise, this uses a ncurses specific enhancement of @@ -1811,9 +1810,9 @@ -- |===================================================================== type Transform_Direction is (From_Screen, To_Screen); procedure Transform_Coordinates - (W : in Window := Standard_Window; - Line : in out Line_Position; - Column : in out Column_Position; + (W : in Window := Standard_Window; + Line : in out Line_Position; + Column : in out Column_Position; Dir : in Transform_Direction := From_Screen); -- This procedure transforms screen coordinates into coordinates relative -- to the window and vice versa, depending on the Dir parameter. @@ -1832,7 +1831,7 @@ pragma Inline (Use_Default_Colors); -- #1A NAME="AFU_155"#2| - procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; + procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; Back : Color_Number := Default_Color); -- AKA: assume_default_colors() pragma Inline (Assume_Default_Colors); @@ -1900,8 +1899,8 @@ -- |===================================================================== -- #1A NAME="AFU_162"#2| - procedure Resize (Win : Window := Standard_Window; - Number_Of_Lines : Line_Count; + procedure Resize (Win : Window := Standard_Window; + Number_Of_Lines : Line_Count; Number_Of_Columns : Column_Count); -- AKA: wresize() @@ -1912,29 +1911,29 @@ -- The next constants are generated and may be different on your -- architecture. -- - Offset_maxy : constant Natural := 2; -- short - Offset_maxx : constant Natural := 3; -- short - Offset_begy : constant Natural := 4; -- short - Offset_begx : constant Natural := 5; -- short - Offset_cury : constant Natural := 0; -- short - Offset_curx : constant Natural := 1; -- short - Offset_yoffset : constant Natural := 36; -- short - Offset_pary : constant Natural := 13; -- int - Offset_parx : constant Natural := 12; -- int - Offset_notimeout : constant Natural := 24; -- char - Offset_clear : constant Natural := 25; -- char - Offset_leaveok : constant Natural := 26; -- char - Offset_scroll : constant Natural := 27; -- char - Offset_idlok : constant Natural := 28; -- char - Offset_idcok : constant Natural := 29; -- char - Offset_immed : constant Natural := 30; -- char - Offset_sync : constant Natural := 31; -- char - Offset_use_keypad : constant Natural := 32; -- char - Sizeof_bool : constant Natural := 1; -- bool + Offset_maxy : constant Natural := 2; -- short + Offset_maxx : constant Natural := 3; -- short + Offset_begy : constant Natural := 4; -- short + Offset_begx : constant Natural := 5; -- short + Offset_cury : constant Natural := 0; -- short + Offset_curx : constant Natural := 1; -- short + Offset_yoffset : constant Natural := 36; -- short + Offset_pary : constant Natural := 13; -- int + Offset_parx : constant Natural := 12; -- int + Offset_notimeout : constant Natural := 24; -- char + Offset_clear : constant Natural := 25; -- char + Offset_leaveok : constant Natural := 26; -- char + Offset_scroll : constant Natural := 27; -- char + Offset_idlok : constant Natural := 28; -- char + Offset_idcok : constant Natural := 29; -- char + Offset_immed : constant Natural := 30; -- char + Offset_sync : constant Natural := 31; -- char + Offset_use_keypad : constant Natural := 32; -- char + Sizeof_bool : constant Natural := 1; -- bool Offset_XY : constant Natural := 1; -- int - type Curses_Bool is mod 2 ** Interfaces.C.char'Size; + type Curses_Bool is mod 2 ** Interfaces.C.char'Size; Curses_Bool_False : constant Curses_Bool := 0; end Terminal_Interface.Curses; - \ No newline at end of file + diff --git a/doc/html/ada/terminal_interface__ads.htm b/doc/html/ada/terminal_interface__ads.htm index 50720217..4557d5b9 100644 --- a/doc/html/ada/terminal_interface__ads.htm +++ b/doc/html/ada/terminal_interface__ads.htm @@ -37,18 +37,17 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Jürgen Pfeifer, 1996 --- Contact: www.familiepfeifer.de/Contact.aspx?Lang=en +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.11 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ -package Terminal_Interface is - pragma Pure (Terminal_Interface); +package Terminal_Interface is + pragma Pure (Terminal_Interface); -- -- Everything is in the child units -- -end Terminal_Interface; +end Terminal_Interface; - \ No newline at end of file + diff --git a/doc/html/announce.html b/doc/html/announce.html index abe392e6..caecbd72 100644 --- a/doc/html/announce.html +++ b/doc/html/announce.html @@ -1,15 +1,16 @@ -Announcing ncurses 5.3 Pre-Release +Announcing ncurses 5.4 + -

    Announcing ncurses 5.3

    +

    Announcing ncurses 5.4

    The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, @@ -35,173 +36,304 @@ the library and tools.

    The ncurses distribution is available via anonymous FTP at the GNU distribution site -ftp://ftp.gnu.org/pub/gnu/ncurses. +ftp://ftp.gnu.org/gnu/ncurses/ .
    It is also available at -ftp://invisible-island.net/ncurses. +ftp://invisible-island.net/ncurses/ .

    Release Notes

    -This release is designed to be upward compatible from ncurses 5.0 and 5.2; +This release is designed to be upward compatible from ncurses 5.0 and 5.3; very few applications will require recompilation, depending on the platform. -These are the highlights from the change-log since ncurses 5.2 release. +These are the highlights from the change-log since ncurses 5.3 release.

    Interface changes:

      -
    • change type for bool used in headers to NCURSES_BOOL, - which usually is the same as the compiler's definition for - bool. - -
    • add all but two functions for X/Open curses wide-character support. - These are only available if the library is configured using the - --enable-widec option. Missing functions are -
        -
      • pecho_wchar() -
      • slk_wset() -
      - -
    • add environment variable $NCURSES_ASSUMED_COLORS to - modify the assume_default_colors() extension. - +
    • add the remaining functions for X/Open curses wide-character + support. +
        +
      • pecho_wchar() +
      • slk_wset() +
      + These are only available if the library is configured using the + --enable-widec option. + +
    • write getyx() and related 2-return macros in terms of + getcury(), + getcurx(), etc. + +
    • simplify ifdef for bool declaration in curses.h + +
    • modify ifdef's in curses.h that disabled use of + __attribute__() for g++, since recent versions + implement the cases which ncurses uses. + +
    • add key_defined() function, to tell which keycode a + string is bound to.
    New features and improvements:
      -
    • Improved support for termcap applications: -
        -
      • add logic to dump_entry.c to remove function-key definitions that do - not fit into the 1023-byte limit for generated termcaps. This makes - hds200 fit. - -
      • modify tgetent() to check if exit_attribute_mode resets the alternate - character set, and if so, attempt to adjust the copy of the termcap - "me" string which it will return to eliminate that part. In - particular, 'screen' would lose track of line-drawing characters. - -
      • add check/fix to comp_parse.c to suppress warning about missing acsc - string. This happens in configurations where raw termcap information - is processed; tic already does this and other checks. - -
      • add tic -A option to suppress capabilities which are commented out - when translating to termcap. - -
      • modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it - work properly for termcap applications (patch by Andrey A Chernov). - -
      - -
    • add a call to _nc_keypad() in keypad() to accommodate applications - such as nvi, which use curses for output but not for input (fixes - Debian #131263, cf: 20011215). - -
    • correct logic for COLORFGBG environment variable: if rxvt is compiled - with xpm support, the variable has three fields, making it slightly - incompatible with itself. In either case, the background color is - the last field. +
    • library +
        +
      • implement logic in lib_mouse.c to handle position reports which + are generated when XFree86 xterm is initialized with private + modes 1002 or 1003. These are returned to the application as the + REPORT_MOUSE_POSITION mask, which was not implemented. +
      • modify soft-key initialization to use A_REVERSE if A_STANDOUT + would not be shown when colors are used, i.e., if ncv#1 is set in + the terminfo as is done in "screen". +
      • add configure option for FreeBSD sysmouse, --with-sysmouse, and + implement library support for that. +
      + +
    • programs: + +
        +
      • tack: + +
          +
        • allow it to run from fallback terminfo data. +
        • reset colors after each color test, correct a place + where exit_standout_mode was used instead of + exit_attribute_mode. +
        • improve bce test by making it set colors other + than black on white. +
        + +
      • tic: + +
          +
        • handle a case where an entry has no + description, and capabilities begin on the same line as the entry + name. +
        • allow a terminfo entry with a leading 2-character name. +
        • improved warnings when suppressing items to fit in termcap's + 1023-byte limit. +
        • add check for multiple "tc=" clauses in a termcap. +
        • correct logic for resolving "use=" clauses + allow infocmp and tic to show cancelled capabilities. +
        • check for incomplete line-drawing character mapping. +
        • check for missing/empty/illegal terminfo name. +
        + +
      • tput: +
          +
        • modify tput to use the same parameter analysis as tparm() does, + to provide for user-defined strings, e.g., for xterm title, a + corresponding capability might be + title=\E]2;%p1%s^G, +
        + +
      • tset: + +
          +
        • use the system's default values for CKILL and other default + control characters. +
        • correct interchanged defaults for kill and interrupt + characters, which caused it to report unnecessarily. +
        + +
    Major bug fixes:
      -
    • rewrote limit-checks in wscrl() and associated _nc_scroll_window(), - to ensure that if the parameter of wscrl() is larger than the size of - the scrolling region, then the scrolling region will be cleared. - -
    • modify tset to restore original I/O modes if an error is encountered. - Also modify to use buffered stderr consistently rather than mixing - with write(). - -
    • move calls to def_shell_mode() and def_prog_mode() before loop with - callbacks in lib_set_term.c, since the c++ demo otherwise initialized - the tty modes before saving them. - -
    • modified wresize() to ensure that a failed realloc will not corrupt - the window structure, and to make subwindows fit within the resized - window. - -
    • altered resizeterm() to avoid having it fail when a child window - cannot be resized because it would be larger than its parent. - -
    • correct/improve logic to produce an exit status for errors in tput, - which did not exit with an error when told to put a string not in the - current terminfo entry. - -
    • modify behavior of can_clear_with() so that if an application is - running in a non-bce terminals with default colors enabled, it - returns true, allowing the user to select/paste text without picking - up extraneous trailing blanks. - -
    • add a check in relative_move() to guard against buffer overflow in - the overwrite logic. - -
    • add some limit/pointer checks to -S option of tputs. +
    • prevent recursion in wgetch() via wgetnstr() if the connection + cannot be switched between cooked/raw modes because it is not a TTY. + +
    • correct a case in _nc_remove_string(), used by + define_key(), to avoid infinite loop if the given string + happens to be a substring of other strings which are assigned to keys. + +
    • modify logic of acsc to use the original character if no mapping is + defined, rather than a null. + +
    • several improvements for handling multi-cell display of wide + characters. +
        +
      • modify setcchar() to allow converting control characters to complex + characters. +
      • correct handling of multibyte characters in waddch_literal() which + force wrapping because they are started too late on the line. +
      • modify setcchar() to allow for wchar_t input strings that have + more than one spacing character. +
      + +
    • other fixes for wide-character support: +
        +
      • rewrote lib_acs.c to allow PutAttrChar() to decide how to render + alternate-characters, i.e., to work with Linux console and UTF-8 + locale. +
      • implement a workaround so that line-drawing works with screen's + crippled UTF-8 support (tested with 3.9.13). This only works with + the wide-character support (--enable-widec); the normal library + will simply suppress line-drawing when running in a UTF-8 locale in + screen. +
      • corrections to lib_get_wstr.c: +
          +
        • null-terminate buffer passed to setcchar(), which occasionally + failed. +
        • map special characters such as erase- and kill-characters into + key-codes so those will work as expected even if they are not + mentioned in the terminfo. +
        +
      -
    • modify mvcur() to avoid emitting newline characters when nonl() mode - is set. Normally this is not a problem since the actual terminal - mode is set to suppress nl/crlf translations, however it is useful to - allow the caller to manipulate the terminal mode to avoid staircasing - effects after spawning a process which writes messages (for lynx - 2.8.4). +
    • modify setupterm() to check if the terminfo and + terminal-modes have already been read. This ensures that it does not + reinvoke def_prog_mode() when an application calls more + than one function, such as tgetent() and + initscr(). + +
    • fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR, + REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at + the editing position before making modifications. + +
    • correct keybound(), which reported definitions in the + wrong table, i.e., the list of definitions which are disabled by + keyok(). + +
    • fixes related to safe_sprintf.c: +
        +
      • correct an allocation size in safe_sprintf.c for the "*" format + code. +
      • correct safe_sprintf.c to not return a null pointer if the format + happens to be an empty string. +
      • make return value from _nc_printf_string() consistent. Before, + depending on whether --enable-safe-sprintf was used, it might not + be cached for reallocating. +
      + +
    • other low-level improvements to the optimization code include: +
        +
      • if the output is a socket or other non-tty device, use 1 + millisecond + for the cost in mvcur; previously it was 9 milliseconds because the + baudrate was not known. +
      • modify lib_getch.c to avoid recursion via wgetnstr() when the + input + is not a tty and consequently mode-changes do not work. +
      • fix several places in tack/pad.c which tested and used the + parameter- and parameterless strings inconsistently. +
      • change several tputs() calls in scrolling code to use putp(), to + enable padding which may be needed for some terminals. +
      • improve mvcur() by checking if it is safe to move when video + attributes are set (msgr), and if not, reset/restore attributes + within that function rather than doing it separately in the GoTo() + function in tty_update.c. +
      • use tputs() rather than putp() in a few cases in tty_update.c + since the corresponding delays are proportional to the number of + lines affected: repeat_char, clr_eos, change_scroll_region. +
      + +
    • correct line/column reference in adjust_window(), needed to make + special windows such as curscr track properly when resizing. + +
    • fix a potential recursion between napms() and _nc_timed_wait() + +
    • rewrote lib_insch.c, combining it with lib_insstr.c so both handle + tab and other control characters consistently. + +
    • do not try to open gpm mouse driver if standard output is not a + tty; the gpm library does not make this check.
    Portability:
      -
    • configure script: -
        -
      • modify check in --disable-overwrite option so that it is used by - default unless the --prefix/$prefix value is not /usr, in attempt to - work around packagers who do not read the INSTALL notes. - -
      • correct a typo in configure --enable-colorfgbg option, and move it - to the experimental section (cf: 20011208). - -
      • modify configure script to allow building with termcap only, or with - fallbacks only. In this case, we do not build tic and toe. - -
      • modify run_tic.sh to check if the build is a cross-compile. In that - case, do not use the build's tic to install the terminfo database. - -
      • modify c++/Makefile.in to accommodate archive programs that are - different for C++ than for C, and add cases for vendor's C++ - compilers on Solaris and IRIX. - -
      • add several configure script options to aid with cross-compiling: - --with-build-cc, --with-build-cflags, --with-build-ldflags, and - --with-build-libs. - -
      • add experimental --with-caps=XXX option to customize to similar - terminfo database formats such as AIX 4.x - -
      • add configure option --with-ospeed to assist packagers in transition - to 5.3 change to ospeed type. -
      - -
    • library: -
        -
      • implement a simple vsscanf() fallback function which uses the %n - conversion to help parse the input data. - -
      • various fixes to build/work with different implementations of - vsscanf(). - -
      • add/use macro to suppress sign-extension of char type on - platforms where this is a problem in ctype macros, e.g., Solaris. - -
      • finish changes needed to build dll's on cygwin. - -
      • add #undef's before possible redefinition of ERR and OK in curses.h -
      - -
    • programs: -
        -
      • modify ifdef's in write_entry.c to allow use of symbolic links on - platforms with no hard links, e.g., BeOS. - -
      • modify _nc_write_entry() to allow for the possibility that linking - aliases on a filesystem that ignores case would not succeed because - the source and destination differ only by case, e.g., NCR260VT300WPP0 - on cygwin. - -
      • modify logic in tic, toe, tput and tset which checks for basename of - argv[0] to work properly on systems such as OS/2 which have - case-independent filenames and/or program suffixes, e.g., ".ext". -
      +
    • configure script: +
        +
      • new options: +
        +
        --with-abi-version option. +
        addresses platforms where packagers have diverged from + ncurses ABI numbering. +
        --with-manpage-format=catonly +
        addresses + behavior of BSDI, allow install of man+cat files on NetBSD, + whose behavior has diverged by requiring both to be present. +
        --with-manpage-aliases +
        extends + "--with-manpage-aliases" to provide the option of generating + ".so" files rather than symbolic links for manpage aliases. +
        --with-rel-version +
        workaround to force + libtool on Darwin generate the "same" library names as with + the "--with-shared" option. The Darwin ld program does not + work well with a zero as the minor-version value. +
        --with-trace +
        simplifies defining TRACE to incorporate trace() in libraries. +
        + +
      • fixes/improvements for cross-compiling: + +
          +
        • allow BUILD_CC and related configure script variables to be + overridden from the environment. +
        • use AC_CHECK_TOOL to get proper values for AR and LD for cross + compiling. +
        • use $cross_compiling variable in configure script + rather than comparing $host_alias and + $target alias, since "host" is traditionally misused + in autoconf to refer to the target platform. +
        • modify run_tic.in to avoid using wrong shared libraries when + cross-compiling. +
        + +
      • fixes for Mac OS X: +
          +
        • fix a redefinition of $RANLIB in the configure + script when libtool is used. +
        • modify MKlib_gen.sh to avoid passing "#" tokens through the C + preprocessor. This works around Mac OS X's preprocessor, which + insists on adding a blank on each side of the token. +
        + +
      • workarounds for broken tools: +
          +
        • add configure check for wchar_t and wint_t types, rather than + rely on preprocessor definitions. Also work around for gcc + fixinclude bug which creates a shadow copy of + curses.h if it sees these symbols apparently typedef'd. +
        • modify configure script to omit -Winline for gcc 3.3, since + that feature is broken. +
        • several script fixes to work around the ironically named + POSIXLY_CORRECT feature of GNU sed 4.0. +
        • modify configure script to avoid using "head -1", which does + not work if POSIXLY_CORRECT (sic) is set. +
        • update configure script to reflect fix for + AC_PROG_GCC_TRADITIONAL, which is broken in autoconf 2.5x for Mac + OS X 10.2.3. +
        • repair check for missing C++ compiler, which is broken in + autoconf 2.5x by hardcoding it to g++. +
        + +
      • corrected ifdef's relating to configure check for wchar_t, etc. +
      • remove configure script check to allow -Wconversion for older + versions of gcc +
      • modify configure script to accommodate libtool 1.5, as well as + add an parameter to the "--with-libtool" option which can specify + the pathname of libtool. +
      • change several sed scripts to avoid using "\+" since it is not a + BRE (basic regular expression). One instance caused terminfo.5 to + be misformatted on FreeBSD. +
      • use '%' as sed substitute delimiter in run_tic script to avoid + problems with pathname delimiters such as ':' and '@'. +
      • add -D_XOPEN_SOURCE=500 if needed when configuring with + "--enable-widec", to get mbstate_t declaration on HPUX + 11.11. +
      + +
    • library: +
        +
      • adjust include-options in CF_ETIP_DEFINES to avoid missing + ncurses_dll.h, fixing special definitions that may be needed for + etip.h. +
      • modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a + ".so" suffix. +
      • improve ifdef's to guard against redefinition of wchar_t and wint_t + in curses.h. +
      • remove an #undef for KEY_EVENT from curses.tail used in the + experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses + Debian dpkg's build script. +

    Features of Ncurses

    @@ -317,61 +449,60 @@ including (versions starting with those noted):
    cdk
    Curses Development Kit
    -http://invisible-island.net/cdk. +http://invisible-island.net/cdk/
    -http://www.vexus.ca/CDK.html +http://www.vexus.ca/products/CDK/
    ded
    directory-editor
    -http://invisible-island.net/ded. +http://invisible-island.net/ded/
    dialog
    the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux.
    -http://invisible-island.net/dialog. +http://invisible-island.net/dialog/
    lynx
    the character-screen WWW browser
    -http://lynx.isc.org/release. +http://lynx.isc.org/release/
    Midnight Commander
    file manager
    -www.gnome.org/mc/. +http://www.ibiblio.org/mc/
    mutt
    mail utility
    -http://www.mutt.org. +http://www.mutt.org/
    ncftp
    file-transfer utility
    -http://www.ncftp.com. +http://www.ncftp.com/
    nvi
    New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
    -http://www.bostic.com/vi/. +http://www.bostic.com/vi/ +
    +
    pinfo +
    Lynx-like info browser. +http://dione.ids.pl/~pborys/software/pinfo/
    tin
    newsreader, supporting color, MIME -
    -http://www.tin.org. -
    taper -
    tape archive utility -
    -http://members.iinet.net.au/~yusuf/taper/. +http://www.tin.org/
    vh-1.6
    Volks-Hypertext browser for the Jargon File
    -http://www.bg.debian.org/Packages/unstable/text/vh.html. +http://www.debian.org/Packages/unstable/text/vh.html as well as some that use ncurses for the terminfo support alone:
    minicom
    terminal emulator
    -http://www.pp.clinet.fi/~walker/minicom.html. +http://www.netsonic.fi/~walker/minicom.html
    vile
    vi-like-emacs
    -http://invisible-island.net/vile. +http://invisible-island.net/vile/

    @@ -380,16 +511,16 @@ a few games).

    Who's Who and What's What

    -The original developers of ncurses are Zeyd Ben-Halim and -Eric S. Raymond. +Zeyd Ben-Halim +started it from a previous package pcurses, written by Pavel Curtis. +Eric S. Raymond +continued development. +Jürgen Pfeifer wrote most of the form and menu libraries. Ongoing work is being done by -Thomas Dickey -and -Jürgen Pfeifer. -Thomas Dickey -acts as the maintainer for the Free Software Foundation, which holds the -copyright on ncurses. +Thomas Dickey. +Thomas Dickey +acts as the maintainer for the Free Software Foundation, +which holds the copyright on ncurses. Contact the current maintainers at bug-ncurses@gnu.org.

    @@ -404,7 +535,7 @@ This list is open to anyone interested in helping with the development and testing of this package.

    Beta versions of ncurses and patches to the current release are made available at -ftp://invisible-island.net/ncurses. +ftp://invisible-island.net/ncurses/ .

    Future Plans

      @@ -416,14 +547,16 @@ on them, please join the ncurses list.

      Other Related Resources

      -The distribution includes and uses a version of the terminfo-format -terminal description file maintained by Eric Raymond. -http://earthspace.net/~esr/terminfo.

      +The distribution provides a newer version of the terminfo-format +terminal description file maintained by +Eric Raymond . +Unlike the older version, the termcap and terminfo data are provided +in the same file.

      You can find lots of information on terminal-related topics not covered in the terminfo file at Richard Shuford's -archive. +archive . A Hacker's Guide to Ncurses Internals + @@ -41,6 +41,10 @@


       
      +captoinfo(1m)                                       captoinfo(1m)
      +
      +
      +
       
       

      NAME

      @@ -104,7 +108,6 @@
              CV       ve     AT&T    cursor_normal
              DS       mh     AT&T    enter_dim_mode
              EE       me     AT&T    exit_attribute_mode
      -
              FE       LF     AT&T    label_on
              FL       LO     AT&T    label_off
              XS       mk     AT&T    enter_secure_mode
      @@ -113,6 +116,7 @@
              GS       as     XENIX   enter_alt_charset_mode
              HM       kh     XENIX   key_home
              LD       kL     XENIX   key_dl
      +
              PD       kN     XENIX   key_npage
              PN       po     XENIX   prtr_off
              PS       pf     XENIX   prtr_on
      @@ -192,7 +196,7 @@
              mode.  You can use other tic options such as -f and  -x.
       
              The  trace  option isn't identical to SVr4's.  Under SVr4,
      -       instead of following the -v with  a  trace  level  n,  you
      +       instead of following the -v with  a  trace  level  n,  you
              repeat it n times.
       
       
      @@ -207,18 +211,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    captoinfo(1m)
       

      diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html index d0e79006..d692180f 100644 --- a/doc/html/man/clear.1.html +++ b/doc/html/man/clear.1.html @@ -40,6 +40,10 @@
       
      +clear(1)                                                 clear(1)
      +
      +
      +
       
       

      NAME

      @@ -64,44 +68,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                         clear(1)
       

      diff --git a/doc/html/man/curs_add_wch.3x.html b/doc/html/man/curs_add_wch.3x.html index 52af77b7..564c4600 100644 --- a/doc/html/man/curs_add_wch.3x.html +++ b/doc/html/man/curs_add_wch.3x.html @@ -40,6 +40,10 @@
       
      +curs_add_wch(3x)                                 curs_add_wch(3x)
      +
      +
      +
       
       

      NAME

      @@ -102,7 +106,6 @@
              success.
       
       
      -
       

      NOTES

              Note that add_wch, mvadd_wch, mvwadd_wch,  and  echo_wchar
      @@ -127,41 +130,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_add_wch(3x)
       

      diff --git a/doc/html/man/curs_add_wchstr.3x.html b/doc/html/man/curs_add_wchstr.3x.html index ba756939..343a69b8 100644 --- a/doc/html/man/curs_add_wchstr.3x.html +++ b/doc/html/man/curs_add_wchstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_add_wchstr(3x)                           curs_add_wchstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -106,62 +110,13 @@
              standard, Issue 4.
       
       
      -
       

      SEE ALSO

              curses(3x), curs_addchstr(3x) curs_addwstr(3x)
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                              curs_add_wchstr(3x)
       

      diff --git a/doc/html/man/curs_addch.3x.html b/doc/html/man/curs_addch.3x.html index 2c0f6e7b..301f3007 100644 --- a/doc/html/man/curs_addch.3x.html +++ b/doc/html/man/curs_addch.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +curs_addch(3x)                                     curs_addch(3x)
      +
      +
      +
       
       

      NAME

      @@ -77,7 +81,7 @@
              sor one character left; at the left edge of  a  window  it
              does  nothing.   Newline  does  a clrtoeol, then moves the
              cursor to  the  window  left  margin  on  the  next  line,
      -       scrolling  the window if on the last line).  Tabs are con-
      +       scrolling  the  window if on the last line.  Tabs are con-
              sidered to be at every eighth column.   The  tab  interval
              may be altered by setting the TABSIZE variable.
       
      @@ -91,7 +95,7 @@
              passed to addch or related functions by logical-ORing them
              into  the  character.   (Thus, text, including attributes,
              can be copied from one place to  another  using  inch  and
      -       addch.).   See the curs_attr(3x) page for values of prede-
      +       addch.)   See  the curs_attr(3x) page for values of prede-
              fined video attribute constants that can be usefully OR'ed
              into characters.
       
      @@ -147,7 +151,6 @@
              ACS_VLINE      |         vertical line
       
       
      -
       

      RETURN VALUE

              All routines return the integer ERR upon failure and OK on
      @@ -188,35 +191,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_addch(3x)
       

      diff --git a/doc/html/man/curs_addchstr.3x.html b/doc/html/man/curs_addchstr.3x.html index 18db3f07..486f247d 100644 --- a/doc/html/man/curs_addchstr.3x.html +++ b/doc/html/man/curs_addchstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_addchstr(3x)                               curs_addchstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -83,7 +87,6 @@
              wrapping it around to the new line.
       
       
      -
       

      RETURN VALUES

              All routines return the integer ERR upon failure and OK on
      @@ -108,6 +111,8 @@
              curses(3x).
       
       
      +
      +                                                curs_addchstr(3x)
       

      diff --git a/doc/html/man/curs_addstr.3x.html b/doc/html/man/curs_addstr.3x.html index 4f4857d3..57ebeb6c 100644 --- a/doc/html/man/curs_addstr.3x.html +++ b/doc/html/man/curs_addstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_addstr(3x)                                   curs_addstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -101,13 +105,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_addstr(3x)
       

      diff --git a/doc/html/man/curs_addwstr.3x.html b/doc/html/man/curs_addwstr.3x.html index d761b351..38e95897 100644 --- a/doc/html/man/curs_addwstr.3x.html +++ b/doc/html/man/curs_addwstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_addwstr(3x)                                 curs_addwstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,9 +109,7 @@
       
       
       
      -
      -
      -
      +                                                 curs_addwstr(3x)
       

      diff --git a/doc/html/man/curs_attr.3x.html b/doc/html/man/curs_attr.3x.html index fa0c4e11..80ddcc99 100644 --- a/doc/html/man/curs_attr.3x.html +++ b/doc/html/man/curs_attr.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +curs_attr(3x)                                       curs_attr(3x)
      +
      +
      +
       
       

      NAME

      @@ -154,7 +158,6 @@
               A_REVERSE       Reverse video
               A_BLINK         Blinking
               A_DIM           Half bright
      -
               A_BOLD          Extra bright or bold
               A_PROTECT       Protected mode
               A_INVIS         Invisible or blank mode
      @@ -226,49 +229,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    curs_attr(3x)
       

      diff --git a/doc/html/man/curs_beep.3x.html b/doc/html/man/curs_beep.3x.html index a3df0f94..089f8aab 100644 --- a/doc/html/man/curs_beep.3x.html +++ b/doc/html/man/curs_beep.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_beep(3x)                                       curs_beep(3x)
      +
      +
      +
       
       

      NAME

      @@ -91,23 +95,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    curs_beep(3x)
       

      diff --git a/doc/html/man/curs_bkgd.3x.html b/doc/html/man/curs_bkgd.3x.html index 178a8f61..cbb09047 100644 --- a/doc/html/man/curs_bkgd.3x.html +++ b/doc/html/man/curs_bkgd.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_bkgd(3x)                                       curs_bkgd(3x)
      +
      +
      +
       
       

      NAME

      @@ -47,7 +51,6 @@
              background manipulation routines
       
       
      -
       

      SYNOPSIS

              #include <curses.h>
      @@ -117,51 +120,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    curs_bkgd(3x)
       

      diff --git a/doc/html/man/curs_bkgrnd.3x.html b/doc/html/man/curs_bkgrnd.3x.html index 4a445359..6424ae28 100644 --- a/doc/html/man/curs_bkgrnd.3x.html +++ b/doc/html/man/curs_bkgrnd.3x.html @@ -40,6 +40,10 @@
       
      +curs_bkgrnd(3x)                                   curs_bkgrnd(3x)
      +
      +
      +
       
       

      NAME

      @@ -114,52 +118,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_bkgrnd(3x)
       

      diff --git a/doc/html/man/curs_border.3x.html b/doc/html/man/curs_border.3x.html index e6f9adbf..49176f3a 100644 --- a/doc/html/man/curs_border.3x.html +++ b/doc/html/man/curs_border.3x.html @@ -40,6 +40,10 @@
       
      +curs_border(3x)                                   curs_border(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,6 +104,7 @@
              tion in the window.  The current cursor  position  is  not
              changed.   The  line  is  at most n characters long, or as
              many as fit into the window.
      +
              The vline and wvline functions draw  a  vertical  (top  to
              bottom) line using ch starting at the current cursor posi-
              tion in the window.  The current cursor  position  is  not
      @@ -136,32 +141,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_border(3x)
       

      diff --git a/doc/html/man/curs_border_set.3x.html b/doc/html/man/curs_border_set.3x.html index b5a3ebb3..1e93b1f9 100644 --- a/doc/html/man/curs_border_set.3x.html +++ b/doc/html/man/curs_border_set.3x.html @@ -40,6 +40,10 @@
       
      +curs_border_set(3x)                           curs_border_set(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,6 +104,7 @@
              around  the  edges  of  the  current  or specified window.
              These functions do not change the cursor position, and  do
              not wrap.
      +
              Other  than the window, each argument is a complex charac-
              ter with attributes:
                     ls - left side,
      @@ -160,6 +165,7 @@
       
       
       
      +                                              curs_border_set(3x)
       

      diff --git a/doc/html/man/curs_clear.3x.html b/doc/html/man/curs_clear.3x.html index bb5ff226..6838d5b9 100644 --- a/doc/html/man/curs_clear.3x.html +++ b/doc/html/man/curs_clear.3x.html @@ -40,6 +40,10 @@
       
      +curs_clear(3x)                                     curs_clear(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,8 +109,8 @@
       
              Some  historic  curses  implementations had, as an undocu-
              mented feature,  the  ability  to  do  the  equivalent  of
      -       clearok(...,    1)    by    saying   touchwin(stdscr)   or
      -       clear(stdscr).  This will not work under ncurses.
      +       clearok(...,  1)  by saying touchwin(stdscr) or clear(std-
      +       scr).  This will not work under ncurses.
       
       
       
      @@ -115,53 +119,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + curs_clear(3x)
      diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index 2165cebf..eda9d7ec 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -40,6 +40,10 @@
       
      +curs_color(3x)                                     curs_color(3x)
      +
      +
      +
       
       

      NAME

      @@ -242,34 +246,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_color(3x)
       

      diff --git a/doc/html/man/curs_delch.3x.html b/doc/html/man/curs_delch.3x.html index 10840ed9..6c2e8632 100644 --- a/doc/html/man/curs_delch.3x.html +++ b/doc/html/man/curs_delch.3x.html @@ -40,6 +40,10 @@
       
      +curs_delch(3x)                                     curs_delch(3x)
      +
      +
      +
       
       

      NAME

      @@ -93,21 +97,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_delch(3x)
       

      diff --git a/doc/html/man/curs_deleteln.3x.html b/doc/html/man/curs_deleteln.3x.html index 2c3fc1ce..7f609254 100644 --- a/doc/html/man/curs_deleteln.3x.html +++ b/doc/html/man/curs_deleteln.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_deleteln(3x)                               curs_deleteln(3x)
      +
      +
      +
       
       

      NAME

      @@ -73,7 +77,7 @@
              and  move  the remaining lines up.  The bottom n lines are
              cleared.  The current cursor position remains the same.
       
      -       The insertln and winsertln routines, insert a  blank  line
      +       The insertln and winsertln routines insert  a  blank  line
              above the current line and the bottom line is lost.
       
       
      @@ -107,7 +111,7 @@
       
       
       
      -
      +                                                curs_deleteln(3x)
       

      diff --git a/doc/html/man/curs_extend.3x.html b/doc/html/man/curs_extend.3x.html index 188389fe..ccb182b0 100644 --- a/doc/html/man/curs_extend.3x.html +++ b/doc/html/man/curs_extend.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +curs_extend(3x)                                   curs_extend(3x)
      +
      +
      +
       
       

      NAME

      @@ -70,10 +74,10 @@
              standard 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  descision is made by using the -x option of tic
      +       essential  decision  is made by using the -x option of tic
              to compile extended terminal definitions.  However you can
      -       disable  this  feature  to  ensure compatiblity with other
      -       implementations of curses
      +       disable  this  feature  to ensure compatibility with other
      +       implementations of curses.
       
       
       
      @@ -97,16 +101,7 @@ - - - - - - - - - - + curs_extend(3x)
      diff --git a/doc/html/man/curs_get_wch.3x.html b/doc/html/man/curs_get_wch.3x.html index ddd3f4b1..ba9f1230 100644 --- a/doc/html/man/curs_get_wch.3x.html +++ b/doc/html/man/curs_get_wch.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_get_wch(3x)                                 curs_get_wch(3x)
      +
      +
      +
       
       

      NAME

      @@ -52,10 +56,10 @@
       

      SYNOPSIS

              #include <curses.h>
       
      -       int get_wch(win_t *wch);
      -       int wget_wch(WINDOW *win, win_t *wch);
      -       int mvget_wch(int y, int x, win_t *wch);
      -       int mvwget_wch(WINDOW *win, int y, int x, win_t *wch);
      +       int get_wch(wint_t *wch);
      +       int wget_wch(WINDOW *win, wint_t *wch);
      +       int mvget_wch(int y, int x, wint_t *wch);
      +       int mvwget_wch(WINDOW *win, int y, int x, wint_t *wch);
              int unget_wch(const wchar_t wch);
       
       
      @@ -100,7 +104,6 @@
              operation may fail.
       
       
      -
       

      NOTES

              The  header  file  <curses.h>  automatically  includes the
      @@ -137,29 +140,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_get_wch(3x)
       

      diff --git a/doc/html/man/curs_get_wstr.3x.html b/doc/html/man/curs_get_wstr.3x.html index b3b066d5..4adca85b 100644 --- a/doc/html/man/curs_get_wstr.3x.html +++ b/doc/html/man/curs_get_wstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_get_wstr(3x)                               curs_get_wstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -129,6 +133,10 @@
              treated as an  end-of-file  condition,  and  the  returned
              array contains a WEOF followed by a null wchar_t.
       
      +       X/Open  curses  documents these functions to pass an array
      +       of wchar_t, but all of the vendors  implement  this  using
      +       wint_t.
      +
       
       

      SEE ALSO

      @@ -136,32 +144,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                curs_get_wstr(3x)
       

      diff --git a/doc/html/man/curs_getcchar.3x.html b/doc/html/man/curs_getcchar.3x.html index 0ae39ca0..5a5d8375 100644 --- a/doc/html/man/curs_getcchar.3x.html +++ b/doc/html/man/curs_getcchar.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_getcchar(3x)                               curs_getcchar(3x)
      +
      +
      +
       
       

      NAME

      @@ -138,28 +142,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                curs_getcchar(3x)
       

      diff --git a/doc/html/man/curs_getch.3x.html b/doc/html/man/curs_getch.3x.html index 76b20e49..9b7b9d9c 100644 --- a/doc/html/man/curs_getch.3x.html +++ b/doc/html/man/curs_getch.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +curs_getch(3x)                                     curs_getch(3x)
      +
      +
      +
       
       

      NAME

      @@ -89,7 +93,7 @@
              token for that function key is returned instead of the raw
              characters.    Possible   function  keys  are  defined  in
              <curses.h> as macros with  values  outside  the  range  of
      -       8-bit  characters  whose  names  begin  with KEY_. Thus, a
      +       8-bit  characters  whose  names  begin  with KEY_. Thus, a
              variable intended to hold the return value of  a  function
              key must be of short size or larger.
       
      @@ -114,103 +118,102 @@
              that  not  all  of  these are necessarily supported on any
              particular terminal.
       
      -           Name            Key name
      -
      -           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          Function keys; space for 64  keys
      -                           is reserved.
      -           KEY_F(n)        For 0 <= n <= 63
      -           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
      +            Name            Key name
      +
      +                   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          Function keys; space for 64 keys
      +                            is reserved.
      +            KEY_F(n)        For 0 <= n <= 63
      +            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
       
              Keypad is arranged like this:
       
      @@ -223,7 +226,9 @@
                                +-----+------+-------+
              The has_key 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.
      +       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.
       
       
       
      @@ -247,7 +252,7 @@
              according  to  whether  they treat these control keys spe-
              cially (and ignore the terminfo), or use the terminfo def-
              initions.   Ncurses  uses  the terminfo definition.  If it
      -       says that  KEY_ENTER  is  control/M,  getch,  will  return
      +       says  that  KEY_ENTER  is  control/M,  getch  will  return
              KEY_ENTER when you press control/M.
       
              When  using  getch, wgetch, mvgetch, or mvwgetch, nocbreak
      @@ -287,7 +292,7 @@
              implementation of  handled  signal  receipt  interrupts  a
              read(2)  call in progress or not, and also (in some imple-
              mentations) depending on whether an input timeout or  non-
      -       blocking mode hsd been set.
      +       blocking mode has been set.
       
              Programmers concerned about portability should be prepared
              for either of two  cases:  (a)  signal  receipt  does  not
      @@ -308,23 +313,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_getch(3x)
       

      diff --git a/doc/html/man/curs_getstr.3x.html b/doc/html/man/curs_getstr.3x.html index 029ce0c3..066f81bc 100644 --- a/doc/html/man/curs_getstr.3x.html +++ b/doc/html/man/curs_getstr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_getstr(3x)                                   curs_getstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -106,10 +110,11 @@
              standard  does  not  define  any  error  conditions.  This
              implementation returns ERR if the window pointer is  null,
              or if the lower-level wgetch call returns an ERR.
      +
              SVr3  and early SVr4 curses implementations did not reject
              function keys; the SVr4.0 documentation claimed that "spe-
              cial  keys"  (such  as  function keys, "home" key, "clear"
      -       key, etc.) are interpreted" without  giving  details.   It
      +       key, etc.) 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
      @@ -125,43 +130,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_getstr(3x)
       

      diff --git a/doc/html/man/curs_getyx.3x.html b/doc/html/man/curs_getyx.3x.html index d6db1a8b..5ccfc05d 100644 --- a/doc/html/man/curs_getyx.3x.html +++ b/doc/html/man/curs_getyx.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_getyx(3x)                                     curs_getyx(3x)
      +
      +
      +
       
       

      NAME

      @@ -74,7 +78,7 @@
       
       

      RETURN VALUE

      -       The return values of these  macros  are  undefined  (i.e.,
      +       The return values of these  macros  are  undefined  (i.e.,
              they  should not be used as the right-hand side of assign-
              ment statements).
       
      @@ -101,13 +105,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_getyx(3x)
       

      diff --git a/doc/html/man/curs_in_wch.3x.html b/doc/html/man/curs_in_wch.3x.html index 5aa287e5..3c06a9b9 100644 --- a/doc/html/man/curs_in_wch.3x.html +++ b/doc/html/man/curs_in_wch.3x.html @@ -40,6 +40,10 @@
       
      +curs_in_wch(3x)                                   curs_in_wch(3x)
      +
      +
      +
       
       

      NAME

      @@ -90,24 +94,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_in_wch(3x)
       

      diff --git a/doc/html/man/curs_in_wchstr.3x.html b/doc/html/man/curs_in_wchstr.3x.html index 0277eb47..4347004f 100644 --- a/doc/html/man/curs_in_wchstr.3x.html +++ b/doc/html/man/curs_in_wchstr.3x.html @@ -40,6 +40,10 @@
       
      +curs_in_wchstr(3x)                             curs_in_wchstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,9 +109,7 @@
       
       
       
      -
      -
      -
      +                                               curs_in_wchstr(3x)
       

      diff --git a/doc/html/man/curs_inch.3x.html b/doc/html/man/curs_inch.3x.html index b3f1485d..e966923d 100644 --- a/doc/html/man/curs_inch.3x.html +++ b/doc/html/man/curs_inch.3x.html @@ -41,6 +41,10 @@
       
      +curs_inch(3x)                                       curs_inch(3x)
      +
      +
      +
       
       

      NAME

      @@ -94,19 +98,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    curs_inch(3x)
       

      diff --git a/doc/html/man/curs_inchstr.3x.html b/doc/html/man/curs_inchstr.3x.html index cdf33a2a..2af744e2 100644 --- a/doc/html/man/curs_inchstr.3x.html +++ b/doc/html/man/curs_inchstr.3x.html @@ -40,6 +40,10 @@
       
      +curs_inchstr(3x)                                 curs_inchstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -107,7 +111,7 @@
       
       
       
      -
      +                                                 curs_inchstr(3x)
       

      diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html index 74f72009..f8ba9ac6 100644 --- a/doc/html/man/curs_initscr.3x.html +++ b/doc/html/man/curs_initscr.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_initscr(3x)                                 curs_initscr(3x)
      +
      +
      +
       
       

      NAME

      @@ -107,8 +111,8 @@
              terminals.   The screen reference new becomes the new cur-
              rent terminal.  The previous terminal is returned  by  the
              routine.   This  is  the  only  routine  which manipulates
      -       SCREEN pointers; all other routines affect only  the  cur-
      -       rent terminal.
      +       SCREEN  pointers;  all  other  routines  affect  only  the
      +       current terminal.
       
              The  delscreen  routine  frees storage associated with the
              SCREEN data structure.  The endwin  routine  does  not  do
      @@ -148,20 +152,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_initscr(3x)
       

      diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html index 9e8ce06e..3e4b434f 100644 --- a/doc/html/man/curs_inopts.3x.html +++ b/doc/html/man/curs_inopts.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_inopts(3x)                                   curs_inopts(3x)
      +
      +
      +
       
       

      NAME

      @@ -172,9 +176,9 @@
       
              The timeout and wtimeout routines  set  blocking  or  non-
              blocking  read  for a given window.  If delay is negative,
      -       blocking  read  is  used  (i.e.,  waits  indefinitely  for
      +       blocking  read  is  used  (i.e.,  waits  indefinitely  for
              input).   If delay is zero, then non-blocking read is used
      -       (i.e., read returns ERR if no input is waiting).  If delay
      +       (i.e., read returns ERR if no input is waiting).  If delay
              is  positive, then read blocks for delay milliseconds, and
              returns ERR if there is still no input.  Hence, these rou-
              tines  provide the same functionality as nodelay, plus the
      @@ -237,39 +241,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_inopts(3x)
       

      diff --git a/doc/html/man/curs_ins_wch.3x.html b/doc/html/man/curs_ins_wch.3x.html index aa07ca32..ed0ab4db 100644 --- a/doc/html/man/curs_ins_wch.3x.html +++ b/doc/html/man/curs_ins_wch.3x.html @@ -40,6 +40,10 @@
       
      +curs_ins_wch(3x)                                 curs_ins_wch(3x)
      +
      +
      +
       
       

      NAME

      @@ -85,27 +89,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_ins_wch(3x)
       

      diff --git a/doc/html/man/curs_ins_wstr.3x.html b/doc/html/man/curs_ins_wstr.3x.html index 43e874b3..c2a128c2 100644 --- a/doc/html/man/curs_ins_wstr.3x.html +++ b/doc/html/man/curs_ins_wstr.3x.html @@ -40,6 +40,10 @@
       
      +curs_ins_wstr(3x)                               curs_ins_wstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -110,56 +114,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                curs_ins_wstr(3x)
       

      diff --git a/doc/html/man/curs_insch.3x.html b/doc/html/man/curs_insch.3x.html index 4ad06bdf..70db3ae3 100644 --- a/doc/html/man/curs_insch.3x.html +++ b/doc/html/man/curs_insch.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_insch(3x)                                     curs_insch(3x)
      +
      +
      +
       
       

      NAME

      @@ -59,7 +63,7 @@
       
       

      DESCRIPTION

      -       These routines, insert the character ch before the charac-
      +       These routines insert the character ch before the  charac-
              ter  under the cursor.  All characters to the right of the
              cursor are moved one space to the right, with  the  possi-
              bility  of the rightmost character on the line being lost.
      @@ -95,19 +99,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_insch(3x)
       

      diff --git a/doc/html/man/curs_insstr.3x.html b/doc/html/man/curs_insstr.3x.html index 0e95f565..b169a795 100644 --- a/doc/html/man/curs_insstr.3x.html +++ b/doc/html/man/curs_insstr.3x.html @@ -40,6 +40,10 @@
       
      +curs_insstr(3x)                                   curs_insstr(3x)
      +
      +
      +
       
       

      NAME

      @@ -114,55 +118,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_insstr(3x)
       

      diff --git a/doc/html/man/curs_instr.3x.html b/doc/html/man/curs_instr.3x.html index 3bd43e81..a560ae6e 100644 --- a/doc/html/man/curs_instr.3x.html +++ b/doc/html/man/curs_instr.3x.html @@ -40,6 +40,10 @@
       
      +curs_instr(3x)                                     curs_instr(3x)
      +
      +
      +
       
       

      NAME

      @@ -104,10 +108,7 @@
       
       
       
      -
      -
      -
      -
      +                                                   curs_instr(3x)
       

      diff --git a/doc/html/man/curs_inwstr.3x.html b/doc/html/man/curs_inwstr.3x.html index 297e06ba..34672b46 100644 --- a/doc/html/man/curs_inwstr.3x.html +++ b/doc/html/man/curs_inwstr.3x.html @@ -40,6 +40,10 @@
       
      +curs_inwstr(3)                                     curs_inwstr(3)
      +
      +
      +
       
       

      NAME

      @@ -96,16 +100,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_inwstr(3)
       

      diff --git a/doc/html/man/curs_kernel.3x.html b/doc/html/man/curs_kernel.3x.html index beaea46f..6ee8d583 100644 --- a/doc/html/man/curs_kernel.3x.html +++ b/doc/html/man/curs_kernel.3x.html @@ -40,6 +40,10 @@
       
      +curs_kernel(3x)                                   curs_kernel(3x)
      +
      +
      +
       
       

      NAME

      @@ -175,47 +179,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_kernel(3x)
       

      diff --git a/doc/html/man/curs_mouse.3x.html b/doc/html/man/curs_mouse.3x.html index 9a09a3f4..a471fc6f 100644 --- a/doc/html/man/curs_mouse.3x.html +++ b/doc/html/man/curs_mouse.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +curs_mouse(3x)                                     curs_mouse(3x)
      +
      +
      +
       
       

      NAME

      @@ -55,9 +59,9 @@
       
              typedef unsigned long mmask_t;
       
      -       typedef struct
      -       {
      -           short id;         /* ID to distinguish multiple devices */
      +       typedef struct
      +       {
      +           short id;         /* ID to distinguish multiple devices */
                  int x, y, z;      /* event coordinates */
                  mmask_t bstate;   /* button state bits */
              }
      @@ -100,7 +104,6 @@
              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
      @@ -109,6 +112,7 @@
              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
      @@ -181,7 +185,6 @@
              str that expects a linefeed for input-loop termination.
       
       
      -
       

      RETURN VALUE

              getmouse, ungetmouse and mouseinterval return the  integer
      @@ -208,11 +211,20 @@
              the future.
       
              Under  ncurses(3x),  these  calls  are  implemented  using
      -       either  xterm's  built-in mouse-tracking API or Alessandro
      -       Rubini's gpm server.  If you  are  using  something  other
      -       than  xterm  and  there  is  no gpm daemon running on your
      -       machine, mouse events will not be visible  to  ncurses(3x)
      -       (and the wmousemask function will always return 0).
      +       either  xterm's  built-in  mouse-tracking API or platform-
      +       specific drivers including
      +              Alessandro Rubini's gpm server.
      +              FreeBSD sysmouse
      +              OS/2 EMX
      +       If you  are  using  an  unsupported  configuration,  mouse
      +       events will not be visible to ncurses(3x) (and the wmouse-
      +       mask function will always return 0).
      +
      +       If the terminfo entry contains a XM string, this  is  used
      +       in  the xterm mouse driver to control the way the terminal
      +       is initialized for mouse operation.  The default, if XM is
      +       not found, corresponds to private mode 1000 of xterm:
      +              \E[?1000%?%p1%{1}%=%th%el%;
              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
      @@ -246,31 +258,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_mouse(3x)
       

      diff --git a/doc/html/man/curs_move.3x.html b/doc/html/man/curs_move.3x.html index 890b78a9..230874b4 100644 --- a/doc/html/man/curs_move.3x.html +++ b/doc/html/man/curs_move.3x.html @@ -40,6 +40,10 @@
       
      +curs_move(3x)                                       curs_move(3x)
      +
      +
      +
       
       

      NAME

      @@ -91,23 +95,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    curs_move(3x)
       

      diff --git a/doc/html/man/curs_outopts.3x.html b/doc/html/man/curs_outopts.3x.html index 9d2d1735..ae728815 100644 --- a/doc/html/man/curs_outopts.3x.html +++ b/doc/html/man/curs_outopts.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_outopts(3x)                                 curs_outopts(3x)
      +
      +
      +
       
       

      NAME

      @@ -99,8 +103,8 @@
              tion and deletion.
       
              If  immedok is called with TRUE as argument, any change in
      -       the window image, such  as  the  ones  caused  by  waddch,
      -       wclrtobot, wscrl, etc., automatically cause a call to wre-
      +       the window image, such as the ones caused by waddch, wclr-
      +       tobot,  wscrl,  etc.,  automatically  cause a call to wre-
              fresh.  However, it may degrade performance  considerably,
              due  to  repeated  calls  to  wrefresh.  It is disabled by
              default.
      @@ -156,7 +160,6 @@
              an integer always return OK.
       
       
      -
       

      PORTABILITY

              These  functions are described in the XSI Curses standard,
      @@ -203,19 +206,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_outopts(3x)
       

      diff --git a/doc/html/man/curs_overlay.3x.html b/doc/html/man/curs_overlay.3x.html index 64b4f71e..f6f6b8f5 100644 --- a/doc/html/man/curs_overlay.3x.html +++ b/doc/html/man/curs_overlay.3x.html @@ -40,6 +40,10 @@
       
      +curs_overlay(3x)                                 curs_overlay(3x)
      +
      +
      +
       
       

      NAME

      @@ -102,12 +106,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      +                                                 curs_overlay(3x)
       

      diff --git a/doc/html/man/curs_pad.3x.html b/doc/html/man/curs_pad.3x.html index 0da61e87..77e534c1 100644 --- a/doc/html/man/curs_pad.3x.html +++ b/doc/html/man/curs_pad.3x.html @@ -1,7 +1,7 @@ @@ -40,11 +40,15 @@
       
      +curs_pad(3x)                                         curs_pad(3x)
      +
      +
      +
       
       

      NAME

      -       newpad, subpad, prefresh, pnoutrefresh, pechochar - create
      -       and display curses pads
      +       newpad,   subpad,   prefresh,   pnoutrefresh,   pechochar,
      +       pecho_wchar - create and display curses pads
       
       
       
      @@ -59,6 +63,7 @@ int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol); int pechochar(WINDOW *pad, chtype ch); + int pecho_wchar(WINDOW *pad, const cchar_t *wch);
      @@ -70,7 +75,7 @@ sarily 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 echo- + Automatic refreshes of pads (e.g., from scrolling or echo- ing of input) do not occur. It is not legal to call wre- fresh with a pad as an argument; the routines prefresh or pnoutrefresh should be called instead. Note that these @@ -106,7 +111,7 @@ The pechochar routine is functionally equivalent to a call to addch followed by a call to refresh, a call to waddch followed by a call to wrefresh, or a call to waddch fol- - lowed by a call to prefresh. The knowledge that only a + lowed by a call to prefresh. The knowledge that only a single character is being output is taken into considera- tion and, for non-control characters, a considerable per- formance gain might be seen by using these routines @@ -114,14 +119,19 @@ the last location of the pad on the screen is reused for the arguments to prefresh. + The pecho_wchar function is the analogous wide-character + form of pechochar. It outputs one character to a pad and + immediately refreshes the pad. It does this by a call to + wadd_wch followed by a call to prefresh. +

      RETURN VALUE

      -       Routines  that  return  an integer return ERR upon failure
      -       and OK (SVr4 only specifies "an integer value  other  than
      +       Routines that return an integer return  ERR  upon  failure
      +       and  OK  (SVr4 only specifies "an integer value other than
              ERR") upon successful completion.
       
      -       Routines  that  return  pointers return NULL on error, and
      +       Routines that return pointers return NULL  on  error,  and
              set errno to ENOMEM.
       
       
      @@ -132,36 +142,18 @@
       
       

      PORTABILITY

      -       The XSI Curses standard, Issue  4  describes  these  func-
      +       The  XSI  Curses  standard,  Issue 4 describes these func-
              tions.
       
       
       

      SEE ALSO

      -       curses(3x),        curs_refresh(3x),       curs_touch(3x),
      +       curses(3x),       curs_refresh(3x),        curs_touch(3x),
              curs_addch(3x).
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                     curs_pad(3x)
       

      diff --git a/doc/html/man/curs_print.3x.html b/doc/html/man/curs_print.3x.html index adf7ccc0..fc160e49 100644 --- a/doc/html/man/curs_print.3x.html +++ b/doc/html/man/curs_print.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_print(3x)                                     curs_print(3x)
      +
      +
      +
       
       

      NAME

      @@ -107,7 +111,7 @@
       
       
       
      -
      +                                                   curs_print(3x)
       

      diff --git a/doc/html/man/curs_printw.3x.html b/doc/html/man/curs_printw.3x.html index 0a61b82c..498da06c 100644 --- a/doc/html/man/curs_printw.3x.html +++ b/doc/html/man/curs_printw.3x.html @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_printw.3x,v 1.12 2002/07/20 15:01:43 tom Exp @ + * @Id: curs_printw.3x,v 1.13 2002/11/16 22:28:57 tom Exp @ --> @@ -40,6 +40,10 @@
       
      +curs_printw(3x)                                   curs_printw(3x)
      +
      +
      +
       
       

      NAME

      @@ -51,45 +55,48 @@
       

      SYNOPSIS

              #include <curses.h>
       
      -       int printw(char *fmt, ...);
      -       int wprintw(WINDOW *win, char *fmt, ...);
      -       int mvprintw(int y, int x, char *fmt, ...);
      -       int mvwprintw(WINDOW *win, int y, int x, char *fmt, ...);
      -       int vwprintw(WINDOW *win, char *fmt, va_list varglist);
      -       int vw_printw(WINDOW *win, char *fmt, va_list varglist);
      +       int printw(const char *fmt, ...);
      +       int wprintw(WINDOW *win, const char *fmt, ...);
      +       int mvprintw(int y, int x, const char *fmt, ...);
      +       int mvwprintw(WINDOW *win, int y, int x, const char  *fmt,
      +       ...);
      +       int  vwprintw(WINDOW  *win,  const char *fmt, va_list var-
      +       glist);
      +       int vw_printw(WINDOW *win, const char *fmt,  va_list  var-
      +       glist);
       
       
       

      DESCRIPTION

      -       The printw, wprintw, mvprintw and mvwprintw  routines  are
      -       analogous  to  printf  [see  printf(3S)].   In effect, the
      +       The  printw,  wprintw, mvprintw and mvwprintw routines are
      +       analogous to printf  [see  printf(3S)].   In  effect,  the
              string that would be output by printf is output instead as
              though waddstr were used on the given window.
       
      -       The  vwprintw  and  wv_printw  routines  are  analogous to
      -       vprintf [see printf(3S)] and perform  a  wprintw  using  a
      -       variable  argument list.  The third argument is a va_list,
      -       a  pointer  to  a  list  of  arguments,  as   defined   in
      +       The vwprintw  and  wv_printw  routines  are  analogous  to
      +       vprintf  [see  printf(3S)]  and  perform a wprintw using a
      +       variable argument list.  The third argument is a  va_list,
      +       a   pointer   to  a  list  of  arguments,  as  defined  in
              <stdarg.h>.
       
       
       

      RETURN VALUE

      -       Routines  that  return  an integer return ERR upon failure
      -       and OK (SVr4 only specifies "an integer value  other  than
      +       Routines that return an integer return  ERR  upon  failure
      +       and  OK  (SVr4 only specifies "an integer value other than
              ERR") upon successful completion.
       
       
       

      PORTABILITY

      -       The  XSI  Curses  standard,  Issue 4 describes these func-
      -       tions.  The function vwprintw is marked TO  BE  WITHDRAWN,
      -       and  is  to  be replaced by a function vw_printw using the
      +       The XSI Curses standard, Issue  4  describes  these  func-
      +       tions.   The  function vwprintw is marked TO BE WITHDRAWN,
      +       and is to be replaced by a function  vw_printw  using  the
              <stdarg.h> interface.  The Single Unix Specification, Ver-
      -       sion  2  states  that  vw_printw  is preferred to vwprintw
      -       since the latter  requires  including  <varargs.h>,  which
      -       cannot  be  used  in  the  same  file as <stdarg.h>.  This
      -       implementation uses  <stdarg.h>  for  both,  because  that
      +       sion 2 states that vw_printw   is  preferred  to  vwprintw
      +       since  the  latter  requires  including <varargs.h>, which
      +       cannot be used in  the  same  file  as  <stdarg.h>.   This
      +       implementation  uses  <stdarg.h>  for  both,  because that
              header is included in <curses.h>.
       
       
      @@ -99,13 +106,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_printw(3x)
       

      diff --git a/doc/html/man/curs_refresh.3x.html b/doc/html/man/curs_refresh.3x.html index 3ac1d00e..60c5e332 100644 --- a/doc/html/man/curs_refresh.3x.html +++ b/doc/html/man/curs_refresh.3x.html @@ -40,6 +40,10 @@
       
      +curs_refresh(3x)                                 curs_refresh(3x)
      +
      +
      +
       
       

      NAME

      @@ -144,24 +148,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 curs_refresh(3x)
       

      diff --git a/doc/html/man/curs_scanw.3x.html b/doc/html/man/curs_scanw.3x.html index 3e132c16..dd2aae38 100644 --- a/doc/html/man/curs_scanw.3x.html +++ b/doc/html/man/curs_scanw.3x.html @@ -40,6 +40,10 @@
       
      +curs_scanw(3x)                                     curs_scanw(3x)
      +
      +
      +
       
       

      NAME

      @@ -114,52 +118,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_scanw(3x)
       

      diff --git a/doc/html/man/curs_scr_dump.3x.html b/doc/html/man/curs_scr_dump.3x.html index c64c48ce..615b1287 100644 --- a/doc/html/man/curs_scr_dump.3x.html +++ b/doc/html/man/curs_scr_dump.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_scr_dump(3x)                               curs_scr_dump(3x)
      +
      +
      +
       
       

      NAME

      @@ -73,26 +77,25 @@
              data  is  determined  to  be  valid, curses bases its next
              update of the  screen  on  this  information  rather  than
              clearing  the  screen and starting from scratch.  scr_init
      -       is used after initscr or  a  system  [see  system(BA_LIB)]
      -       call  to  share  the screen with another process which has
      -       done a scr_dump  after  its  endwin  call.   The  data  is
      -       declared  invalid  if  the terminfo capabilities rmcup and
      -       nrrmc exist; also if the  terminal  has  been  written  to
      -       since the preceding scr_dump call.
      -
      -       The  scr_set  routine  is a combination of scr_restore and
      -       scr_init.  It tells the program that  the  information  in
      +       is used after initscr or a system call to share the screen
      +       with  another  process which has done a scr_dump after its
      +       endwin call.  The data is declared invalid if the terminfo
      +       capabilities  rmcup  and nrrmc exist; also if the terminal
      +       has been written to since the preceding scr_dump call.
      +
      +       The scr_set routine is a combination  of  scr_restore  and
      +       scr_init.   It  tells  the program that the information in
              filename is what is currently on the screen, and also what
      -       the program wants on the screen.  This can be  thought  of
      +       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 getwin
      +       To read (write) a window from (to) a file, use the  getwin
              and putwin routines [see curs_util(3x)].
       
       
       

      RETURN VALUE

      -       All routines return the integer ERR upon  failure  and  OK
      +       All  routines  return  the integer ERR upon failure and OK
              upon success.
       
       
      @@ -104,64 +107,22 @@
       
       

      PORTABILITY

      -       The XSI Curses standard, Issue 4,  describes  these  func-
      +       The  XSI  Curses  standard, Issue 4, describes these func-
              tions (adding the const qualifiers).
      +
              The SVr4 docs merely say under scr_init that the dump data
      -       is also considered invalid "if the time-stamp of  the  tty
      +       is  also  considered invalid "if the time-stamp of the tty
              is old" but don't define "old".
       
       
       

      SEE ALSO

      -       curses(3x),       curs_initscr(3x),      curs_refresh(3x),
      +       curses(3x),      curs_initscr(3x),       curs_refresh(3x),
              curs_util(3x), system(3S)
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                curs_scr_dump(3x)
       

      diff --git a/doc/html/man/curs_scroll.3x.html b/doc/html/man/curs_scroll.3x.html index cd50d76e..0570dadb 100644 --- a/doc/html/man/curs_scroll.3x.html +++ b/doc/html/man/curs_scroll.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_scroll(3x)                                   curs_scroll(3x)
      +
      +
      +
       
       

      NAME

      @@ -108,6 +112,9 @@
       

      SEE ALSO

              curses(3x), curs_outopts(3x)
       
      +
      +
      +                                                  curs_scroll(3x)
       

      diff --git a/doc/html/man/curs_slk.3x.html b/doc/html/man/curs_slk.3x.html index 9a0a29a4..72ceb115 100644 --- a/doc/html/man/curs_slk.3x.html +++ b/doc/html/man/curs_slk.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_slk(3x)                                         curs_slk(3x)
      +
      +
      +
       
       

      NAME

      @@ -115,7 +119,7 @@
              The  slk_clear  routine  clears  the  soft labels from the
              screen.
       
      -       The slk_restore routine, restores the soft labels  to  the
      +       The slk_restore routine restores the soft  labels  to  the
              screen after a slk_clear has been performed.
       
              The  slk_touch  routine  forces  all the soft labels to be
      @@ -160,7 +164,6 @@
              slk_attr are specific to ncurses.
       
       
      -
       

      SEE ALSO

              curses(3x),        curs_attr(3x),        curs_initscr(3x),
      @@ -168,54 +171,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                     curs_slk(3x)
       

      diff --git a/doc/html/man/curs_termattrs.3x.html b/doc/html/man/curs_termattrs.3x.html index dc35ff7c..8b508a05 100644 --- a/doc/html/man/curs_termattrs.3x.html +++ b/doc/html/man/curs_termattrs.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_termattrs(3x)                             curs_termattrs(3x)
      +
      +
      +
       
       

      NAME

      @@ -114,8 +118,8 @@
              curses  program needs complete control over the appearance
              of the screen.
       
      -       The termname routine returns the value of the  environmen-
      -       tal variable TERM (truncated to 14 characters).
      +       The termname routine returns the  terminal  name  used  by
      +       setupterm.
       
       
       
      @@ -136,7 +140,8 @@

      PORTABILITY

              The  XSI  Curses  standard,  Issue 4 describes these func-
              tions.  It changes the return type of termattrs to the new
      -       type attr_t.
      +       type  attr_t.  Most versions of curses truncate the result
      +       returned by termname to 14 characters.
       
       
       
      @@ -145,23 +150,7 @@ - - - - - - - - - - - - - - - - - + curs_termattrs(3x)

      diff --git a/doc/html/man/curs_termcap.3x.html b/doc/html/man/curs_termcap.3x.html index f510812b..d9145631 100644 --- a/doc/html/man/curs_termcap.3x.html +++ b/doc/html/man/curs_termcap.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_termcap(3x)                                 curs_termcap(3x)
      +
      +
      +
       
       

      NAME

      @@ -136,32 +140,43 @@
              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 sgr
      +       string.  One consequence of this is that termcap  applica-
      +       tions  assume me (terminfo sgr0) does not reset the alter-
      +       nate character set.  This implementation checks  for,  and
      +       modifies the data shown to the termcap interface to accom-
      +       modate termcap's limitation in this respect.
      +
       
       

      PORTABILITY

      -       The  XSI  Curses  standard,  Issue 4 describes these func-
      -       tions.  However, they are marked TO BE WITHDRAWN  and  may
      +       The XSI Curses standard, Issue  4  describes  these  func-
      +       tions.   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 tgetent correctly,  though
      -       all  three were in fact returned ever since SVr1.  In par-
      -       ticular, an omission in the XSI Curses  documentation  has
      -       been  misinterpreted  to  mean  that tgetent returns OK or
      +       Neither the XSI Curses standard nor  the  SVr4  man  pages
      +       documented  the return values of tgetent correctly, though
      +       all three were in fact returned ever since SVr1.  In  par-
      +       ticular,  an  omission in the XSI Curses documentation has
      +       been misinterpreted to mean that  tgetent  returns  OK  or
              ERR.  Because the purpose of these functions is to provide
      -       compatibility  with  the termcap library, that is a defect
      +       compatibility with the termcap 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
      +       External  variables  are  provided  for support of certain
      +       termcap applications.  However, termcap applications'  use
              of those variables is poorly documented, e.g., not distin-
      -       guishing  between  input  and output.  In particular, some
      +       guishing between input and output.   In  particular,  some
              applications are reported to declare and/or modify ospeed.
       
       
       

      SEE ALSO

              curses(3x), terminfo(5), putc(3S).
      +
      +
      +
      +                                                 curs_termcap(3x)
       

      diff --git a/doc/html/man/curs_terminfo.3x.html b/doc/html/man/curs_terminfo.3x.html index 4163fbb7..724a4be8 100644 --- a/doc/html/man/curs_terminfo.3x.html +++ b/doc/html/man/curs_terminfo.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_terminfo(3x)                               curs_terminfo(3x)
      +
      +
      +
       
       

      NAME

      @@ -207,8 +211,8 @@
              refresh).
       
              The tigetflag, tigetnum and tigetstr routines  return  the
      -       value  of  the  capability  corresponding  to the terminfo
      -       capname passed to them, such as xenl.
      +       value of the capability corresponding to the terminfo cap-
      +       name passed to them, such as xenl.
       
              The tigetflag routine returns the value -1 if  capname  is
              not a boolean capability, or 0 if it is canceled or absent
      @@ -293,37 +297,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                curs_terminfo(3x)
       

      diff --git a/doc/html/man/curs_touch.3x.html b/doc/html/man/curs_touch.3x.html index eec4c7a1..64f83cdc 100644 --- a/doc/html/man/curs_touch.3x.html +++ b/doc/html/man/curs_touch.3x.html @@ -40,6 +40,10 @@
       
      +curs_touch(3x)                                     curs_touch(3x)
      +
      +
      +
       
       

      NAME

      @@ -114,55 +118,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   curs_touch(3x)
       

      diff --git a/doc/html/man/curs_trace.3x.html b/doc/html/man/curs_trace.3x.html index c4a52c4d..ee7065c1 100644 --- a/doc/html/man/curs_trace.3x.html +++ b/doc/html/man/curs_trace.3x.html @@ -40,6 +40,10 @@
       
      +curs_trace(3x)                                     curs_trace(3x)
      +
      +
      +
       
       

      NAME

      @@ -159,7 +163,7 @@
       
       
       
      -
      +                                                   curs_trace(3x)
       

      diff --git a/doc/html/man/curs_util.3x.html b/doc/html/man/curs_util.3x.html index 0fed7678..2557f86d 100644 --- a/doc/html/man/curs_util.3x.html +++ b/doc/html/man/curs_util.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_util(3x)                                       curs_util(3x)
      +
      +
      +
       
       

      NAME

      @@ -53,7 +57,7 @@
              #include <curses.h>
       
              char *unctrl(chtype c);
      -       char *wunctrl(wchar_t w);
      +       char *wunctrl(cchar_t *c);
              char *keyname(int c);
              char *key_name(wchar_t w);
              void filter(void);
      @@ -110,17 +114,18 @@
              The delay_output routine inserts an ms  millisecond  pause
              in  output.   This  routine should not be used extensively
              because padding characters are  used  rather  than  a  CPU
      -       pause.
      +       pause.   If  no  padding character is specified, this uses
      +       napms to perform the delay.
       
      -       The  flushinp  routine  throws away any typeahead that has
      -       been typed by the user and has not yet been  read  by  the
      +       The flushinp routine throws away any  typeahead  that  has
      +       been  typed  by  the user and has not yet been read by the
              program.
       
       
       

      RETURN VALUE

      -       Except  for  flushinp,  routines  that  return  an integer
      -       return ERR upon failure and OK (SVr4  specifies  only  "an
      +       Except for  flushinp,  routines  that  return  an  integer
      +       return  ERR  upon  failure and OK (SVr4 specifies only "an
              integer value other than ERR") upon successful completion.
       
              flushinp always returns OK.
      @@ -130,36 +135,25 @@
       
       

      PORTABILITY

      -       The XSI Curses standard, Issue  4  describes  these  func-
      -       tions.   It  states  that unctrl and wunctrl will return a
      -       null pointer if unsuccessful,  but  does  not  define  any
      +       The  XSI  Curses  standard,  Issue 4 describes these func-
      +       tions.  It states that unctrl and wunctrl  will  return  a
      +       null  pointer  if  unsuccessful,  but  does not define any
              error conditions.
       
              The SVr4 documentation describes the action of filter only
      -       in the vaguest terms.  The  description  here  is  adapted
      -       from  the  XSI Curses standard (which erroneously fails to
      +       in  the  vaguest  terms.   The description here is adapted
      +       from the XSI Curses standard (which erroneously  fails  to
              describe the disabling of cuu).
       
       
       

      SEE ALSO

      -       curses(3x), curs_initscr(3x), curs_scr_dump(3x).
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +       curses(3x),       curs_initscr(3x),       curs_kernel(3x),
      +       curs_scr_dump(3x).
       
       
       
      +                                                    curs_util(3x)
       

      diff --git a/doc/html/man/curs_window.3x.html b/doc/html/man/curs_window.3x.html index 0b9d2a34..fcd400c7 100644 --- a/doc/html/man/curs_window.3x.html +++ b/doc/html/man/curs_window.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +curs_window(3x)                                   curs_window(3x)
      +
      +
      +
       
       

      NAME

      @@ -175,49 +179,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  curs_window(3x)
       

      diff --git a/doc/html/man/default_colors.3x.html b/doc/html/man/default_colors.3x.html index d0be6fb6..019624cb 100644 --- a/doc/html/man/default_colors.3x.html +++ b/doc/html/man/default_colors.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +default_colors(3x)                             default_colors(3x)
      +
      +
      +
       
       

      NAME

      @@ -142,29 +146,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                               default_colors(3x)
       

      diff --git a/doc/html/man/define_key.3x.html b/doc/html/man/define_key.3x.html index 0be1e000..c95817de 100644 --- a/doc/html/man/define_key.3x.html +++ b/doc/html/man/define_key.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +define_key(3x)                                     define_key(3x)
      +
      +
      +
       
       

      NAME

      @@ -51,7 +55,7 @@
       

      SYNOPSIS

              #include <curses.h>
       
      -       int define_key(char *definition, int keycode);
      +       int define_key(const char *definition, int keycode);
       
       
       
      @@ -93,22 +97,7 @@ - - - - - - - - - - - - - - - - + define_key(3x)

      diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html index 27ff8706..320d2816 100644 --- a/doc/html/man/form.3x.html +++ b/doc/html/man/form.3x.html @@ -41,6 +41,10 @@
       
      +form(3x)                                                 form(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,7 +104,6 @@
              field_opts_off         form_field_opts(3x)
              field_opts_on          form_field_opts(3x)
              field_pad              form_field_attributes(3x)
      -
              field_status           form_field_buffer(3x)
              field_term             form_hook(3x)
              field_type             form_field_validation(3x)
      @@ -109,6 +112,7 @@
              form_fields            form_field(3x)
              form_init              form_hook(3x)
              form_opts              form_opts(3x)
      +
              form_opts_off          form_opts(3x)
              form_opts_on           form_opts(3x)
              form_page              form_page(3x)
      @@ -230,50 +234,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                         form(3x)
       

      diff --git a/doc/html/man/form_cursor.3x.html b/doc/html/man/form_cursor.3x.html index af7d8d7d..ac989b00 100644 --- a/doc/html/man/form_cursor.3x.html +++ b/doc/html/man/form_cursor.3x.html @@ -41,6 +41,10 @@
       
      +form_cursor(3x)                                   form_cursor(3x)
      +
      +
      +
       
       

      NAME

      @@ -103,14 +107,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  form_cursor(3x)
       

      diff --git a/doc/html/man/form_data.3x.html b/doc/html/man/form_data.3x.html index 277b54bf..a411eed4 100644 --- a/doc/html/man/form_data.3x.html +++ b/doc/html/man/form_data.3x.html @@ -41,6 +41,10 @@
       
      +form_data(3x)                                       form_data(3x)
      +
      +
      +
       
       

      NAME

      @@ -89,26 +93,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    form_data(3x)
       

      diff --git a/doc/html/man/form_driver.3x.html b/doc/html/man/form_driver.3x.html index 061519f5..f0d036f3 100644 --- a/doc/html/man/form_driver.3x.html +++ b/doc/html/man/form_driver.3x.html @@ -40,6 +40,10 @@
       
      +form_driver(3x)                                   form_driver(3x)
      +
      +
      +
       
       

      NAME

      @@ -153,7 +157,6 @@
                   Move down in the field.
       
       
      -
              REQ_NEW_LINE
                   Insert or overlay a new line.
       
      @@ -209,6 +212,7 @@
              REQ_SCR_BHPAGE
                   Scroll the field backward half a page.
       
      +
              REQ_SCR_FCHAR
                   Scroll the field forward a character.
       
      @@ -264,8 +268,8 @@
                   ment.
       
              E_BAD_STATE
      -            Routine  was  called  from   an   initialization   or
      -            termination function.
      +            Routine was called from an initialization or termina-
      +            tion function.
       
              E_NOT_POSTED
                   The form has not been posted.
      @@ -304,29 +308,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  form_driver(3x)
       

      diff --git a/doc/html/man/form_field.3x.html b/doc/html/man/form_field.3x.html index 35d82339..7d41bae2 100644 --- a/doc/html/man/form_field.3x.html +++ b/doc/html/man/form_field.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_field(3x)                                     form_field(3x)
      +
      +
      +
       
       

      NAME

      @@ -69,7 +73,7 @@
              The  function  field_count  returns the count of fields in
              form.
       
      -       The function move_field move the given field  (which  must
      +       The function move_field moves the given field (which  must
              be disconnected) to a specified location on the screen.
       
       
      @@ -126,45 +130,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   form_field(3x)
       

      diff --git a/doc/html/man/form_field_attributes.3x.html b/doc/html/man/form_field_attributes.3x.html index bb5e210d..8fc80e0c 100644 --- a/doc/html/man/form_field_attributes.3x.html +++ b/doc/html/man/form_field_attributes.3x.html @@ -41,6 +41,10 @@
       
      +form_field_attributes(3x)               form_field_attributes(3x)
      +
      +
      +
       
       

      NAME

      @@ -115,56 +119,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                        form_field_attributes(3x)
       

      diff --git a/doc/html/man/form_field_buffer.3x.html b/doc/html/man/form_field_buffer.3x.html index c23ac003..7ba29ac3 100644 --- a/doc/html/man/form_field_buffer.3x.html +++ b/doc/html/man/form_field_buffer.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_field_buffer(3x)                       form_field_buffer(3x)
      +
      +
      +
       
       

      NAME

      @@ -130,42 +134,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                            form_field_buffer(3x)
       

      diff --git a/doc/html/man/form_field_info.3x.html b/doc/html/man/form_field_info.3x.html index db2e5247..1d2c6b33 100644 --- a/doc/html/man/form_field_info.3x.html +++ b/doc/html/man/form_field_info.3x.html @@ -41,6 +41,10 @@
       
      +form_field_info(3x)                           form_field_info(3x)
      +
      +
      +
       
       

      NAME

      @@ -111,6 +115,10 @@
       

      AUTHORS

              Juergen  Pfeifer.   Manual  pages  and  adaptation for new
              curses by Eric S. Raymond.
      +
      +
      +
      +                                              form_field_info(3x)
       

      diff --git a/doc/html/man/form_field_just.3x.html b/doc/html/man/form_field_just.3x.html index c4c989c6..08444ab6 100644 --- a/doc/html/man/form_field_just.3x.html +++ b/doc/html/man/form_field_just.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_field_just(3x)                           form_field_just(3x)
      +
      +
      +
       
       

      NAME

      @@ -68,7 +72,7 @@
              The  function field_just returns one of: NO_JUSTIFICATION,
              JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER.
       
      -       The function set_field_just return one of the following:
      +       The function set_field_just returns one of the following:
       
              E_OK The routine succeeded.
       
      @@ -105,12 +109,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      +                                              form_field_just(3x)
       

      diff --git a/doc/html/man/form_field_new.3x.html b/doc/html/man/form_field_new.3x.html index 54e94e51..4c8e1d48 100644 --- a/doc/html/man/form_field_new.3x.html +++ b/doc/html/man/form_field_new.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_field_new(3x)                             form_field_new(3x)
      +
      +
      +
       
       

      NAME

      @@ -115,8 +119,8 @@
       
              It  may be unwise to count on the set of attributes copied
              by  dup_field(3x)  being  portable;  the  System  V  forms
      -       library  documents  are  not  very  explicit  on what gets
      -       copied and was not.
      +       library  documents  are  not very explicit about what gets
      +       copied and what doesn't.
       
       
       
      @@ -126,45 +130,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + form_field_new(3x)

      diff --git a/doc/html/man/form_field_opts.3x.html b/doc/html/man/form_field_opts.3x.html index c1ff6a30..3eae4302 100644 --- a/doc/html/man/form_field_opts.3x.html +++ b/doc/html/man/form_field_opts.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_field_opts(3x)                           form_field_opts(3x)
      +
      +
      +
       
       

      NAME

      @@ -75,7 +79,7 @@
       
              O_VISIBLE
                   The  field is displayed.  If this option is off, dis-
      -            play of the field is suppressed,
      +            play of the field is suppressed.
       
              O_ACTIVE
                   The field is  visited  during  processing.   If  this
      @@ -98,8 +102,7 @@
                   at the first position.
       
              O_AUTOSKIP
      -            Skip to the next field when this one fills
      -
      +            Skip to the next field when this one fills.
       
              O_NULLOK
                   Allow a blank field.
      @@ -147,22 +150,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                              form_field_opts(3x)
       

      diff --git a/doc/html/man/form_field_userptr.3x.html b/doc/html/man/form_field_userptr.3x.html index 0041a562..0ec2c5ef 100644 --- a/doc/html/man/form_field_userptr.3x.html +++ b/doc/html/man/form_field_userptr.3x.html @@ -41,6 +41,10 @@
       
      +form_field_userptr(3x)                     form_field_userptr(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,17 +104,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                           form_field_userptr(3x)
       

      diff --git a/doc/html/man/form_field_validation.3x.html b/doc/html/man/form_field_validation.3x.html index 93cae7f4..6fe3b475 100644 --- a/doc/html/man/form_field_validation.3x.html +++ b/doc/html/man/form_field_validation.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +form_field_validation(3x)               form_field_validation(3x)
      +
      +
      +
       
       

      NAME

      @@ -53,12 +57,20 @@
              FIELDTYPE *field_type(const FIELD *field);
              void *field_arg(const FIELD *field);
       
      +       FIELDTYPE *TYPE_ALNUM;
      +       FIELDTYPE *TYPE_ALPHA;
      +       FIELDTYPE *TYPE_ENUM;
      +       FIELDTYPE *TYPE_INTEGER;
      +       FIELDTYPE *TYPE_NUMERIC;
      +       FIELDTYPE *TYPE_REGEXP;
      +       FIELDTYPE *TYPE_IPV4;
      +
       
       

      DESCRIPTION

              The  function  set_field_type  declares  a data type for a
              given form field.  This is the type checked by  validation
      -       functions.  The types are as follows:
      +       functions.  The predefined types are as follows:
       
              TYPE_ALNUM
                   Alphanumeric  data.  Requires a third int argument, a
      @@ -78,7 +90,7 @@
                   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 to use a list that lives in automatic variables
      +            avoid using a list that lives in automatic  variables
                   on the stack.
       
              TYPE_INTEGER
      @@ -86,9 +98,9 @@
                   Requires a third int argument controlling the  preci-
                   sion,  a  fourth  long  argument constraining minimum
                   value, and a fifth long constraining  maximum  value.
      -            If  the  maximum  value  is less or equal the minimum
      -            value, the range is simply  ignored.  On  return  the
      -            field  buffer  is  formatted  according to the printf
      +            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 printf
                   format  specification  ".*ld",  where  the   '*'   is
                   replaced  by  the precision argument.  For details of
                   the precision handling see printf's man-page.
      @@ -98,47 +110,48 @@
                   Requires  a third int argument controlling the preci-
                   sion, a fourth double argument  constraining  minimum
                   value, and a fifth double constraining maximum value.
      -            If your system supports locale's, the  decimal  point
      +            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  or  equal
      -            the  minimum  value,  the range is simply ignored. On
      -            return the field buffer is formatted according to the
      -            printf  format  specification ".*f", where the '*' is
      -            replaced by the precision argument.  For  details  of
      -            the precision handling see printf's man-page.
      +            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 printf format specification ".*f",
      +            where the '*' is replaced by the precision  argument.
      +            For  details  of  the precision handling see printf's
      +            man-page.
       
              TYPE_REGEXP
      -            Regular  expression data.  Requires a regular expres-
      -            sion (char *) third argument; the data  is  valid  if
      -            the  regular  expression matches it.  Regular expres-
      -            sions  are  in  the   format   of   regcomp(3x)   and
      -            regexec(3x).  Please  notice that the regular expres-
      -            sion 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]*
      +            Regular expression data.  Requires a regular  expres-
      +            sion  (char  *)  third argument; the data is valid if
      +            the regular expression matches it.   Regular  expres-
      +            sions   are   in   the   format  of  regcomp(3x)  and
      +            regexec(3x). Please notice that the  regular  expres-
      +            sion  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
      +            field),  or  "^ *[0-9]* *$" which is good for leading
                   and trailing spaces around the digits.
       
              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
      +            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 vali-
      +            buffer are ignored. The address itself is  not  vali-
                   dated. Please note that this is an ncurses extension.
      -            This  field type may not be available in other curses
      +            This field type may not be available in other  curses
                   implementations.
       
      -            It is possible to set up new programmer-defined field
      -            types.  See the form_fieldtype(3x) manual page.
      +       It  is  possible  to  set  up new programmer-defined field
      +       types.  See the form_fieldtype(3x) manual page.
       
       
       

      RETURN VALUE

      -       The  functions  field_type  and  field_arg  return NULL on
      +       The functions field_type  and  field_arg  return  NULL  on
              error. The function set_field_type returns one of the fol-
              lowing:
       
      @@ -161,63 +174,18 @@
       
       

      PORTABILITY

      -       These routines emulate the System V forms  library.   They
      +       These  routines  emulate the System V forms library.  They
              were not supported on Version 7 or BSD versions.
       
       
       

      AUTHORS

      -       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
      +       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
              curses by Eric S. Raymond.
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                        form_field_validation(3x)
       

      diff --git a/doc/html/man/form_fieldtype.3x.html b/doc/html/man/form_fieldtype.3x.html index d4ff4f34..fc220281 100644 --- a/doc/html/man/form_fieldtype.3x.html +++ b/doc/html/man/form_fieldtype.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +form_fieldtype(3x)                             form_fieldtype(3x)
      +
      +
      +
       
       

      NAME

      @@ -72,11 +76,11 @@
              The function new_fieldtype creates a new field type usable
              for data validation.  You supply it  with  field_check,  a
              predicate  to check the validity of an entered data string
      -       whenever the user attempt 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.
      +       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 new_fieldtype with char_check, a  function
              to  validate input characters as they are entered; it will
      @@ -86,26 +90,30 @@
              The  function free_fieldtype frees the space allocated for
              a given validation type.
       
      -       The function set_fieldtype associates  three  storage-man-
      -       agement functions with a field type.  The mak_arg function
      -       is automatically applied to the list of arguments you give
      -       set_field_type  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  argu-
      -       ment-block  structures.   They  will be used by the forms-
      -       driver code. You must supply  the  mak_arg  function,  the
      -       other  two  are optional, you may supply NULL for them. In
      -       this case it is assumed,  that  mak_arg  doesn't  allocate
      +       The function set_fieldtype_arg associates  three  storage-
      +       management  functions  with  a  field  type.  The make_arg
      +       function is automatically applied to the list of arguments
      +       you  give  set_field_type  when  attaching validation to a
      +       field; its job is to bundle these into an allocated  argu-
      +       ment-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 make_arg function,
      +       the  other two are optional, you may supply NULL for them.
      +       In this case it is assumed that make_arg does not allocate
              memory  but simply loads the argument into a single scalar
              value.
       
      +       The function link_fieldtype creates a new field type  from
      +       the  two  given  types.   They are connected by an logical
      +       'OR'.
      +
              The   form    driver    requests    REQ_NEXT_CHOICE    and
              REQ_PREV_CHOICE 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 set_fieldtype_choice func-
      -       tion allows forms programmers to define successor and pre-
      -       decessor  functions  for  the field type.  These functions
      +       tion 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.
       
      @@ -158,13 +166,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      +                                               form_fieldtype(3x)
       

      diff --git a/doc/html/man/form_hook.3x.html b/doc/html/man/form_hook.3x.html index 5f6af22f..bd092a0c 100644 --- a/doc/html/man/form_hook.3x.html +++ b/doc/html/man/form_hook.3x.html @@ -41,6 +41,10 @@
       
      +form_hook(3x)                                       form_hook(3x)
      +
      +
      +
       
       

      NAME

      @@ -123,48 +127,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    form_hook(3x)
       

      diff --git a/doc/html/man/form_new.3x.html b/doc/html/man/form_new.3x.html index c90a023e..9b755eb3 100644 --- a/doc/html/man/form_new.3x.html +++ b/doc/html/man/form_new.3x.html @@ -41,6 +41,10 @@
       
      +form_new(3x)                                         form_new(3x)
      +
      +
      +
       
       

      NAME

      @@ -107,10 +111,7 @@
       
       
       
      -
      -
      -
      -
      +                                                     form_new(3x)
       

      diff --git a/doc/html/man/form_new_page.3x.html b/doc/html/man/form_new_page.3x.html index ae2cc2d9..ca031b98 100644 --- a/doc/html/man/form_new_page.3x.html +++ b/doc/html/man/form_new_page.3x.html @@ -41,6 +41,10 @@
       
      +form_new_page(3x)                               form_new_page(3x)
      +
      +
      +
       
       

      NAME

      @@ -104,13 +108,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      +                                                form_new_page(3x)
       

      diff --git a/doc/html/man/form_opts.3x.html b/doc/html/man/form_opts.3x.html index 38f970be..03a462dc 100644 --- a/doc/html/man/form_opts.3x.html +++ b/doc/html/man/form_opts.3x.html @@ -41,6 +41,10 @@
       
      +form_opts(3x)                                       form_opts(3x)
      +
      +
      +
       
       

      NAME

      @@ -119,52 +123,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    form_opts(3x)
       

      diff --git a/doc/html/man/form_page.3x.html b/doc/html/man/form_page.3x.html index 84d9f7b7..5409ca8f 100644 --- a/doc/html/man/form_page.3x.html +++ b/doc/html/man/form_page.3x.html @@ -41,6 +41,10 @@
       
      +form_page(3x)                                       form_page(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,7 +109,6 @@
              curses(3x), form(3x).
       
       
      -
       

      NOTES

              The header file <form.h> automatically includes the header
      @@ -125,46 +128,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    form_page(3x)
       

      diff --git a/doc/html/man/form_post.3x.html b/doc/html/man/form_post.3x.html index 2730fddb..379e4a8e 100644 --- a/doc/html/man/form_post.3x.html +++ b/doc/html/man/form_post.3x.html @@ -41,6 +41,10 @@
       
      +form_post(3x)                                       form_post(3x)
      +
      +
      +
       
       

      NAME

      @@ -121,50 +125,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    form_post(3x)
       

      diff --git a/doc/html/man/form_requestname.3x.html b/doc/html/man/form_requestname.3x.html index 093f1f12..6aeb907c 100644 --- a/doc/html/man/form_requestname.3x.html +++ b/doc/html/man/form_requestname.3x.html @@ -41,6 +41,10 @@
       
      +form_requestname(3x)                         form_requestname(3x)
      +
      +
      +
       
       

      NAME

      @@ -96,21 +100,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                             form_requestname(3x)
       

      diff --git a/doc/html/man/form_userptr.3x.html b/doc/html/man/form_userptr.3x.html index 325df02b..5f6e0b3d 100644 --- a/doc/html/man/form_userptr.3x.html +++ b/doc/html/man/form_userptr.3x.html @@ -41,6 +41,10 @@
       
      +form_userptr(3x)                                 form_userptr(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,17 +104,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 form_userptr(3x)
       

      diff --git a/doc/html/man/form_win.3x.html b/doc/html/man/form_win.3x.html index 13d39e3a..8cb1dcda 100644 --- a/doc/html/man/form_win.3x.html +++ b/doc/html/man/form_win.3x.html @@ -41,6 +41,10 @@
       
      +form_win(3x)                                         form_win(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,7 +109,6 @@
              curses(3x), form(3x).
       
       
      -
       

      NOTES

              The header file <form.h> automatically includes the header
      @@ -125,46 +128,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                     form_win(3x)
       

      diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html index 099b3ef0..26deb7e3 100644 --- a/doc/html/man/infocmp.1m.html +++ b/doc/html/man/infocmp.1m.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +infocmp(1m)                                           infocmp(1m)
      +
      +
      +
       
       

      NAME

      @@ -100,7 +104,6 @@
              for each terminal named.
       
             -I   use the terminfo names
      -
             -L   use the long C variable name listed in <term.h>
             -C   use the termcap names
             -r   when using -C, put out all capabilities in termcap form
      @@ -154,8 +157,8 @@
              The  -u  option  produces a terminfo source description of
              the first terminal termname which is relative to  the  sum
              of  the  descriptions  given  by the entries for the other
      -       terminals  termnames.   It  does  this  by  analyzing  the
      -       differences  between  the  first  termname  and  the other
      +       terminals termnames.  It does this by analyzing  the  dif-
      +       ferences   between   the  first  termname  and  the  other
              termnames and producing a description with use= fields for
              the  other  terminals.   In this manner, it is possible to
              retrofit  generic  terminfo  entries  into  a   terminal's
      @@ -313,8 +316,8 @@
       
                   An   SGR0  designates  an  empty  highlight  sequence
                   (equivalent to {SGR:NORMAL}).
      -       -
      -       l    Set output format to terminfo.
      +
      +       -l   Set output format to terminfo.
       
              -p   Ignore padding specifications when comparing strings.
       
      @@ -387,13 +390,13 @@
       
              The -r option's notion of `termcap' capabilities is System
              V Release 4's.  Actual BSD curses  versions  will  have  a
      -       more  restricted  set.  To see only the 4.4BSD set, use -r
      -       -RBSD.
      +       more  restricted  set.  To see only the 4.4BSD set, use -r
      +       -RBSD.
       
       
       

      BUGS

      -       The -F option of infocmp(1m) should be a toe(1m) mode.
      +       The -F option of infocmp(1m) should be a toe(1m) mode.
       
       
       
      @@ -405,38 +408,11 @@

      AUTHOR

              Eric S. Raymond <esr@snark.thyrsus.com> and
      -       Thomas E. Dickey <dickey@herndon4.his.com>
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +       Thomas E. Dickey <dickey@invisible-island.net>
       
       
       
      +                                                      infocmp(1m)
       

      diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html index b4738d72..2bb2f8b4 100644 --- a/doc/html/man/infotocap.1m.html +++ b/doc/html/man/infotocap.1m.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +infotocap(1m)                                       infotocap(1m)
      +
      +
      +
       
       

      NAME

      @@ -91,22 +95,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    infotocap(1m)
       

      diff --git a/doc/html/man/key_defined.3x.html b/doc/html/man/key_defined.3x.html new file mode 100644 index 00000000..bed92903 --- /dev/null +++ b/doc/html/man/key_defined.3x.html @@ -0,0 +1,103 @@ + + + + +key_defined 3x + + + + +

      key_defined 3x

      +
      +
      +
      +key_defined(3x)                                   key_defined(3x)
      +
      +
      +
      +
      +
      +

      NAME

      +       define_key - define a keycode
      +
      +
      +
      +

      SYNOPSIS

      +       #include <curses.h>
      +
      +       int key_defined(const char *definition);
      +
      +
      +
      +

      DESCRIPTION

      +       This is an extension to the curses library.  It permits an
      +       application to determine if a string is currently bound to
      +       any keycode.
      +
      +
      +
      +

      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.
      +
      +
      +
      +

      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  con-
      +       ditioned using NCURSES_VERSION.
      +
      +
      +
      +

      SEE ALSO

      +       define_key(3x).
      +
      +
      +
      +

      AUTHOR

      +       Thomas Dickey.
      +
      +
      +
      +                                                  key_defined(3x)
      +
      +
      +
      +Man(1) output converted with +man2html +
      + + diff --git a/doc/html/man/keybound.3x.html b/doc/html/man/keybound.3x.html index 99da0c76..667bdf84 100644 --- a/doc/html/man/keybound.3x.html +++ b/doc/html/man/keybound.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +keyok(3x)                                               keyok(3x)
      +
      +
      +
       
       

      NAME

      @@ -63,10 +67,12 @@
       
       

      RETURN VALUE

      -       The  keycode  must  be  greater  than  zero,  else NULL is
      -       returned.  If it does not correspond  to  a  defined  key,
      -       then  NULL is returned.  Otherwise, the function returns a
      -       string, which must be freed by the caller.
      +       The keycode parameter must be greater than zero, else NULL
      +       is returned.  If it does not correspond to a defined  key,
      +       then  NULL  is  returned.   The count parameter is used to
      +       allow the application to iterate through multiple  defini-
      +       tions,  counting from zero.  When successful, the function
      +       returns a string which must be freed by the caller.
       
       
       
      @@ -88,27 +94,7 @@ - - - - - - - - - - - - - - - - - - - - - + keyok(3x)
      diff --git a/doc/html/man/keyok.3x.html b/doc/html/man/keyok.3x.html index 001445e2..0213a566 100644 --- a/doc/html/man/keyok.3x.html +++ b/doc/html/man/keyok.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +keyok(3x)                                               keyok(3x)
      +
      +
      +
       
       

      NAME

      @@ -90,25 +94,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                        keyok(3x)
       

      diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html index d77562a9..fc558ef7 100644 --- a/doc/html/man/menu.3x.html +++ b/doc/html/man/menu.3x.html @@ -41,6 +41,10 @@
       
      +menu(3x)                                                 menu(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,7 +104,6 @@
              menu_back              menu_attributes(3x)
              menu_driver            menu_driver(3x)
              menu_fore              menu_attributes(3x)
      -
              menu_format            menu_format(3x)
              menu_grey              menu_attributes(3x)
              menu_init              menu_hook(3x)
      @@ -109,6 +112,7 @@
              menu_opts              menu_opts(3x)
              menu_opts_off          menu_opts(3x)
              menu_opts_on           menu_opts(3x)
      +
              menu_pad               menu_attributes(3x)
              menu_pattern           menu_pattern(3x)
              menu_request_by_name   menu_requestname(3x)
      @@ -223,56 +227,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                         menu(3x)
       

      diff --git a/doc/html/man/menu_attributes.3x.html b/doc/html/man/menu_attributes.3x.html index 2332f98f..702fdc4a 100644 --- a/doc/html/man/menu_attributes.3x.html +++ b/doc/html/man/menu_attributes.3x.html @@ -41,6 +41,10 @@
       
      +menu_attributes(3x)                           menu_attributes(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,7 +109,6 @@
              detailed descriptions of the entry points.
       
       
      -
       

      NOTES

              The header file <menu.h> automatically includes the header
      @@ -125,46 +128,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                              menu_attributes(3x)
       

      diff --git a/doc/html/man/menu_cursor.3x.html b/doc/html/man/menu_cursor.3x.html index 61647f46..9e08a867 100644 --- a/doc/html/man/menu_cursor.3x.html +++ b/doc/html/man/menu_cursor.3x.html @@ -41,6 +41,10 @@
       
      +menu_cursor(3x)                                   menu_cursor(3x)
      +
      +
      +
       
       

      NAME

      @@ -102,15 +106,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  menu_cursor(3x)
       

      diff --git a/doc/html/man/menu_driver.3x.html b/doc/html/man/menu_driver.3x.html index 2c4f5e6e..fa65d976 100644 --- a/doc/html/man/menu_driver.3x.html +++ b/doc/html/man/menu_driver.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +menu_driver(3x)                                   menu_driver(3x)
      +
      +
      +
       
       

      NAME

      @@ -154,7 +158,6 @@
              value of these pre-defined requests.
       
       
      -
       

      RETURN VALUE

              menu_driver return one of the following error codes:
      @@ -210,14 +213,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  menu_driver(3x)
       

      diff --git a/doc/html/man/menu_format.3x.html b/doc/html/man/menu_format.3x.html index e4c24d90..b9d1887b 100644 --- a/doc/html/man/menu_format.3x.html +++ b/doc/html/man/menu_format.3x.html @@ -41,6 +41,10 @@
       
      +menu_format(3x)                                   menu_format(3x)
      +
      +
      +
       
       

      NAME

      @@ -115,56 +119,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  menu_format(3x)
       

      diff --git a/doc/html/man/menu_hook.3x.html b/doc/html/man/menu_hook.3x.html index b2c784ec..ab82cd75 100644 --- a/doc/html/man/menu_hook.3x.html +++ b/doc/html/man/menu_hook.3x.html @@ -41,6 +41,10 @@
       
      +menu_hook(3x)                                       menu_hook(3x)
      +
      +
      +
       
       

      NAME

      @@ -123,48 +127,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    menu_hook(3x)
       

      diff --git a/doc/html/man/menu_items.3x.html b/doc/html/man/menu_items.3x.html index 65dd1c7c..701c58af 100644 --- a/doc/html/man/menu_items.3x.html +++ b/doc/html/man/menu_items.3x.html @@ -41,6 +41,10 @@
       
      +menu_items(3x)                                     menu_items(3x)
      +
      +
      +
       
       

      NAME

      @@ -122,49 +126,6 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
       

      diff --git a/doc/html/man/menu_mark.3x.html b/doc/html/man/menu_mark.3x.html index 588cb945..25388e44 100644 --- a/doc/html/man/menu_mark.3x.html +++ b/doc/html/man/menu_mark.3x.html @@ -41,6 +41,10 @@
       
      +menu_mark(3x)                                       menu_mark(3x)
      +
      +
      +
       
       

      NAME

      @@ -111,6 +115,9 @@
              Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
              curses by Eric S. Raymond.
       
      +
      +
      +                                                    menu_mark(3x)
       

      diff --git a/doc/html/man/menu_new.3x.html b/doc/html/man/menu_new.3x.html index bd337a09..7fc2e609 100644 --- a/doc/html/man/menu_new.3x.html +++ b/doc/html/man/menu_new.3x.html @@ -41,6 +41,10 @@
       
      +menu_new(3x)                                         menu_new(3x)
      +
      +
      +
       
       

      NAME

      @@ -107,10 +111,7 @@
       
       
       
      -
      -
      -
      -
      +                                                     menu_new(3x)
       

      diff --git a/doc/html/man/menu_opts.3x.html b/doc/html/man/menu_opts.3x.html index a306b2a1..72666717 100644 --- a/doc/html/man/menu_opts.3x.html +++ b/doc/html/man/menu_opts.3x.html @@ -41,6 +41,10 @@
       
      +menu_opts(3x)                                       menu_opts(3x)
      +
      +
      +
       
       

      NAME

      @@ -102,7 +106,6 @@
       
              E_OK The routine succeeded.
       
      -
              E_SYSTEM_ERROR
                   System error occurred (see errno).
       
      @@ -134,37 +137,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    menu_opts(3x)
       

      diff --git a/doc/html/man/menu_pattern.3x.html b/doc/html/man/menu_pattern.3x.html index ea3a8cce..84a9de8b 100644 --- a/doc/html/man/menu_pattern.3x.html +++ b/doc/html/man/menu_pattern.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +menu_pattern(3x)                                 menu_pattern(3x)
      +
      +
      +
       
       

      NAME

      @@ -110,6 +114,9 @@
              Juergen  Pfeifer.   Manual  pages  and  adaptation for new
              curses by Eric S. Raymond.
       
      +
      +
      +                                                 menu_pattern(3x)
       

      diff --git a/doc/html/man/menu_post.3x.html b/doc/html/man/menu_post.3x.html index 82d90e9f..26086cd3 100644 --- a/doc/html/man/menu_post.3x.html +++ b/doc/html/man/menu_post.3x.html @@ -41,6 +41,10 @@
       
      +menu_post(3x)                                       menu_post(3x)
      +
      +
      +
       
       

      NAME

      @@ -123,48 +127,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                    menu_post(3x)
       

      diff --git a/doc/html/man/menu_requestname.3x.html b/doc/html/man/menu_requestname.3x.html index fa475d1b..c2f16b3f 100644 --- a/doc/html/man/menu_requestname.3x.html +++ b/doc/html/man/menu_requestname.3x.html @@ -41,6 +41,10 @@
       
      +menu_requestname(3x)                         menu_requestname(3x)
      +
      +
      +
       
       

      NAME

      @@ -96,21 +100,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                             menu_requestname(3x)
       

      diff --git a/doc/html/man/menu_spacing.3x.html b/doc/html/man/menu_spacing.3x.html index 998cdb12..2ad714d4 100644 --- a/doc/html/man/menu_spacing.3x.html +++ b/doc/html/man/menu_spacing.3x.html @@ -41,6 +41,10 @@
       
      +menu_spacing(3x)                                 menu_spacing(3x)
      +
      +
      +
       
       

      NAME

      @@ -111,6 +115,10 @@
       

      AUTHORS

              Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
              curses by Eric S. Raymond.
      +
      +
      +
      +                                                 menu_spacing(3x)
       

      diff --git a/doc/html/man/menu_userptr.3x.html b/doc/html/man/menu_userptr.3x.html index 6fadbe52..3f0b8bcf 100644 --- a/doc/html/man/menu_userptr.3x.html +++ b/doc/html/man/menu_userptr.3x.html @@ -41,6 +41,10 @@
       
      +menu_userptr(3x)                                 menu_userptr(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,17 +104,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                 menu_userptr(3x)
       

      diff --git a/doc/html/man/menu_win.3x.html b/doc/html/man/menu_win.3x.html index d873d16d..f5930504 100644 --- a/doc/html/man/menu_win.3x.html +++ b/doc/html/man/menu_win.3x.html @@ -41,6 +41,10 @@
       
      +menu_win(3x)                                         menu_win(3x)
      +
      +
      +
       
       

      NAME

      @@ -105,7 +109,6 @@
              curses(3x), menu(3x).
       
       
      -
       

      NOTES

              The header file <menu.h> automatically includes the header
      @@ -125,46 +128,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                     menu_win(3x)
       

      diff --git a/doc/html/man/mitem_current.3x.html b/doc/html/man/mitem_current.3x.html index 82614bbd..7a8c22fe 100644 --- a/doc/html/man/mitem_current.3x.html +++ b/doc/html/man/mitem_current.3x.html @@ -41,6 +41,10 @@
       
      +mitem_current(3x)                               mitem_current(3x)
      +
      +
      +
       
       

      NAME

      @@ -130,42 +134,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                mitem_current(3x)
       

      diff --git a/doc/html/man/mitem_name.3x.html b/doc/html/man/mitem_name.3x.html index a60a1d7f..aca34ad3 100644 --- a/doc/html/man/mitem_name.3x.html +++ b/doc/html/man/mitem_name.3x.html @@ -41,6 +41,10 @@
       
      +mitem_name(3x)                                     mitem_name(3x)
      +
      +
      +
       
       

      NAME

      @@ -91,26 +95,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   mitem_name(3x)
       

      diff --git a/doc/html/man/mitem_new.3x.html b/doc/html/man/mitem_new.3x.html index 86603d1a..40f6e930 100644 --- a/doc/html/man/mitem_new.3x.html +++ b/doc/html/man/mitem_new.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +mitem_new(3x)                                       mitem_new(3x)
      +
      +
      +
       
       

      NAME

      @@ -60,12 +64,11 @@
              it  from  the name and description pointers. Please notice
              that the item stores only the pointers  to  the  name  and
              description. Those pointers must be valid during the life-
      -       time of the item. So you  should  be  very  carefull  with
      -       names  or descriptions allocated on the stack of some rou-
      -       tines.
      +       time of the item. So you should be very careful with names
      +       or descriptions allocated on the stack of some routines.
              The function free_item 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
      +       that it  is  the  responsibility  of  the  application  to
      +       release  the memory for the name or the description of the
              item.
       
       
      @@ -81,7 +84,7 @@
                   System error occurred (see errno).
       
              E_BAD_ARGUMENT
      -            Routine  detected  an incorrect or out-of-range argu-
      +            Routine detected an incorrect or  out-of-range  argu-
                   ment.
       
              E_CONNECTED
      @@ -101,16 +104,18 @@
       
       

      PORTABILITY

      -       These  routines  emulate  the System V menu library.  They
      +       These routines emulate the System V  menu  library.   They
              were not supported on Version 7 or BSD versions.
       
       
       

      AUTHORS

      -       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
      +       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
              curses by Eric S. Raymond.
       
       
      +
      +                                                    mitem_new(3x)
       

      diff --git a/doc/html/man/mitem_opts.3x.html b/doc/html/man/mitem_opts.3x.html index cc43f6a4..75ca07d9 100644 --- a/doc/html/man/mitem_opts.3x.html +++ b/doc/html/man/mitem_opts.3x.html @@ -41,6 +41,10 @@
       
      +mitem_opts(3x)                                     mitem_opts(3x)
      +
      +
      +
       
       

      NAME

      @@ -111,6 +115,7 @@
       
       
       
      +                                                   mitem_opts(3x)
       

      diff --git a/doc/html/man/mitem_userptr.3x.html b/doc/html/man/mitem_userptr.3x.html index 997a6762..23574613 100644 --- a/doc/html/man/mitem_userptr.3x.html +++ b/doc/html/man/mitem_userptr.3x.html @@ -41,6 +41,10 @@
       
      +mitem_userptr(3x)                               mitem_userptr(3x)
      +
      +
      +
       
       

      NAME

      @@ -100,17 +104,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                mitem_userptr(3x)
       

      diff --git a/doc/html/man/mitem_value.3x.html b/doc/html/man/mitem_value.3x.html index e38d5e1b..e04780d0 100644 --- a/doc/html/man/mitem_value.3x.html +++ b/doc/html/man/mitem_value.3x.html @@ -40,6 +40,10 @@
       
      +mitem_value(3x)                                   mitem_value(3x)
      +
      +
      +
       
       

      NAME

      @@ -102,14 +106,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                  mitem_value(3x)
       

      diff --git a/doc/html/man/mitem_visible.3x.html b/doc/html/man/mitem_visible.3x.html index 0b36dec5..19a1d854 100644 --- a/doc/html/man/mitem_visible.3x.html +++ b/doc/html/man/mitem_visible.3x.html @@ -41,6 +41,10 @@
       
      +mitem_visible(3x)                               mitem_visible(3x)
      +
      +
      +
       
       

      NAME

      @@ -85,30 +89,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                mitem_visible(3x)
       

      diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html index 83995f9e..04905297 100644 --- a/doc/html/man/ncurses.3x.html +++ b/doc/html/man/ncurses.3x.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +ncurses(3x)                                           ncurses(3x)
      +
      +
      +
       
       

      NAME

      @@ -55,41 +59,40 @@
       

      DESCRIPTION

              The  ncurses  library  routines  give the user a terminal-
      -       independent method  of  updating  character  screens  with
      -       reasonable  optimization.   This  implementation  is ``new
      +       independent method of updating character screens with rea-
      +       sonable   optimization.    This  implementation  is  ``new
              curses'' (ncurses) and is  the  approved  replacement  for
              4.4BSD classic curses, which has been discontinued.
       
              The  ncurses  routines  emulate  the curses(3x) library of
              System V Release 4 UNIX, and the XPG4 curses standard (XSI
              curses)  but the ncurses 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.
      +       in source form.  Differences from the SVr4 curses are sum-
      +       marized  under  the EXTENSIONS and BUGS sections below and
      +       described in detail in the EXTENSIONS and BUGS sections of
      +       individual man pages.
       
              A  program  using  these  routines must be linked with the
              -lncurses option, or (if it has been generated)  with  the
              debugging  library  -lncurses_g.   (Your system integrator
              may also have installed these libraries  under  the  names
              -lcurses and -lcurses_g.)  The ncurses_g library generates
      -       trace logs (in  a  file  called  'trace'  in  the  current
      -       directory) that describe curses actions.
      +       trace logs (in a file called 'trace' in the current direc-
      +       tory) that describe curses actions.
       
              The  ncurses  package supports: overall screen, window and
      -       pad manipulation; output  to  windows  and  pads;  reading
      -       terminal input; control over terminal and curses input and
      -       output  options;   environment   query   routines;   color
      -       manipulation;   use   of   soft   label   keys;   terminfo
      -       capabilities;   and   access   to   low-level    terminal-
      -       manipulation routines.
      +       pad manipulation; output to windows and pads; reading ter-
      +       minal  input;  control  over terminal and curses input and
      +       output options; environment query routines; color  manipu-
      +       lation; use of soft label keys; terminfo capabilities; and
      +       access to low-level terminal-manipulation routines.
       
              To initialize the routines, the routine initscr or newterm
      -       must be called before any of the other routines that  deal
      -       with  windows  and  screens  are used.  The routine endwin
      +       must  be called before any of the other routines that deal
      +       with windows and screens are  used.   The  routine  endwin
              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
      +       input without echoing (most interactive,  screen  oriented
      +       programs  want  this),  the  following  sequence should be
              used:
       
                    initscr(); cbreak(); noecho();
      @@ -100,74 +103,74 @@
                    intrflush(stdscr, FALSE);
                    keypad(stdscr, TRUE);
       
      -       Before  a  curses  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
      +       Before a curses program is run, the tab stops of the  ter-
      +       minal  should  be  set  and its initialization strings, if
      +       defined, must be output.  This can be  done  by  executing
              the tput init command after the shell environment variable
      -       TERM  has  been  exported.  tset(1) is usually responsible
      +       TERM has been exported.  tset(1)  is  usually  responsible
              for doing this.  [See terminfo(5) for further details.]
       
      -       The  ncurses  library   permits   manipulation   of   data
      -       structures,  called  windows,  which  can be thought of as
      -       two-dimensional arrays of characters representing  all  or
      -       part  of  a  CRT  screen.  A default window called stdscr,
      -       which is the size of the  terminal  screen,  is  supplied.
      -       Others may be created with newwin.
      -
      -       Note  that  curses  does  not  handle overlapping windows,
      -       that's done by the panel(3x) library. This means that  you
      -       can  either  use  stdscr  or  divide the screen into tiled
      -       windows and not using stdscr at all. Mixing the  two  will
      +       The  ncurses  library  permits manipulation of data struc-
      +       tures, called windows, which can be  thought  of  as  two-
      +       dimensional  arrays of characters representing all or part
      +       of a CRT screen.  A default window called stdscr, which is
      +       the  size of the terminal screen, is supplied.  Others may
      +       be created with newwin.
      +
      +       Note that curses  does  not  handle  overlapping  windows,
      +       that's  done by the panel(3x) library. This means that you
      +       can either use stdscr or divide the screen into tiled win-
      +       dows  and  not  using  stdscr  at all. Mixing the two will
              result in unpredictable, and undesired, effects.
       
              Windows are referred to by variables declared as WINDOW *.
      -       These  data  structures  are  manipulated  with   routines
      -       described  here and elsewhere in the ncurses manual pages.
      -       Among which the most basic routines are  move  and  addch.
      -       More  general versions of these routines are included with
      -       names beginning with w, allowing the  user  to  specify  a
      +       These   data  structures  are  manipulated  with  routines
      +       described here and elsewhere in the ncurses manual  pages.
      +       Among  which  the  most basic routines are move and addch.
      +       More general versions of these routines are included  with
      +       names  beginning  with  w,  allowing the user to specify a
              window.  The routines not beginning with w affect stdscr.)
       
      -       After using routines to manipulate a  window,  refresh  is
      -       called,  telling curses to make the user's CRT screen look
      -       like stdscr.  The characters in a window are  actually  of
      -       type  chtype, (character and attribute data) so that other
      -       information about the character may also  be  stored  with
      +       After  using  routines  to manipulate a window, refresh is
      +       called, telling curses to make the user's CRT screen  look
      +       like  stdscr.   The characters in a window are actually of
      +       type chtype, (character and attribute data) so that  other
      +       information  about  the  character may also be stored with
              each character.
       
      -       Special  windows  called  pads  may  also  be manipulated.
      +       Special windows  called  pads  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 curs_pad(3x) for more information.
      -
      -       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, curses 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
      +       the screen and whose contents need not be completely  dis-
      +       played.  See curs_pad(3x) for more information.
      +
      +       In  addition  to  drawing  characters on the screen, video
      +       attributes and colors may be supported, causing the  char-
      +       acters  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, curses 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
              <curses.h>, such as A_REVERSE, ACS_HLINE, and KEY_LEFT.
       
              If the environment variables LINES and COLUMNS are set, or
      -       if the program is executing in a window environment,  line
      -       and  column  information  in the environment will override
      +       if  the program is executing in a window environment, line
      +       and column information in the  environment  will  override
              information read by terminfo.  This would effect a program
      -       running  in an AT&T 630 layer, for example, where the size
      +       running in an AT&T 630 layer, for example, where the  size
              of a screen is changeable (see ENVIRONMENT).
       
      -       If the  environment  variable  TERMINFO  is  defined,  any
      -       program   using   curses   checks  for  a  local  terminal
      -       definition before checking in  the  standard  place.   For
      -       example,  if  TERM  is  set  to att4424, then the compiled
      -       terminal definition is found in
      +       If  the environment variable TERMINFO is defined, any pro-
      +       gram using curses checks for a local  terminal  definition
      +       before  checking  in  the standard place.  For example, if
      +       TERM is set to att4424, then the compiled terminal defini-
      +       tion is found in
       
                    /usr/share/terminfo/a/att4424.
       
              (The a is copied from the first letter of att4424 to avoid
      -       creation  of  huge  directories.)  However, if TERMINFO is
      +       creation of huge directories.)  However,  if  TERMINFO  is
              set to $HOME/myterms, curses first checks
       
                    $HOME/myterms/a/att4424,
      @@ -176,54 +179,52 @@
       
                    /usr/share/terminfo/a/att4424.
       
      -       This is useful for developing experimental definitions  or
      -       when   write  permission  in  /usr/share/terminfo  is  not
      -       available.
      +       This  is useful for developing experimental definitions or
      +       when write permission in /usr/share/terminfo is not avail-
      +       able.
       
      -       The integer  variables  LINES  and  COLS  are  defined  in
      -       <curses.h>  and will be filled in by initscr with the size
      -       of the screen.  The constants  TRUE  and  FALSE  have  the
      -       values 1 and 0, respectively.
      +       The  integer  variables  LINES  and  COLS  are  defined in
      +       <curses.h> and will be filled in by initscr with the  size
      +       of the screen.  The constants TRUE and FALSE have the val-
      +       ues 1 and 0, respectively.
       
      -       The  curses  routines  also  define  the WINDOW * variable
      +       The curses routines also  define  the  WINDOW  *  variable
              curscr which is used for certain low-level operations like
      -       clearing  and  redrawing a screen containing garbage.  The
      +       clearing and redrawing a screen containing  garbage.   The
              curscr can be used in only a few routines.
       
      -
          Routine and Argument Names
      -       Many curses routines  have  two  or  more  versions.   The
      -       routines  prefixed  with w require a window argument.  The
      -       routines prefixed with p require a  pad  argument.   Those
      -       without a prefix generally use stdscr.
      +       Many  curses routines have two or more versions.  The rou-
      +       tines prefixed with w require a window argument.  The rou-
      +       tines prefixed with p require a pad argument.  Those with-
      +       out a prefix generally use stdscr.
       
              The routines prefixed with mv require a y and x coordinate
      -       to move to before performing the appropriate action.   The
      -       mv  routines  imply  a call to move before the call to the
      -       other routine.  The coordinate y always refers to the  row
      -       (of  the  window), and x always refers to the column.  The
      +       to  move to before performing the appropriate action.  The
      +       mv routines imply a call to move before the  call  to  the
      +       other  routine.  The coordinate y always refers to the row
      +       (of the window), and x always refers to the  column.   The
              upper left-hand corner is always (0,0), not (1,1).
       
              The routines prefixed with mvw take both a window argument
      -       and  x  and  y coordinates.  The window argument is always
      +       and x and y coordinates.  The window  argument  is  always
              specified before the coordinates.
       
      -       In each case, win is the window affected, and pad  is  the
      -       pad  affected;  win  and  pad  are always pointers to type
      -       WINDOW.
      +       In  each  case, win is the window affected, and pad is the
      +       pad affected; win and pad are always pointers to type WIN-
      +       DOW.
       
              Option setting routines require a Boolean flag bf with the
      -       value  TRUE  or  FALSE;  bf  is  always of type bool.  The
      -       variables ch and attrs below are always  of  type  chtype.
      -       The  types WINDOW, SCREEN, bool, and chtype are defined in
      -       <curses.h>.  The type TERMINAL  is  defined  in  <term.h>.
      +       value TRUE or FALSE; bf is always of type bool.  The vari-
      +       ables  ch  and attrs below are always of type chtype.  The
      +       types WINDOW, SCREEN, bool,  and  chtype  are  defined  in
      +       <curses.h>.   The  type  TERMINAL  is defined in <term.h>.
              All other arguments are integers.
       
      -
          Routine Name Index
              The following table lists each curses routine and the name
      -       of the manual page on which  it  is  described.   Routines
      -       flagged  with  `*'  are ncurses-specific, not described by
      +       of  the  manual  page  on which it is described.  Routines
      +       flagged with `*' are ncurses-specific,  not  described  by
              XPG4 or present in SVr4.
       
                     curses Routine Name     Manual Page Name
      @@ -243,6 +244,7 @@
                     add_wchnstr             curs_add_wchstr(3x)
                     add_wchstr              curs_add_wchstr(3x)
                     addch                   curs_addch(3x)
      +
                     addchnstr               curs_addchstr(3x)
                     addchstr                curs_addchstr(3x)
                     addnstr                 curs_addstr(3x)
      @@ -262,7 +264,6 @@
                     bkgd                    curs_bkgd(3x)
                     bkgdset                 curs_bkgd(3x)
                     bkgrnd                  curs_bkgrnd(3x)
      -
                     bkgrndset               curs_bkgrnd(3x)
                     border                  curs_border(3x)
                     border_set              curs_border_set(3x)
      @@ -309,6 +310,7 @@
                     getbkgrnd               curs_bkgrnd(3x)
                     getcchar                curs_getcchar(3x)
                     getch                   curs_getch(3x)
      +
                     getmaxyx                curs_getyx(3x)
                     getmouse                curs_mouse(3x)*
                     getn_wstr               curs_get_wstr(3x)
      @@ -316,7 +318,6 @@
                     getparyx                curs_getyx(3x)
                     getstr                  curs_getstr(3x)
                     getsyx                  curs_kernel(3x)
      -
                     getwin                  curs_util(3x)
                     getyx                   curs_getyx(3x)
                     halfdelay               curs_inopts(3x)
      @@ -354,6 +355,7 @@
                     is_linetouched          curs_touch(3x)
                     is_wintouched           curs_touch(3x)
                     isendwin                curs_initscr(3x)
      +              key_defined             key_defined(3x)*
                     key_name                curs_util(3x)
                     keybound                keybound(3x)*
                     keyname                 curs_util(3x)
      @@ -370,11 +372,11 @@
                     mousemask               curs_mouse(3x)*
                     move                    curs_move(3x)
                     mvadd_wch               curs_add_wch(3x)
      -
                     mvadd_wchnstr           curs_add_wchstr(3x)
                     mvadd_wchstr            curs_add_wchstr(3x)
                     mvaddch                 curs_addch(3x)
                     mvaddchnstr             curs_addchstr(3x)
      +
                     mvaddchstr              curs_addchstr(3x)
                     mvaddnstr               curs_addstr(3x)
                     mvaddnwstr              curs_addwstr(3x)
      @@ -424,7 +426,6 @@
                     mvwaddwstr              curs_addwstr(3x)
                     mvwchgat                curs_attr(3x)
                     mvwdelch                curs_delch(3x)
      -
                     mvwget_wch              curs_get_wch(3x)
                     mvwget_wstr             curs_get_wstr(3x)
                     mvwgetch                curs_getch(3x)
      @@ -441,6 +442,7 @@
                     mvwinchnstr             curs_inchstr(3x)
                     mvwinchstr              curs_inchstr(3x)
                     mvwinnstr               curs_instr(3x)
      +
                     mvwinnwstr              curs_inwstr(3x)
                     mvwins_nwstr            curs_ins_wstr(3x)
                     mvwins_wch              curs_ins_wch(3x)
      @@ -478,7 +480,6 @@
                     qiflush                 curs_inopts(3x)
                     raw                     curs_inopts(3x)
                     redrawwin               curs_refresh(3x)
      -
                     refresh                 curs_refresh(3x)
                     reset_prog_mode         curs_kernel(3x)
                     reset_shell_mode        curs_kernel(3x)
      @@ -507,6 +508,7 @@
                     slk_attr_on             curs_slk(3x)
                     slk_attr_set            curs_slk(3x)
                     slk_attroff             curs_slk(3x)
      +
                     slk_attron              curs_slk(3x)
                     slk_attrset             curs_slk(3x)
                     slk_clear               curs_slk(3x)
      @@ -532,7 +534,6 @@
                     tgetnum                 curs_termcap(3x)
                     tgetstr                 curs_termcap(3x)
                     tgoto                   curs_termcap(3x)
      -
                     tigetflag               curs_terminfo(3x)
                     tigetnum                curs_terminfo(3x)
                     tigetstr                curs_terminfo(3x)
      @@ -573,6 +574,7 @@
                     waddstr                 curs_addstr(3x)
                     waddwstr                curs_addwstr(3x)
                     wattr_get               curs_attr(3x)
      +
                     wattr_off               curs_attr(3x)
                     wattr_on                curs_attr(3x)
                     wattr_set               curs_attr(3x)
      @@ -586,7 +588,6 @@
                     wborder                 curs_border(3x)
                     wborder_set             curs_border_set(3x)
                     wchgat                  curs_attr(3x)
      -
                     wclear                  curs_clear(3x)
                     wclrtobot               curs_clear(3x)
                     wclrtoeol               curs_clear(3x)
      @@ -639,8 +640,8 @@
                     wstandout               curs_attr(3x)
                     wsyncdown               curs_window(3x)
                     wsyncup                 curs_window(3x)
      -              wtimeout                curs_inopts(3x)
       
      +              wtimeout                curs_inopts(3x)
                     wtouchln                curs_touch(3x)
                     wunctrl                 curs_util(3x)
                     wvline                  curs_border(3x)
      @@ -649,15 +650,15 @@
       
       

      RETURN VALUE

      -       Routines that return an integer return  ERR  upon  failure
      -       and  an  integer  value  other  than  ERR  upon successful
      -       completion,  unless  otherwise  noted   in   the   routine
      -       descriptions.
      -
      -       All  macros  return  the  value  of  the w version, except
      -       setscrreg, wsetscrreg,  getyx,  getbegyx,  getmaxyx.   The
      -       return  values  of setscrreg, wsetscrreg, getyx, getbegyx,
      -       and getmaxyx are undefined (i.e., these should not be used
      +       Routines  that  return  an integer return ERR upon failure
      +       and an integer value other than ERR upon  successful  com-
      +       pletion,  unless  otherwise  noted in the routine descrip-
      +       tions.
      +
      +       All macros return the  value  of  the  w  version,  except
      +       setscrreg, wsetscrreg, getyx, getbegyx, and getmaxyx.  The
      +       return values of setscrreg, wsetscrreg,  getyx,  getbegyx,
      +       and getmaxyx are undefined (i.e., these should not be used
              as the right-hand side of assignment statements).
       
              Routines that return pointers return NULL on error.
      @@ -665,28 +666,27 @@
       
       

      ENVIRONMENT

      -       The   following   environment   symbols   are  useful  for
      -       customizing the runtime behavior of the  ncurses  library.
      -       The  most  important  ones  have been already discussed in
      -       detail.
      +       The following environment symbols are useful for customiz-
      +       ing the runtime behavior of the ncurses library.  The most
      +       important ones have been already discussed in detail.
       
              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 ncurses uses 9600.  This allows
      +            If no value is found, ncurses uses 9600.  This allows
                   testers to construct repeatable test-cases that  take
                   into account costs that depend on baudrate.
       
              CC   When set, change occurrences of the command_character
                   (i.e., the cmdch capability) of the  loaded  terminfo
      -            entries  to  the  value  of  this  symbol.   Very few
      -            terminfo entries provide this feature.
      +            entries  to  the value of this symbol.  Very few ter-
      +            minfo entries provide this feature.
       
              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
      +            Applications  running in a windowing environment usu-
      +            ally 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,
                   ncurses  uses  the size which may be specified in the
      @@ -713,8 +713,8 @@
                   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.
      +            is enough for most uses.  However, it is made a vari-
      +            able to accommodate unusual applications.
       
                   The most common instance where you may wish to change
                   this value is to work with slow hosts, e.g.,  running
      @@ -723,8 +723,8 @@
                   the  terminal did not send characters rapidly enough.
                   The library will still see a timeout.
       
      -            Note that  xterm  mouse  events  are  built  up  from
      -            character sequences received from the xterm.  If your
      +            Note that xterm mouse events are built up from  char-
      +            acter  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
      @@ -756,34 +756,34 @@
                   132.
       
              NCURSES_ASSUMED_COLORS
      -            Override  the   compiled-in   assumption   that   the
      -            terminal's  default  colors  are  white-on-black (see
      -            assume_default_colors(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
      +            Override the compiled-in assumption that  the  termi-
      +            nal's   default   colors   are   white-on-black  (see
      +            assume_default_colors(3x)).  You may  set  the  fore-
      +            ground and background color values with this environ-
      +            ment variable by  proving  a  2-element  list:  fore-
      +            ground,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
      -            max_colors value is allowed.
      +            Any positive value from zero to the terminfo max_col-
      +            ors value is allowed.
       
              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.
      +            windowing environment and use  curses-based  applica-
      +            tions.   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 con-
      +            trol), it (or your application) must manage dataflow,
      +            preventing overruns.  The cheapest solution (no hard-
      +            ware cost) is for your program to do this by  pausing
      +            after  operations that the terminal does slowly, such
      +            as clearing the display.
       
                   As a result, many  terminal  descriptions  (including
                   the  vt100)  have delay times embedded.  You may wish
      @@ -795,11 +795,11 @@
                   part of special control sequences such as flash.
       
              NCURSES_NO_SETBUF
      -            Normally   ncurses  enables  buffered  output  during
      -            terminal initialization.  This is done  (as  in  SVr4
      -            curses)   for   performance   reasons.   For  testing
      -            purposes, both of ncurses and  certain  applications,
      -            this   feature   is   made   optional.   Setting  the
      +            Normally  ncurses enables buffered output during ter-
      +            minal initialization.   This  is  done  (as  in  SVr4
      +            curses)  for  performance  reasons.  For testing pur-
      +            poses, both of ncurses 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.
      @@ -819,8 +819,8 @@
                   distinct, though many are similar.
       
              TERMCAP
      -            If  the  ncurses  library  has  been  configured with
      -            termcap support, ncurses will check for a  terminal's
      +            If the ncurses library has been configured with term-
      +            cap support, ncurses  will  check  for  a  terminal's
                   description in termcap form if it is not available in
                   the terminfo database.
       
      @@ -838,7 +838,7 @@
                   The complete list of directories in order follows:
       
                   -  the last directory to which ncurses wrote, if any,
      -               is searched first.
      +               is searched first
       
                   -  the directory specified by the TERMINFO symbol
       
      @@ -851,21 +851,21 @@
                      /usr/share/terminfo
       
              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.
      +            Specifies  a list of directories to search for termi-
      +            nal 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.
       
              TERMPATH
                   If TERMCAP does not hold a  file  name  then  ncurses
      -            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,  ncurses  looks  in  the  files
      -            /etc/termcap,       /usr/share/misc/termcap       and
      -            $HOME/.termcap, in that order.
      +            checks  the TERMPATH symbol.  This is a list of file-
      +            names separated by spaces or colons  (i.e.,  ":")  on
      +            Unix, semicolons on OS/2 EMX.  If the TERMPATH symbol
      +            is not set, ncurses looks in the files  /etc/termcap,
      +            /usr/share/misc/termcap  and  $HOME/.termcap, in that
      +            order.
       
              The library may be configured to disregard  the  following
              variables  when  the current user is the superuser (root),
      @@ -877,8 +877,8 @@
       

      FILES

              /usr/share/tabset
                   directory  containing  initialization  files  for the
      -            terminal  capability   database   /usr/share/terminfo
      -            terminal capability database
      +            terminal capability database /usr/share/terminfo ter-
      +            minal capability database
       
       
       
      @@ -890,12 +890,12 @@

      EXTENSIONS

              The  ncurses  library  can  be  compiled  with  an  option
      -       (-DUSE_GETCAP)   that   falls   back   to   the  old-style
      -       /etc/termcap file if the terminal setup code cannot find a
      -       terminfo entry corresponding to TERM.  Use of this feature
      -       is not recommended, as it essentially includes  an  entire
      -       termcap   compiler   in   the  ncurses  startup  code,  at
      -       significant cost in core and startup cycles.
      +       (-DUSE_GETCAP) that falls back to the old-style /etc/term-
      +       cap file if the terminal setup code cannot find a terminfo
      +       entry  corresponding  to TERM.  Use of this feature is not
      +       recommended, as it essentially includes an entire  termcap
      +       compiler  in the ncurses startup code, at significant cost
      +       in core and startup cycles.
       
              The ncurses  library  includes  facilities  for  capturing
              mouse  events  on certain terminals (including xterm). See
      @@ -910,132 +910,82 @@
              The ncurses 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  define_key(3x)  and  keyok(3x)  manual pages for
      -       details.
      +       See the define_key(3x) key_defined(3x), and keyok(3x) man-
      +       ual pages for details.
       
      -       The  ncurses  library  can  exploit  the  capabilities  of
      -       terminals  which  implement the ISO-6429 SGR 39 and SGR 49
      +       The ncurses library can exploit the capabilities of termi-
      +       nals  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  default_colors(3x)  manual page for
      -       details.
      +       colored  text  on a background whose color is set indepen-
      +       dently, providing better  control  over  color  contrasts.
      +       See the default_colors(3x) manual page for details.
       
      -       The ncurses library  includes  a  function  for  directing
      -       application  output  to a printer attached to the terminal
      +       The  ncurses  library  includes  a  function for directing
      +       application output to a printer attached to  the  terminal
              device.  See the curs_print(3x) manual page for details.
       
       
       

      PORTABILITY

      -       The  ncurses  library  is  intended   to   be   BASE-level
      -       conformant with the XSI Curses standard.  Certain portions
      -       of the EXTENDED XSI Curses functionality (including  color
      -       support) are supported.  The following EXTENDED XSI Curses
      -       calls in support of wide (multibyte)  characters  are  not
      -       yet implemented: pecho_wchar, slk_wset.
      -
      -       A  small  number of local differences (that is, individual
      -       differences between the XSI Curses and ncurses calls)  are
      -       described  in  PORTABILITY  sections  of  the  library man
      +       The  ncurses  library is intended to be BASE-level confor-
      +       mant with the  XSI  Curses  standard.   The  EXTENDED  XSI
      +       Curses  functionality  (including  color  support) is sup-
      +       ported.
      +
      +       A small number of local differences (that  is,  individual
      +       differences  between the XSI Curses and ncurses calls) are
      +       described in  PORTABILITY  sections  of  the  library  man
              pages.
       
              The routine has_key is not part of XPG4, nor is it present
      -       in  SVr4.  See the curs_getch(3x) manual page for details.
      +       in SVr4.  See the curs_getch(3x) manual page for  details.
       
      -       The routine slk_attr is  not  part  of  XPG4,  nor  is  it
      -       present  in  SVr4.   See  the curs_slk(3x) manual page for
      +       The  routine  slk_attr is not part of XPG4, nor is it pre-
      +       sent in  SVr4.   See  the  curs_slk(3x)  manual  page  for
              details.
       
      -       The    routines    getmouse,    mousemask,     ungetmouse,
      -       mouseinterval,  and wenclose relating to mouse interfacing
      -       are not part of XPG4, nor are they present in  SVr4.   See
      -       the curs_mouse(3x) manual page for details.
      +       The  routines getmouse, mousemask, ungetmouse, mouseinter-
      +       val, and wenclose relating to mouse  interfacing  are  not
      +       part  of  XPG4,  nor  are  they  present in SVr4.  See the
      +       curs_mouse(3x) manual page for details.
       
              The routine mcprint was not present in any previous curses
      -       implementation.  See the curs_print(3x)  manual  page  for
      +       implementation.   See  the  curs_print(3x) manual page for
              details.
       
              The routine wresize is not part of XPG4, nor is it present
              in SVr4.  See the wresize(3x) manual page for details.
       
      -       In  historic  curses  versions,  delays  embedded  in  the
      -       capabilities   cr,   ind,   cub1,  ff  and  tab  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.
      +       In  historic curses versions, delays embedded in the capa-
      +       bilities cr, ind, cub1, ff and tab activated corresponding
      +       delay  bits  in  the UNIX tty driver.  In this implementa-
      +       tion, 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.
       
       
       

      NOTES

      -       The header  file  <curses.h>  automatically  includes  the
      +       The  header  file  <curses.h>  automatically  includes the
              header files <stdio.h> and <unctrl.h>.
       
      -       If  standard  output from a ncurses 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.
      +       If standard output from a ncurses program  is  re-directed
      +       to  something  which  is not a tty, screen updates will be
      +       directed to standard error.  This was an undocumented fea-
      +       ture of AT&T System V Release 3 curses.
       
       
       

      AUTHORS

      -       Zeyd M. Ben-Halim, Eric  S.  Raymond,  Thomas  E.  Dickey.
      +       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
              Based on pcurses by Pavel Curtis.
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                      ncurses(3x)
       

      diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html index 31ab3480..7dd86b97 100644 --- a/doc/html/man/panel.3x.html +++ b/doc/html/man/panel.3x.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +panel(3x)                                               panel(3x)
      +
      +
      +
       
       

      NAME

      @@ -81,7 +85,7 @@
              of the stack.
       
              A window is associated with every panel.  The  panel  rou-
      -       tines  enable you to create, move, hides, and show panels,
      +       tines  enable  you to create, move, hide, and show panels,
              as well as position a panel at any desired location in the
              stack.
       
      @@ -219,9 +223,7 @@
       
       
       
      -
      -
      -
      +                                                        panel(3x)
       

      diff --git a/doc/html/man/resizeterm.3x.html b/doc/html/man/resizeterm.3x.html index 9ad4fe77..a7be4795 100644 --- a/doc/html/man/resizeterm.3x.html +++ b/doc/html/man/resizeterm.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +resizeterm(3x)                                     resizeterm(3x)
      +
      +
      +
       
       

      NAME

      @@ -119,51 +123,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                   resizeterm(3x)
       

      diff --git a/doc/html/man/term.5.html b/doc/html/man/term.5.html index 394d0f7c..a0c144cc 100644 --- a/doc/html/man/term.5.html +++ b/doc/html/man/term.5.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +TERM(5)                                                   TERM(5)
      +
      +
      +
       
       

      NAME

      @@ -204,14 +208,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                          TERM(5)
       

      diff --git a/doc/html/man/term.7.html b/doc/html/man/term.7.html index 96798643..85284e7d 100644 --- a/doc/html/man/term.7.html +++ b/doc/html/man/term.7.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +TERM(7)                                                   TERM(7)
      +
      +
      +
       
       

      NAME

      @@ -126,10 +130,10 @@
              ters or digits.  You need to avoid using punctuation char-
              acters  in  root  names,  because they are used and inter-
              preted 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 (\, $, [, ]), is
      -       especially dangerous  (terminfo  is  platform-independent,
      +       $,  *, ?, etc.) embedded in them may cause odd and unhelp-
      +       ful behavior.  The slash (/), or any other character  that
      +       may  be  interpreted by anyone's file system (\, $, [, ]),
      +       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
      @@ -153,6 +157,7 @@
              in  a  multi-platform environment!  If a model number fol-
              lows, it should indicate either the OS  release  level  or
              the console driver release level.
      +
              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
      @@ -169,23 +174,23 @@
                   another that has this suffix and uses  magic  cookies
                   to support multiple attributes.
       
      -       -am  Enable auto-margin (right-margin wraparound)
      +       -am  Enable auto-margin (right-margin wraparound).
       
      -       -m   Mono mode - suppress color support
      +       -m   Mono mode - suppress color support.
       
              -na  No  arrow keys - termcap ignores arrow keys which are
                   actually there on the terminal, so the user  can  use
                   the arrow keys locally.
       
      -       -nam No auto-margin - suppress am capability
      +       -nam No auto-margin - suppress am capability.
       
      -       -nl  No labels - suppress soft labels
      +       -nl  No labels - suppress soft labels.
       
      -       -nsl No status line - suppress status line
      +       -nsl No status line - suppress status line.
       
              -pp  Has a printer port which is used.
       
      -       -rv  Terminal in reverse video mode (black on white)
      +       -rv  Terminal in reverse video mode (black on white).
       
              -s   Enable status line.
       
      @@ -223,10 +228,10 @@
                   compiled terminal capability data base
       
              /etc/inittab
      -            tty line initialization (AT&T-like UNIXes).
      +            tty line initialization (AT&T-like UNIXes)
       
              /etc/ttys
      -            tty line initialization (BSD-like UNIXes).
      +            tty line initialization (BSD-like UNIXes)
       
       
       
      @@ -235,38 +240,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + TERM(7)

      diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html index 366da654..0a503be3 100644 --- a/doc/html/man/terminfo.5.html +++ b/doc/html/man/terminfo.5.html @@ -34,7 +34,7 @@ **************************************************************************** * @Id: terminfo.head,v 1.10 2002/08/17 23:37:10 tom Exp @ * Head of terminfo man page ends here - * @Id: terminfo.tail,v 1.35 2002/04/20 16:49:33 tom Exp @ + * @Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp @ * Beginning of terminfo.tail file *.TH --> @@ -49,6 +49,10 @@
       
      +TERMINFO(5)                File Formats               TERMINFO(5)
      +
      +
      +
       
       

      NAME

      @@ -163,7 +167,6 @@
              can_change                ccc   cc    terminal can re-
                                                    define existing col-
                                                    ors
      -
              ceol_standout_glitch      xhp   xs    standout not erased
                                                    by overwriting (hp)
              col_addr_glitch           xhpa  YA    only positive motion
      @@ -183,6 +186,7 @@
                                                    strikes with a blank
              generic_type              gn    gn    generic line type
              hard_copy                 hc    hc    hardcopy terminal
      +
              hard_cursor               chts  HC    cursor is hard to
                                                    see
              has_meta_key              km    km    Has a meta key
      @@ -216,8 +220,6 @@
                                                    f2=ctrl C)
              no_pad_char               npc   NP    pad character does
                                                    not exist
      -
      -
              non_dest_scroll_region    ndscr ND    scrolling region is
                                                    non-destructive
              non_rev_rmcup             nrrmc NR    smcup does not
      @@ -250,6 +252,7 @@
              label_height          lh       lh     rows in each label
              label_width           lw       lw     columns in each
                                                    label
      +
              lines                 lines    li     number of lines on
                                                    screen or page
              lines_of_memory       lm       lm     lines of memory if >
      @@ -270,8 +273,6 @@
              no_color_video        ncv      NC     video attributes
                                                    that cannot be used
                                                    with colors
      -
      -
              num_labels            nlab     Nl     number of labels on
                                                    screen
              padding_baud_rate     pb       pb     lowest baud rate
      @@ -315,6 +316,9 @@
              output_res_char        orc     Yi     horizontal resolu-
                                                    tion in units per
                                                    line
      +
      +
      +
              output_res_horz_inch   orhi    Yk     horizontal resolu-
                                                    tion in units per
                                                    inch
      @@ -324,8 +328,6 @@
                                                    in units per inch
              print_rate             cps     Ym     print rate in char-
                                                    acters per second
      -
      -
              wide_char_size         widcs   Yn     character step size
                                                    when in double wide
                                                    mode
      @@ -378,12 +380,11 @@
              cursor_address            cup    cm   move to row #1
                                                    columns #2
              cursor_down               cud1   do   down one line
      -
      -
              cursor_home               home   ho   home cursor (if no
                                                    cup)
              cursor_invisible          civis  vi   make cursor invisi-
                                                    ble
      +
              cursor_left               cub1   le   move left one space
              cursor_mem_address        mrcup  CM   memory relative cur-
                                                    sor addressing, move
      @@ -433,7 +434,6 @@
                                                    riage motion
              enter_micro_mode          smicm  ZJ   Start micro-motion
                                                    mode
      -
              enter_near_letter_quality snlq   ZK   Enter NLQ mode
              enter_normal_quality      snrmq  ZL   Enter normal-quality
                                                    mode
      @@ -450,6 +450,7 @@
              enter_subscript_mode      ssubm  ZN   Enter subscript mode
              enter_superscript_mode    ssupm  ZO   Enter superscript
                                                    mode
      +
              enter_underline_mode      smul   us   begin underline mode
              enter_upward_mode         sum    ZP   Start upward car-
                                                    riage motion
      @@ -487,7 +488,6 @@
              flash_hook                hook   fh   flash switch hook
              flash_screen              flash  vb   visible bell (may
                                                    not move cursor)
      -
              form_feed                 ff     ff   hardcopy terminal
                                                    page eject (P*)
              from_status_line          fsl    fs   return from status
      @@ -515,6 +515,8 @@
              insert_padding            ip     ip   insert padding after
                                                    inserted character
              key_a1                    ka1    K1   upper left of keypad
      +
      +
              key_a3                    ka3    K3   upper right of key-
                                                    pad
              key_b2                    kb2    K2   center of keypad
      @@ -540,8 +542,6 @@
                                                    in insert mode
              key_end                   kend   @7   end key
              key_enter                 kent   @8   enter/send key
      -
      -
              key_eol                   kel    kE   clear-to-end-of-line
                                                    key
              key_eos                   ked    kS   clear-to-end-of-
      @@ -582,6 +582,7 @@
              key_f38                   kf38   FS   F38 function key
              key_f39                   kf39   FT   F39 function key
              key_f4                    kf4    k4   F4 function key
      +
              key_f40                   kf40   FU   F40 function key
              key_f41                   kf41   FV   F41 function key
              key_f42                   kf42   FW   F42 function key
      @@ -595,7 +596,6 @@
              key_f5                    kf5    k5   F5 function key
              key_f50                   kf50   Fe   F50 function key
              key_f51                   kf51   Ff   F51 function key
      -
              key_f52                   kf52   Fg   F52 function key
              key_f53                   kf53   Fh   F53 function key
              key_f54                   kf54   Fi   F54 function key
      @@ -648,8 +648,8 @@
              key_sdl                   kDL    *5   shifted delete-line
                                                    key
              key_select                kslt   *6   select key
      -       key_send                  kEND   *7   shifted end key
       
      +       key_send                  kEND   *7   shifted end key
              key_seol                  kEOL   *8   shifted clear-to-
                                                    end-of-line key
              key_sexit                 kEXT   *9   shifted exit key
      @@ -702,8 +702,6 @@
                                                    key f6 if not f6
              lab_f7                    lf7    l7   label on function
                                                    key f7 if not f7
      -
      -
              lab_f8                    lf8    l8   label on function
                                                    key f8 if not f8
              lab_f9                    lf9    l9   label on function
      @@ -716,6 +714,7 @@
                                                    (8th-bit on)
              micro_column_address      mhpa   ZY   Like column_address
                                                    in micro mode
      +
              micro_down                mcud1  ZZ   Like cursor_down in
                                                    micro mode
              micro_left                mcub1  Za   Like cursor_left in
      @@ -757,7 +756,6 @@
                                                    sor in micro mode
              parm_rindex               rin    SR   scroll back #1 lines
                                                    (P)
      -
              parm_up_cursor            cuu    UP   up #1 lines (P*)
              parm_up_micro             mcuu   Zi   Like parm_up_cursor
                                                    in micro mode
      @@ -781,6 +779,8 @@
              quick_dial                qdial  QD   dial number #1 with-
                                                    out checking
              remove_clock              rmclk  RC   remove clock
      +
      +
              repeat_char               rep    rp   repeat char #1 #2
                                                    times (P*)
              req_for_input             rfi    RF   send next input char
      @@ -811,7 +811,6 @@
                                                    line #1 or (if smgtp
                                                    is not given) #2
                                                    lines from bottom
      -
              set_clock                 sclk   SC   set clock, #1 hrs #2
                                                    mins #3 secs
              set_color_pair            scp    sp   Set current color
      @@ -846,6 +845,8 @@
                                                    set
              stop_bit_image            rbim   Zs   Stop printing bit
                                                    image graphics
      +
      +
              stop_char_set_def         rcsd   Zt   End definition of
                                                    character set #1
              subscript_characters      subcs  Zu   List of subscript-
      @@ -865,7 +866,6 @@
                                                    move past it
              up_half_line              hu     hu   half a line up
              user0                     u0     u0   User string #0
      -
              user1                     u1     u1   User string #1
              user2                     u2     u2   User string #2
              user3                     u3     u3   User string #3
      @@ -911,6 +911,8 @@
                                                      port
              display_pc_char           dispc    S1   Display PC charac-
                                                      ter #1
      +
      +
              end_bit_image_region      endbi    Yy   End a bit-image
                                                      region
              enter_pc_charset_mode     smpch    S2   Enter PC character
      @@ -919,7 +921,6 @@
                                                      mode
              exit_pc_charset_mode      rmpch    S3   Exit PC character
                                                      display mode
      -
              exit_scancode_mode        rmsc     S5   Exit PC scancode
                                                      mode
              get_mouse                 getm     Gm   Curses should get
      @@ -973,10 +974,11 @@
               terminfo entries after SVr4.1; beware!
       
                       Variable         Cap-   TCap     Description
      -
                        String          name   Code
               enter_horizontal_hl_mode ehhlm  Xh   Enter horizontal
                                                    highlight mode
      +
      +
               enter_left_hl_mode       elhlm  Xl   Enter left highlight
                                                    mode
               enter_low_hl_mode        elohlm Xo   Enter low highlight
      @@ -1083,6 +1085,7 @@
              To do this, put a period before the capability name.   For
              example, see the second ind in the example above.
       
      +
          Fetching Compiled Descriptions
              If  the environment variable TERMINFO is set, it is inter-
              preted as the pathname of a directory containing the  com-
      @@ -1136,65 +1139,64 @@
              beginning  of the next line when it reaches the right mar-
              gin, then it should have the am capability.  If the termi-
              nal  can  clear its screen, leaving the cursor in the home
      -       position,  then  this  is  given  by  the   clear   string
      -       capability.   If  the  terminal  overstrikes  (rather than
      -       clearing a position when a character is struck over)  then
      -       it  should  have  the os capability.  If the terminal is a
      -       printing terminal, with no soft copy unit, give it both hc
      -       and  os.   (os applies to storage scope terminals, such as
      -       TEKTRONIX 4010 series, as well as hard copy and APL termi-
      -       nals.)   If there is a code to move the cursor to the left
      -       edge of the current row, give this as 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 bel.
      -
      -       If  there is a code to move the cursor one position to the
      -       left (such as backspace) that capability should  be  given
      -       as  cub1.   Similarly, codes to move to the right, up, and
      +       position, then this is given by the clear string  capabil-
      +       ity.   If the terminal overstrikes (rather than clearing a
      +       position when a character is struck over) then  it  should
      +       have  the  os  capability.   If the terminal is a printing
      +       terminal, with no soft copy unit, give it both hc and  os.
      +       (os  applies to storage scope terminals, such as TEKTRONIX
      +       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 cr.  (Normally this will be car-
      +       riage  return,  control M.)  If there is a code to produce
      +       an audible signal (bell, beep, etc) give this as bel.
      +
      +       If there is a code to move the cursor one position to  the
      +       left  (such  as backspace) that capability should be given
      +       as cub1.  Similarly, codes to move to the right,  up,  and
              down should be given as cuf1, cuu1, and cud1.  These local
      -       cursor  motions  should not alter the text they pass over,
      -       for example, you would not normally use  `cuf1= '  because
      +       cursor motions should not alter the text they  pass  over,
      +       for  example,  you would not normally use `cuf1= ' because
              the space would erase the character moved over.
       
      -       A  very  important  point  here  is  that the local cursor
      -       motions encoded in terminfo are undefined at the left  and
      -       top  edges  of  a  CRT  terminal.   Programs  should never
      -       attempt to backspace around the left edge,  unless  bw  is
      +       A very important point  here  is  that  the  local  cursor
      +       motions  encoded in terminfo are undefined at the left and
      +       top edges  of  a  CRT  terminal.   Programs  should  never
      +       attempt  to  backspace  around the left edge, unless 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
      +       order  to  scroll text up, a program will go to the bottom
              left corner of the screen and send the ind (index) string.
       
              To scroll text down, a program goes to the top left corner
      -       of  the  screen  and  sends the ri (reverse index) string.
      -       The strings ind and ri are undefined  when  not  on  their
      +       of the screen and sends the  ri  (reverse  index)  string.
      +       The  strings  ind  and  ri are undefined when not on their
              respective corners of the screen.
       
              Parameterized versions of the scrolling sequences are indn
              and rin which have the same semantics as ind and ri except
      -       that  they take one parameter, and scroll that many lines.
      -       They are also undefined except at the appropriate edge  of
      +       that they take one parameter, and scroll that many  lines.
      +       They  are also undefined except at the appropriate edge of
              the screen.
       
      -       The  am  capability tells whether the cursor sticks at the
      -       right edge of the screen when text  is  output,  but  this
      +       The am 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 cuf1 from the last column.
      -       The only local motion which is defined from the left  edge
      -       is  if  bw  is  given, then a cub1 from the left edge will
      -       move to the right edge of the previous row.  If bw is  not
      -       given,  the effect is undefined.  This is useful for draw-
      -       ing a box around the edge of the screen, for example.   If
      -       the  terminal has switch selectable automatic margins, the
      -       terminfo file usually assumes that this is on;  i.e.,  am.
      -       If  the  terminal  has  a command which moves to the first
      -       column of the next line, that command can be given as  nel
      -       (newline).   It  does not matter if the command clears the
      -       remainder of the current line, so if the terminal  has  no
      -       cr  and lf it may still be possible to craft a working nel
      +       The  only local motion which is defined from the left edge
      +       is if bw is given, then a cub1 from  the  left  edge  will
      +       move  to the right edge of the previous row.  If bw is not
      +       given, the effect is undefined.  This is useful for  draw-
      +       ing  a box around the edge of the screen, for example.  If
      +       the terminal has switch selectable automatic margins,  the
      +       terminfo  file  usually assumes that this is on; i.e., am.
      +       If the terminal has a command which  moves  to  the  first
      +       column  of the next line, that command can be given as nel
      +       (newline).  It does not matter if the command  clears  the
      +       remainder  of  the current line, so if the terminal has no
      +       cr and lf it may still be possible to craft a working  nel
              out of one or both of them.
       
              These  capabilities  suffice  to  describe  hard-copy  and
      -       "glass-tty"  terminals.   Thus  the  model  33 teletype is
      +       "glass-tty" terminals.  Thus  the  model  33  teletype  is
              described as
       
            33|tty33|tty|model 33 teletype,
      @@ -1208,323 +1210,359 @@
       
       
          Parameterized Strings
      -       Cursor addressing and other strings  requiring  parameters
      -       in  the  terminal  are described by a parameterized string
      -       capability, with printf(3S) like escapes %x  in  it.   For
      -       example,  to  address  the  cursor,  the cup capability is
      +       Cursor  addressing  and other strings requiring parameters
      +       in the terminal are described by  a  parameterized  string
      +       capability,  with  printf(3S)  like escapes %x in it.  For
      +       example, to address the  cursor,  the  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
      +       memory.)  If  the  terminal  has  memory  relative  cursor
              addressing, that can be indicated by mrcup.
       
      -       The parameter mechanism uses a stack and special  %  codes
      -       to  manipulate  it.  Typically a sequence will push one of
      -       the parameters onto the stack and then print  it  in  some
      -       format.  Often more complex operations are necessary.
      +       The  parameter  mechanism uses a stack and special % 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 sgr string.
       
              The % encodings have the following meanings:
       
      -            %%        outputs `%'
      -            %[[:]flags][width[.precision]][doxXs]
      -                      as in printf, flags are [-+#] and space
      -            %c        print pop() like %c in printf()
      -            %s        print pop() like %s in printf()
      -
      -            %p[1-9]   push i'th parm
      -            %P[a-z]   set dynamic variable [a-z] to pop()
      -            %g[a-z]   get dynamic variable [a-z] and push it
      -            %P[A-Z]   set static variable [a-z] to pop()
      -            %g[A-Z]   get static variable [a-z] and push it
      -            %'c'      char constant c
      -            %{nn}     integer constant nn
      -            %l        push strlen(pop)
      -
      -            %+ %- %* %/ %m
      -                      arithmetic (%m is mod): push(pop() op pop())
      -            %& %| %^  bit operations: push(pop() op pop())
      -            %= %> %<  logical operations: push(pop() op pop())
      -            %A, %O    logical and & or operations (for conditionals)
      -            %! %~     unary operations push(op pop())
      -            %i        add 1 to first two parameters (for ANSI terminals)
      -
      -            %? expr %t thenpart %e elsepart %;
      -                      if-then-else, %e elsepart is optional.
      -                      else-if's are possible a la Algol 68:
      -                      %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %;
      -                      ci are conditions, bi are bodies.
      +
      +       %%   outputs `%'
      +
      +       %[[:]flags][width[.precision]][doxXs]
      +            as in printf, flags are [-+#] and space
      +
      +       %c   print pop() like %c in printf
      +
      +       %s   print pop() like %s in printf
      +
      +       %p[1-9]
      +            push i'th parameter
      +
      +       %P[a-z]
      +            set dynamic variable [a-z] to pop()
      +
      +       %g[a-z]
      +            get dynamic variable [a-z] and push it
      +
      +       %P[A-Z]
      +            set static variable [a-z] to pop()
      +
      +       %g[A-Z]
      +            get static variable [a-z] and push it
      +
      +            The  terms  "static"  and  "dynamic"  are misleading.
      +            Historically, these are simply two different sets  of
      +            variables,  whose  values are not reset between calls
      +            to tparm.  However, that fact is  not  documented  in
      +            other  implementations.  Relying on it will adversely
      +            impact portability to other implementations.
      +
      +       %'c' char constant c
      +
      +       %{nn}
      +            integer constant nn
      +
      +       %l   push strlen(pop)
      +
      +       %+ %- %* %/ %m
      +            arithmetic (%m is mod): push(pop() op pop())
      +
      +       %& %| %^
      +            bit operations: push(pop() op pop())
      +
      +       %= %> %<
      +            logical operations: push(pop() op pop())
      +
      +       %A, %O
      +            logical and & or operations (for conditionals)
      +
      +       %! %~
      +            unary operations push(op pop())
      +
      +       %i   add 1 to first two parameters (for ANSI terminals)
      +
      +       %? expr %t thenpart %e elsepart %;
      +            if-then-else, %e elsepart is optional.  else-if's are
      +            possible a la Algol 68:
      +            %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %;
      +            ci are conditions, bi are bodies.
       
              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
      +       the  usual  order.   That  is,  to  get  x-5 one would use
      +       "%gx%{5}%-".  %P and %g variables  are  persistent  across
              escape-string evaluations.
       
              Consider the HP2645, which, to get to row 3 and column 12,
      -       needs  to  be  sent  \E&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 dig-
      +       needs to be sent \E&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  dig-
              its.  Thus its cup capability is "cup=6\E&%p2%2dc%p1%2dY".
       
              The Microterm ACT-IV needs the current row and column sent
      -       preceded by a ^T, with the row and column  simply  encoded
      -       in  binary,  "cup=^T%p1%c%p2%c".  Terminals which use "%c"
      -       need to be able to backspace the  cursor  (cub1),  and  to
      +       preceded  by  a ^T, with the row and column simply encoded
      +       in binary, "cup=^T%p1%c%p2%c".  Terminals which  use  "%c"
      +       need  to  be  able  to backspace the cursor (cub1), and to
              move the cursor up one line on the screen (cuu1).  This is
      -       necessary because it is not always safe to transmit \n  ^D
      -       and  \r,  as  the system may change or discard them.  (The
      -       library routines dealing with terminfo set  tty  modes  so
      +       necessary  because it is not always safe to transmit \n ^D
      +       and \r, as the system may change or  discard  them.   (The
      +       library  routines  dealing  with terminfo set tty modes so
              that tabs are never expanded, so \t is safe to send.  This
              turns out to be essential for the Ann Arbor 4080.)
       
              A final example is the LSI ADM-3a, which uses row and col-
              umn  offset  by  a  blank  character,  thus  "cup=\E=%p1%'
      -       '%+%c%p2%' '%+%c".  After sending `\E=', 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 charac-
      -       ter.  Then the same is  done  for  the  second  parameter.
      +       '%+%c%p2%'  '%+%c".   After sending `\E=', 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  charac-
      +       ter.   Then  the  same  is  done for the second parameter.
              More complex arithmetic is possible using the stack.
       
       
          Cursor Motions
              If the terminal has a fast way to home the cursor (to very
      -       upper left corner of screen) then this  can  be  given  as
      -       home;  similarly  a fast way of getting to the lower left-
      -       hand corner can be given as ll; this may involve going  up
      -       with  cuu1  from  the  home position, but a program should
      -       never do this itself (unless ll 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
      +       upper  left  corner  of  screen) then this can be given as
      +       home; similarly a fast way of getting to the  lower  left-
      +       hand  corner can be given as ll; this may involve going up
      +       with cuu1 from the home position,  but  a  program  should
      +       never  do this itself (unless ll 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 \EH sequence  on  HP  terminals
      +       not  of  memory.   (Thus, the \EH sequence on HP terminals
              cannot be used for home.)
       
              If the terminal has row or column absolute cursor address-
      -       ing, these can be given as single  parameter  capabilities
      +       ing,  these  can be given as single parameter capabilities
              hpa (horizontal position absolute) and vpa (vertical posi-
              tion absolute).  Sometimes these are shorter than the more
      -       general  two  parameter  sequence (as with the hp2645) and
      +       general two parameter sequence (as with  the  hp2645)  and
              can be used in preference to cup.  If there are parameter-
      -       ized  local  motions  (e.g.,  move  n spaces to the right)
      +       ized local motions (e.g., move  n  spaces  to  the  right)
              these can be given as cud, cub, cuf, and cuu with a single
      -       parameter  indicating  how many spaces to move.  These are
      -       primarily useful if the terminal does not have  cup,  such
      +       parameter indicating how many spaces to move.   These  are
      +       primarily  useful  if the terminal does not have cup, such
              as the TEKTRONIX 4025.
       
              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 smcup and rmcup.  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
      +       and exit this mode can be given as smcup and rmcup.   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.
      +       into  the terminal for cursor addressing to work properly.
              This is also used for the TEKTRONIX 4025, where smcup sets
      -       the command character to be the one used by terminfo.   If
      -       the  smcup  sequence  will not restore the screen after an
      +       the  command character to be the one used by terminfo.  If
      +       the smcup sequence will not restore the  screen  after  an
              rmcup sequence is output (to the state prior to outputting
              rmcup), specify nrrmc.
       
       
          Area Clears
              If the terminal can clear from the current position to the
      -       end of the line, leaving the  cursor  where  it  is,  this
      +       end  of  the  line,  leaving  the cursor where it is, this
              should be given as el.  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
      -       el1.  If the terminal can clear from the current  position
      -       to  the  end  of the display, then this should be given as
      -       ed.  Ed is only defined from the first column of  a  line.
      -       (Thus,  it can be simulated by a request to delete a large
      +       beginning  of  the line to the current position inclusive,
      +       leaving the cursor where it is, this should  be  given  as
      +       el1.   If the terminal can clear from the current position
      +       to the end of the display, then this should  be  given  as
      +       ed.   Ed  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 ed is not available.)
       
       
          Insert/delete line and vertical motions
      -       If the terminal can open a new blank line before the  line
      -       where  the cursor is, this should be given as il1; this is
      -       done only from the first position of a line.   The  cursor
      +       If  the terminal can open a new blank line before the line
      +       where the cursor is, this should be given as il1; 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 dl1; this is done only from the first
      -       position on the line to be deleted.  Versions of  il1  and
      -       dl1  which  take  a  single parameter and insert or delete
      +       can  delete  the  line  which  the cursor is on, then this
      +       should be given as dl1; this is done only from  the  first
      +       position  on  the line to be deleted.  Versions of il1 and
      +       dl1 which take a single parameter  and  insert  or  delete
              that many lines can be given as il and dl.
       
      -       If the terminal has a settable scrolling region (like  the
      -       vt100)  the  command to set this can be described with the
      -       csr capability, which takes two parameters:  the  top  and
      +       If  the terminal has a settable scrolling region (like the
      +       vt100) the command to set this can be described  with  the
      +       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.
       
      -       It is possible to get the effect of insert or delete  line
      +       It  is possible to get the effect of insert or delete line
              using csr on a properly chosen region; the sc and 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 ncurses(3x) library does  this
      -       synthesis   automatically,   so   you   need  not  compose
      +       and  restore  cursor)  commands may be useful for ensuring
      +       that your synthesized insert/delete string does  not  move
      +       the  cursor.  (Note that the ncurses(3x) library does this
      +       synthesis  automatically,  so   you   need   not   compose
              insert/delete strings for an entry with csr).
       
              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
      +       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).
       
      -       Inserting  lines  at  the  top or bottom of the screen can
      -       also be done using ri or ind on many terminals  without  a
      -       true  insert/delete line, and is often faster even on ter-
      +       Inserting lines at the top or bottom  of  the  screen  can
      +       also  be  done using ri or ind on many terminals without a
      +       true insert/delete line, and is often faster even on  ter-
              minals with those features.
       
      -       The boolean non_dest_scroll_region 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 some-
      -       thing to the bottom line, move the cursor to  the  top  of
      +       The  boolean  non_dest_scroll_region 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  some-
      +       thing  to  the  bottom line, move the cursor to the top of
              the region, and do ri followed by dl1 or ind.  If the data
      -       scrolled off the bottom  of  the  region  by  the  ri  re-
      -       appears,  then scrolling is non-destructive.  System V and
      -       XSI Curses expect that ind, ri, indn, and rin  will  simu-
      -       late  destructive  scrolling; their documentation cautions
      -       you not to define csr unless this is  true.   This  curses
      +       scrolled  off  the  bottom  of  the  region  by the ri re-
      +       appears, then scrolling is non-destructive.  System V  and
      +       XSI  Curses  expect that ind, ri, indn, and rin will simu-
      +       late destructive scrolling; their  documentation  cautions
      +       you  not  to  define csr unless this is true.  This curses
              implementation is more liberal and will do explicit erases
              after scrolling if ndstr is defined.
       
              If the terminal has the ability to define a window as part
      -       of  memory,  which all commands affect, it should be given
      +       of memory, which all commands affect, it should  be  given
              as the parameterized string wind.  The four parameters are
      -       the  starting  and ending lines in memory and the starting
      +       the starting and ending lines in memory and  the  starting
              and ending columns in memory, in that order.
       
      -       If the terminal can retain display memory above, then  the
      -       da  capability  should  be given; if display memory can be
      -       retained below, then db should be given.   These  indicate
      -       that  deleting  a  line  or  scrolling may bring non-blank
      -       lines up from below or that scrolling  back  with  ri  may
      +       If  the terminal can retain display memory above, then the
      +       da capability should be given; if display  memory  can  be
      +       retained  below,  then db should be given.  These indicate
      +       that deleting a line  or  scrolling  may  bring  non-blank
      +       lines  up  from  below  or that scrolling back with ri may
              bring down non-blank lines.
       
       
          Insert/Delete Character
      -       There  are  two  basic kinds of intelligent terminals with
      -       respect to insert/delete character which can be  described
      -       using  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  "abc    def" using local cursor motions (not spaces)
      +       There are two basic kinds of  intelligent  terminals  with
      +       respect  to insert/delete character which can be described
      +       using 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 "abc    def" using local cursor motions (not  spaces)
              between the "abc" and the "def".  Then position the cursor
      -       before  the "abc" and put the terminal in insert mode.  If
      -       typing characters causes the rest of  the  line  to  shift
      +       before the "abc" 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 ter-
      -       minal does not  distinguish  between  blanks  and  untyped
      -       positions.   If  the  "abc" shifts over to the "def" 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 in, which  stands
      +       minal  does  not  distinguish  between  blanks and untyped
      +       positions.  If the "abc" shifts over to  the  "def"  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 in, which stands
              for "insert null".  While these are two logically separate
      -       attributes (one line versus multi-line  insert  mode,  and
      -       special  treatment of untyped spaces) we have seen no ter-
      +       attributes  (one  line  versus multi-line insert mode, and
      +       special treatment of untyped spaces) we have seen no  ter-
              minals whose insert mode cannot be described with the sin-
              gle attribute.
       
      -       Terminfo  can describe both terminals which have an insert
      +       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 smir the
      -       sequence to get  into  insert  mode.   Give  as  rmir  the
      -       sequence  to  leave  insert  mode.   Now  give as ich1 any
      +       blank position on the current  line.   Give  as  smir  the
      +       sequence  to  get  into  insert  mode.   Give  as rmir the
      +       sequence to leave insert  mode.   Now  give  as  ich1  any
              sequence needed to be sent just before sending the charac-
      -       ter  to  be  inserted.   Most terminals with a true insert
      -       mode will not give ich1; terminals which send  a  sequence
      +       ter to be inserted.  Most terminals  with  a  true  insert
      +       mode  will  not give ich1; terminals which send a sequence
              to open a screen position should give it here.
       
      -       If  your terminal has both, insert mode is usually prefer-
      -       able to ich1.   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
      +       If your terminal has both, insert mode is usually  prefer-
      +       able  to  ich1.   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 ich sequences do not require previous smir,
              and most smir insert modes do not require ich1 before each
      -       character.   Therefore,  the  new  curses actually assumes
      -       this is the case and uses either rmir/smir or ich/ich1  as
      +       character.  Therefore, the  new  curses  actually  assumes
      +       this  is the case and uses either rmir/smir or ich/ich1 as
              appropriate (but not both).  If you have to write an entry
      -       to be used under new curses for a terminal old  enough  to
      +       to  be  used under new curses for a terminal old enough to
              need both, include the rmir/smir sequences in ich1.
       
              If post insert padding is needed, give this as a number of
      -       milliseconds in ip (a string option).  Any other  sequence
      -       which  may  need  to  be  sent after an insert of a single
      +       milliseconds  in ip (a string option).  Any other sequence
      +       which may need to be sent after  an  insert  of  a  single
              character may also be given in ip.  If your terminal needs
              both to be placed into an `insert mode' and a special code
      -       to precede each inserted character,  then  both  smir/rmir
      -       and  ich1  can  be  given, and both will be used.  The ich
      +       to  precede  each  inserted character, then both smir/rmir
      +       and ich1 can be given, and both will  be  used.   The  ich
              capability, with one parameter, n, will repeat the effects
              of ich1 n times.
       
              If padding is necessary between characters typed while not
      -       in insert mode, give this  as  a  number  of  milliseconds
      +       in  insert  mode,  give  this  as a number of milliseconds
              padding in rmp.
       
      -       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  mir  to  speed up inserting in this case.
      -       Omitting mir  will  affect  only  speed.   Some  terminals
      +       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 mir to speed up  inserting  in  this  case.
      +       Omitting  mir  will  affect  only  speed.   Some terminals
              (notably Datamedia's) must not have mir because of the way
              their insert mode works.
       
      -       Finally, you can specify dch1 to delete a  single  charac-
      -       ter,  dch  with  one parameter, n, to delete n characters,
      -       and delete mode by giving smdc and rmdc to enter and  exit
      -       delete  mode  (any mode the terminal needs to be placed in
      +       Finally,  you  can specify dch1 to delete a single charac-
      +       ter, dch with one parameter, n, to  delete  n  characters,
      +       and  delete mode by giving smdc and rmdc to enter and exit
      +       delete mode (any mode the terminal needs to be  placed  in
              for dch1 to work).
       
      -       A command to erase n characters (equivalent to  outputting
      -       n  blanks  without  moving the cursor) can be given as ech
      +       A  command to erase n characters (equivalent to outputting
      +       n blanks without moving the cursor) can be  given  as  ech
              with one parameter.
       
       
          Highlighting, Underlining, and Visible Bells
              If  your  terminal  has  one  or  more  kinds  of  display
      -       attributes,  these  can be represented in a number of dif-
      +       attributes, these can be represented in a number  of  dif-
              ferent ways.  You should choose one display form as stand-
              out mode, 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
      -       smso and rmso, 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,
      +       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
      +       smso  and  rmso, 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 xmc should be given to tell how many spaces are left.
       
      -       Codes to begin underlining  and  end  underlining  can  be
      -       given  as smul and rmul respectively.  If the terminal has
      -       a code to underline the current  character  and  move  the
      +       Codes  to  begin  underlining  and  end underlining can be
      +       given as smul and rmul 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 uc.
       
      -       Other capabilities to  enter  various  highlighting  modes
      -       include  blink  (blinking) bold (bold or extra bright) dim
      -       (dim or half-bright) invis (blanking  or  invisible  text)
      -       prot  (protected)  rev  (reverse video) sgr0 (turn off all
      -       attribute modes)  smacs  (enter  alternate  character  set
      -       mode)  and  rmacs  (exit  alternate  character  set mode).
      -       Turning on any of these modes singly may or may  not  turn
      +       Other  capabilities  to  enter  various highlighting modes
      +       include blink (blinking) bold (bold or extra  bright)  dim
      +       (dim  or  half-bright)  invis (blanking or invisible text)
      +       prot (protected) rev (reverse video) sgr0  (turn  off  all
      +       attribute  modes)  smacs  (enter  alternate  character set
      +       mode) and  rmacs  (exit  alternate  character  set  mode).
      +       Turning  on  any of these modes singly may or may not turn
              off other modes.
       
      -       If  there  is  a sequence to set arbitrary combinations of
      -       modes, this should be given as sgr (set attributes),  tak-
      -       ing  9 parameters.  Each parameter is either 0 or nonzero,
      +       If there is a sequence to set  arbitrary  combinations  of
      +       modes,  this should be given as sgr (set attributes), tak-
      +       ing 9 parameters.  Each parameter is either 0 or  nonzero,
              as the corresponding attribute is on or off.  The 9 param-
      -       eters  are, in order: standout, underline, reverse, blink,
      -       dim, bold, blank, protect, alternate character  set.   Not
      -       all  modes  need be supported by sgr, only those for which
      +       eters are, in order: standout, underline, reverse,  blink,
      +       dim,  bold,  blank, protect, alternate character set.  Not
      +       all modes need be supported by sgr, only those  for  which
              corresponding separate attribute commands exist.
       
              For example, the DEC vt220 supports most of the modes:
      @@ -1534,6 +1572,7 @@
                  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
      @@ -1542,22 +1581,22 @@
                  p8                protect      not used
                  p9                altcharset   ^O (off) ^N (on)
       
      -       We begin each escape sequence by turning off any  existing
      -       modes,  since  there  is no quick way to determine whether
      +       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 era-
      -       sures.  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
      +       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  era-
      +       sures.   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.
       
      -       Some  sequences  are common to different modes.  For exam-
      -       ple, ;7 is output when either p1 or p3 is true,  that  is,
      +       Some sequences are common to different modes.   For  exam-
      +       ple,  ;7  is output when either p1 or p3 is true, that is,
              if either standout or reverse modes are turned on.
       
      -       Writing  out  the above sequences, along with their depen-
      +       Writing out the above sequences, along with  their  depen-
              dencies yields
       
                sequence    when to output     terminfo translation
      @@ -1568,7 +1607,6 @@
                ;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%;
       
      @@ -1577,70 +1615,69 @@
                  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%;,
       
      -       Remember that if you specify sgr, you  must  also  specify
      +       Remember  that  if  you specify sgr, you must also specify
              sgr0.
       
      -       Terminals  with  the ``magic cookie'' glitch (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
      -       msgr  capability,  asserting  that  it  is safe to move in
      +       Terminals with the ``magic cookie'' glitch  (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
      +       msgr capability, asserting that it  is  safe  to  move  in
              standout mode, is present.
       
      -       If the terminal has a way of flashing the screen to  indi-
      -       cate  an  error quietly (a bell replacement) then this can
      +       If  the terminal has a way of flashing the screen to indi-
      +       cate an error quietly (a bell replacement) then  this  can
              be given as flash; it must not move the cursor.
       
      -       If the cursor needs to be made more  visible  than  normal
      +       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
      +       non-blinking  underline  into  an  easier to find block or
              blinking underline) give this sequence as cvvis.  If there
      -       is a way to make the  cursor  completely  invisible,  give
      +       is  a  way  to  make the cursor completely invisible, give
              that as civis.  The capability cnorm should be given which
              undoes the effects of both of these modes.
       
              If your terminal correctly generates underlined characters
      -       (with  no  special  codes  needed) even though it does not
      -       overstrike, then you should give the capability ul.  If  a
      -       character  overstriking  another leaves both characters on
      +       (with no special codes needed) even  though  it  does  not
      +       overstrike,  then you should give the capability ul.  If a
      +       character overstriking another leaves both  characters  on
              the screen, specify the capability os.  If overstrikes are
      -       erasable  with  a  blank, then this should be indicated by
      +       erasable with a blank, then this should  be  indicated  by
              giving eo.
       
       
          Keypad and Function Keys
              If the terminal has a keypad that transmits codes when the
      -       keys  are  pressed,  this  information can be given.  Note
      +       keys are pressed, this information  can  be  given.   Note
              that it is not possible to handle terminals where the key-
              pad 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 smkx and
      +       unshifted  HP  2621  keys).   If  the keypad can be set to
      +       transmit or not transmit, give these  codes  as  smkx  and
              rmkx.  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  kcub1,  kcuf1,
      -       kcuu1,  kcud1,  and  khome  respectively.   If  there  are
      -       function keys such as f0, f1, ...,  f10,  the  codes  they
      -       send  can  be given as kf0, kf1, ..., kf10.  If these keys
      -       have labels other than the default  f0  through  f10,  the
      -       labels  can  be  given  as lf0, lf1, ..., lf10.  The codes
      -       transmitted by certain other special keys  can  be  given:
      -       kll  (home  down), kbs (backspace), ktbc (clear all tabs),
      -       kctab (clear the tab stop in  this  column),  kclr  (clear
      -       screen  or  erase  key),  kdch1  (delete  character), kdl1
      -       (delete line), krmir (exit insert mode), kel (clear to end
      -       of  line),  ked  (clear  to  end of screen), kich1 (insert
      -       character or enter insert mode), kil1 (insert  line),  knp
      -       (next  page),  kpp  (previous  page),  kind  (scroll  for-
      -       ward/down), kri (scroll backward/up), 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 ka1, ka3, kb2, kc1, and kc3.
      -       These keys are useful when the effects of a 3 by 3  direc-
      -       tional pad are needed.
      +       The codes sent by the left arrow, right arrow,  up  arrow,
      +       down  arrow,  and  home keys can be given as kcub1, kcuf1,
      +       kcuu1, kcud1, and khome respectively.  If there are  func-
      +       tion  keys  such  as f0, f1, ..., f10, the codes they send
      +       can be given as kf0, kf1, ..., kf10.  If these  keys  have
      +       labels  other  than the default f0 through f10, the labels
      +       can be given as lf0, lf1, ..., lf10.  The codes  transmit-
      +       ted  by certain other special keys can be given: kll (home
      +       down), kbs  (backspace),  ktbc  (clear  all  tabs),  kctab
      +       (clear the tab stop in this column), kclr (clear screen or
      +       erase key), kdch1 (delete character), kdl1 (delete  line),
      +       krmir  (exit insert mode), kel (clear to end of line), ked
      +       (clear to end of screen), kich1 (insert character or enter
      +       insert  mode),  kil1  (insert  line), knp (next page), kpp
      +       (previous page), kind (scroll forward/down),  kri  (scroll
      +       backward/up),  khts  (set  a tab stop in this column).  In
      +       addition, if the keypad has a 3 by 3 array of keys includ-
      +       ing  the four arrow keys, the other five keys can be given
      +       as ka1, ka3, kb2, kc1, and kc3.   These  keys  are  useful
      +       when the effects of a 3 by 3 directional pad are needed.
       
              Strings  to  program  function keys can be given as pfkey,
              pfloc, and pfx.  A string to program screen labels  should
      @@ -1799,6 +1836,7 @@
              bullet                     ACS_BULLET     o          ~
              checker board (stipple)    ACS_CKBOARD    :          a
              degree symbol              ACS_DEGREE     \          f
      +
              diamond                    ACS_DIAMOND    +          `
              greater-than-or-equal-to   ACS_GEQUAL     >          z
              greek pi                   ACS_PI         *          {
      @@ -1870,12 +1908,12 @@
              defined."
       
              The  setaf/setab  and setf/setb capabilities take a single
      -       numeric argument each.  Argument values 0-7  are  portably
      -       defined  as  follows  (the  middle  column is the symbolic
      -       #define available in the header for the curses or  ncurses
      -       libraries).  The terminal hardware is free to map these as
      -       it likes, but the RGB values indicate normal locations  in
      -       color space.
      +       numeric argument each.  Argument values 0-7 of setaf/setab
      +       are  portably defined as follows (the middle column is the
      +       symbolic #define available in the header for the curses or
      +       ncurses  libraries).  The terminal hardware is free to map
      +       these as it likes, but  the  RGB  values  indicate  normal
      +       locations in color space.
       
                    Color       #define       Value       RGB
                    black     COLOR_BLACK       0     0, 0, 0
      @@ -1887,34 +1925,50 @@
                    cyan      COLOR_CYAN        6     0,max,max
                    white     COLOR_WHITE       7     max,max,max
       
      -       On  an  HP-like terminal, use scp with a color-pair number
      +       The  argument  values of setf/setb historically correspond
      +       to a different mapping, i.e.,
      +             Color       #define       Value       RGB
      +             black     COLOR_BLACK       0     0, 0, 0
      +             blue      COLOR_BLUE        1     0,0,max
      +             green     COLOR_GREEN       2     0,max,0
      +             cyan      COLOR_CYAN        3     0,max,max
      +             red       COLOR_RED         4     max,0,0
      +             magenta   COLOR_MAGENTA     5     max,0,max
      +             yellow    COLOR_YELLOW      6     max,max,0
      +             white     COLOR_WHITE       7     max,max,max
      +       It is important to not confuse the two sets of color capa-
      +       bilities;  otherwise  red/blue will be interchanged on the
      +       display.
      +
      +       On an HP-like terminal, use scp with a  color-pair  number
              parameter to set which color pair is current.
       
      -       On a Tektronix-like terminal, the capability  ccc  may  be
      -       present  to  indicate that colors can be modified.  If so,
      +       On  a  Tektronix-like  terminal, the capability ccc may be
      +       present to indicate that colors can be modified.   If  so,
              the initc capability will take a color number (0 to colors
      -       -  1)and  three  more parameters which describe the color.
      +       - 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 hls
      +       (Red, Green, Blue) values.  If the boolean capability  hls
              is present, they are instead as HLS (Hue, Lightness, Satu-
              ration) indices.  The ranges are terminal-dependent.
       
      -       On  an  HP-like  terminal, initp may give a capability for
      -       changing a color-pair value.  It will take  seven  parame-
      -       ters;  a  color-pair  number (0 to max_pairs - 1), and two
      -       triples describing first background  and  then  foreground
      -       colors.   These  parameters  must be (Red, Green, Blue) or
      +       On an HP-like terminal, initp may give  a  capability  for
      +       changing  a  color-pair value.  It will take seven parame-
      +       ters; a color-pair number (0 to max_pairs -  1),  and  two
      +       triples  describing  first  background and then foreground
      +       colors.  These parameters must be (Red,  Green,  Blue)  or
              (Hue, Lightness, Saturation) depending on hls.
       
      -       On some color terminals, colors collide  with  highlights.
      +       On  some  color terminals, colors collide with highlights.
              You can register these collisions with the ncv capability.
      -       This is a bit-mask of attributes not to be used when  col-
      -       ors  are  enabled.  The correspondence with the attributes
      +       This  is a bit-mask of attributes not to be used when col-
      +       ors are enabled.  The correspondence with  the  attributes
              understood by curses is as follows:
       
                             Attribute      Bit   Decimal
                             A_STANDOUT     0     1
                             A_UNDERLINE    1     2
      +
                             A_REVERSE      2     4
                             A_BLINK        3     8
                             A_DIM          4     16
      @@ -1923,297 +1977,298 @@
                             A_PROTECT      7     128
                             A_ALTCHARSET   8     256
       
      -       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  ncv
      +       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 ncv
              capability of 2.
       
      -       SVr4  curses  does nothing with ncv, ncurses recognizes it
      +       SVr4 curses does nothing with ncv, ncurses  recognizes  it
              and optimizes the output in favor of colors.
       
       
          Miscellaneous
      -       If the terminal requires other than a null (zero)  charac-
      -       ter  as  a  pad,  then this can be given as pad.  Only the
      -       first character of the pad string is used.  If the  termi-
      +       If  the terminal requires other than a null (zero) charac-
      +       ter as a pad, then this can be given  as  pad.   Only  the
      +       first  character of the pad string is used.  If the termi-
              nal does not have a pad character, specify npc.  Note that
      -       ncurses implements  the  termcap-compatible  PC  variable;
      -       though  the  application  may  set this value to something
      -       other than a null, ncurses will test  npc  first  and  use
      +       ncurses  implements  the  termcap-compatible  PC variable;
      +       though the application may set  this  value  to  something
      +       other  than  a  null,  ncurses will test npc first and use
              napms if the terminal has no pad character.
       
      -       If  the terminal can move up or down half a line, this can
      -       be indicated with hu  (half-line  up)  and  hd  (half-line
      +       If the terminal can move up or down half a line, this  can
      +       be  indicated  with  hu  (half-line  up) and hd (half-line
              down).  This is primarily useful for superscripts and sub-
      -       scripts on hard-copy terminals.  If a  hard-copy  terminal
      -       can  eject  to  the next page (form feed), give this as ff
      +       scripts  on  hard-copy terminals.  If a hard-copy terminal
      +       can eject to the next page (form feed), give  this  as  ff
              (usually control L).
       
      -       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  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
      +       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 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'.
       
      -       If the terminal has a settable command character, such  as
      -       the  TEKTRONIX  4025, this can be indicated with cmdch.  A
      +       If  the terminal has a settable command character, such as
      +       the TEKTRONIX 4025, this can be indicated with  cmdch.   A
              prototype command character is chosen which is used in all
      -       capabilities.   This character is given in the cmdch capa-
      -       bility to identify it.  The following convention  is  sup-
      -       ported  on  some  UNIX  systems:  The environment is to be
      -       searched for a CC variable, and if found, all  occurrences
      +       capabilities.  This character is given in the cmdch  capa-
      +       bility  to  identify it.  The following convention is sup-
      +       ported on some UNIX systems:  The  environment  is  to  be
      +       searched  for a CC variable, and if found, all occurrences
              of the prototype character are replaced with the character
              in the environment variable.
       
      -       Terminal descriptions that do  not  represent  a  specific
      +       Terminal  descriptions  that  do  not represent a specific
              kind of known terminal, such as switch, dialup, patch, and
      -       network, should include the  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
      -       virtual   terminal   descriptions  for  which  the  escape
      +       network,  should  include  the  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
      +       virtual  terminal  descriptions  for  which   the   escape
              sequences are known.)
       
      -       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 km.   Otherwise,  software
      +       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 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''
      +       be  cleared.   If strings exist to turn this ``meta mode''
              on and off, they can be given as smm and rmm.
       
      -       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  lm.   A  value of lm#0 indicates that the
      +       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 lm.  A value of  lm#0  indicates  that  the
              number of lines is not fixed, but that there is still more
              memory than fits on the screen.
       
              If the terminal is one of those supported by the UNIX vir-
      -       tual terminal protocol, the terminal number can  be  given
      +       tual  terminal  protocol, the terminal number can be given
              as vt.
       
              Media copy strings which control an auxiliary printer con-
              nected to the terminal can be given as mc0: print the con-
      -       tents  of  the screen, mc4: turn off the printer, and mc5:
      -       turn on the printer.  When the printer  is  on,  all  text
      -       sent  to  the terminal will be sent to the printer.  It is
      +       tents of the screen, mc4: turn off the printer,  and  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 termi-
              nal screen when the printer is on.  A variation mc5p takes
              one parameter, and leaves the printer on for as many char-
      -       acters  as  the  value  of  the  parameter, then turns the
      -       printer off.  The parameter should not  exceed  255.   All
      +       acters as the value  of  the  parameter,  then  turns  the
      +       printer  off.   The  parameter should not exceed 255.  All
              text,  including  mc4,  is  transparently  passed  to  the
              printer while an mc5p is in effect.
       
       
          Glitches and Braindamage
      -       Hazeltine terminals, which do not allow `~' characters  to
      +       Hazeltine  terminals, which do not allow `~' characters to
              be displayed should indicate hz.
       
              Terminals which ignore a line-feed immediately after an am
              wrap, such as the Concept and vt100, should indicate xenl.
       
      -       If  el  is  required  to  get  rid of standout (instead of
      -       merely writing normal text on top of it),  xhp  should  be
      +       If el is required to  get  rid  of  standout  (instead  of
      +       merely  writing  normal  text on top of it), xhp should be
              given.
       
      -       Teleray  terminals,  where  tabs turn all characters moved
      -       over to blanks, should  indicate  xt  (destructive  tabs).
      -       Note:    the    variable    indicating    this    is   now
      -       `dest_tabs_magic_smso'; in older  versions,  it  was  tel-
      +       Teleray terminals, where tabs turn  all  characters  moved
      +       over  to  blanks,  should  indicate xt (destructive tabs).
      +       Note:   the    variable    indicating    this    is    now
      +       `dest_tabs_magic_smso';  in  older  versions,  it was tel-
              eray_glitch.  This glitch is also taken to mean that it is
      -       not possible to position the cursor on top  of  a  ``magic
      +       not  possible  to  position the cursor on top of a ``magic
              cookie'', that to erase standout mode it is instead neces-
              sary to use delete and insert line.  The ncurses implemen-
              tation ignores this glitch.
       
      -       The  Beehive Superbee, which is unable to correctly trans-
      -       mit the escape or control C characters, has xsb,  indicat-
      -       ing  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
      +       The Beehive Superbee, which is unable to correctly  trans-
      +       mit  the escape or control C characters, has xsb, indicat-
      +       ing 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'.
       
      -       Other  specific  terminal  problems  may  be  corrected by
      +       Other specific  terminal  problems  may  be  corrected  by
              adding more capabilities of the form xx.
       
       
          Similar Terminals
              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  vari-
      -       ant,  the string capability use can be given with the name
      -       of the base terminal.  The capabilities given  before  use
      -       override  those  in  the base type named by use.  If there
      -       are multiple use capabilities, they are merged in  reverse
      -       order.   That is, the rightmost use reference is processed
      -       first, then the one to its left, and so forth.   Capabili-
      -       ties  given explicitly in the entry override those brought
      +       can be defined as being just like  the  other  (the  base)
      +       with  certain  exceptions.  In the definition of the vari-
      +       ant, the string capability use can be given with the  name
      +       of  the  base terminal.  The capabilities given before use
      +       override those in the base type named by  use.   If  there
      +       are  multiple use capabilities, they are merged in reverse
      +       order.  That is, the rightmost use reference is  processed
      +       first,  then the one to its left, and so forth.  Capabili-
      +       ties given explicitly in the entry override those  brought
              in by use references.
       
              A capability can be canceled by placing xx@ to the left of
      -       the  use  reference that imports it, where xx is the capa-
      +       the use reference that imports it, where xx is  the  capa-
              bility.  For example, the entry
      +
                          2621-nl, smkx@, rmkx@, use=2621,
       
      -       defines a 2621-nl that does not  have  the  smkx  or  rmkx
      -       capabilities,  and hence does not turn on the function key
      -       labels when in visual mode.  This is useful for  different
      +       defines  a  2621-nl  that  does  not have the smkx or rmkx
      +       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.
       
       
          Pitfalls of Long Entries
      -       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.
      -
      -       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
      +       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.
      +
      +       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 term-
              cap entry 1k-1 (1023) bytes.  Depending on what the appli-
      -       cation  and the termcap library being used does, and where
      -       in the termcap file the terminal type  that  tgetent()  is
      +       cation 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.
       
      -       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
      +       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.
       
              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
      +       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.
       
      -       The "before tc expansion" length  is  the  most  important
      -       one,  because it affects more than just users of that par-
      -       ticular terminal.  This is the length of the entry  as  it
      +       The  "before  tc  expansion"  length is the most important
      +       one, because it affects more than just users of that  par-
      +       ticular  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
      +       libraries strip off the final newline,  too  (GNU  termcap
              does not).  Now suppose:
       
      -       *    a termcap entry before expansion is  more  than  1023
      +       *    a  termcap  entry  before expansion is more than 1023
                   bytes long,
       
              *    and the application has only allocated a 1k buffer,
       
      -       *    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
      +       *    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,
       
      -       *    and tgetent() is searching for a terminal  type  that
      +       *    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
      +            after  the  long entry, or doesn't appear in the file
      +            at all (so that tgetent() has  to  search  the  whole
                   termcap file).
       
      -       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
      +       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.
       
              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" expan-
      +       that terminal type, since tgetent() only does "tc"  expan-
              sion once it's found the terminal type it was looking for,
              not while searching.
       
              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,
      +       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 ter-
      -       minal types and users whose TERM variable does not have  a
      +       minal  types and users whose TERM variable does not have a
              termcap entry.
       
              When in -C (translate to termcap) mode, the ncurses imple-
      -       mentation of tic(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)
      +       mentation  of tic(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.
       
          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
      +       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
      +       SVr1, and have added extension capabilities to the  string
      +       table  that  (in  the binary format) collide with System V
              and XSI Curses extensions.
       
       
       

      EXTENSIONS

      -       Some  SVr4  curses  implementations,  and  all previous to
      +       Some SVr4 curses  implementations,  and  all  previous  to
              SVr4, don't interpret the %A and %O operators in parameter
              strings.
       
      -       SVr4/XPG4  do  not  specify whether msgr licenses movement
      -       while in an alternate-character-set mode (such modes  may,
      +       SVr4/XPG4 do not specify whether  msgr  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   ncurses   implementation
      -       ignores  msgr  in ALTCHARSET mode.  This raises the possi-
      -       bility that an XPG4  implementation  making  the  opposite
      -       interpretation  may need terminfo entries made for ncurses
      +       trigger   local   motions).   The  ncurses  implementation
      +       ignores msgr in ALTCHARSET mode.  This raises  the  possi-
      +       bility  that  an  XPG4  implementation making the opposite
      +       interpretation may need terminfo entries made for  ncurses
              to have msgr turned off.
       
      -       The ncurses library handles insert-character  and  insert-
      +       The  ncurses  library handles insert-character and insert-
              character modes in a slightly non-standard way to get bet-
      -       ter update efficiency.  See  the  Insert/Delete  Character
      +       ter  update  efficiency.   See the Insert/Delete Character
              subsection above.
       
      -       The   parameter   substitutions  for  set_clock  and  dis-
      -       play_clock are not documented in SVr4 or  the  XSI  Curses
      +       The  parameter  substitutions  for  set_clock   and   dis-
      +       play_clock  are  not  documented in SVr4 or the XSI Curses
              standard.  They are deduced from the documentation for the
              AT&T 505 terminal.
       
      -       Be careful assigning the kmous  capability.   The  ncurses
      -       wants  to  interpret it as KEY_MOUSE, for use by terminals
      -       and emulators like xterm that  can  return  mouse-tracking
      +       Be  careful  assigning  the kmous capability.  The ncurses
      +       wants to interpret it as KEY_MOUSE, for use  by  terminals
      +       and  emulators  like  xterm that can return mouse-tracking
              information in the keyboard-input stream.
       
      -       Different  commercial ports of terminfo and curses support
      -       different subsets of the XSI Curses standard and (in  some
      +       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, accu-
              rate as of October 1995:
       
              SVR4, Solaris, ncurses -- These support all SVr4 capabili-
              ties.
       
      -       SGI  --  Supports  the  SVr4  set,  adds  one undocumented
      +       SGI --  Supports  the  SVr4  set,  adds  one  undocumented
              extended string capability (set_pglen).
       
      -       SVr1, Ultrix -- These support a restricted subset of  ter-
      -       minfo  capabilities.   The booleans end with xon_xoff; the
      -       numerics with  width_status_line;  and  the  strings  with
      +       SVr1,  Ultrix -- These support a restricted subset of ter-
      +       minfo capabilities.  The booleans end with  xon_xoff;  the
      +       numerics  with  width_status_line;  and  the  strings with
              prtr_non.
       
      -       HP/UX  --  Supports  the  SVr1  subset,  plus the SVr[234]
      +       HP/UX -- Supports  the  SVr1  subset,  plus  the  SVr[234]
              numerics num_labels, label_height, label_width, plus func-
      -       tion  keys  11  through  63, plus plab_norm, label_on, and
      +       tion keys 11 through 63,  plus  plab_norm,  label_on,  and
              label_off, plus some incompatible extensions in the string
              table.
       
      -       AIX  --  Supports  the  SVr1 subset, plus function keys 11
      -       through 63, plus a number  of  incompatible  string  table
      +       AIX -- Supports the SVr1 subset,  plus  function  keys  11
      +       through  63,  plus  a  number of incompatible string table
              extensions.
       
      -       OSF  -- Supports both the SVr4 set and the AIX extensions.
      +       OSF -- Supports both the SVr4 set and the AIX  extensions.
       
       
       
      @@ -2222,7 +2277,6 @@ descriptions -

      SEE ALSO

              tic(1m), curses(3x), printf(3S), term(5).
      @@ -2230,56 +2284,12 @@
       
       

      AUTHORS

      -       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
      +       Zeyd M. Ben-Halim, Eric  S.  Raymond,  Thomas  E.  Dickey.
              Based on pcurses by Pavel Curtis.
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                      TERMINFO(5)
       

      diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html index e7963e61..09dc035c 100644 --- a/doc/html/man/tic.1m.html +++ b/doc/html/man/tic.1m.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +tic(1m)                                                   tic(1m)
      +
      +
      +
       
       

      NAME

      @@ -85,7 +89,7 @@
                     entries as user-defined names.
       
              -C     Force source translation to termcap format.   Note:
      -              this  differs  from the -C option of infocmp(1m) in
      +              this  differs  from the -C option of infocmp(1m) in
                     that it does not merely translate capability names,
                     but  also  translates  terminfo  strings to termcap
                     format.  Capabilities that are not translatable are
      @@ -107,10 +111,10 @@
                     alias of a terminal matches one of the names in the
                     list, the entry will be written  or  translated  as
                     normal.   Otherwise no output will be generated for
      -              it.  The option value is interpreted as a file con-
      -              taining  the  list  if  it  contains a '/'.  (Note:
      +              it.  The option value  is  interpreted  as  a  file
      +              containing  the  list if it contains a '/'.  (Note:
                     depending on how tic was compiled, this option  may
      -              require -I or -C.)
      +              require -I or -C.)
       
              -f     Display  complex  terminfo  strings  which  contain
                     if/then/else/endif expressions indented  for  read-
      @@ -277,7 +281,7 @@
       
              The  -C,  -G,  -I, -N, -R, -T, -V, -a, -e, -f, -g, -o, -r,
              -s, -t and -x options are not supported under  SVr4.   The
      -       SVr4 -c mode does not report bad use links.
      +       SVr4 -c mode does not report bad use links.
       
              System  V does not compile entries to or read entries from
              your $HOME/.terminfo directory unless TERMINFO is  explic-
      @@ -297,34 +301,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                          tic(1m)
       

      diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html index 441ff700..1eb6e729 100644 --- a/doc/html/man/toe.1m.html +++ b/doc/html/man/toe.1m.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +toe(1m)                                                   toe(1m)
      +
      +
      +
       
       

      NAME

      @@ -57,7 +61,7 @@
              primary name with descriptions.   File  arguments  specify
              the  directories  to  be scanned; if no such arguments are
              given, your default terminfo directory is scanned.  If you
      -       also  specify  the  -h  option, a directory header will be
      +       also  specify  the  -h  option, a directory header will be
              issued as each directory is entered.
       
              There are other options intended for use by terminfo  file
      @@ -103,7 +107,7 @@
       
       
       
      -
      +                                                          toe(1m)
       

      diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html index e9029a53..ec8281ab 100644 --- a/doc/html/man/tput.1.html +++ b/doc/html/man/tput.1.html @@ -2,7 +2,7 @@ @@ -41,6 +41,10 @@
       
      +tput(1)                                                   tput(1)
      +
      +
      +
       
       

      NAME

      @@ -108,9 +112,9 @@
                     and 1 boolean and string exit codes (see  the  EXIT
                     CODES section).
       
      -              Again, tput uses a table and the presence of param-
      -              eters in its input to decide whether to  use  tparm
      -              (3x), and how to interpret the parameters.
      +              Again,  tput  uses  a  table  and  the  presence of
      +              parameters in its input to decide  whether  to  use
      +              tparm (3x), and how to interpret the parameters.
       
              -V     reports  the  version  of ncurses which was used in
                     this program, and exits.
      @@ -270,7 +274,6 @@
              TICS section.
       
       
      -
       

      DIAGNOSTICS

              tput prints the following error messages and sets the cor-
      @@ -302,34 +305,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                          tput(1)
       

      diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html index 5d806bda..0910b4ed 100644 --- a/doc/html/man/tset.1.html +++ b/doc/html/man/tset.1.html @@ -1,7 +1,7 @@ @@ -40,6 +40,10 @@
       
      +tset(1)                                                   tset(1)
      +
      +
      +
       
       

      NAME

      @@ -73,7 +77,7 @@
              4. The default terminal type, ``unknown''.
       
              If  the  terminal  type  was not specified on the command-
      -       line, the -m option mappings are then applied  (see  below
      +       line, the -m 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 con-
      @@ -108,36 +112,36 @@
       
              The options are as follows:
       
      -       -q   The  terminal  type is displayed to the standard out-
      +       -q   The  terminal  type is displayed to the standard out-
                   put, and the terminal is not initialized in any  way.
                   The option `-' by itself is equivalent but archaic.
       
      -       -e   Set the erase character to ch.
      +       -e   Set the erase character to ch.
       
      -       -I   Do  not  send  the  terminal  or  tab  initialization
      +       -I   Do  not  send  the  terminal  or  tab  initialization
                   strings to the terminal.
       
      -       -Q   Don't display any values for the erase, interrupt and
      +       -Q   Don't display any values for the erase, interrupt and
                   line kill characters.
       
              -V   reports the version of ncurses which was used in this
                   program, and exits.
       
      -       -i   Set the interrupt character to ch.
      +       -i   Set the interrupt character to ch.
       
      -       -k   Set the line kill character to ch.
      +       -k   Set the line kill character to ch.
       
      -       -m   Specify a mapping from a port  type  to  a  terminal.
      +       -m   Specify a mapping from a port  type  to  a  terminal.
                   See below for more information.
       
      -       -r   Print the terminal type to the standard error output.
      +       -r   Print the terminal type to the standard error output.
       
      -       -s   Print the sequence of shell  commands  to  initialize
      +       -s   Print the sequence of shell  commands  to  initialize
                   the environment variable TERM to the standard output.
                   See the section below on setting the environment  for
                   details.
       
      -       The arguments for the -e, -i, and -k options may either be
      +       The arguments for the -e, -i, and -k options may either be
              entered as actual characters or by using the  `hat'  nota-
              tion, i.e. control-h may be specified as ``^H'' or ``^h''.
       
      @@ -146,9 +150,9 @@
       

      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 -s option.
      +       shell's environment.  This is done using the -s option.
       
      -       When the -s option is specified, the commands to enter the
      +       When the -s option is specified, the commands to enter the
              information  into  the  shell's environment are written to
              the standard output.  If the SHELL environmental  variable
              ends in ``csh'', the commands are for csh, otherwise, they
      @@ -171,107 +175,107 @@
              often desirable to provide information about the  type  of
              terminal used on such ports.
       
      -       The  purpose  of  the -m option is to map from some set of
      +       The  purpose  of  the -m option is to map from some set of
              conditions to a terminal type, that is, to tell tset  ``If
              I'm  on this port at a particular speed, guess that I'm on
              that kind of terminal''.
       
      -       The argument to the -m option consists of an optional port
      -       type, an optional operator, an optional baud rate specifi-
      -       cation, 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.
      +       The argument to the -m 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.
       
              If the terminal type is not specified on the command line,
      -       the  -m 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  applica-
      +       the -m 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 applica-
              ble mapping is used.
       
      -       For    example,    consider    the    following   mapping:
      +       For   example,    consider    the    following    mapping:
              dialup>9600:vt100.  The port type is dialup , the operator
      -       is  >, the baud rate specification is 9600, and the termi-
      +       is >, the baud rate specification is 9600, and the  termi-
              nal type is vt100.  The result of this mapping is to spec-
              ify that if the terminal type is dialup, and the baud rate
      -       is greater than 9600 baud, a terminal type of  vt100  will
      +       is  greater  than 9600 baud, a terminal type of vt100 will
              be used.
       
              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,  -m
      +       type  will  match  any  port  type.    For   example,   -m
              dialup:vt100  -m  :?xterm  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
      +       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.
       
      -       No  whitespace  characters  are permitted in the -m option
      -       argument.  Also, to avoid problems  with  meta-characters,
      -       it  is  suggested  that  the  entire -m option argument be
      -       placed within single quote characters, and that csh  users
      -       insert  a  backslash character (``\'') before any exclama-
      +       No whitespace characters are permitted in  the  -m  option
      +       argument.   Also,  to avoid problems with meta-characters,
      +       it is suggested that the  entire  -m  option  argument  be
      +       placed  within single quote characters, and that csh users
      +       insert a backslash character (``\'') before  any  exclama-
              tion marks (``!'').
       
       
       

      HISTORY

      -       The tset command appeared in BSD 3.0.  The ncurses  imple-
      -       mentation  was lightly adapted from the 4.4BSD sources for
      +       The  tset command appeared in BSD 3.0.  The ncurses imple-
      +       mentation was lightly adapted from the 4.4BSD sources  for
              a terminfo environment by Eric S. Raymond <esr@snark.thyr-
              sus.com>.
       
       
       

      COMPATIBILITY

      -       The  tset  utility has been provided for backward-compati-
      -       bility with BSD environments (under  most  modern  UNIXes,
      -       /etc/inittab  and  getty(1) can set TERM appropriately for
      -       each dial-up line; this  obviates  what  was  tset's  most
      -       important  use).   This implementation behaves like 4.4BSD
      +       The tset utility has been provided  for  backward-compati-
      +       bility  with  BSD  environments (under most modern UNIXes,
      +       /etc/inittab and getty(1) can set TERM  appropriately  for
      +       each  dial-up  line;  this  obviates  what was tset's most
      +       important use).  This implementation behaves  like  4.4BSD
              tset, with a few exceptions specified here.
       
      -       The -S option of BSD tset no longer works;  it  prints  an
      -       error message to stderr and dies.  The -s option only sets
      -       TERM, not TERMCAP.  Both these  changes  are  because  the
      -       TERMCAP  variable  is  no longer supported under terminfo-
      +       The  -S  option  of BSD tset no longer works; it prints an
      +       error message to stderr and dies.  The -s option only sets
      +       TERM,  not  TERMCAP.   Both  these changes are because the
      +       TERMCAP variable is no longer  supported  under  terminfo-
              based ncurses, which makes tset -S useless (we made it die
              noisily rather than silently induce lossage).
       
      -       There  was  an  undocumented  4.4BSD feature that invoking
      +       There was an undocumented  4.4BSD  feature  that  invoking
              tset via a link named `TSET` (or via any other name begin-
      -       ning  with  an  upper-case letter) set the terminal to use
      +       ning with an upper-case letter) set the  terminal  to  use
              upper-case only.  This feature has been omitted.
       
      -       The -A, -E, -h, -u and -v options were  deleted  from  the
      -       tset  utility  in  4.4BSD. None of them were documented in
      -       4.3BSD and all are of limited utility at best. The -a, -d,
      -       and -p 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 -m option instead.   The  -n
      -       option  remains, but has no effect.  The -adnp options are
      -       therefore omitted from the usage summary above.
      -
      -       It is still permissible to specify  the  -e,  -i,  and  -k
      +       The  -A,  -E,  -h, -u and -v options were deleted from the
      +       tset utility in 4.4BSD.  None of them were  documented  in
      +       4.3BSD and all are of limited utility at best.  The -a, -,
      +       and                                                      -
      +       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 -m option instead.   The  -n  option
      +       remains,  but has no effect.  The -adnp options are there-
      +       fore omitted from the usage summary above.
      +
      +       It is still permissible to specify  the  -e,  -i,  and  -k
              options  without arguments, although it is strongly recom-
              mended that such usage be fixed to explicitly specify  the
              character.
       
              As  of  4.4BSD,  executing tset as reset no longer implies
      -       the -Q option.  Also, the interaction between the - option
      +       the -Q option.  Also, the interaction between the - option
              and the terminal argument in some historic implementations
              of tset has been removed.
       
       
      -
       

      ENVIRONMENT

              The tset command uses the SHELL and TERM environment vari-
      @@ -296,41 +300,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                          tset(1)
       

      diff --git a/doc/html/man/wresize.3x.html b/doc/html/man/wresize.3x.html index cb402ad8..1f19f09a 100644 --- a/doc/html/man/wresize.3x.html +++ b/doc/html/man/wresize.3x.html @@ -1,7 +1,7 @@ @@ -41,6 +41,10 @@
       
      +wresize(3x)                                           wresize(3x)
      +
      +
      +
       
       

      NAME

      @@ -93,22 +97,7 @@
       
       
       
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      +                                                      wresize(3x)
       

      diff --git a/doc/html/ncurses-intro.html b/doc/html/ncurses-intro.html index 3500e7a6..89f44dc5 100644 --- a/doc/html/ncurses-intro.html +++ b/doc/html/ncurses-intro.html @@ -1,11 +1,12 @@ Writing Programs with NCURSES + @@ -221,16 +222,11 @@ maintainer of this package is <esr@snark.thyrsus.com> wrote many of the new features in versions after 1.8.1 and wrote most of this introduction. -Jürgen Pfeifer +Jürgen Pfeifer wrote all of the menu and forms code as well as the Ada95 binding. Ongoing work is being done by -Thomas Dickey -and -Jürgen Pfeifer. -Florian La Roche -acts as the maintainer for the Free Software Foundation, which holds the -copyright on ncurses. +Thomas Dickey (maintainer). Contact the current maintainers at bug-ncurses@gnu.org.

      @@ -613,6 +609,7 @@ Presently, mouse event reporting works in the following environments:

    • xterm and similar programs such as rxvt.
    • Linux console, when configured with gpm(1), Alessandro Rubini's mouse server. +
    • FreeBSD sysmouse (console)
    • OS/2 EMX

    @@ -2519,13 +2516,13 @@ By default, all options are on. Here are the available option bits:

    O_NL_OVERLOAD
    Enable overloading of REQ_NEW_LINE as described in Editing Requests. The value of this option is +href="#fedit">Editing Requests. The value of this option is ignored on dynamic fields that have not reached their size limit; these have no last line, so the circumstances for triggering a REQ_NEXT_FIELD never arise.
    O_BS_OVERLOAD
    Enable overloading of REQ_DEL_PREV as described in -Editing Requests. +Editing Requests.
    The option values are bit-masks and can be composed with logical-or in diff --git a/doc/ncurses-intro.doc b/doc/ncurses-intro.doc index 750777ed..26bd444b 100644 --- a/doc/ncurses-intro.doc +++ b/doc/ncurses-intro.doc @@ -177,10 +177,8 @@ Scope of This Document Eric S. Raymond wrote many of the new features in versions after 1.8.1 and wrote most of this introduction. Jürgen Pfeifer wrote all of the menu and forms code as well as the Ada95 - binding. Ongoing work is being done by Thomas Dickey and Jürgen - Pfeifer. Florian La Roche acts as the maintainer for the Free Software - Foundation, which holds the copyright on ncurses. Contact the current - maintainers at bug-ncurses@gnu.org. + binding. Ongoing work is being done by Thomas Dickey (maintainer). + Contact the current maintainers at bug-ncurses@gnu.org. This document also describes the panels extension library, similarly modeled on the SVr4 panels facility. This library allows you to @@ -535,6 +533,7 @@ static void finish(int sig) * xterm and similar programs such as rxvt. * Linux console, when configured with gpm(1), Alessandro Rubini's mouse server. + * FreeBSD sysmouse (console) * OS/2 EMX The mouse interface is very simple. To activate it, you use the @@ -2346,9 +2345,9 @@ int form_opts(FORM *form); /* form to query */ O_NL_OVERLOAD Enable overloading of REQ_NEW_LINE as described in Editing - Requests. The value of this option is ignored on dynamic fields - that have not reached their size limit; these have no last - line, so the circumstances for triggering a REQ_NEXT_FIELD + Requests. The value of this option is ignored on dynamic + fields that have not reached their size limit; these have no + last line, so the circumstances for triggering a REQ_NEXT_FIELD never arise. O_BS_OVERLOAD diff --git a/form/Makefile.in b/form/Makefile.in index e55afcb5..ca11c676 100644 --- a/form/Makefile.in +++ b/form/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.36 2002/01/20 01:49:17 tom Exp $ +# $Id: Makefile.in,v 1.40 2003/11/01 22:44:33 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -45,6 +45,9 @@ SHELL = /bin/sh THIS = Makefile +x = @EXEEXT@ +o = .@OBJEXT@ + MODEL = @DFT_LWR_MODEL@ DESTDIR = @DESTDIR@ srcdir = @srcdir@ @@ -55,6 +58,11 @@ libdir = @libdir@ includedir = @includedir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ @@ -84,7 +92,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL) $(CC) +LINK = $(LIBTOOL_LINK) $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -97,7 +105,7 @@ NCURSES_MINOR = @NCURSES_MINOR@ REL_VERSION = @cf_cv_rel_version@ ABI_VERSION = @cf_cv_abi_version@ -RANLIB = @RANLIB@ +RANLIB = @LIB_PREP@ IMPORT_LIB = @IMPORT_LIB@ SHARED_LIB = @SHARED_LIB@ diff --git a/form/READ.ME b/form/READ.ME index 11c81460..ae2b9586 100644 --- a/form/READ.ME +++ b/form/READ.ME @@ -1,3 +1,5 @@ +-- $Id: READ.ME,v 0.6 2003/10/25 15:12:53 tom Exp $ +------------------------------------------------------------------------------- This is a clone of the form library that is available with typical System V curses implementations (ETI). @@ -10,7 +12,3 @@ For things that still need doing, see the TO-DO file in the top-level directory. Juergen Pfeifer - -Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en - - diff --git a/form/fld_arg.c b/form/fld_arg.c index 7e4eaaf7..e1fc2078 100644 --- a/form/fld_arg.c +++ b/form/fld_arg.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_arg.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_arg.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_attr.c b/form/fld_attr.c index 6ce192e0..a7ba7659 100644 --- a/form/fld_attr.c +++ b/form/fld_attr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: fld_attr.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_attr.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*---------------------------------------------------------------------------- Field-Attribute manipulation routines diff --git a/form/fld_current.c b/form/fld_current.c index 02192c28..f4b308ad 100644 --- a/form/fld_current.c +++ b/form/fld_current.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: fld_current.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_current.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_def.c b/form/fld_def.c index 73e2e4cf..32dc11ee 100644 --- a/form/fld_def.c +++ b/form/fld_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_def.c,v 1.14 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_def.c,v 1.17 2003/11/08 21:15:02 Jonathon.Gray Exp $") /* this can't be readonly */ static FIELD default_field = { @@ -74,11 +73,11 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; | int *err ) | | Description : Create an argument structure for the specified type. -| Use the type-dependant argument list to construct +| Use the type-dependent argument list to construct | it. | | Return Values : Pointer to argument structure. Maybe NULL. -| In case of an error in *err an errorcounter is increased. +| In case of an error in *err an error counter is increased. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(TypeArgument*) _nc_Make_Argument @@ -121,7 +120,7 @@ _nc_Make_Argument | type. | | Return Values : Pointer to argument structure. Maybe NULL. -| In case of an error in *err an errorcounter is increased. +| In case of an error in *err an error counter is increased. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(TypeArgument*) _nc_Copy_Argument @@ -197,7 +196,7 @@ _nc_Free_Argument | Description : Copy argument structure of field src to field dst | | Return Values : TRUE - copy worked -| FALSE - error occured +| FALSE - error occurred +--------------------------------------------------------------------------*/ NCURSES_EXPORT(bool) _nc_Copy_Type diff --git a/form/fld_dup.c b/form/fld_dup.c index 31671791..d16e4009 100644 --- a/form/fld_dup.c +++ b/form/fld_dup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_dup.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_dup.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c index faaa4f45..5102636f 100644 --- a/form/fld_ftchoice.c +++ b/form/fld_ftchoice.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_ftchoice.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_ftchoice.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c index 9535817b..dfd8110e 100644 --- a/form/fld_ftlink.c +++ b/form/fld_ftlink.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_ftlink.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_ftlink.c,v 1.8 2003/11/08 20:45:36 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,7 +46,7 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") | E_BAD_ARGUMENT - invalid arguments | E_SYSTEM_ERROR - system error (no memory) | -| Return Values : Fieldtype pointer or NULL if error occured. +| Return Values : Fieldtype pointer or NULL if error occurred. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(FIELDTYPE *) link_fieldtype diff --git a/form/fld_info.c b/form/fld_info.c index c3826abd..bdd2de57 100644 --- a/form/fld_info.c +++ b/form/fld_info.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_info.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_info.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_just.c b/form/fld_just.c index 31bf0fd0..064a9fbc 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.7 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_just.c,v 1.8 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_link.c b/form/fld_link.c index ea7df28a..b3cad0c3 100644 --- a/form/fld_link.c +++ b/form/fld_link.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_link.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_link.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_max.c b/form/fld_max.c index 1ed58176..37521dc1 100644 --- a/form/fld_max.c +++ b/form/fld_max.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_max.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_max.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_move.c b/form/fld_move.c index 6bd355f9..245aa7c7 100644 --- a/form/fld_move.c +++ b/form/fld_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_move.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_move.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c index bc80e329..59cd1a6f 100644 --- a/form/fld_newftyp.c +++ b/form/fld_newftyp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_newftyp.c,v 1.7 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_newftyp.c,v 1.9 2003/11/08 20:45:36 tom Exp $") static FIELDTYPE const default_fieldtype = { 0, /* status */ @@ -64,7 +63,7 @@ NCURSES_EXPORT_VAR(const FIELDTYPE*) _nc_Default_FieldType = &default_fieldtype; | E_BAD_ARGUMENT - invalid arguments | E_SYSTEM_ERROR - system error (no memory) | -| Return Values : Fieldtype pointer or NULL if error occured +| Return Values : Fieldtype pointer or NULL if error occurred +--------------------------------------------------------------------------*/ NCURSES_EXPORT(FIELDTYPE *) new_fieldtype ( diff --git a/form/fld_opts.c b/form/fld_opts.c index 585c391c..575d1722 100644 --- a/form/fld_opts.c +++ b/form/fld_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: fld_opts.c,v 1.8 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_opts.c,v 1.9 2003/10/25 15:17:08 tom Exp $") /*---------------------------------------------------------------------------- Field-Options manipulation routines diff --git a/form/fld_pad.c b/form/fld_pad.c index e635f488..7346973c 100644 --- a/form/fld_pad.c +++ b/form/fld_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: fld_pad.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_pad.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_page.c b/form/fld_page.c index 7012961f..f99a5e46 100644 --- a/form/fld_page.c +++ b/form/fld_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_page.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_page.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_stat.c b/form/fld_stat.c index 0cd255a7..be265b0c 100644 --- a/form/fld_stat.c +++ b/form/fld_stat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_stat.c,v 1.8 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_stat.c,v 1.9 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_type.c b/form/fld_type.c index ee8731d1..aa889ea0 100644 --- a/form/fld_type.c +++ b/form/fld_type.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_type.c,v 1.11 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_type.c,v 1.12 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fld_user.c b/form/fld_user.c index a81484f5..19ff5453 100644 --- a/form/fld_user.c +++ b/form/fld_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_user.c,v 1.10 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fld_user.c,v 1.11 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/form.h b/form/form.h index 57f63a30..d03c819c 100644 --- a/form/form.h +++ b/form/form.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: form.h,v 0.17 2003/11/08 20:39:08 tom Exp $ */ + #ifndef FORM_H #define FORM_H @@ -68,7 +69,7 @@ typedef struct fieldnode { int drows; /* dynamic rows */ int dcols; /* dynamic cols */ int maxgrow; /* maximum field growth */ - int nrow; /* offscreen rows */ + int nrow; /* off-screen rows */ short nbuf; /* additional buffers */ short just; /* justification */ short page; /* page on form */ @@ -208,7 +209,7 @@ typedef void (*Form_Hook)(FORM *); #define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */ #define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */ #define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */ -#define REQ_DEL_WORD (KEY_MAX + 37) /* delete line at cursor */ +#define REQ_DEL_WORD (KEY_MAX + 37) /* delete word at cursor */ #define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */ #define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */ #define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */ diff --git a/form/form.priv.h b/form/form.priv.h index c1ca8e19..11d382c0 100644 --- a/form/form.priv.h +++ b/form/form.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: form.priv.h,v 0.11 2003/11/08 20:38:51 tom Exp $ */ + #include "mf_common.h" #include "form.h" @@ -41,7 +42,7 @@ /* field status values */ #define _CHANGED (0x01) /* Field has been changed */ -#define _NEWTOP (0x02) /* Vertical scrolling occured */ +#define _NEWTOP (0x02) /* Vertical scrolling occurred */ #define _NEWPAGE (0x04) /* field begins new page of form */ #define _MAY_GROW (0x08) /* dynamic field may still grow */ @@ -49,7 +50,7 @@ #define _LINKED_TYPE (0x01) /* Type is a linked type */ #define _HAS_ARGS (0x02) /* Type has arguments */ #define _HAS_CHOICE (0x04) /* Type has choice methods */ -#define _RESIDENT (0x08) /* Type is builtin */ +#define _RESIDENT (0x08) /* Type is built-in */ /* This are the field options required to be a selectable field in field navigation requests */ diff --git a/form/frm_cursor.c b/form/frm_cursor.c index 8e28235f..0790d9c5 100644 --- a/form/frm_cursor.c +++ b/form/frm_cursor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: frm_cursor.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_cursor.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_data.c b/form/frm_data.c index 1026cf4f..847d7d5a 100644 --- a/form/frm_data.c +++ b/form/frm_data.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,19 +28,18 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_data.c,v 1.8 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_data.c,v 1.10 2003/11/08 20:38:14 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform | Function : bool data_behind(const FORM *form) | | Description : Check for off-screen data behind. This is nearly trivial -| becose the begin of a field is fixed. +| because the beginning of a field is fixed. | | Return Values : TRUE - there are off-screen data behind | FALSE - there are no off-screen data behind diff --git a/form/frm_def.c b/form/frm_def.c index ef6f9c92..d49573cd 100644 --- a/form/frm_def.c +++ b/form/frm_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_def.c,v 1.11 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_def.c,v 1.13 2003/11/08 20:37:53 tom Exp $") /* this can't be readonly */ static FORM default_form = { @@ -241,7 +240,7 @@ static int Connect_Fields(FORM * form, FIELD ** fields) | If there are fields, position to first active field. | | Return Values : E_OK - success -| any other - error occured +| any other - error occurred +--------------------------------------------------------------------------*/ INLINE static int Associate_Fields(FORM *form, FIELD **fields) { @@ -268,7 +267,7 @@ INLINE static int Associate_Fields(FORM *form, FIELD **fields) | | Description : Create new form with given array of fields. | -| Return Values : Pointer to form. NULL if error occured. +| Return Values : Pointer to form. NULL if error occurred. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(FORM *) new_form (FIELD ** fields) diff --git a/form/frm_driver.c b/form/frm_driver.c index c9275f7e..9de28eea 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.39 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.45 2003/12/06 17:22:42 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -42,7 +42,7 @@ MODULE_ID("$Id: frm_driver.c,v 1.39 2002/07/06 15:33:27 juergen Exp $") all the functions in this module depends on some others in the module, so it makes no sense to split them into separate files because they will always be linked together. The only acceptable concern is turnaround - time for this module, but now we have all Pentiums or Riscs, so what! + time for this module, but now we have all Pentiums or RISCs, so what! The driver routines are grouped into nine generic categories: @@ -55,10 +55,10 @@ MODULE_ID("$Id: frm_driver.c,v 1.39 2002/07/06 15:33:27 juergen Exp $") c) Intra-Field Navigation ( all functions prefixed by IFN_ ) The current position in the current field is changed. d) Vertical Scrolling ( all functions prefixed by VSC_ ) - Esseantially this is a specialization of Intra-Field navigation. + Essentially this is a specialization of Intra-Field navigation. It has to check for a multi-line field. e) Horizontal Scrolling ( all functions prefixed by HSC_ ) - Esseantially this is a specialization of Intra-Field navigation. + Essentially this is a specialization of Intra-Field navigation. It has to check for a single-line field. f) Field Editing ( all functions prefixed by FE_ ) The content of the current field is changed @@ -79,11 +79,11 @@ MODULE_ID("$Id: frm_driver.c,v 1.39 2002/07/06 15:33:27 juergen Exp $") /* Some options that may effect compatibility in behavior to SVr4 forms, -but they are here to allow a more intuitive and user friendly behaviour of +but they are here to allow a more intuitive and user friendly behavior of our form implementation. This doesn't affect the API, so we feel it is uncritical. -The initial implementation tries to stay very close with the behaviour +The initial implementation tries to stay very close with the behavior of the original SVr4 implementation, although in some areas it is quite clear that this isn't the most appropriate way. As far as possible this sources will allow you to build a forms lib that behaves quite similar @@ -91,9 +91,9 @@ to SVr4, but now and in the future we will give you better options. Perhaps at some time we will make this configurable at runtime. */ -/* Implement a more user-friendly previous/next word behaviour */ +/* Implement a more user-friendly previous/next word behavior */ #define FRIENDLY_PREV_NEXT_WORD (1) -/* Fix the wrong behaviour for forms with all fields inactive */ +/* Fix the wrong behavior for forms with all fields inactive */ #define FIX_FORM_INACTIVE_BUG (1) /* Allow dynamic field growth also when navigating past the end */ #define GROW_IF_NAVIGATE (1) @@ -150,7 +150,7 @@ static int FE_Delete_Previous(FORM *); #define Address_Of_Current_Position_In_Buffer(form) \ Address_Of_Current_Position_In_Nth_Buffer(form,0) -/* Logic to decide wether or not a field is actually a field with +/* Logic to decide whether or not a field is actually a field with vertical or horizontal scrolling */ #define Is_Scroll_Field(field) \ (((field)->drows > (field)->rows) || \ @@ -316,7 +316,7 @@ INLINE static void Adjust_Cursor_Position(FORM * form, const char * pos) | const FIELD * field, | WINDOW * win) | -| Description : Copy the buffer to the window. If its a multiline +| Description : Copy the buffer to the window. If it is a multi-line | field, the buffer is split to the lines of the | window without any editing. | @@ -642,7 +642,7 @@ _nc_Refresh_Current_Field (FORM * form) 0); } else - { /* A multiline, i.e. vertical scrolling field */ + { /* A multi-line, i.e. vertical scrolling field */ int row_after_bottom,first_modified_row,first_unmodified_row; if (field->drows > field->rows) @@ -918,7 +918,7 @@ static int Synchronize_Field(FIELD * field) | | Description : Propagate the Synchronize_Field function to all linked | fields. The first error that occurs in the sequence -| of updates is the returnvalue. +| of updates is the return value. | | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid field pointer @@ -1012,7 +1012,7 @@ _nc_Synchronize_Attributes (FIELD * field) | | Description : If a fields options have changed, this routine is | called to propagate these changes to the screen and -| to really change the behaviour of the field. +| to really change the behavior of the field. | | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid field pointer @@ -1089,7 +1089,7 @@ _nc_Synchronize_Options (!single_line_field && (field->drows < field->maxgrow))) { field->status |= _MAY_GROW; - /* a field with justification now changes its behaviour, + /* a field with justification now changes its behavior, so we must redisplay it */ if (single_line_field && (field->just != NO_JUSTIFICATION) && @@ -1217,7 +1217,7 @@ _nc_Set_Current_Field | Facility : libnform | Function : static int IFN_Next_Character(FORM * form) | -| Description : Move to the next character in the field. In a multiline +| Description : Move to the next character in the field. In a multi-line | field this wraps at the end of the line. | | Return Values : E_OK - success @@ -1255,7 +1255,7 @@ static int IFN_Next_Character(FORM * form) | Function : static int IFN_Previous_Character(FORM * form) | | Description : Move to the previous character in the field. In a -| multiline field this wraps and the beginning of the +| multi-line field this wraps and the beginning of the | line. | | Return Values : E_OK - success @@ -1342,7 +1342,7 @@ static int IFN_Next_Word(FORM * form) Synchronize_Buffer(form); /* Go to the first whitespace after the current position (including - current position). This is then the startpoint to look for the + current position). This is then the starting point to look for the next non-blank data */ s = Get_First_Whitespace_Character(bp,Buffer_Length(field) - (int)(bp - field->buf)); @@ -1436,7 +1436,7 @@ static int IFN_Beginning_Of_Field(FORM * form) | | Description : Place the cursor after the last non-pad character in | the field. If the field occupies the last position in -| the buffer, the cursos is positioned on the last +| the buffer, the cursor is positioned on the last | character. | | Return Values : E_OK - success @@ -1656,7 +1656,7 @@ static int VSC_Generic(FORM *form, int lines) | | Description : Performs the generic vertical scrolling routines. | This has to check for a multi-line field and to set -| the _NEWTOP flag if scrolling really occured. +| the _NEWTOP flag if scrolling really occurred. | | Return Values : Propagated error code from low-level driver calls +--------------------------------------------------------------------------*/ @@ -2056,7 +2056,7 @@ static int Insert_String(FORM *form, int row, char *txt, int len) | the wrapping. | | Return Values : E_OK - no wrapping required or wrapping -| was successfull +| was successful | E_REQUEST_DENIED - | E_SYSTEM_ERROR - some system error +--------------------------------------------------------------------------*/ @@ -2130,7 +2130,7 @@ static int Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM * form) | | Description : Generic routine for field editing requests. The driver | routines are only called for editable fields, the -| _WINDOW_MODIFIED flag is set if editing occured. +| _WINDOW_MODIFIED flag is set if editing occurred. | This is somewhat special due to the overload semantics | of the NEW_LINE and DEL_PREV requests. | @@ -2141,7 +2141,7 @@ static int Field_Editing(int (* const fct) (FORM *), FORM * form) int res = E_REQUEST_DENIED; /* We have to deal here with the specific case of the overloaded - behaviour of New_Line and Delete_Previous requests. + behavior of New_Line and Delete_Previous requests. They may end up in navigational requests if we are on the first character in a field. But navigation is also allowed on non- editable fields. @@ -2205,6 +2205,7 @@ static int FE_New_Line(FORM * form) { if (!(form->opts & O_NL_OVERLOAD)) return(E_REQUEST_DENIED); + wmove(form->w,form->currow,form->curcol); wclrtoeol(form->w); /* we have to set this here, although it is also handled in the generic routine. The reason is, @@ -2221,6 +2222,7 @@ static int FE_New_Line(FORM * form) a single-line field */ return(E_SYSTEM_ERROR); } + wmove(form->w,form->currow,form->curcol); wclrtoeol(form->w); form->currow++; form->curcol = 0; @@ -2248,6 +2250,7 @@ static int FE_New_Line(FORM * form) bp= Address_Of_Current_Position_In_Buffer(form); t = After_End_Of_Data(bp,field->dcols - form->curcol); + wmove(form->w,form->currow,form->curcol); wclrtoeol(form->w); form->currow++; form->curcol=0; @@ -2338,6 +2341,7 @@ static int FE_Insert_Line(FORM * form) +--------------------------------------------------------------------------*/ static int FE_Delete_Character(FORM * form) { + wmove(form->w,form->currow,form->curcol); wdelch(form->w); return E_OK; } @@ -2378,6 +2382,7 @@ static int FE_Delete_Previous(FORM * form) if ((int)(this_end-this_line) > (field->cols-(int)(prev_end-prev_line))) return E_REQUEST_DENIED; + wmove(form->w,form->currow,form->curcol); wdeleteln(form->w); Adjust_Cursor_Position(form,prev_end); wmove(form->w,form->currow,form->curcol); @@ -2455,20 +2460,22 @@ static int FE_Delete_Word(FORM * form) +--------------------------------------------------------------------------*/ static int FE_Clear_To_End_Of_Line(FORM * form) { + wmove(form->w,form->currow,form->curcol); wclrtoeol(form->w); return E_OK; } /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static int FE_Clear_To_End_Of_Form(FORM * form) +| Function : static int FE_Clear_To_End_Of_Field(FORM * form) | -| Description : Clear to end of form. +| Description : Clear to end of field. | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ -static int FE_Clear_To_End_Of_Form(FORM * form) +static int FE_Clear_To_End_Of_Field(FORM * form) { + wmove(form->w,form->currow,form->curcol); wclrtobot(form->w); return E_OK; } @@ -2903,20 +2910,20 @@ INLINE static FIELD *Sorted_Previous_Field(FIELD * field) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static FIELD *Left_Neighbour_Field(FIELD * field) +| Function : static FIELD *Left_Neighbor_Field(FIELD * field) | -| Description : Get the left neighbour of the field on the same line +| Description : Get the left neighbor of the field on the same line | and the same page. Cycles through the line. | -| Return Values : Pointer to left neighbour field. +| Return Values : Pointer to left neighbor field. +--------------------------------------------------------------------------*/ -INLINE static FIELD *Left_Neighbour_Field(FIELD * field) +INLINE static FIELD *Left_Neighbor_Field(FIELD * field) { FIELD *field_on_page = field; - /* For a field that has really a left neighbour, the while clause + /* For a field that has really a left neighbor, the while clause immediately fails and the loop is left, positioned at the right - neighbour. Otherwise we cycle backwards through the sorted fieldlist + neighbor. Otherwise we cycle backwards through the sorted field list until we enter the same line (from the right end). */ do @@ -2929,18 +2936,18 @@ INLINE static FIELD *Left_Neighbour_Field(FIELD * field) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static FIELD *Right_Neighbour_Field(FIELD * field) +| Function : static FIELD *Right_Neighbor_Field(FIELD * field) | -| Description : Get the right neighbour of the field on the same line +| Description : Get the right neighbor of the field on the same line | and the same page. | -| Return Values : Pointer to right neighbour field. +| Return Values : Pointer to right neighbor field. +--------------------------------------------------------------------------*/ -INLINE static FIELD *Right_Neighbour_Field(FIELD * field) +INLINE static FIELD *Right_Neighbor_Field(FIELD * field) { FIELD *field_on_page = field; - /* See the comments on Left_Neighbour_Field to understand how it works */ + /* See the comments on Left_Neighbor_Field to understand how it works */ do { field_on_page = Sorted_Next_Field(field_on_page); @@ -2951,18 +2958,18 @@ INLINE static FIELD *Right_Neighbour_Field(FIELD * field) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static FIELD *Upper_Neighbour_Field(FIELD * field) +| Function : static FIELD *Upper_Neighbor_Field(FIELD * field) | | Description : Because of the row-major nature of sorting the fields, -| its more difficult to define whats the upper neighbour +| it is more difficult to define whats the upper neighbor | field really means. We define that it must be on a | 'previous' line (cyclic order!) and is the rightmost | field laying on the left side of the given field. If | this set is empty, we take the first field on the line. | -| Return Values : Pointer to the upper neighbour field. +| Return Values : Pointer to the upper neighbor field. +--------------------------------------------------------------------------*/ -static FIELD *Upper_Neighbour_Field(FIELD * field) +static FIELD *Upper_Neighbor_Field(FIELD * field) { FIELD *field_on_page = field; int frow = field->frow; @@ -2998,18 +3005,18 @@ static FIELD *Upper_Neighbour_Field(FIELD * field) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static FIELD *Down_Neighbour_Field(FIELD * field) +| Function : static FIELD *Down_Neighbor_Field(FIELD * field) | | Description : Because of the row-major nature of sorting the fields, -| its more difficult to define whats the down neighbour +| its more difficult to define whats the down neighbor | field really means. We define that it must be on a | 'next' line (cyclic order!) and is the leftmost | field laying on the right side of the given field. If | this set is empty, we take the last field on the line. | -| Return Values : Pointer to the upper neighbour field. +| Return Values : Pointer to the upper neighbor field. +--------------------------------------------------------------------------*/ -static FIELD *Down_Neighbour_Field(FIELD * field) +static FIELD *Down_Neighbor_Field(FIELD * field) { FIELD *field_on_page = field; int frow = field->frow; @@ -3053,7 +3060,7 @@ static FIELD *Down_Neighbour_Field(FIELD * field) | int (* const fct) (FORM *), | FORM * form) | -| Description : Generic behaviour for changing the current field, the +| Description : Generic behavior for changing the current field, the | field is left and a new field is entered. So the field | must be validated and the field init/term hooks must | be called. @@ -3216,7 +3223,7 @@ static int FN_Sorted_Last_Field(FORM * form) static int FN_Left_Field(FORM * form) { return _nc_Set_Current_Field(form, - Left_Neighbour_Field(form->current)); + Left_Neighbor_Field(form->current)); } /*--------------------------------------------------------------------------- @@ -3232,16 +3239,16 @@ static int FN_Left_Field(FORM * form) static int FN_Right_Field(FORM * form) { return _nc_Set_Current_Field(form, - Right_Neighbour_Field(form->current)); + Right_Neighbor_Field(form->current)); } /*--------------------------------------------------------------------------- | Facility : libnform | Function : static int FN_Up_Field(FORM * form) | -| Description : Get the upper neighbour of the current field. This +| Description : Get the upper neighbor of the current field. This | cycles through the page. See the comments of the -| Upper_Neighbour_Field function to understand how +| Upper_Neighbor_Field function to understand how | 'upper' is defined. | | Return Values : E_OK - success @@ -3250,16 +3257,16 @@ static int FN_Right_Field(FORM * form) static int FN_Up_Field(FORM * form) { return _nc_Set_Current_Field(form, - Upper_Neighbour_Field(form->current)); + Upper_Neighbor_Field(form->current)); } /*--------------------------------------------------------------------------- | Facility : libnform | Function : static int FN_Down_Field(FORM * form) | -| Description : Get the down neighbour of the current field. This +| Description : Get the down neighbor of the current field. This | cycles through the page. See the comments of the -| Down_Neighbour_Field function to understand how +| Down_Neighbor_Field function to understand how | 'down' is defined. | | Return Values : E_OK - success @@ -3268,7 +3275,7 @@ static int FN_Up_Field(FORM * form) static int FN_Down_Field(FORM * form) { return _nc_Set_Current_Field(form, - Down_Neighbour_Field(form->current)); + Down_Neighbor_Field(form->current)); } /*---------------------------------------------------------------------------- END of Field Navigation routines @@ -3284,7 +3291,7 @@ static int FN_Down_Field(FORM * form) | int page, | FIELD * field) | -| Description : Make the given page nr. the current page and make +| Description : Make the given page number the current page and make | the given field the current field on the page. If | for the field NULL is given, make the first field on | the page the current field. The routine acts only @@ -3366,7 +3373,7 @@ INLINE static int Previous_Page_Number(const FORM * form) | int (* const fct) (FORM *), | FORM * form) | -| Description : Generic behaviour for changing a page. This means +| Description : Generic behavior for changing a page. This means | that the field is left and a new field is entered. | So the field must be validated and the field init/term | hooks must be called. Because also the page is changed, @@ -3598,7 +3605,7 @@ static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = { REQ_DEL_LINE |ID_FE ,FE_Delete_Line}, { REQ_DEL_WORD |ID_FE ,FE_Delete_Word}, { REQ_CLR_EOL |ID_FE ,FE_Clear_To_End_Of_Line}, - { REQ_CLR_EOF |ID_FE ,FE_Clear_To_End_Of_Form}, + { REQ_CLR_EOF |ID_FE ,FE_Clear_To_End_Of_Field}, { REQ_CLR_FIELD |ID_FE ,FE_Clear_Field}, { REQ_OVL_MODE |ID_EM ,EM_Overlay_Mode}, @@ -3785,7 +3792,7 @@ set_field_buffer (int)(1 + (vlen-len)/((field->rows+field->nrow)*field->cols)))) RETURN(E_SYSTEM_ERROR); - /* in this case we also have to check, wether or not the remaining + /* in this case we also have to check, whether or not the remaining characters in value are also printable for buffer 0. */ if (buffer==0) { @@ -3802,7 +3809,7 @@ set_field_buffer p = Address_Of_Nth_Buffer(field,buffer); #if HAVE_MEMCCPY - s = memccpy(p,value,0,len); + s = (char *) memccpy(p, value, 0, len); #else for(s=(char *)value; *s && (s < (value+len)); s++) p[s-value] = *s; diff --git a/form/frm_hook.c b/form/frm_hook.c index 1af3d084..367cf5fa 100644 --- a/form/frm_hook.c +++ b/form/frm_hook.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_hook.c,v 1.10 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_hook.c,v 1.11 2003/10/25 15:17:08 tom Exp $") /* "Template" macro to generate function to set application specific hook */ #define GEN_HOOK_SET_FUNCTION( typ, name ) \ diff --git a/form/frm_opts.c b/form/frm_opts.c index 22ca3a1e..0b8032d1 100644 --- a/form/frm_opts.c +++ b/form/frm_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_opts.c,v 1.10 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_opts.c,v 1.11 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_page.c b/form/frm_page.c index b1a958e1..354c9aea 100644 --- a/form/frm_page.c +++ b/form/frm_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_page.c,v 1.7 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_page.c,v 1.8 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_post.c b/form/frm_post.c index ac1aa1c2..05342bb2 100644 --- a/form/frm_post.c +++ b/form/frm_post.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,11 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: frm_post.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_post.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_req_name.c b/form/frm_req_name.c index e7d5aa4a..80d62c19 100644 --- a/form/frm_req_name.c +++ b/form/frm_req_name.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_req_name.c,v 1.9 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_req_name.c,v 1.10 2003/10/25 15:17:08 tom Exp $") static const char *request_names[ MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1 ] = { "NEXT_PAGE" , diff --git a/form/frm_scale.c b/form/frm_scale.c index e86df103..7ef9c64b 100644 --- a/form/frm_scale.c +++ b/form/frm_scale.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_scale.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_scale.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_sub.c b/form/frm_sub.c index 1c33930e..b20c788d 100644 --- a/form/frm_sub.c +++ b/form/frm_sub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_sub.c,v 1.6 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_sub.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_user.c b/form/frm_user.c index a9b6b397..f75aa912 100644 --- a/form/frm_user.c +++ b/form/frm_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_user.c,v 1.10 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_user.c,v 1.11 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/frm_win.c b/form/frm_win.c index b765d33d..6cdfdd96 100644 --- a/form/frm_win.c +++ b/form/frm_win.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,12 +28,11 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_win.c,v 1.10 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: frm_win.c,v 1.11 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform diff --git a/form/fty_alnum.c b/form/fty_alnum.c index bf16c66d..7eb5a788 100644 --- a/form/fty_alnum.c +++ b/form/fty_alnum.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_alnum.c,v 1.11 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fty_alnum.c,v 1.12 2003/10/25 14:54:48 tom Exp $") typedef struct { int width; diff --git a/form/fty_alpha.c b/form/fty_alpha.c index aa5c7c7d..5796ab7f 100644 --- a/form/fty_alpha.c +++ b/form/fty_alpha.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_alpha.c,v 1.11 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fty_alpha.c,v 1.12 2003/10/25 14:54:48 tom Exp $") typedef struct { int width; diff --git a/form/fty_enum.c b/form/fty_enum.c index ab256db1..95d96d4a 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.16 2002/07/13 11:35:08 juergen Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.18 2003/11/08 20:25:29 tom Exp $") typedef struct { char **kwds; @@ -102,7 +101,7 @@ static void Free_Enum_Type(void * argp) | const unsigned char * buf, | bool ccase ) | -| Description : Check wether or not the text in 'buf' matches the +| Description : Check whether or not the text in 'buf' matches the | text in 's', at least partial. | | Return Values : NOMATCH - buffer doesn't match diff --git a/form/fty_int.c b/form/fty_int.c index 61ad9e42..5f5c5ab0 100644 --- a/form/fty_int.c +++ b/form/fty_int.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_int.c,v 1.12 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fty_int.c,v 1.13 2003/10/25 14:54:48 tom Exp $") typedef struct { int precision; diff --git a/form/fty_num.c b/form/fty_num.c index db4d648c..6bc95c95 100644 --- a/form/fty_num.c +++ b/form/fty_num.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_num.c,v 1.15 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fty_num.c,v 1.16 2003/10/25 14:54:48 tom Exp $") #if HAVE_LOCALE_H #include diff --git a/form/fty_regex.c b/form/fty_regex.c index 6cb69d04..c36d1743 100644 --- a/form/fty_regex.c +++ b/form/fty_regex.c @@ -8,13 +8,12 @@ /*************************************************************************** * * * Author : Juergen Pfeifer * -* Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * * * ***************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fty_regex.c,v 1.16 2002/07/06 15:33:27 juergen Exp $") +MODULE_ID("$Id: fty_regex.c,v 1.17 2003/10/25 14:54:48 tom Exp $") #if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */ #include diff --git a/include/Caps.hpux11 b/include/Caps.hpux11 index 449ffe1d..e43d44ef 100644 --- a/include/Caps.hpux11 +++ b/include/Caps.hpux11 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2002 Free Software Foundation, Inc. # +# 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"), # @@ -28,10 +28,10 @@ # # Author: Thomas Dickey # -# $Id: Caps.hpux11,v 1.2 2002/07/07 00:11:56 tom Exp $ +# $Id: Caps.hpux11,v 1.3 2003/11/15 20:27:40 tom Exp $ # # This is an adaptation of ncurses' termcap/terminfo capability table, which -# is designed to align with AIX 4.x's terminfo. +# is designed to align with HPUX 11.x's terminfo. # # This table is used to generate initializers for tables that drive tic, # infocmp, and the library compilation code used to support the termcap @@ -230,6 +230,7 @@ dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t106 tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine) transparent_underline ul bool ul - - YBCGE underline character overstrikes xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking +# end booleans for HPUX 9, 10 (non-color curses) needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required prtr_silent mc5i bool 5i - - ----- printer will not echo on screen hard_cursor chts bool HC - - ----- cursor is hard to see @@ -267,6 +268,7 @@ magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by sms padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix) width_status_line wsl num ws - - YB-G- number of columns in status line +# end numbers for HPUX 9, 10 (non-color curses) num_labels nlab num Nl - - ----- number of labels on screen label_height lh num lh - - ----- rows in each label label_width lw num lw - - ----- columns in each label @@ -531,6 +533,7 @@ key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key +# end of strings in HPUX 9 char_padding rmp str rP - - ----- like ip but when in insert mode acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100 key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh index 655078b9..b3cb4f7f 100755 --- a/include/MKkey_defs.sh +++ b/include/MKkey_defs.sh @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: MKkey_defs.sh,v 1.10 2002/09/28 23:32:16 tom Exp $ +# $Id: MKkey_defs.sh,v 1.14 2003/12/06 17:10:09 tom Exp $ ############################################################################## -# Copyright (c) 2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -30,7 +30,7 @@ # # MKkey_defs.sh -- generate function-key definitions for curses.h # -# Author: Thomas E. Dickey 2001 +# Author: Thomas E. Dickey 2001 # # Extract function-key definitions from the Caps file # @@ -49,10 +49,14 @@ trap 'rm -f $data pass[1234]_$$' 0 1 2 5 15 if sort -k 6 $DATA >$data 2>/dev/null then # POSIX - sed -e 's/[ ]\+/ /g' < $DATA |sort -n -k 6 >$data -else + sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n -k 6 >$data +elif sort -n +5 $DATA >$data 2>/dev/null +then # SunOS (and SVr4, marked as obsolete but still recognized) - sed -e 's/[ ]\+/ /g' < $DATA |sort -n +5 >$data + sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n +5 >$data +else + echo "Your sort utility is broken. Please install one that works." >&2 + exit 1 fi # add keys that we generate automatically: diff --git a/include/MKncurses_def.sh b/include/MKncurses_def.sh index 3ca08c33..4aac8655 100755 --- a/include/MKncurses_def.sh +++ b/include/MKncurses_def.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: MKncurses_def.sh,v 1.1 2000/09/02 17:37:35 tom Exp $ +# $Id: MKncurses_def.sh,v 1.2 2003/10/25 16:19:46 tom Exp $ ############################################################################## # Copyright (c) 2000 Free Software Foundation, Inc. # # # @@ -30,7 +30,7 @@ # # MKncurses_def.sh -- generate fallback definitions for ncurses_cfg.h # -# Author: Thomas E. Dickey 2000 +# Author: Thomas E. Dickey 2000 # # Given the choice between constructs such as # diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index 8243aea5..6cf0445c 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -1,6 +1,6 @@ BEGIN { print "/****************************************************************************" - print " * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *" + 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 *" @@ -30,9 +30,10 @@ BEGIN { 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.41 2001/12/23 01:04:38 tom Exp $ */" + 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" @@ -224,6 +225,7 @@ END { 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;" diff --git a/include/curses.h.in b/include/curses.h.in index 8b2b6223..3b869601 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -32,7 +32,7 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.134 2002/09/28 15:08:06 tom Exp $ */ +/* $Id: curses.h.in,v 1.148 2004/01/14 23:50:12 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -125,18 +125,21 @@ typedef unsigned @cf_cv_typeof_chtype@ chtype; typedef @cf_cv_type_of_bool@ NCURSES_BOOL; -#if (!defined(__cplusplus) || !@cf_cv_builtin_bool@) && (!@cf_cv_cc_bool_type@) +#if @USE_CXX_BOOL@ /* __cplusplus, etc. */ -#if @cf_cv_header_stdbool_h@ -#include -#endif +/* use the C++ compiler's bool type */ +#define NCURSES_BOOL bool -#undef bool +#else /* c89, c99, etc. */ #if @cf_cv_header_stdbool_h@ -#define bool NCURSES_BOOL +#include +/* use whatever the C compiler decides bool really is */ +#define NCURSES_BOOL bool #else -typedef @cf_cv_type_of_bool@ bool; +/* there is no predefined bool - use our own */ +#undef bool +#define bool NCURSES_BOOL #endif #endif /* !__cplusplus, etc. */ @@ -189,45 +192,47 @@ extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void); extern NCURSES_EXPORT_VAR(chtype) acs_map[]; #endif +#define NCURSES_ACS(c) (acs_map[(unsigned char)c]) + /* VT100 symbols begin here */ -#define ACS_ULCORNER (acs_map['l']) /* upper left corner */ -#define ACS_LLCORNER (acs_map['m']) /* lower left corner */ -#define ACS_URCORNER (acs_map['k']) /* upper right corner */ -#define ACS_LRCORNER (acs_map['j']) /* lower right corner */ -#define ACS_LTEE (acs_map['t']) /* tee pointing right */ -#define ACS_RTEE (acs_map['u']) /* tee pointing left */ -#define ACS_BTEE (acs_map['v']) /* tee pointing up */ -#define ACS_TTEE (acs_map['w']) /* tee pointing down */ -#define ACS_HLINE (acs_map['q']) /* horizontal line */ -#define ACS_VLINE (acs_map['x']) /* vertical line */ -#define ACS_PLUS (acs_map['n']) /* large plus or crossover */ -#define ACS_S1 (acs_map['o']) /* scan line 1 */ -#define ACS_S9 (acs_map['s']) /* scan line 9 */ -#define ACS_DIAMOND (acs_map['`']) /* diamond */ -#define ACS_CKBOARD (acs_map['a']) /* checker board (stipple) */ -#define ACS_DEGREE (acs_map['f']) /* degree symbol */ -#define ACS_PLMINUS (acs_map['g']) /* plus/minus */ -#define ACS_BULLET (acs_map['~']) /* bullet */ +#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 (acs_map[',']) /* arrow pointing left */ -#define ACS_RARROW (acs_map['+']) /* arrow pointing right */ -#define ACS_DARROW (acs_map['.']) /* arrow pointing down */ -#define ACS_UARROW (acs_map['-']) /* arrow pointing up */ -#define ACS_BOARD (acs_map['h']) /* board of squares */ -#define ACS_LANTERN (acs_map['i']) /* lantern symbol */ -#define ACS_BLOCK (acs_map['0']) /* solid square block */ +#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 (acs_map['p']) /* scan line 3 */ -#define ACS_S7 (acs_map['r']) /* scan line 7 */ -#define ACS_LEQUAL (acs_map['y']) /* less/equal */ -#define ACS_GEQUAL (acs_map['z']) /* greater/equal */ -#define ACS_PI (acs_map['{']) /* Pi */ -#define ACS_NEQUAL (acs_map['|']) /* not equal */ -#define ACS_STERLING (acs_map['}']) /* UK pound sign */ +#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 @@ -286,20 +291,19 @@ typedef chtype attr_t; /* ...must be at least as wide as chtype */ #undef mblen #endif #include -#define _WCHAR_T -#define _WINT_T #endif -#if @NCURSES_MBSTATE_T@ +#if @NEED_WCHAR_H@ #include /* ...to get mbstate_t, etc. */ #endif -#ifndef _WCHAR_T -typedef unsigned long wchar_t; -#endif /* _WCHAR_T */ -#ifndef _WINT_T -typedef long int wint_t; -#endif /* _WINT_T */ +#if @NCURSES_WCHAR_T@ +typedef unsigned short wchar_t@NCURSES_OK_WCHAR_T@; +#endif + +#if @NCURSES_WINT_T@ +typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@; +#endif #define CCHARW_MAX 5 typedef struct @@ -388,7 +392,8 @@ 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 (char *, 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); @@ -451,23 +456,13 @@ extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *); * 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. - * G++ doesn't accept it anyway. + * Old versions of G++ do not accept it anyway, at least not consistently with + * GCC. */ -#if !defined(__GNUC__) && !defined(__attribute__) +#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) #define __attribute__(p) /* nothing */ #endif -/* - * For g++, turn off our macros that use __attribute__ (g++ recognizes some - * of them, but not at the same version levels as gcc). - */ -#ifdef __cplusplus -#undef GCC_NORETURN -#undef GCC_PRINTF -#undef GCC_SCANF -#undef GCC_UNUSED -#endif - /* * We cannot define these in ncurses_cfg.h, since they require parameters to be * passed (that's non-portable). @@ -609,7 +604,7 @@ 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, NCURSES_CONST char *,...) /* implemented */ +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); @@ -634,7 +629,7 @@ 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, NCURSES_CONST char *,...) /* implemented */ +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); @@ -658,7 +653,7 @@ 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 (NCURSES_CONST char *,...) /* 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 */ @@ -720,8 +715,8 @@ 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 *, NCURSES_CONST char *,va_list); /* implemented */ -extern NCURSES_EXPORT(int) vw_printw (WINDOW *, NCURSES_CONST char *,va_list); /* 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 */ @@ -765,7 +760,7 @@ 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 *, NCURSES_CONST char *,...) /* 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 */ @@ -831,10 +826,11 @@ extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */ #define nocrmode() nocbreak() #define gettmode() -#define getyx(win,y,x) (y = (win)?(win)->_cury:ERR, x = (win)?(win)->_curx:ERR) -#define getbegyx(win,y,x) (y = (win)?(win)->_begy:ERR, x = (win)?(win)->_begx:ERR) -#define getmaxyx(win,y,x) (y = (win)?((win)->_maxy + 1):ERR, x = (win)?((win)->_maxx + 1):ERR) -#define getparyx(win,y,x) (y = (win)?(win)->_pary:ERR, x = (win)?(win)->_parx:ERR) +#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) diff --git a/include/curses.tail b/include/curses.tail index b3991cdc..d51abc25 100644 --- a/include/curses.tail +++ b/include/curses.tail @@ -1,4 +1,4 @@ -/* $Id: curses.tail,v 1.7 2002/10/12 15:46:02 tom Exp $ */ +/* $Id: curses.tail,v 1.8 2002/11/02 20:26:26 tom Exp $ */ /* mouse interface */ #define NCURSES_MOUSE_VERSION 1 @@ -121,10 +121,6 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); #define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */ #endif -#ifndef NCURSES_WGETCH_EVENTS -#undef KEY_EVENT -#endif - #ifdef __cplusplus /* these names conflict with STL */ diff --git a/include/curses.wide b/include/curses.wide index ac03151b..a37f3f84 100644 --- a/include/curses.wide +++ b/include/curses.wide @@ -1,21 +1,23 @@ #ifdef _XOPEN_SOURCE_EXTENDED -/* $Id: curses.wide,v 1.25 2002/08/31 17:48:53 tom Exp $ */ +/* $Id: curses.wide,v 1.28 2004/01/03 20:35:14 tom Exp $ */ extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; -#define WACS_BSSB (&_nc_wacs['l']) -#define WACS_SSBB (&_nc_wacs['m']) -#define WACS_BBSS (&_nc_wacs['k']) -#define WACS_SBBS (&_nc_wacs['j']) -#define WACS_SBSS (&_nc_wacs['u']) -#define WACS_SSSB (&_nc_wacs['t']) -#define WACS_SSBS (&_nc_wacs['v']) -#define WACS_BSSS (&_nc_wacs['w']) -#define WACS_BSBS (&_nc_wacs['q']) -#define WACS_SBSB (&_nc_wacs['x']) -#define WACS_SSSS (&_nc_wacs['n']) +#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c]) + +#define WACS_BSSB NCURSES_WACS('l') +#define WACS_SSBB NCURSES_WACS('m') +#define WACS_BBSS NCURSES_WACS('k') +#define WACS_SBBS NCURSES_WACS('j') +#define WACS_SBSS NCURSES_WACS('u') +#define WACS_SSSB NCURSES_WACS('t') +#define WACS_SSBS NCURSES_WACS('v') +#define WACS_BSSS NCURSES_WACS('w') +#define WACS_BSBS NCURSES_WACS('q') +#define WACS_SBSB NCURSES_WACS('x') +#define WACS_SSSS NCURSES_WACS('n') #define WACS_ULCORNER WACS_BSSB #define WACS_LLCORNER WACS_SSBB @@ -29,31 +31,31 @@ extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; #define WACS_VLINE WACS_SBSB #define WACS_PLUS WACS_SSSS -#define WACS_S1 (&_nc_wacs['o']) /* scan line 1 */ -#define WACS_S9 (&_nc_wacs['s']) /* scan line 9 */ -#define WACS_DIAMOND (&_nc_wacs['`']) /* diamond */ -#define WACS_CKBOARD (&_nc_wacs['a']) /* checker board */ -#define WACS_DEGREE (&_nc_wacs['f']) /* degree symbol */ -#define WACS_PLMINUS (&_nc_wacs['g']) /* plus/minus */ -#define WACS_BULLET (&_nc_wacs['~']) /* bullet */ +#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */ +#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */ +#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */ +#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */ +#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */ +#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */ +#define WACS_BULLET NCURSES_WACS('~') /* bullet */ /* Teletype 5410v1 symbols */ -#define WACS_LARROW (&_nc_wacs[',']) /* arrow left */ -#define WACS_RARROW (&_nc_wacs['+']) /* arrow right */ -#define WACS_DARROW (&_nc_wacs['.']) /* arrow down */ -#define WACS_UARROW (&_nc_wacs['-']) /* arrow up */ -#define WACS_BOARD (&_nc_wacs['h']) /* board of squares */ -#define WACS_LANTERN (&_nc_wacs['i']) /* lantern symbol */ -#define WACS_BLOCK (&_nc_wacs['0']) /* solid square block */ +#define WACS_LARROW NCURSES_WACS(',') /* arrow left */ +#define WACS_RARROW NCURSES_WACS('+') /* arrow right */ +#define WACS_DARROW NCURSES_WACS('.') /* arrow down */ +#define WACS_UARROW NCURSES_WACS('-') /* arrow up */ +#define WACS_BOARD NCURSES_WACS('h') /* board of squares */ +#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */ +#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */ /* ncurses extensions */ -#define WACS_S3 (&_nc_wacs['p']) /* scan line 3 */ -#define WACS_S7 (&_nc_wacs['r']) /* scan line 7 */ -#define WACS_LEQUAL (&_nc_wacs['y']) /* less/equal */ -#define WACS_GEQUAL (&_nc_wacs['z']) /* greater/equal */ -#define WACS_PI (&_nc_wacs['{']) /* Pi */ -#define WACS_NEQUAL (&_nc_wacs['|']) /* not equal */ -#define WACS_STERLING (&_nc_wacs['}']) /* UK pound sign */ +#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */ +#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */ +#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */ +#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */ +#define WACS_PI NCURSES_WACS('{') /* Pi */ +#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */ +#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */ /* * Function prototypes for wide-character operations. @@ -127,9 +129,9 @@ extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */ -extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* missing */ +extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, short, const void *); /* implemented */ -extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* missing */ +extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */ extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */ extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */ extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); /* implemented */ diff --git a/include/ncurses_defs b/include/ncurses_defs index a4b49c00..4a302828 100644 --- a/include/ncurses_defs +++ b/include/ncurses_defs @@ -1,6 +1,6 @@ -# $Id: ncurses_defs,v 1.15 2002/08/24 23:13:43 tom Exp $ +# $Id: ncurses_defs,v 1.21 2004/01/18 01:03:24 tom Exp $ ############################################################################## -# Copyright (c) 2000-2001,2002 Free Software Foundation, Inc. # +# Copyright (c) 2000-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"), # @@ -45,6 +45,8 @@ GCC_NORETURN /* nothing */ GCC_UNUSED /* nothing */ HAVE_BIG_CORE HAVE_BSD_CGETENT +HAVE_BSD_SIGNAL_H +HAVE_BTOWC HAVE_BUILTIN_H HAVE_DIRENT_H HAVE_ERRNO @@ -62,6 +64,7 @@ HAVE_GXX_BUILTIN_H HAVE_HAS_KEY HAVE_ISASCII HAVE_ISSETUGID +HAVE_LIBC_H HAVE_LIBDBMALLOC HAVE_LIBDMALLOC HAVE_LIBFORM @@ -72,6 +75,10 @@ HAVE_LIMITS_H HAVE_LINK HAVE_LOCALE_H HAVE_LONG_FILE_NAMES +HAVE_MBLEN +HAVE_MBRLEN +HAVE_MBRTOWC +HAVE_MBTOWC HAVE_MEMCCPY HAVE_MENU_H HAVE_MKSTEMP @@ -81,6 +88,7 @@ HAVE_PANEL_H HAVE_POLL HAVE_POLL_H HAVE_PURIFY +HAVE_PUTWC HAVE_REGEXPR_H_FUNCS HAVE_REGEXP_H_FUNCS HAVE_REGEX_H_FUNCS @@ -93,6 +101,7 @@ HAVE_SETVBUF HAVE_SIGACTION HAVE_SIGVEC HAVE_SIZECHANGE +HAVE_SLK_COLOR HAVE_STRDUP HAVE_STRSTR HAVE_SYMLINK @@ -121,6 +130,8 @@ HAVE_USE_DEFAULT_COLORS HAVE_VFSCANF HAVE_VSNPRINTF HAVE_VSSCANF +HAVE_WCTOB +HAVE_WCTOMB HAVE_WORKING_POLL HAVE_WRESIZE HAVE__DOSCAN @@ -149,6 +160,7 @@ USE_GETCAP USE_GETCAP_CACHE USE_HARD_TABS USE_HASHMAP +USE_HOME_TERMINFO USE_LINKS USE_MY_MEMMOVE USE_OK_BCOPY @@ -160,6 +172,7 @@ USE_STDIO_VSCAN USE_STRSTREAM_VSCAN USE_STRSTREAM_VSCAN_CAST USE_SYMLINKS +USE_SYSMOUSE USE_TERMCAP USE_WIDEC_SUPPORT USE_XMC_SUPPORT diff --git a/include/ncurses_dll.h b/include/ncurses_dll.h index c961c3e0..de46c605 100644 --- a/include/ncurses_dll.h +++ b/include/ncurses_dll.h @@ -1,10 +1,14 @@ -/* $Id: ncurses_dll.h,v 1.2 2001/12/09 01:36:34 tom Exp $ */ +/* $Id: ncurses_dll.h,v 1.4 2003/07/19 18:44:32 Charles.Wilson Exp $ */ #ifndef NCURSES_DLL_H_incl #define NCURSES_DLL_H_incl 1 -#undef NCURSES_DLL /* cygwin dll not implemented */ -#define NCURSES_STATIC /* cygwin dll not implemented */ +/* no longer needed on cygwin or mingw, thanks to auto-import */ +/* but this structure may be useful at some point for an MSVC build */ +/* so, for now unconditionally define the important flags */ +/* "the right way" for proper static and dll+auto-import behavior */ +#undef NCURSES_DLL +#define NCURSES_STATIC #if defined(__CYGWIN__) # if defined(NCURSES_DLL) @@ -14,8 +18,8 @@ # endif # undef NCURSES_IMPEXP # undef NCURSES_API -# undef NCURSES_EXPORT(type) -# undef NCURSES_EXPORT_VAR(type) +# undef NCURSES_EXPORT +# undef NCURSES_EXPORT_VAR # if defined(NCURSES_DLL) /* building a DLL */ # define NCURSES_IMPEXP __declspec(dllexport) diff --git a/include/tic.h b/include/tic.h index 806d43fd..752c1f7e 100644 --- a/include/tic.h +++ b/include/tic.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -32,7 +32,7 @@ ****************************************************************************/ /* - * $Id: tic.h,v 1.42 2002/10/12 15:46:15 tom Exp $ + * $Id: tic.h,v 1.46 2003/12/27 19:05:32 tom Exp $ * tic.h - Global variables and structures for the terminfo * compiler. */ @@ -83,13 +83,14 @@ extern "C" { #define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */ #define MAX_ENTRY_SIZE 4096 /* maximum legal entry size */ -/* The maximum size of individual name or alias is guaranteed in XSI to - * be 14, since that corresponds to the older filename lengths. Newer - * systems allow longer aliases, though not many terminal descriptions - * are written to use them. +/* + * The maximum size of individual name or alias is guaranteed in XSI to be at + * least 14, since that corresponds to the older filename lengths. Newer + * systems allow longer aliases, though not many terminal descriptions are + * written to use them. The MAX_ALIAS symbol is used for warnings. */ #if HAVE_LONG_FILE_NAMES -#define MAX_ALIAS 32 /* POSIX minimum for PATH_MAX */ +#define MAX_ALIAS 32 /* smaller than POSIX minimum for PATH_MAX */ #else #define MAX_ALIAS 14 /* SVr3 filename length */ #endif @@ -203,8 +204,6 @@ struct alias const char *source; }; -extern NCURSES_EXPORT_VAR(int) _nc_tparm_err; - extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_info_hash_table[]; extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_cap_hash_table[]; @@ -217,7 +216,7 @@ extern NCURSES_EXPORT(const struct name_table_entry * const *) _nc_get_hash_tabl #define NOTFOUND ((struct name_table_entry *) 0) /* out-of-band values for representing absent capabilities */ -#define ABSENT_BOOLEAN (-1) /* 255 */ +#define ABSENT_BOOLEAN (char)(-1) /* 255 */ #define ABSENT_NUMERIC (-1) #define ABSENT_STRING (char *)0 @@ -241,6 +240,7 @@ extern NCURSES_EXPORT(const struct name_table_entry * const *) _nc_get_hash_tabl #endif /* access.c */ +extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *); extern NCURSES_EXPORT(char *) _nc_basename (char *); extern NCURSES_EXPORT(char *) _nc_rootname (char *); @@ -284,6 +284,13 @@ extern NCURSES_EXPORT(char) _nc_trans_string (char *, char *); extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const); extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const); +/* lib_tparm.c */ +#define NUM_PARM 9 + +extern NCURSES_EXPORT_VAR(int) _nc_tparm_err; + +extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount); + /* lib_tputs.c */ extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */ diff --git a/man/MKterminfo.sh b/man/MKterminfo.sh index 8160ca93..3a996095 100755 --- a/man/MKterminfo.sh +++ b/man/MKterminfo.sh @@ -1,10 +1,10 @@ #!/bin/sh -# $Id: MKterminfo.sh,v 1.10 2002/06/29 20:04:28 tom Exp $ +# $Id: MKterminfo.sh,v 1.12 2003/01/11 21:42:12 tom Exp $ # # MKterminfo.sh -- generate terminfo.5 from Caps tabular data # #*************************************************************************** -# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +# 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 * @@ -69,11 +69,11 @@ trap "rm -f $sorted $temp $unsorted; exit 99" 1 2 5 15 sed -n <$caps "\ /%%-STOP-HERE-%%/q -/^#%/s///p +/^#%/s/#%//p /^#/d -s/[ ]\+/ /g +s/[ ][ ]*/ /g s/$/T}/ -s/ [A-Z0-9_()\-]\+ [0-9\-]\+ [Y\-][B\-][C\-][G\-][EK\-]\** / T{/ +s/ [A-Z0-9_()\-][A-Z0-9_()\-]* [0-9\-][0-9\-]* [Y\-][B\-][C\-][G\-][EK\-]\** / T{/ s/ bool / /p s/ num / /p s/ str / /p diff --git a/man/Makefile.in b/man/Makefile.in index 56dbe093..92fb9d30 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.33 2002/01/19 22:49:44 tom Exp $ +# $Id: Makefile.in,v 1.35 2003/12/20 18:41:10 tom Exp $ ############################################################################## -# Copyright (c) 1998,2000,2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997 +# Author: Thomas E. Dickey 1996,1997 # # Makefile for ncurses manual pages. # @@ -56,10 +56,10 @@ $(DESTDIR)$(mandir) : EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]* install install.man : terminfo.5 $(DESTDIR)$(mandir) - sh ./edit_man.sh installing $(EDITARGS) + sh ./edit_man.sh normal installing $(EDITARGS) uninstall uninstall.man : - -sh ./edit_man.sh removing $(EDITARGS) + -sh ./edit_man.sh normal removing $(EDITARGS) # We compose terminfo.5 from the real sources... CAPLIST=$(srcdir)/../include/@TERMINFO_CAPS@ diff --git a/man/captoinfo.1m b/man/captoinfo.1m index 40c09f5a..2938ec6c 100644 --- a/man/captoinfo.1m +++ b/man/captoinfo.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -27,14 +27,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: captoinfo.1m,v 1.16 2000/08/13 01:56:49 tom Exp $ +.\" $Id: captoinfo.1m,v 1.17 2003/05/11 00:32:53 tom Exp $ .TH captoinfo 1M "" .ds n 5 .ds d @TERMINFO@ .SH NAME \fBcaptoinfo\fR - convert a \fItermcap\fR description into a \fIterminfo\fR description .SH SYNOPSIS -\fBcaptoinfo\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . . +\fBcaptoinfo\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . . .SH DESCRIPTION \fBcaptoinfo\fR looks in \fIfile\fR for \fBtermcap\fR descriptions. For each one found, an equivalent \fBterminfo\fR description is written to standard @@ -47,18 +47,18 @@ the terminal whose name is specified in the environment variable \fBTERM\fR is extracted from that file. If the environment variable \fBTERMCAP\fR is not set, then the file \fB\*d\fR is read. .TP 5 -\fB-v\fR +\fB\-v\fR print out tracing information on standard error as the program runs. .TP 5 -\fB-V\fR +\fB\-V\fR print out the version of the program in use on standard error and exit. .TP 5 -\fB-1\fR +\fB\-1\fR cause the fields to print out one to a line. Otherwise, the fields will be printed several to a line to a maximum width of 60 characters. .TP 5 -\fB-w\fR +\fB\-w\fR change the output to \fIwidth\fR characters. .SH FILES .TP 20 @@ -172,11 +172,11 @@ Hewlett-Packard's terminfo library supports two nonstandard terminfo capabilities \fBmeml\fR (memory lock) and \fBmemu\fR (memory unlock). These will be discarded with a warning message. .SH NOTES -This utility is actually a link to \fItic\fR(1M), running in \fI-I\fR mode. -You can use other \fItic\fR options such as \fB-f\fR and \fB-x\fR. +This utility is actually a link to \fItic\fR(1M), running in \fI\-I\fR mode. +You can use other \fItic\fR options such as \fB\-f\fR and \fB\-x\fR. The trace option isn't identical to SVr4's. Under SVr4, instead of following -the -v with a trace level n, you repeat it n times. +the \fB\-v\fR with a trace level n, you repeat it n times. .SH SEE ALSO \fBcurses\fR(3X), \fB@INFOCMP@\fR(1M), \fBterminfo\fR(\*n) .SH AUTHOR diff --git a/man/curs_add_wchstr.3x b/man/curs_add_wchstr.3x index 17d34469..7afd4984 100644 --- a/man/curs_add_wchstr.3x +++ b/man/curs_add_wchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_add_wchstr.3x,v 1.1 2002/02/23 22:15:55 tom Exp $ +.\" $Id: curs_add_wchstr.3x,v 1.2 2003/12/27 18:53:41 tom Exp $ .TH curs_add_wchstr 3X "" .SH NAME .PP @@ -40,7 +40,7 @@ \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 diff --git a/man/curs_addch.3x b/man/curs_addch.3x index 3feb9e78..13053d00 100644 --- a/man/curs_addch.3x +++ b/man/curs_addch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addch.3x,v 1.20 2002/08/10 22:12:36 tom Exp $ +.\" $Id: curs_addch.3x,v 1.23 2004/01/31 13:16:21 tom Exp $ .TH curs_addch 3X "" .SH NAME \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, @@ -35,7 +35,7 @@ \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 @@ -55,29 +55,29 @@ 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). +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 +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 @@ -90,7 +90,7 @@ 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 _ _ _ @@ -129,7 +129,6 @@ 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 @@ -158,6 +157,10 @@ 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), diff --git a/man/curs_addchstr.3x b/man/curs_addchstr.3x index 0d9ea29f..9de749fc 100644 --- a/man/curs_addchstr.3x +++ b/man/curs_addchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addchstr.3x,v 1.7 2000/07/01 19:53:33 tom Exp $ +.\" $Id: curs_addchstr.3x,v 1.8 2003/12/27 18:51:24 tom Exp $ .TH curs_addchstr 3X "" .SH NAME \fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR, @@ -34,7 +34,7 @@ \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 @@ -56,14 +56,13 @@ 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 diff --git a/man/curs_addstr.3x b/man/curs_addstr.3x index a845acbc..0ffacc6f 100644 --- a/man/curs_addstr.3x +++ b/man/curs_addstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addstr.3x,v 1.10 2002/03/09 23:09:29 tom Exp $ +.\" $Id: curs_addstr.3x,v 1.11 2003/12/27 18:51:15 tom Exp $ .TH curs_addstr 3X "" .SH NAME \fBaddstr\fR, @@ -40,7 +40,7 @@ .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 diff --git a/man/curs_addwstr.3x b/man/curs_addwstr.3x index 4ce7c230..4091b362 100644 --- a/man/curs_addwstr.3x +++ b/man/curs_addwstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addwstr.3x,v 1.2 2002/03/09 23:16:59 tom Exp $ +.\" $Id: curs_addwstr.3x,v 1.3 2003/12/27 18:51:01 tom Exp $ .TH curs_addwstr 3X "" .SH NAME \fBaddwstr\fR, @@ -40,7 +40,7 @@ .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 diff --git a/man/curs_attr.3x b/man/curs_attr.3x index 3457ff2b..bcbf61c4 100644 --- a/man/curs_attr.3x +++ b/man/curs_attr.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_attr.3x,v 1.26 2002/09/21 19:50:06 tom Exp $ +.\" $Id: curs_attr.3x,v 1.27 2003/12/27 18:50:51 tom Exp $ .TH curs_attr 3X "" .SH NAME \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, @@ -148,7 +148,7 @@ Use \fBtouchwin\fR to force the screen to match the updated 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 . @@ -165,14 +165,14 @@ l l . \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. @@ -196,7 +196,7 @@ 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 . @@ -209,7 +209,7 @@ l l . \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. diff --git a/man/curs_beep.3x b/man/curs_beep.3x index b9caaa80..579931cc 100644 --- a/man/curs_beep.3x +++ b/man/curs_beep.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" 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 * @@ -26,13 +26,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_beep.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_beep.3x,v 1.9 2003/12/27 18:44:30 tom 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 @@ -45,7 +45,7 @@ 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, +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 diff --git a/man/curs_bkgd.3x b/man/curs_bkgd.3x index f5c620db..b2d768a4 100644 --- a/man/curs_bkgd.3x +++ b/man/curs_bkgd.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,16 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_bkgd.3x,v 1.18 2002/09/21 19:46:26 tom Exp $ +.\" $Id: curs_bkgd.3x,v 1.19 2003/12/27 18:50:40 tom 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 @@ -57,23 +56,23 @@ 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 diff --git a/man/curs_deleteln.3x b/man/curs_deleteln.3x index 8b39402d..38a5496a 100644 --- a/man/curs_deleteln.3x +++ b/man/curs_deleteln.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_deleteln.3x,v 1.7 2000/11/11 20:43:20 Bernhard.Rosenkraenzer Exp $ +.\" $Id: curs_deleteln.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ .TH curs_deleteln 3X "" .SH NAME \fBdeleteln\fR, @@ -61,7 +61,7 @@ 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 +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 diff --git a/man/curs_extend.3x b/man/curs_extend.3x index dc05b39d..8e992e74 100644 --- a/man/curs_extend.3x +++ b/man/curs_extend.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1999 +.\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: curs_extend.3x,v 1.9 2002/02/16 22:39:04 tom Exp $ +.\" $Id: curs_extend.3x,v 1.12 2003/10/25 20:33:16 tom Exp $ .TH curs_extend 3X "" .SH NAME \fBcurses_version\fP, @@ -55,11 +55,11 @@ 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 descision -is made by using the \fB-x\fP option of \fItic\fP to compile +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 compatiblity with other implementations of curses +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 diff --git a/man/curs_get_wch.3x b/man/curs_get_wch.3x index 26ff2d4c..ce723a0a 100644 --- a/man/curs_get_wch.3x +++ b/man/curs_get_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wch.3x,v 1.3 2002/05/18 21:48:53 tom Exp $ +.\" $Id: curs_get_wch.3x,v 1.5 2003/05/10 20:33:49 jmc Exp $ .TH curs_get_wch 3X "" .SH NAME \fBget_wch\fR, @@ -37,13 +37,13 @@ .SH SYNOPSIS \fB#include \fR .sp -\fBint get_wch(win_t *\fR\fIwch\fR\fB);\fR +\fBint get_wch(wint_t *\fR\fIwch\fR\fB);\fR .br -\fBint wget_wch(WINDOW *\fR\fIwin\fR\fB, win_t *\fR\fIwch\fR\fB);\fR +\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, win_t *\fR\fIwch\fR\fB);\fR +\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, win_t *\fR\fIwch\fR\fB);\fR +\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 @@ -130,7 +130,7 @@ 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 +All functions except \fBwget_wch\fR and \fBunget_wch\fR may be macros. .SH RETURN VALUES When diff --git a/man/curs_get_wstr.3x b/man/curs_get_wstr.3x index f8fa51d4..86a5b82a 100644 --- a/man/curs_get_wstr.3x +++ b/man/curs_get_wstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wstr.3x,v 1.2 2002/05/18 21:48:15 tom Exp $ +.\" $Id: curs_get_wstr.3x,v 1.3 2003/07/05 11:15:28 tom Exp $ .TH curs_get_wstr 3X "" .SH NAME \fBget_wstr\fR, @@ -151,6 +151,9 @@ 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), diff --git a/man/curs_getcchar.3x b/man/curs_getcchar.3x index 2dfa10b7..06623175 100644 --- a/man/curs_getcchar.3x +++ b/man/curs_getcchar.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getcchar.3x,v 1.6 2002/03/24 01:08:55 tom Exp $ +.\" $Id: curs_getcchar.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $ .TH curs_getcchar 3X "" .SH NAME \fBgetcchar\fP, @@ -108,7 +108,7 @@ 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. +and contain no characters of negative width. .SH NOTES .PP The \fIopts\fP argument is reserved for future use. diff --git a/man/curs_getch.3x b/man/curs_getch.3x index 73e1a296..88003a5d 100644 --- a/man/curs_getch.3x +++ b/man/curs_getch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getch.3x,v 1.21 2002/03/17 14:36:21 tom Exp $ +.\" $Id: curs_getch.3x,v 1.24 2003/12/27 18:46:06 tom Exp $ .TH curs_getch 3X "" .SH NAME \fBgetch\fR, @@ -38,7 +38,7 @@ \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 @@ -63,7 +63,7 @@ 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: @@ -73,19 +73,19 @@ 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 +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. @@ -94,11 +94,11 @@ 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. @@ -110,7 +110,7 @@ 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 @@ -143,7 +143,7 @@ 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_LL/Home down or bottom (lower left) KEY_A1/Upper left of keypad KEY_A3/Upper right of keypad KEY_B2/Center of keypad @@ -208,7 +208,7 @@ KEY_SUNDO/Shifted undo key KEY_SUSPEND/Suspend key KEY_UNDO/Undo key .TE - +.PP Keypad is arranged like this: .sp .TS @@ -222,7 +222,9 @@ c c c . 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 @@ -231,25 +233,25 @@ completion. 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 +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 @@ -266,27 +268,27 @@ 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 hsd been set. - +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. diff --git a/man/curs_getstr.3x b/man/curs_getstr.3x index 1a32a0be..ffbd2887 100644 --- a/man/curs_getstr.3x +++ b/man/curs_getstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getstr.3x,v 1.11 2002/04/13 22:14:30 tom Exp $ +.\" $Id: curs_getstr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ .TH curs_getstr 3X "" .SH NAME \fBgetstr\fR, @@ -90,7 +90,7 @@ 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 +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). diff --git a/man/curs_getyx.3x b/man/curs_getyx.3x index 87df1622..1e1a6eff 100644 --- a/man/curs_getyx.3x +++ b/man/curs_getyx.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,17 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getyx.3x,v 1.8 2002/09/21 19:00:38 tom Exp $ +.\" $Id: curs_getyx.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ .TH curs_getyx 3X "" .SH NAME -.IX getbegx -.IX getbegy -.IX getcurx -.IX getcury -.IX getmaxx -.IX getmaxy -.IX getparx -.IX getpary \fBgetyx\fR, \fBgetparyx\fR, \fBgetbegyx\fR, @@ -64,7 +56,7 @@ 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 (\fIi\fR.\fIe\fR., +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. diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x index ea41729e..02f149df 100644 --- a/man/curs_initscr.3x +++ b/man/curs_initscr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_initscr.3x,v 1.11 2002/07/20 14:51:04 tom Exp $ +.\" $Id: curs_initscr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ .TH curs_initscr 3X "" .SH NAME \fBinitscr\fR, @@ -111,7 +111,7 @@ 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 +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), diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x index c129ae19..24a9bd61 100644 --- a/man/curs_inopts.3x +++ b/man/curs_inopts.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inopts.3x,v 1.9 2002/08/10 22:29:49 tom Exp $ +.\" $Id: curs_inopts.3x,v 1.11 2003/12/27 18:45:42 tom Exp $ .TH curs_inopts 3X "" .SH NAME \fBcbreak\fR, \fBnocbreak\fR, \fBecho\fR, @@ -36,7 +36,7 @@ \fBtypeahead\fR - \fBcurses\fR input options .SH SYNOPSIS \fB#include \fR - +.PP \fBint cbreak(void);\fR .br \fBint nocbreak(void);\fR @@ -78,14 +78,14 @@ 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 @@ -95,14 +95,14 @@ 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 @@ -110,7 +110,7 @@ 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 @@ -121,7 +121,7 @@ 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, @@ -134,17 +134,17 @@ to setting the CS7 flag on the terminal. The window argument, \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 @@ -152,7 +152,7 @@ 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 @@ -160,18 +160,18 @@ output queues associated with the \fBINTR\fR, \fBQUIT\fR and 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 (\fIi\fR.\fIe\fR., waits indefinitely for +blocking read is used (i.e., waits indefinitely for input). If \fIdelay\fR is zero, then non-blocking read is used -(\fIi\fR.\fIe\fR., read returns \fBERR\fR if no input is waiting). If +(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 @@ -188,18 +188,18 @@ 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 +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 diff --git a/man/curs_insch.3x b/man/curs_insch.3x index 8546cf53..44eaa1ec 100644 --- a/man/curs_insch.3x +++ b/man/curs_insch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_insch.3x,v 1.7 2000/07/01 19:57:21 tom Exp $ +.\" $Id: curs_insch.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ .TH curs_insch 3X "" .SH NAME \fBinsch\fR, @@ -45,7 +45,7 @@ \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 +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. diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x index c1e3e37f..b1550762 100644 --- a/man/curs_mouse.3x +++ b/man/curs_mouse.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_mouse.3x,v 1.20 2002/07/20 14:52:14 tom Exp $ +.\" $Id: curs_mouse.3x,v 1.24 2003/12/27 18:47:54 tom Exp $ .TH curs_mouse 3X "" .SH NAME \fBgetmouse\fR, \fBungetmouse\fR, @@ -36,10 +36,10 @@ \fBmouseinterval\fR - mouse interface through curses .SH SYNOPSIS .nf -\fB#include \fR - +\fB#include +.PP \fBtypedef unsigned long mmask_t; - +.PP typedef struct { short id; \fI/* ID to distinguish multiple devices */\fB @@ -70,7 +70,7 @@ 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. @@ -80,13 +80,13 @@ 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 _ _ @@ -118,7 +118,7 @@ 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. @@ -131,26 +131,26 @@ 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 +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. @@ -168,19 +168,18 @@ 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 @@ -193,22 +192,38 @@ 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 Alessandro Rubini's gpm server. -If you are using something other than xterm and there is no gpm daemon -running on your machine, mouse events will not be visible to +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 @@ -218,12 +233,12 @@ 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", diff --git a/man/curs_outopts.3x b/man/curs_outopts.3x index f9db6f26..c5b518c1 100644 --- a/man/curs_outopts.3x +++ b/man/curs_outopts.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_outopts.3x,v 1.17 2001/10/14 00:50:30 tom Exp $ +.\" $Id: curs_outopts.3x,v 1.18 2003/05/10 20:33:49 jmc Exp $ .TH curs_outopts 3X "" .SH NAME \fBclearok\fR, \fBidlok\fR, \fBidcok\fR, \fBimmedok\fR, @@ -93,7 +93,7 @@ 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, -\fIetc\fR., automatically cause a call to \fBwrefresh\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. @@ -165,7 +165,7 @@ ability to do the equivalent of \fBclearok(..., 1)\fR by saying This will not work under ncurses. -Earlier System V curses implementations specified that with \fBscrollok\fR +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 diff --git a/man/curs_pad.3x b/man/curs_pad.3x index 0813a0a4..4db08dcf 100644 --- a/man/curs_pad.3x +++ b/man/curs_pad.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,14 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_pad.3x,v 1.9 2000/07/04 22:38:13 tom Exp $ +.\" $Id: curs_pad.3x,v 1.12 2004/01/04 01:36:49 tom Exp $ .TH curs_pad 3X "" .SH NAME \fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR, -\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBcurses\fR pads +\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 @@ -46,56 +47,78 @@ \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 +\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 -(\fIe\fR.\fIg\fR., from scrolling or echoing of input) do not occur. It is not +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 +\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 +(\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 +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, +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 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 +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 +\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 +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. +to \fBENOMEM\fR. .SH NOTES Note that \fBpechochar\fR may be a macro. .SH PORTABILITY diff --git a/man/curs_print.3x b/man/curs_print.3x index dd4b6e3c..3077d347 100644 --- a/man/curs_print.3x +++ b/man/curs_print.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_print.3x,v 1.5 2002/02/16 22:39:04 tom Exp $ +.\" $Id: curs_print.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $ .TH curs_print 3X "" .SH NAME \fBmcprint\fR - ship binary data to printer @@ -46,7 +46,7 @@ keeping the rate of writes to the printer below its continuous throughput rate 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 +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 diff --git a/man/curs_printw.3x b/man/curs_printw.3x index 3b9c3582..f16e2fe0 100644 --- a/man/curs_printw.3x +++ b/man/curs_printw.3x @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_printw.3x,v 1.12 2002/07/20 15:01:43 tom Exp $ +.\" $Id: curs_printw.3x,v 1.13 2002/11/16 22:28:57 tom Exp $ .TH curs_printw 3X "" .SH NAME \fBprintw\fR, @@ -37,17 +37,17 @@ .SH SYNOPSIS \fB#include \fR -\fBint printw(char *fmt, ...);\fR +\fBint printw(const char *fmt, ...);\fR .br -\fBint wprintw(WINDOW *win, char *fmt, ...);\fR +\fBint wprintw(WINDOW *win, const char *fmt, ...);\fR .br -\fBint mvprintw(int y, int x, char *fmt, ...);\fR +\fBint mvprintw(int y, int x, const char *fmt, ...);\fR .br -\fBint mvwprintw(WINDOW *win, int y, int x, char *fmt, ...);\fR +\fBint mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);\fR .br -\fBint vwprintw(WINDOW *win, char *fmt, va_list varglist);\fR +\fBint vwprintw(WINDOW *win, const char *fmt, va_list varglist);\fR .br -\fBint vw_printw(WINDOW *win, char *fmt, va_list varglist);\fR +\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 diff --git a/man/curs_scr_dump.3x b/man/curs_scr_dump.3x index 581d10d1..a925ea56 100644 --- a/man/curs_scr_dump.3x +++ b/man/curs_scr_dump.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scr_dump.3x,v 1.2 2000/07/01 20:06:53 tom Exp $ +.\" $Id: curs_scr_dump.3x,v 1.3 2003/10/25 20:34:06 tom Exp $ .TH curs_scr_dump 3X "" .SH NAME \fBscr_dump\fR, @@ -58,7 +58,7 @@ 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 [see \fBsystem\fR(BA_LIB)] call to share +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 diff --git a/man/curs_scroll.3x b/man/curs_scroll.3x index f957ac96..4e694c33 100644 --- a/man/curs_scroll.3x +++ b/man/curs_scroll.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scroll.3x,v 1.9 2001/10/14 00:51:56 tom Exp $ +.\" $Id: curs_scroll.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ .TH curs_scroll 3X "" .SH NAME \fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window @@ -61,12 +61,12 @@ These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies .SH NOTES Note that \fBscrl\fR and \fBscroll\fR may be macros. -The SVr4 documentation says that the optimization of physically scrolling +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. +optimization of multiple scroll actions on the next update. Neither the SVr4 nor the XSI documentation specify whether the current attribute or diff --git a/man/curs_slk.3x b/man/curs_slk.3x index 8f1ae8a0..1271f859 100644 --- a/man/curs_slk.3x +++ b/man/curs_slk.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_slk.3x,v 1.11 2001/03/03 21:05:41 Todd.C.Miller Exp $ +.\" $Id: curs_slk.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ .TH curs_slk 3X "" .SH NAME \fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR, @@ -77,7 +77,7 @@ 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 +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 @@ -94,10 +94,10 @@ PC like 4-4-4 mode. If \fBfmt\fR is set to \fB3\fR, it is again the PC like 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 +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 +\fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the label is to be left-justified, centered, or right-justified, respectively, within the label. @@ -109,7 +109,7 @@ The \fBslk_label\fR routine returns the current label for label number The \fBslk_clear\fR routine clears the soft labels from the screen. -The \fBslk_restore\fR routine, restores the soft labels to 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 @@ -118,7 +118,7 @@ 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 +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 diff --git a/man/curs_termattrs.3x b/man/curs_termattrs.3x index d285b866..48ff21ce 100644 --- a/man/curs_termattrs.3x +++ b/man/curs_termattrs.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termattrs.3x,v 1.8 2002/05/11 21:32:26 tom Exp $ +.\" $Id: curs_termattrs.3x,v 1.9 2003/12/27 18:37:47 tom Exp $ .TH curs_termattrs 3X "" .SH NAME \fBbaudrate\fR, @@ -42,7 +42,7 @@ \fBtermname\fR - \fBcurses\fR environment query routines .SH SYNOPSIS \fB#include \fR - +.PP \fBint baudrate(void);\fR .br \fBchar erasechar(void);\fR @@ -69,29 +69,29 @@ 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 @@ -100,7 +100,7 @@ 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. @@ -109,12 +109,11 @@ 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. - -The \fBtermname\fR routine returns the value of the environmental -variable \fBTERM\fR (truncated to 14 characters). +.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. @@ -123,6 +122,8 @@ 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) .\"# diff --git a/man/curs_termcap.3x b/man/curs_termcap.3x index 828bb9ad..c5c5517e 100644 --- a/man/curs_termcap.3x +++ b/man/curs_termcap.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termcap.3x,v 1.16 2002/02/16 19:26:41 tom Exp $ +.\" $Id: curs_termcap.3x,v 1.18 2003/02/08 22:25:47 tom Exp $ .TH curs_termcap 3X "" .ds n 5 .SH NAME @@ -130,6 +130,12 @@ 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. diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x index ee0ef0c0..d5c9bf68 100644 --- a/man/curs_terminfo.3x +++ b/man/curs_terminfo.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_terminfo.3x,v 1.16 2002/07/20 16:05:19 tom Exp $ +.\" $Id: curs_terminfo.3x,v 1.18 2003/12/27 18:48:59 tom Exp $ .TH curs_terminfo 3X "" .ds n 5 .SH NAME @@ -51,7 +51,7 @@ \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 @@ -91,7 +91,7 @@ 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 @@ -105,21 +105,21 @@ 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. +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 @@ -154,7 +154,7 @@ 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 @@ -162,48 +162,48 @@ The \fBsetterm\fR routine is being replaced by \fBsetupterm\fR. The call: 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, @@ -214,26 +214,26 @@ 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). @@ -250,37 +250,37 @@ These null-terminated arrays contain the \fIcapnames\fR, the 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. +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 diff --git a/man/curs_util.3x b/man/curs_util.3x index 90f00d07..de19a308 100644 --- a/man/curs_util.3x +++ b/man/curs_util.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_util.3x,v 1.9 2002/09/01 19:44:37 tom Exp $ +.\" $Id: curs_util.3x,v 1.12 2004/01/31 17:24:53 tom Exp $ .TH curs_util 3X "" .SH NAME \fBdelay_output\fR, @@ -41,10 +41,10 @@ \fBwunctrl\fR - miscellaneous \fBcurses\fR utility routines .SH SYNOPSIS \fB#include \fR - +.sp \fBchar *unctrl(chtype c);\fR .br -\fBchar *wunctrl(wchar_t w);\fR +\fBchar *wunctrl(cchar_t *c);\fR .br \fBchar *keyname(int c);\fR .br @@ -69,7 +69,7 @@ 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, @@ -78,13 +78,13 @@ 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 @@ -93,39 +93,51 @@ argument, the values of \fBlines\fR and \fBcolumns\fR specified in the \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_scr_dump\fR(3X). +\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: diff --git a/man/curs_window.3x b/man/curs_window.3x index 4d3ca4ca..6aad4e7f 100644 --- a/man/curs_window.3x +++ b/man/curs_window.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_window.3x,v 1.9 2000/07/01 20:08:37 tom Exp $ +.\" $Id: curs_window.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $ .TH curs_window 3X "" .SH NAME \fBnewwin\fR, @@ -142,7 +142,7 @@ The subwindow functions (\fIsubwin\fR, \fIderwin\fR, \fImvderwin\fR, 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 +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 diff --git a/man/default_colors.3x b/man/default_colors.3x index 4ebb9012..ae07899d 100644 --- a/man/default_colors.3x +++ b/man/default_colors.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1997,1999,2000 +.\" Author: Thomas E. Dickey 1997,1999,2000 .\" -.\" $Id: default_colors.3x,v 1.16 2002/02/16 22:39:52 tom Exp $ +.\" $Id: default_colors.3x,v 1.17 2003/10/25 20:41:08 tom Exp $ .TH default_colors 3X "" .SH NAME \fBuse_default_colors\fR, diff --git a/man/define_key.3x b/man/define_key.3x index 1019c42f..c11e14b1 100644 --- a/man/define_key.3x +++ b/man/define_key.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,16 +26,16 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1997 +.\" Author: Thomas E. Dickey 1997 .\" -.\" $Id: define_key.3x,v 1.8 2002/02/16 22:39:52 tom Exp $ +.\" $Id: define_key.3x,v 1.10 2003/10/25 20:33:16 tom Exp $ .TH define_key 3X "" .SH NAME \fBdefine_key\fP \- define a keycode .SH SYNOPSIS \fB#include \fP -\fBint define_key(char *definition, int keycode);\fP +\fBint define_key(const char *definition, int keycode);\fP .SH DESCRIPTION This is an extension to the curses library. It permits an application to define keycodes with their corresponding control diff --git a/man/form_field.3x b/man/form_field.3x index f452036b..e916bf18 100644 --- a/man/form_field.3x +++ b/man/form_field.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field.3x,v 1.5 1998/11/29 01:05:52 Rick.Ohnemus Exp $ +.\" $Id: form_field.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $ .TH form_field 3X "" .SH NAME \fBform_field\fR - make and break connections between fields and forms @@ -50,7 +50,7 @@ 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 move the given field (which must be disconnected) +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. diff --git a/man/form_field_buffer.3x b/man/form_field_buffer.3x index 814c5d9d..7595f53e 100644 --- a/man/form_field_buffer.3x +++ b/man/form_field_buffer.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_buffer.3x,v 1.9 2002/01/19 22:48:23 tom Exp $ +.\" $Id: form_field_buffer.3x,v 1.10 2003/05/10 20:22:01 tom Exp $ .TH form_field_buffer 3X "" .SH NAME \fBform_field_buffer\fR - field buffer control @@ -50,7 +50,7 @@ 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 +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 diff --git a/man/form_field_just.3x b/man/form_field_just.3x index 9468d8b7..61b62b88 100644 --- a/man/form_field_just.3x +++ b/man/form_field_just.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_just.3x,v 1.6 2002/01/19 22:48:41 tom Exp $ +.\" $Id: form_field_just.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $ .TH form_field_just 3X "" .SH NAME \fBform_field_just\fR - retrieve field characteristics @@ -48,7 +48,7 @@ JUSTIFY_LEFT, or JUSTIFY_CENTER. The function \fBfield_just\fR returns one of: NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. -The function \fBset_field_just\fR return one of the following: +The function \fBset_field_just\fR returns one of the following: .TP 5 \fBE_OK\fR The routine succeeded. diff --git a/man/form_field_new.3x b/man/form_field_new.3x index 96915205..a8174a5c 100644 --- a/man/form_field_new.3x +++ b/man/form_field_new.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_new.3x,v 1.11 2002/02/16 22:39:52 tom Exp $ +.\" $Id: form_field_new.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ .TH form_field_new 3X "" .SH NAME \fBform_field_new\fR - create and destroy form fields @@ -84,7 +84,7 @@ 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 on what gets copied and was not. +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. diff --git a/man/form_field_opts.3x b/man/form_field_opts.3x index 8f5e2def..8a3e5018 100644 --- a/man/form_field_opts.3x +++ b/man/form_field_opts.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_opts.3x,v 1.7 1998/11/29 01:06:54 Rick.Ohnemus Exp $ +.\" $Id: form_field_opts.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $ .TH form_field_opts 3X "" .SH NAME \fBform_field_opts\fR - set and get field options @@ -58,7 +58,7 @@ 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, +suppressed. .TP 5 O_ACTIVE The field is visited during processing. If this option is off, the field will @@ -79,7 +79,7 @@ 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 +Skip to the next field when this one fills. .TP 5 O_NULLOK Allow a blank field. diff --git a/man/form_field_validation.3x b/man/form_field_validation.3x index cc3d508d..c82abf3c 100644 --- a/man/form_field_validation.3x +++ b/man/form_field_validation.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,10 +26,10 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_validation.3x,v 1.12 2002/02/16 22:39:52 tom Exp $ +.\" $Id: form_field_validation.3x,v 1.14 2003/05/10 20:33:49 jmc Exp $ .TH form_field_validation 3X "" .SH NAME -\fBform_field_validation\fR - data type validation for fields +\fBform_field_validation\fR - data type validation for fields .SH SYNOPSIS \fB#include \fR .br @@ -38,10 +38,25 @@ int set_field_type(FIELD *field, FIELDTYPE *type, ...); 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 types are as follows: +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. @@ -56,27 +71,29 @@ case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a parti 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 to use a list that lives in automatic variables +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 +\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 or equal 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. +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 locale's, the decimal point character +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 or equal 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. +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 @@ -96,7 +113,7 @@ 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 diff --git a/man/form_fieldtype.3x b/man/form_fieldtype.3x index 69a8e208..979258a2 100644 --- a/man/form_fieldtype.3x +++ b/man/form_fieldtype.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_fieldtype.3x,v 1.9 2001/08/04 20:36:25 William.Setzer Exp $ +.\" $Id: form_fieldtype.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $ .TH form_fieldtype 3X "" .SH NAME \fBform_fieldtype\fR - define validation-field types @@ -57,7 +57,7 @@ FIELDTYPE *link_fieldtype(FIELDTYPE *type1, .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 attempt to leave a field. +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. @@ -69,22 +69,31 @@ 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\fR associates three storage-management functions -with a field type. The \fImak_arg\fR function is automatically applied to the +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 \fImak_arg\fR function, -the other two are optional, you may supply NULL for them. In this case it -is assumed, that \fImak_arg\fR doesn't allocate memory but simply loads the +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 +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 +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. diff --git a/man/infocmp.1m b/man/infocmp.1m index 9ecdfa3e..fe95d6f8 100644 --- a/man/infocmp.1m +++ b/man/infocmp.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,14 +27,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: infocmp.1m,v 1.30 2002/10/05 21:22:21 tom Exp $ +.\" $Id: infocmp.1m,v 1.34 2003/10/25 16:19:01 tom Exp $ .TH infocmp 1M "" .ds n 5 .ds d @TERMINFO@ .SH NAME \fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions .SH SYNOPSIS -\fBinfocmp\fR [\fB-\ +\fBinfocmp\fR [\fB\-\ 1\ C\ E\ @@ -58,9 +58,9 @@ t\ u\ \fR] .br - [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB-R \fR\fBsubset\fR] + [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-R \fR\fBsubset\fR] .br - [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR] + [\fB\-w\fR\ \fIwidth\fR] [\fB\-A\fR\ \fIdirectory\fR] [\fB\-B\fR\ \fIdirectory\fR] .br [\fItermname\fR...] .SH DESCRIPTION @@ -72,9 +72,9 @@ fields will be printed first, followed by the numeric fields, followed by the string fields. .SS Default Options If no options are specified and zero or one \fItermnames\fR are specified, the -\fB-I\fR option will be assumed. If more than one \fItermname\fR is specified, -the \fB-d\fR option will be assumed. -.SS Comparison Options [-d] [-c] [-n] +\fB\-I\fR option will be assumed. If more than one \fItermname\fR is specified, +the \fB\-d\fR option will be assumed. +.SS Comparison Options [\-d] [\-c] [\-n] \fBinfocmp\fR compares the \fBterminfo\fR description of the first terminal \fItermname\fR with each of the descriptions given by the entries for the other terminal's \fItermnames\fR. If a capability is defined for only one of the @@ -82,35 +82,35 @@ terminals, the value returned will depend on the type of the capability: \fBF\fR for boolean variables, \fB-1\fR for integer variables, and \fBNULL\fR for string variables. -The \fB-d\fR option produces a list of each capability that is different +The \fB\-d\fR option produces a list of each capability that is different between two entries. This option is useful to show the difference between two entries, created by different people, for the same or similar terminals. -The \fB-c\fR option produces a list of each capability that is common between +The \fB\-c\fR option produces a list of each capability that is common between two entries. Capabilities that are not set are ignored. This option can be -used as a quick check to see if the \fB-u\fR option is worth using. +used as a quick check to see if the \fB\-u\fR option is worth using. -The \fB-n\fR option produces a list of each capability that is in neither +The \fB\-n\fR option produces a list of each capability that is in neither entry. If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be used for both of the \fItermnames\fR. This can be used as a quick check to see if anything was left out of a description. -.SS Source Listing Options [-I] [-L] [-C] [-r] -The \fB-I\fR, \fB-L\fR, and \fB-C\fR options will produce a source listing for +.SS Source Listing Options [\-I] [\-L] [\-C] [\-r] +The \fB\-I\fR, \fB\-L\fR, and \fB\-C\fR options will produce a source listing for each terminal named. .TS center tab(/) ; l l . -\fB-I\fR/use the \fBterminfo\fR names -\fB-L\fR/use the long C variable name listed in <\fBterm.h\fR> -\fB-C\fR/use the \fBtermcap\fR names -\fB-r\fR/when using \fB-C\fR, put out all capabilities in \fBtermcap\fR form +\fB\-I\fR/use the \fBterminfo\fR names +\fB\-L\fR/use the long C variable name listed in <\fBterm.h\fR> +\fB\-C\fR/use the \fBtermcap\fR names +\fB\-r\fR/when using \fB\-C\fR, put out all capabilities in \fBtermcap\fR form .TE If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be used for the terminal name. -The source produced by the \fB-C\fR option may be used directly as a +The source produced by the \fB\-C\fR option may be used directly as a \fBtermcap\fR entry, but not all parameterized strings can be changed to the \fBtermcap\fR format. \fBinfocmp\fR will attempt to convert most of the parameterized information, and anything not converted will be plainly marked in @@ -123,7 +123,7 @@ padding (padding information with a trailing '/') will become optional. All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which are derivable from other \fBterminfo\fR variables, will be output. Not all \fBterminfo\fR capabilities will be translated; only those variables which were -part of \fBtermcap\fR will normally be output. Specifying the \fB-r\fR option +part of \fBtermcap\fR will normally be output. Specifying the \fB\-r\fR option will take off this restriction, allowing all capabilities to be output in \fItermcap\fR form. @@ -151,8 +151,8 @@ l l l. \fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept \fB%p2\fR is printed before \fB%p1/%r\fR/hp .TE -.SS Use= Option [-u] -The \fB-u\fR option produces a \fBterminfo\fR source description of the first +.SS Use= Option [\-u] +The \fB\-u\fR option produces a \fBterminfo\fR source description of the first terminal \fItermname\fR which is relative to the sum of the descriptions given by the entries for the other terminals \fItermnames\fR. It does this by analyzing the differences between the first \fItermname\fR and the other @@ -187,29 +187,29 @@ Another error that does not cause incorrect compiled files, but will slow down the compilation time, is specifying extra \fBuse=\fR fields that are superfluous. \fBinfocmp\fR will flag any other \fItermname use=\fR fields that were not needed. -.SS Changing Databases [-A \fIdirectory\fR] [-B \fIdirectory\fR] +.SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR] The location of the compiled \fBterminfo\fR database is taken from the environment variable \fBTERMINFO\fR . If the variable is not defined, or the terminal is not found in that location, the system \fBterminfo\fR database, -in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR -and \fB-B\fR may be used to override this location. The \fB-A\fR option will -set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will +in \fB@TERMINFO@\fR, will be used. The options \fB\-A\fR +and \fB\-B\fR may be used to override this location. The \fB\-A\fR option will +set \fBTERMINFO\fR for the first \fItermname\fR and the \fB\-B\fR option will set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to compare descriptions for a terminal with the same name located in two different databases. This is useful for comparing descriptions for the same terminal created by different people. .SS Other Options .TP 5 -\fB-1\fR +\fB\-1\fR causes the fields to be printed out one to a line. Otherwise, the fields will be printed several to a line to a maximum width of 60 characters. .TP -\fB-a\fR +\fB\-a\fR tells \fBinfocmp\fP to retain commented-out capabilities rather than discarding them. Capabilities are commented by prefixing them with a period. .TP 5 -\fB-E\fR +\fB\-E\fR Dump the capabilities of the given terminal as tables, needed in the C initializer for a TERMTYPE structure (the terminal capability structure in the \fB\fR). @@ -218,17 +218,17 @@ for a given terminal type. The tables are all declared static, and are named according to the type and the name of the corresponding terminal entry. .sp -Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP +Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP options was not needed; but support for extended names required making the arrays of terminal capabilities separate from the TERMTYPE structure. .TP 5 -\fB-e\fR +\fB\-e\fR Dump the capabilities of the given terminal as a C initializer for a TERMTYPE structure (the terminal capability structure in the \fB\fR). This option is useful for preparing versions of the curses library hardwired for a given terminal type. .TP 5 -\fB-F\fR +\fB\-F\fR compare terminfo files. This assumes that two following arguments are filenames. The files are searched for pairwise matches between entries, with two entries considered to match if any of their names do. @@ -237,21 +237,21 @@ the other file, and entries with more than one match. For entries with exactly one match it includes a difference report. Normally, to reduce the volume of the report, use references are not resolved before looking for differences, but resolution can be forced -by also specifying \fB-r\fR. +by also specifying \fB\-r\fR. .TP 5 -\fB-f\fR +\fB\-f\fR Display complex terminfo strings which contain if/then/else/endif expressions indented for readability. .TP 5 -\fB-G\fR +\fB\-G\fR Display constant literals in decimal form rather than their character equivalents. .TP 5 -\fB-g\fR +\fB\-g\fR Display constant character literals in quoted form rather than their decimal equivalents. .TP 5 -\fB-i\fR +\fB\-i\fR Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry. For each string, the code tries to analyze it into actions in terms of the other capabilities in the @@ -302,17 +302,17 @@ REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `-' (turn off). An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}). .TP 5 -\bB-l\fR +\fB\-l\fR Set output format to terminfo. .TP 5 -\fB-p\fR +\fB\-p\fR Ignore padding specifications when comparing strings. .TP 5 -\fB-q\fR +\fB\-q\fR Make the comparison listing shorter by omitting subheadings, and using "-" for absent capabilities, "@" for canceled rather than "NULL". .TP 5 -\fB-R\fR\fIsubset\fR +\fB\-R\fR\fIsubset\fR Restrict output to a given subset. This option is for use with archaic versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support the full set of SVR4/XSI Curses terminfo; and variants such as AIX @@ -321,8 +321,8 @@ subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for details. You can also choose the subset "BSD" which selects only capabilities with termcap equivalents recognized by 4.4BSD. .TP -\fB-s \fR\fI[d|i|l|c]\fR -The \fB-s\fR option sorts the fields within each type according to the argument +\fB\-s \fR\fI[d|i|l|c]\fR +The \fB\-s\fR option sorts the fields within each type according to the argument below: .br .RS 5 @@ -340,30 +340,30 @@ sort by the long C variable name. sort by the \fItermcap\fR name. .RE .IP -If the \fB-s\fR option is not given, the fields printed out will be +If the \fB\-s\fR option is not given, the fields printed out will be sorted alphabetically by the \fBterminfo\fR name within each type, -except in the case of the \fB-C\fR or the \fB-L\fR options, which cause the +except in the case of the \fB\-C\fR or the \fB\-L\fR options, which cause the sorting to be done by the \fBtermcap\fR name or the long C variable name, respectively. .TP 5 -\fB-T\fR +\fB\-T\fR eliminates size-restrictions on the generated text. This is mainly useful for testing and analysis, since the compiled descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). .TP -\fB-t\fR +\fB\-t\fR tells \fBtic\fP to discard commented-out capabilities. Normally when translating from terminfo to termcap, untranslatable capabilities are commented-out. .TP 5 -\fB-V\fR +\fB\-V\fR reports the version of ncurses which was used in this program, and exits. .TP 5 -\fB-v\fR \fIn\fR +\fB\-v\fR \fIn\fR prints out tracing information on standard error as the program runs. Higher values of n induce greater verbosity. .TP 5 -\fB-w\fR \fIwidth\fR +\fB\-w\fR \fIwidth\fR changes the output to \fIwidth\fR characters. .SH FILES .TP 20 @@ -371,28 +371,28 @@ changes the output to \fIwidth\fR characters. Compiled terminal description database. .SH EXTENSIONS The -\fB-E\fR, -\fB-F\fR, -\fB-G\fR, -\fB-R\fR, -\fB-T\fR, -\fB-V\fR, -\fB-a\fR, -\fB-e\fR, -\fB-f\fR, -\fB-g\fR, -\fB-i\fR, -\fB-l\fR, -\fB-p\fR, -\fB-q\fR and -\fB-t\fR +\fB\-E\fR, +\fB\-F\fR, +\fB\-G\fR, +\fB\-R\fR, +\fB\-T\fR, +\fB\-V\fR, +\fB\-a\fR, +\fB\-e\fR, +\fB\-f\fR, +\fB\-g\fR, +\fB\-i\fR, +\fB\-l\fR, +\fB\-p\fR, +\fB\-q\fR and +\fB\-t\fR options are not supported in SVr4 curses. -The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's. +The \fB\-r\fR option's notion of `termcap' capabilities is System V Release 4's. Actual BSD curses versions will have a more restricted set. To see only the -4.4BSD set, use -r -RBSD. +4.4BSD set, use \fB\-r\fR \fB\-RBSD\fR. .SH BUGS -The -F option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode. +The \fB\-F\fR option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode. .SH SEE ALSO \fBinfocmp\fR(1M), \fBcaptoinfo\fR(1M), \fBinfotocap\fR(1M), \fBtic\fR(1M), \fBtoe\fR(1M), @@ -401,7 +401,7 @@ The -F option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode. Eric S. Raymond and .br -Thomas E. Dickey +Thomas E. Dickey .\"# .\"# The following sets edit modes for GNU EMACS .\"# Local Variables: diff --git a/man/infotocap.1m b/man/infotocap.1m index ef8735b7..f1845842 100644 --- a/man/infotocap.1m +++ b/man/infotocap.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1999,2000 Free Software Foundation, Inc. * +.\" Copyright (c) 1999-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 * @@ -27,40 +27,40 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: infotocap.1m,v 1.3 2000/08/13 01:56:03 tom Exp $ +.\" $Id: infotocap.1m,v 1.4 2003/05/11 00:32:53 tom Exp $ .TH infotocap 1M "" .ds n 5 .ds d @TERMINFO@ .SH NAME \fBinfotocap\fR - convert a \fIterminfo\fR description into a \fItermcap\fR description .SH SYNOPSIS -\fBinfotocap\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . . +\fBinfotocap\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . . .SH DESCRIPTION \fBinfotocap\fR looks in \fIfile\fR for \fBterminfo\fR descriptions. For each one found, an equivalent \fBtermcap\fR description is written to standard output. Terminfo \fBuse\fR capabilities are translated directly to termcap \fBtc\fR capabilities. .TP 5 -\fB-v\fR +\fB\-v\fR print out tracing information on standard error as the program runs. .TP 5 -\fB-V\fR +\fB\-V\fR print out the version of the program in use on standard error and exit. .TP 5 -\fB-1\fR +\fB\-1\fR cause the fields to print out one to a line. Otherwise, the fields will be printed several to a line to a maximum width of 60 characters. .TP 5 -\fB-w\fR +\fB\-w\fR change the output to \fIwidth\fR characters. .SH FILES .TP 20 \*d Compiled terminal description database. .SH NOTES -This utility is actually a link to \fItic\fR(1M), running in \fI-C\fR mode. -You can use other \fItic\fR options such as \fB-f\fR and \fB-x\fR. +This utility is actually a link to \fItic\fR(1M), running in \fI\-C\fR mode. +You can use other \fItic\fR options such as \fB\-f\fR and \fB\-x\fR. .SH SEE ALSO \fBcurses\fR(3X), \fBtic\fR(1M), diff --git a/man/key_defined.3x b/man/key_defined.3x new file mode 100644 index 00000000..574e524c --- /dev/null +++ b/man/key_defined.3x @@ -0,0 +1,60 @@ +.\"*************************************************************************** +.\" 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 $ +.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/man/keybound.3x b/man/keybound.3x index 79c480cf..61074e43 100644 --- a/man/keybound.3x +++ b/man/keybound.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1999 +.\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.3 2002/02/16 22:30:36 tom Exp $ +.\" $Id: keybound.3x,v 1.5 2003/10/25 20:33:16 tom Exp $ .TH keyok 3X "" .SH NAME \fBkeybound\fP \- return definition of keycode @@ -41,9 +41,12 @@ 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 keycode must be greater than zero, else NULL is returned. +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. -Otherwise, the function returns a string, which must be freed by the caller. +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 diff --git a/man/keyok.3x b/man/keyok.3x index e3f2287a..f9209089 100644 --- a/man/keyok.3x +++ b/man/keyok.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1997 +.\" Author: Thomas E. Dickey 1997 .\" -.\" $Id: keyok.3x,v 1.7 2002/02/16 22:40:59 tom Exp $ +.\" $Id: keyok.3x,v 1.8 2003/10/25 20:41:08 tom Exp $ .TH keyok 3X "" .SH NAME \fBkeyok\fP \- enable or disable a keycode diff --git a/man/make_sed.sh b/man/make_sed.sh index c6c37c25..766801d5 100755 --- a/man/make_sed.sh +++ b/man/make_sed.sh @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: make_sed.sh,v 1.5 1998/02/11 12:13:48 tom Exp $ +# $Id: make_sed.sh,v 1.7 2003/10/25 20:33:16 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# 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"), # @@ -28,7 +28,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey 1997 # # Construct a sed-script to perform renaming within man-pages. Originally # written in much simpler form, this one accounts for the common cases of @@ -47,7 +47,7 @@ RESULT=result$$ rm -f $UPPER $SCRIPT $RESULT trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0 1 2 5 15 fgrep -v \# $1 | \ -sed -e 's/[ ]\+/ /g' >$INPUT +sed -e 's/[ ][ ]*/ /g' >$INPUT for F in 1 2 3 4 do diff --git a/man/man_db.renames b/man/man_db.renames index 7aaf1de2..ff5546b3 100644 --- a/man/man_db.renames +++ b/man/man_db.renames @@ -1,4 +1,4 @@ -# $Id: man_db.renames,v 0.31 2002/04/13 21:49:08 tom Exp $ +# $Id: man_db.renames,v 0.32 2003/05/31 17:27:11 tom Exp $ # Manual-page renamings for the man_db program # # Files: @@ -89,6 +89,7 @@ infocmp.1m infocmp.1 infotocap.1m infotocap.1 keybound.3x keybound.3ncurses keyok.3x keyok.3ncurses +key_defined.3x key_defined.3ncurses menu.3x menu.3menu menu_attributes.3x attributes.3menu menu_cursor.3x cursor.3menu diff --git a/man/manlinks.sed b/man/manlinks.sed index 5babc5db..4da7790d 100644 --- a/man/manlinks.sed +++ b/man/manlinks.sed @@ -1,6 +1,6 @@ -# $Id: manlinks.sed,v 1.10 2002/09/21 19:02:03 tom Exp $ +# $Id: manlinks.sed,v 1.12 2003/12/20 13:17:56 tom Exp $ ############################################################################## -# Copyright (c) 2000,2002 Free Software Foundation, Inc. # +# Copyright (c) 2000-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"), # @@ -29,6 +29,8 @@ # Given a manpage (nroff) as input, writes a list of the names that are # listed in the "NAME" section, i.e., the names that we would like to use # as aliases for the manpage -T.Dickey +# +# eliminate formatting controls that get in the way /^'\\"/d /\.\\"/d /^\.br/d @@ -36,34 +38,64 @@ s/^\.IX// s/\\f.//g s/[:,]/ /g +# +# eliminate unnecessary whitespace, convert multiple blanks to single space s/^[ ][ ]*// s/[ ][ ]*$// s/[ ][ ]*/ /g +# +# convert ".SH" into a more manageable form s/\.SH[ ][ ]*/.SH_(/ # +# in ".SH NAME" +# change "\-" to "-", eliminate text after "-", and split the remaining lines +# at each space, making a list of names: /^\.SH_(NAME/,/^\.SH_(SYNOPSIS/{ s/\\-.*/ -/ / -/{ - s/ -.*// - s/ /\ +s/ -.*// +s/ /\ /g } /^-/{ - d +d } s/ /\ /g } +# +# in ".SH SYNOPSIS" +# remove any line that does not contain a '(', since we only want functions. +# then strip off return-type of each function. +# finally, remove the parameter list, which begins with a '('. /^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{ - /^#/d - /^[^(]*$/d - s/^\([^ (]* [^ (]* [*]*\)//g - s/^\([^ (]* [*]*\)//g - s/\.SH_(/.SH_/ - s/(.*// - s/\.SH_/.SH_(/ +/^[^(]*$/d +# reduce +# .B "int add_wch( const cchar_t *\fIwch\fB );" +# to +# add_wch( const cchar_t *\fIwch\fB );" +s/^\([^ (]* [^ (]* [*]*\)//g +s/^\([^ (]* [*]*\)//g +# trim blanks in case we have +# void (*) (FORM *) field_init(const FORM *form); +s/) (/)(/g +# reduce stuff like +# void (*)(FORM *) field_init(const FORM *form); +# to +# field_init(const FORM *form); +s/^\(([^)]*)\)\(([^)]*)\)*[ ]*//g +# rename marker temporarily +s/\.SH_(/.SH_/ +# kill lines with ");", and trim off beginning of argument list. +s/[()].*// +# rename marker back +s/\.SH_/.SH_(/ } +# +# delete ".SH DESCRIPTION" and following lines /^\.SH_(DESCRIPTION/,${ - d +d } +# +# delete any remaining directives /^\./d diff --git a/man/menu_driver.3x b/man/menu_driver.3x index 0e6f9e02..1651724b 100644 --- a/man/menu_driver.3x +++ b/man/menu_driver.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_driver.3x,v 1.10 2002/02/16 22:40:59 tom Exp $ +.\" $Id: menu_driver.3x,v 1.11 2003/05/10 20:22:01 tom Exp $ .TH menu_driver 3X "" .SH NAME \fBmenu_driver\fR - command-processing loop of the menu system @@ -115,10 +115,10 @@ 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 +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. +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 diff --git a/man/menu_pattern.3x b/man/menu_pattern.3x index 990a9dc5..2fdc09a6 100644 --- a/man/menu_pattern.3x +++ b/man/menu_pattern.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_pattern.3x,v 1.7 2002/02/16 22:40:59 tom Exp $ +.\" $Id: menu_pattern.3x,v 1.8 2003/05/10 20:22:01 tom Exp $ .TH menu_pattern 3X "" .SH NAME \fBmenu_pattern\fR - get and set a menu's pattern buffer @@ -44,7 +44,7 @@ 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. +current; if not, the current item does not change. The function \fBmenu_pattern\fR returns the pattern buffer of the given \fImenu\fR. diff --git a/man/mitem_new.3x b/man/mitem_new.3x index 06538401..afba950b 100644 --- a/man/mitem_new.3x +++ b/man/mitem_new.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_new.3x,v 1.7 1998/11/29 01:11:38 Rick.Ohnemus Exp $ +.\" $Id: mitem_new.3x,v 1.8 2003/10/25 20:08:57 Jared.Yanovich Exp $ .TH mitem_new 3X "" .SH NAME \fBmitem_new\fR - create and destroy menu items @@ -42,7 +42,7 @@ int free_item(ITEM *item); 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 carefull with names +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 diff --git a/man/ncurses.3x b/man/ncurses.3x index f5abde44..0c87dd8d 100644 --- a/man/ncurses.3x +++ b/man/ncurses.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,1999,2001,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: ncurses.3x,v 1.63 2002/08/10 21:56:07 tom Exp $ +.\" $Id: ncurses.3x,v 1.70 2004/01/11 01:45:54 tom Exp $ .hy 0 .TH ncurses 3X "" .ds n 5 @@ -42,61 +42,61 @@ 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 @@ -104,17 +104,17 @@ 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 @@ -123,75 +123,74 @@ 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 @@ -322,6 +321,7 @@ 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) @@ -612,13 +612,13 @@ wvline_set/\fBcurs_border_set\fR(3X) 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, \fBgetmaxyx\fR. The return +\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 (\fIi\fR.\fIe\fR., these should not be used as the +\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 @@ -629,7 +629,7 @@ 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. +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 @@ -646,18 +646,18 @@ 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 @@ -665,13 +665,13 @@ 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 @@ -681,7 +681,7 @@ to the composed multi-click event as well as the individual clicks. 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 @@ -695,13 +695,13 @@ 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. @@ -733,11 +733,11 @@ 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. @@ -755,7 +755,7 @@ 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 @@ -769,7 +769,7 @@ 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. @@ -784,7 +784,7 @@ The complete list of directories in order follows: .RS .TP 3 - -the last directory to which \fBncurses\fR wrote, if any, is searched first. +the last directory to which \fBncurses\fR wrote, if any, is searched first .TP 3 - the directory specified by the TERMINFO symbol @@ -828,28 +828,29 @@ terminal capability database \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) +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. @@ -857,17 +858,14 @@ 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. Certain portions of the EXTENDED XSI Curses functionality -(including color support) are supported. The following EXTENDED XSI Curses -calls in support of wide (multibyte) characters are not yet implemented: -\fBpecho_wchar\fP, -\fBslk_wset\fP. +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 @@ -899,7 +897,7 @@ 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. diff --git a/man/panel.3x b/man/panel.3x index 7ebecc00..800ad32e 100644 --- a/man/panel.3x +++ b/man/panel.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: panel.3x,v 1.10 2000/08/13 01:56:47 tom Exp $ +.\" $Id: panel.3x,v 1.11 2003/05/17 22:44:09 jmc Exp $ .TH panel 3X "" .ds n 5 .ds d @TERMINFO@ @@ -77,7 +77,7 @@ The set of currently visible panels is the stack of panels. The of the stack. .P A window is associated with every panel. The panel routines enable -you to create, move, hides, and show panels, as well as position a +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 diff --git a/man/resizeterm.3x b/man/resizeterm.3x index 562c3532..da5d84df 100644 --- a/man/resizeterm.3x +++ b/man/resizeterm.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1996,1997,2002 +.\" Author: Thomas E. Dickey 1996,1997,2002 .\" -.\" $Id: resizeterm.3x,v 1.9 2002/02/16 22:32:24 tom Exp $ +.\" $Id: resizeterm.3x,v 1.10 2003/10/25 20:41:08 tom Exp $ .TH resizeterm 3X "" .SH NAME \fBis_term_resized\fR, diff --git a/man/term.5 b/man/term.5 index 1dcb87de..94b6df51 100644 --- a/man/term.5 +++ b/man/term.5 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: term.5,v 1.14 2002/08/10 21:59:37 tom Exp $ +.\" $Id: term.5,v 1.15 2003/05/10 20:33:49 jmc Exp $ .TH TERM 5 .ds n 5 .ds d @TERMINFO@ @@ -56,7 +56,7 @@ 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 +.I tic program, and read by the routine .IR setupterm . The file is divided into six parts: @@ -84,7 +84,7 @@ 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 +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). @@ -160,12 +160,12 @@ 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, +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 diff --git a/man/term.7 b/man/term.7 index 5d51e92e..e3be223b 100644 --- a/man/term.7 +++ b/man/term.7 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: term.7,v 1.13 2002/04/20 16:50:47 tom Exp $ +.\" $Id: term.7,v 1.14 2003/05/10 20:33:49 jmc Exp $ .TH TERM 7 .ds n 5 .ds d @TERMINFO@ @@ -96,7 +96,7 @@ terminals that also explains how to parse them: 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 +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 @@ -136,29 +136,29 @@ with another that has this suffix and uses magic cookies to support multiple attributes. .TP 5 -am -Enable auto-margin (right-margin wraparound) +Enable auto-margin (right-margin wraparound). .TP 5 -m -Mono mode - suppress color support +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 +No auto-margin - suppress am capability. .TP 5 -nl -No labels - suppress soft labels +No labels - suppress soft labels. .TP 5 -nsl -No status line - suppress status line +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) +Terminal in reverse video mode (black on white). .TP 5 -s Enable status line. @@ -190,10 +190,10 @@ should be unique within the first 14 characters. compiled terminal capability data base .TP 5 /etc/inittab -tty line initialization (AT&T-like UNIXes). +tty line initialization (AT&T-like UNIXes) .TP 5 /etc/ttys -tty line initialization (BSD-like UNIXes). +tty line initialization (BSD-like UNIXes) .SH SEE ALSO \fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBterm\fR(\*n). .\"# diff --git a/man/terminfo.tail b/man/terminfo.tail index bd585b12..fc6af2e0 100644 --- a/man/terminfo.tail +++ b/man/terminfo.tail @@ -1,4 +1,4 @@ -.\" $Id: terminfo.tail,v 1.35 2002/04/20 16:49:33 tom Exp $ +.\" $Id: terminfo.tail,v 1.38 2003/01/05 22:47:05 tom Exp $ .\" Beginning of terminfo.tail file .ps +1 .PP @@ -311,42 +311,81 @@ 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. -Often more complex operations are necessary. +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 -.DT -.nf -.ta .5i 1.5i - \s-1%% outputs `%' - %\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP - as in \fBprintf\fP, flags are [-+#] and space - %c print pop() like %c in printf() - %s print pop() like %s in printf() - - %p[1-9] push \fIi\fP'th parm - %P[a-z] set dynamic variable [a-z] to pop() - %g[a-z] get dynamic variable [a-z] and push it - %P[A-Z] set static variable [a-z] to pop() - %g[A-Z] get static variable [a-z] and push it - %'\fIc\fP' char constant \fIc\fP - %{\fInn\fP} integer constant \fInn\fP - %l push strlen(pop) - - %+ %- %* %/ %m - arithmetic (%m is mod): push(pop() op pop()) - %& %| %^ bit operations: push(pop() op pop()) - %= %> %< logical operations: push(pop() op pop()) - %A, %O logical and & or operations (for conditionals) - %! %~ unary operations push(op pop()) - %i add 1 to first two parameters (for ANSI terminals) - - %? expr %t thenpart %e elsepart %; - if-then-else, %e elsepart is optional. - else-if's are possible a la Algol 68: - %? 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 %; -\s+1 c\di\u are conditions, b\di\u are bodies. -.fi +.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}%-". @@ -1170,7 +1209,7 @@ defined." .PP The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a single numeric argument each. -Argument values 0-7 are portably defined as +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 @@ -1192,6 +1231,25 @@ 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 diff --git a/man/tic.1m b/man/tic.1m index 829fe400..29d52619 100644 --- a/man/tic.1m +++ b/man/tic.1m @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tic.1m,v 1.33 2002/10/05 20:06:13 tom Exp $ +.\" $Id: tic.1m,v 1.35 2003/05/11 00:32:53 tom Exp $ .TH tic 1M "" .ds n 5 .ds d @TERMINFO@ @@ -52,11 +52,11 @@ s\ t\ x\ \fR] -[\fB-e\fR \fInames\fR] -[\fB-o\fR \fIdir\fR] -[\fB-R\fR \fIsubset\fR] -[\fB-v\fR[\fIn\fR]] -[\fB-w\fR[\fIn\fR]] +[\fB\-e\fR \fInames\fR] +[\fB\-o\fR \fIdir\fR] +[\fB\-R\fR \fIsubset\fR] +[\fB\-v\fR[\fIn\fR]] +[\fB\-w\fR[\fIn\fR]] \fIfile\fR .br .SH DESCRIPTION @@ -78,31 +78,31 @@ Libraries that read terminfo entries are expected to check for a TERMINFO directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and finally look in \fI\*d\fR. .TP -\fB-1\fR +\fB\-1\fR restricts the output to a single column .TP -\fB-a\fR +\fB\-a\fR tells \fBtic\fP to retain commented-out capabilities rather than discarding them. Capabilities are commented by prefixing them with a period. -This sets the \fB-x\fR option, because it treats the commented-out +This sets the \fB\-x\fR option, because it treats the commented-out entries as user-defined names. .TP -\fB-C\fR -Force source translation to termcap format. Note: this differs from the -C +\fB\-C\fR +Force source translation to termcap format. Note: this differs from the \fB\-C\fR option of \fIinfocmp\fR(1M) in that it does not merely translate capability names, but also translates terminfo strings to termcap format. Capabilities that are not translatable are left in the entry under their terminfo names but commented out with two preceding dots. .TP -\fB-c\fR +\fB\-c\fR tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and -bad use links. If you specify \fB-C\fR (\fB-I\fR) with this option, the code +bad use links. If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code will print warnings about entries which, after use resolution, are more than 1023 (4096) bytes long. Due to a fixed buffer length in older termcap libraries (and a documented limit in terminfo), these entries may cause core dumps. .TP -\fB-e \fR\fInames\fR +\fB\-e \fR\fInames\fR Limit writes and translations to the following comma-separated list of terminals. If any name or alias of a terminal matches one of the names in @@ -110,32 +110,32 @@ the list, the entry will be written or translated as normal. Otherwise no output will be generated for it. The option value is interpreted as a file containing the list if it contains a '/'. -(Note: depending on how tic was compiled, this option may require -I or -C.) +(Note: depending on how tic was compiled, this option may require \fB\-I\fR or \fB\-C\fR.) .TP -\fB-f\fR +\fB\-f\fR Display complex terminfo strings which contain if/then/else/endif expressions indented for readability. .TP -\fB-G\fR +\fB\-G\fR Display constant literals in decimal form rather than their character equivalents. .TP -\fB-g\fR +\fB\-g\fR Display constant character literals in quoted form rather than their decimal equivalents. .TP -\fB-I\fR +\fB\-I\fR Force source translation to terminfo format. .TP -\fB-L\fR +\fB\-L\fR Force source translation to terminfo format using the long C variable names listed in <\fBterm.h\fR> .TP -\fB-N\fR -Disable smart defaults. -Normally, when translating from termcap to terminfo, the compiler makes +\fB\-N\fR +Disable smart defaults. +Normally, when translating from termcap to terminfo, the compiler makes a number of assumptions about the defaults of string capabilities -\fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR, +\fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR, \fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR, \fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts to use obsolete termcap capabilities to deduce correct values. It also @@ -143,42 +143,42 @@ normally suppresses output of obsolete termcap capabilities such as \fBbs\fR. This option forces a more literal translation that also preserves the obsolete capabilities. .TP -\fB-o\fR\fIdir\fR +\fB\-o\fR\fIdir\fR Write compiled entries to given directory. Overrides the TERMINFO environment variable. .TP -\fB-R\fR\fIsubset\fR +\fB\-R\fR\fIsubset\fR Restrict output to a given subset. This option is for use with archaic versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x that have their own extensions incompatible with SVr4/XSI. Available subsets are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details. .TP -\fB-r\fR +\fB\-r\fR Force entry resolution (so there are no remaining tc capabilities) even when doing translation to termcap format. This may be needed if you are preparing a termcap file for a termcap library (such as GNU termcap through version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple tc capabilities per entry. .TP -\fB-s\fR +\fB\-s\fR Summarize the compile by showing the directory into which entries are written, and the number of entries which are compiled. .TP -\fB-T\fR +\fB\-T\fR eliminates size-restrictions on the generated text. This is mainly useful for testing and analysis, since the compiled descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). .TP -\fB-t\fR +\fB\-t\fR tells \fBtic\fP to discard commented-out capabilities. Normally when translating from terminfo to termcap, untranslatable capabilities are commented-out. .TP -\fB-V\fR +\fB\-V\fR reports the version of ncurses which was used in this program, and exits. .TP -\fB-v\fR\fIn\fR +\fB\-v\fR\fIn\fR specifies that (verbose) output be written to standard error trace information showing \fBtic\fR's progress. The optional integer \fIn\fR is a number from 1 to 10, inclusive, indicating the desired @@ -186,10 +186,10 @@ level of detail of information. If \fIn\fR is omitted, the default level is 1. If \fIn\fR is specified and greater than 1, the level of detail is increased. .TP -\fB-w\fR\fIn\fR +\fB\-w\fR\fIn\fR specifies the width of the output. .TP -\fB-x\fR +\fB\-x\fR Treat unknown capabilities as user-defined. That is, if you supply a capability name which \fBtic\fP does not recognize, it will infer its type (boolean, number or string) from the syntax and @@ -274,25 +274,25 @@ The error messages from this \fBtic\fR have the same format as GNU C error messages, and can be parsed by GNU Emacs's compile facility. The -\fB-C\fR, -\fB-G\fR, -\fB-I\fR, -\fB-N\fR, -\fB-R\fR, -\fB-T\fR, -\fB-V\fR, -\fB-a\fR, -\fB-e\fR, -\fB-f\fR, -\fB-g\fR, -\fB-o\fR, -\fB-r\fR, -\fB-s\fR, -\fB-t\fR and -\fB-x\fR +\fB\-C\fR, +\fB\-G\fR, +\fB\-I\fR, +\fB\-N\fR, +\fB\-R\fR, +\fB\-T\fR, +\fB\-V\fR, +\fB\-a\fR, +\fB\-e\fR, +\fB\-f\fR, +\fB\-g\fR, +\fB\-o\fR, +\fB\-r\fR, +\fB\-s\fR, +\fB\-t\fR and +\fB\-x\fR options are not supported under SVr4. -The SVr4 -c mode does not report bad use links. +The SVr4 \fB\-c\fR mode does not report bad use links. System V does not compile entries to or read entries from your \fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it. diff --git a/man/toe.1m b/man/toe.1m index 399cf614..4e69f55f 100644 --- a/man/toe.1m +++ b/man/toe.1m @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,45 +26,45 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: toe.1m,v 1.10 2000/08/19 18:51:05 tom Exp $ +.\" $Id: toe.1m,v 1.12 2003/05/11 00:32:53 tom Exp $ .TH toe 1M "" .ds n 5 .ds d @TERMINFO@ .SH NAME \fBtoe\fR - table of (terminfo) entries .SH SYNOPSIS -\fBtoe\fR [\fB-v\fR[\fIn\fR]] [\fB-huUV\fR] \fIfile...\fR +\fBtoe\fR [\fB\-v\fR[\fIn\fR]] [\fB\-huUV\fR] \fIfile...\fR .br .SH DESCRIPTION .PP With no options, \fBtoe\fR lists all available terminal types by primary name with descriptions. File arguments specify the directories to be scanned; if no such arguments are given, your default terminfo directory is scanned. If you -also specify the -h option, a directory header will be issued as each -directory is entered. +also specify the \fB\-h\fR option, a directory header will be issued as each +directory is entered. .PP There are other options intended for use by terminfo file maintainers: .TP -\fB-u\fR \fIfile\fR +\fB\-u\fR \fIfile\fR says to issue a report on dependencies in the given file. This report condenses the `use' relation: each line consists of the primary name of a terminal that has use capabilities, followed by a colon, followed by the whitespace-separated primary names of all terminals which occur in those use capabilities, followed by a newline .TP -\fB-U\fR \fIfile\fR +\fB\-U\fR \fIfile\fR says to issue a report on reverse dependencies in the given file. This report reverses the `use' relation: each line consists of the primary name of a terminal that occurs in use capabilities, followed by a colon, followed by the whitespace-separated primary names of all terminals which depend on it, followed by a newline. .TP -\fB-v\fR\fIn\fR +\fB\-v\fR\fIn\fR specifies that (verbose) output be written to standard error trace information showing \fBtoe\fR's progress. The optional integer \fIn\fR is a number from 1 to 10, interpreted as for \fBtic\fR(1). .TP 5 -\fB-V\fR +\fB\-V\fR reports the version of ncurses which was used in this program, and exits. .SH FILES .TP 5 diff --git a/man/tput.1 b/man/tput.1 index 7e73b0e0..c657a162 100644 --- a/man/tput.1 +++ b/man/tput.1 @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -27,24 +27,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tput.1,v 1.18 2002/10/12 13:53:20 tom Exp $ +.\" $Id: tput.1,v 1.20 2003/05/11 00:32:53 tom Exp $ .TH tput 1 "" .ds d @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 ... ] +\fBtput\fR [\fB\-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ] .br -\fBtput\fR [\fB-T\fR\fItype\fR] \fBinit\fR +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBinit\fR .br -\fBtput\fR [\fB-T\fR\fItype\fR] \fBreset\fR +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBreset\fR .br -\fBtput\fR [\fB-T\fR\fItype\fR] \fBlongname\fR +\fBtput\fR [\fB\-T\fR\fItype\fR] \fBlongname\fR .br -\fBtput -S\fR \fB<<\fR +\fBtput \-S\fR \fB<<\fR .br -\fBtput -V\fR +\fBtput \-V\fR .br .SH DESCRIPTION The \fBtput\fR utility uses the \fBterminfo\fR database to make the @@ -62,10 +62,10 @@ returned on standard output, the user should test the exit code For a complete list of capabilities and the \fIcapname\fR associated with each, see \fBterminfo\fR(\*n). .TP -\fB-T\fR\fItype\fR +\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 +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 @@ -83,14 +83,14 @@ 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. +\fBtput\fR writes the string without performing the substitution. .TP -\fB-S\fR +\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 +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 @@ -98,12 +98,12 @@ 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 +\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 +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 @@ -122,7 +122,7 @@ 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 +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)]. @@ -139,7 +139,7 @@ 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 +\fBtput \-T5620 reset\fR Reset an AT&T 5620 terminal, overriding the type of terminal in the environmental variable \fBTERM\fR. .TP 5 @@ -154,7 +154,7 @@ Echo the clear-screen sequence for the current terminal. \fBtput cols\fR Print the number of columns for the current terminal. .TP 5 -\fBtput -T450 cols\fR +\fBtput \-T450 cols\fR Print the number of columns for the 450 terminal. .TP 5 \fBbold=`tput smso` offbold=`tput rmso`\fR @@ -178,7 +178,7 @@ type of terminal specified in the environmental variable \fBTERM\fR. .PP .RS 5 -\fBtput -S < clear\fR .br @@ -213,7 +213,7 @@ 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, +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. @@ -221,7 +221,7 @@ 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, +If the \fB\-S\fR option is not used, the exit code depends on the type of \fIcapname\fR: .RS 5 .TP @@ -241,7 +241,7 @@ 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 +A value of \fB\-1\fR means that \fIcapname\fR is not defined for this terminal \fItype\fR. .TP .I other @@ -262,17 +262,17 @@ 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) +\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 +\fB>4\fR error occurred in \-S = .TE .SH PORTABILITY -The \fBlongname\fR and \fB-S\fR options, and the parameter-substitution +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 diff --git a/man/tset.1 b/man/tset.1 index 897d9edb..3a78b37b 100644 --- a/man/tset.1 +++ b/man/tset.1 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" 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 * @@ -26,14 +26,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tset.1,v 1.12 2000/09/09 20:33:07 tom Exp $ +.\" $Id: tset.1,v 1.13 2003/05/11 00:32:53 tom 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] +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] +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. @@ -50,7 +50,7 @@ System-V-like UNIXes, \fIgetty\fR does this job by setting .PP 4. The default terminal type, ``unknown''. .PP -If the terminal type was not specified on the command-line, the -m +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 @@ -81,50 +81,50 @@ Also, the terminal will often not echo the command. .PP The options are as follows: .TP 5 --q +.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 5 --e +.TP +.B \-e Set the erase character to \fIch\fR. -.TP 5 --I +.TP +.B \-I Do not send the terminal or tab initialization strings to the terminal. -.TP 5 --Q +.TP +.B \-Q Don't display any values for the erase, interrupt and line kill characters. .TP -\fB-V\fR +.B \-V reports the version of ncurses which was used in this program, and exits. -.TP 5 --i +.TP +.B \-i Set the interrupt character to \fIch\fR. -.TP 5 --k +.TP +.B \-k Set the line kill character to \fIch\fR. -.TP 5 --m +.TP +.B \-m Specify a mapping from a port type to a terminal. See below for more information. -.TP 5 --r +.TP +.B \-r Print the terminal type to the standard error output. -.TP 5 --s +.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 -e, -i, and -k +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 -s option. +This is done using the \fB\-s\fR option. .PP -When the -s option is specified, the commands to enter the information +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. @@ -132,7 +132,7 @@ 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 ... \` + eval \`tset \-s options ... \` .SH TERMINAL TYPE MAPPING When the terminal is not hardwired into the system (or the current @@ -142,13 +142,13 @@ 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 -m option is to map +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 -m option consists of an optional port type, an +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 @@ -159,7 +159,7 @@ 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 -m +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 @@ -174,16 +174,16 @@ and the baud rate is greater than 9600 baud, a terminal type of .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 +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 -m option argument. +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 -m option argument be placed within single quote characters, +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 @@ -197,30 +197,33 @@ 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 -S option of BSD tset no longer works; it prints an error message to stderr -and dies. The -s option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these +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 +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 -A, -E, -h, -u and -v 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 -a, -d, and -p options are similarly +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 -m option instead. The --n option remains, but has no effect. The -adnp options are therefore +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 -e, -i, and -k options without +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 -Q +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 @@ -230,7 +233,7 @@ environment variables. .TP 5 /etc/ttys system port name to terminal type mapping database (BSD versions only). -.TP 5 +.TP @TERMINFO@ terminal capability database .SH SEE ALSO diff --git a/man/wresize.3x b/man/wresize.3x index 62933f1a..ce7c10b8 100644 --- a/man/wresize.3x +++ b/man/wresize.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. * +.\" 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 * @@ -26,9 +26,9 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1996 +.\" Author: Thomas E. Dickey 1996 .\" -.\" $Id: wresize.3x,v 1.7 2002/02/16 22:40:59 tom Exp $ +.\" $Id: wresize.3x,v 1.8 2003/10/25 20:41:08 tom Exp $ .TH wresize 3X "" .SH NAME \fBwresize\fR - resize a curses window diff --git a/menu/Makefile.in b/menu/Makefile.in index b5c7b68c..28152290 100644 --- a/menu/Makefile.in +++ b/menu/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.36 2002/01/20 01:49:17 tom Exp $ +# $Id: Makefile.in,v 1.41 2003/11/01 22:44:33 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -45,6 +45,9 @@ SHELL = /bin/sh THIS = Makefile +x = @EXEEXT@ +o = .@OBJEXT@ + MODEL = @DFT_LWR_MODEL@ DESTDIR = @DESTDIR@ srcdir = @srcdir@ @@ -55,6 +58,11 @@ libdir = @libdir@ includedir = @includedir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ @@ -71,8 +79,7 @@ CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ \ - -DHAVE_CONFIG_H +CPPFLAGS = -DHAVE_CONFIG_H @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -84,7 +91,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL) $(CC) +LINK = $(LIBTOOL_LINK) $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -97,7 +104,7 @@ NCURSES_MINOR = @NCURSES_MINOR@ REL_VERSION = @cf_cv_rel_version@ ABI_VERSION = @cf_cv_abi_version@ -RANLIB = @RANLIB@ +RANLIB = @LIB_PREP@ IMPORT_LIB = @IMPORT_LIB@ SHARED_LIB = @SHARED_LIB@ diff --git a/menu/READ.ME b/menu/READ.ME index 7867bc94..e3a7e524 100644 --- a/menu/READ.ME +++ b/menu/READ.ME @@ -1,3 +1,5 @@ +-- $Id: READ.ME,v 1.8 2003/10/25 15:22:35 tom Exp $ +------------------------------------------------------------------------------- This is a clone of the menu library that is available with typical System V curses implementations (ETI). @@ -10,6 +12,3 @@ For things that still need doing, see the TO-DO file in the top-level directory. Juergen Pfeifer - -Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en - diff --git a/menu/eti.h b/menu/eti.h index d46636b0..baa6190d 100644 --- a/menu/eti.h +++ b/menu/eti.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: eti.h,v 1.8 2003/10/25 15:24:29 tom Exp $ */ + #ifndef NCURSES_ETI_H_incl #define NCURSES_ETI_H_incl 1 diff --git a/menu/m_attribs.c b/menu/m_attribs.c index 34db8802..b36ccc15 100644 --- a/menu/m_attribs.c +++ b/menu/m_attribs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_attribs.c,v 1.10 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_attribs.c,v 1.12 2003/11/08 20:54:20 tom Exp $") /* Macro to redraw menu if it is posted and changed */ #define Refresh_Menu(menu) \ @@ -63,7 +62,7 @@ NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\ RETURN(E_OK);\ } -/* "Template" macro to generate a function to get a menus attribute */ +/* "Template" macro to generate a function to get a menu's attribute */ #define GEN_MENU_ATTR_GET_FCT( name ) \ NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\ {\ @@ -75,7 +74,7 @@ NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\ | Function : int set_menu_fore(MENU *menu, chtype attr) | | Description : Set the attribute for selectable items. In single- -| valued menus thiis is used to highlight the current +| valued menus this is used to highlight the current | item ((i.e. where the cursor is), in multi-valued | menus this is used to highlight the selected items. | diff --git a/menu/m_cursor.c b/menu/m_cursor.c index 0ab3b7a3..11011dc1 100644 --- a/menu/m_cursor.c +++ b/menu/m_cursor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_cursor.c,v 1.15 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_cursor.c,v 1.16 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_driver.c b/menu/m_driver.c index d86100d7..215cb5fa 100644 --- a/menu/m_driver.c +++ b/menu/m_driver.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_driver.c,v 1.19 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_driver.c,v 1.20 2003/10/25 14:54:48 tom Exp $") /* Macros */ diff --git a/menu/m_format.c b/menu/m_format.c index 4f19f76c..3785e650 100644 --- a/menu/m_format.c +++ b/menu/m_format.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_format.c,v 1.11 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_format.c,v 1.12 2003/10/25 14:54:48 tom Exp $") #define minimum(a,b) ((a)<(b) ? (a): (b)) diff --git a/menu/m_global.c b/menu/m_global.c index b1f73f5c..542b484f 100644 --- a/menu/m_global.c +++ b/menu/m_global.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_global.c,v 1.14 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_global.c,v 1.16 2003/11/08 20:53:01 tom Exp $") static char mark[] = "-"; @@ -161,7 +160,7 @@ INLINE static void ResetConnectionInfo(MENU *menu, ITEM **items) | Decorate all the items with a number and a backward | pointer to the menu. | -| Return Values : TRUE - successfull connection +| Return Values : TRUE - successful connection | FALSE - connection failed +--------------------------------------------------------------------------*/ NCURSES_EXPORT(bool) @@ -265,9 +264,9 @@ _nc_Calculate_Item_Length_and_Width (MENU * menu) | Facility : libnmenu | Function : void _nc_Link_Item(MENU *menu) | -| Description : Statically calculate for every item its four neighbours. +| Description : Statically calculate for every item its four neighbors. | This depends on the orientation of the menu. This -| static aproach simplifies navigation in the menu a lot. +| static approach simplifies navigation in the menu a lot. | | Return Values : - +--------------------------------------------------------------------------*/ diff --git a/menu/m_hook.c b/menu/m_hook.c index 62f72978..51644a10 100644 --- a/menu/m_hook.c +++ b/menu/m_hook.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_hook.c,v 1.10 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_hook.c,v 1.11 2003/10/25 14:54:48 tom Exp $") /* "Template" macro to generate function to set application specific hook */ #define GEN_HOOK_SET_FUNCTION( typ, name ) \ diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c index 92215f3c..d4d6bb84 100644 --- a/menu/m_item_cur.c +++ b/menu/m_item_cur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_cur.c,v 1.13 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_cur.c,v 1.14 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c index 0a74c6c6..65eb5953 100644 --- a/menu/m_item_nam.c +++ b/menu/m_item_nam.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_nam.c,v 1.11 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_nam.c,v 1.12 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_item_new.c b/menu/m_item_new.c index 50dde292..788f53ee 100644 --- a/menu/m_item_new.c +++ b/menu/m_item_new.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -39,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_new.c,v 1.13 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_new.c,v 1.14 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c index c9aed839..5dcc06b6 100644 --- a/menu/m_item_opt.c +++ b/menu/m_item_opt.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_opt.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_opt.c,v 1.14 2003/11/08 20:50:19 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -96,7 +95,7 @@ NCURSES_EXPORT(int) item_opts_off (ITEM *item, Item_Options opts) { ITEM *citem = item; /* use a copy because set_item_opts must detect - NULL item itself to adjust its behaviour */ + NULL item itself to adjust its behavior */ if (opts & ~ALL_ITEM_OPTS) RETURN(E_BAD_ARGUMENT); @@ -121,7 +120,7 @@ NCURSES_EXPORT(int) item_opts_on (ITEM *item, Item_Options opts) { ITEM *citem = item; /* use a copy because set_item_opts must detect - NULL item itself to adjust its behaviour */ + NULL item itself to adjust its behavior */ opts &= ALL_ITEM_OPTS; if (opts & ~ALL_ITEM_OPTS) diff --git a/menu/m_item_top.c b/menu/m_item_top.c index 04eab641..0a0fb481 100644 --- a/menu/m_item_top.c +++ b/menu/m_item_top.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,13 +37,13 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_top.c,v 1.6 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_top.c,v 1.8 2003/11/08 20:51:53 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu | Function : int set_top_row(MENU *menu, int row) | -| Description : Makes the speified row the top row in the menu +| Description : Makes the specified row the top row in the menu | | Return Values : E_OK - success | E_BAD_ARGUMENT - not a menu pointer or invalid row diff --git a/menu/m_item_use.c b/menu/m_item_use.c index 4f52ea1a..c05e1d21 100644 --- a/menu/m_item_use.c +++ b/menu/m_item_use.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_use.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_use.c,v 1.13 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_item_val.c b/menu/m_item_val.c index aa3e43ac..89bd8fb3 100644 --- a/menu/m_item_val.c +++ b/menu/m_item_val.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,13 +37,13 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_val.c,v 1.10 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_val.c,v 1.12 2003/11/08 20:51:29 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu | Function : int set_item_value(ITEM *item, int value) | -| Description : Programmatically set the items selection value. This is +| Description : Programmatically set the item's selection value. This is | only allowed if the item is selectable at all and if | it is not connected to a single-valued menu. | If the item is connected to a posted menu, the menu diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c index 5ae40ae5..75bb60ed 100644 --- a/menu/m_item_vis.c +++ b/menu/m_item_vis.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_vis.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_vis.c,v 1.13 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_items.c b/menu/m_items.c index 54459e75..d66a5189 100644 --- a/menu/m_items.c +++ b/menu/m_items.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_items.c,v 1.10 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_items.c,v 1.12 2003/11/08 20:50:58 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -79,7 +78,7 @@ set_menu_items (MENU * menu, ITEM ** items) | Facility : libnmenu | Function : ITEM **menu_items(const MENU *menu) | -| Description : Returns a pointer to the item pointer arry of the menu +| Description : Returns a pointer to the item pointer array of the menu | | Return Values : NULL on error +--------------------------------------------------------------------------*/ diff --git a/menu/m_new.c b/menu/m_new.c index b5143e24..10fd052f 100644 --- a/menu/m_new.c +++ b/menu/m_new.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_new.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_new.c,v 1.13 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_opts.c b/menu/m_opts.c index 298d7084..70fc7d2b 100644 --- a/menu/m_opts.c +++ b/menu/m_opts.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_opts.c,v 1.14 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_opts.c,v 1.16 2003/11/08 20:50:19 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -115,7 +114,7 @@ NCURSES_EXPORT(int) menu_opts_off (MENU *menu, Menu_Options opts) { MENU *cmenu = menu; /* use a copy because set_menu_opts must detect - NULL menu itself to adjust its behaviour */ + NULL menu itself to adjust its behavior */ opts &= ALL_MENU_OPTS; if (opts & ~ALL_MENU_OPTS) @@ -145,7 +144,7 @@ NCURSES_EXPORT(int) menu_opts_on (MENU * menu, Menu_Options opts) { MENU *cmenu = menu; /* use a copy because set_menu_opts must detect - NULL menu itself to adjust its behaviour */ + NULL menu itself to adjust its behavior */ opts &= ALL_MENU_OPTS; if (opts & ~ALL_MENU_OPTS) diff --git a/menu/m_pad.c b/menu/m_pad.c index 8a3382ea..560036e2 100644 --- a/menu/m_pad.c +++ b/menu/m_pad.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_pad.c,v 1.6 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_pad.c,v 1.7 2003/10/25 14:54:48 tom Exp $") /* Macro to redraw menu if it is posted and changed */ #define Refresh_Menu(menu) \ diff --git a/menu/m_pattern.c b/menu/m_pattern.c index 34870012..3d50cf42 100644 --- a/menu/m_pattern.c +++ b/menu/m_pattern.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_pattern.c,v 1.7 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_pattern.c,v 1.9 2003/12/06 17:22:10 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -54,7 +53,7 @@ MODULE_ID("$Id: m_pattern.c,v 1.7 2002/07/06 15:22:16 juergen Exp $") NCURSES_EXPORT(char *) menu_pattern (const MENU * menu) { - return (menu ? (menu->pattern ? menu->pattern : "") : (char *)0); + return (char *)(menu ? (menu->pattern ? menu->pattern : "") : 0); } /*--------------------------------------------------------------------------- diff --git a/menu/m_post.c b/menu/m_post.c index 8751712b..759b328a 100644 --- a/menu/m_post.c +++ b/menu/m_post.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_post.c,v 1.18 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_post.c,v 1.19 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_req_name.c b/menu/m_req_name.c index 758721ba..2f1a4a12 100644 --- a/menu/m_req_name.c +++ b/menu/m_req_name.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_req_name.c,v 1.14 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_req_name.c,v 1.15 2003/10/25 14:54:48 tom Exp $") static const char *request_names[ MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1 ] = { "LEFT_ITEM" , diff --git a/menu/m_scale.c b/menu/m_scale.c index a6daf027..04110def 100644 --- a/menu/m_scale.c +++ b/menu/m_scale.c @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_scale.c,v 1.6 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_scale.c,v 1.7 2003/10/25 14:54:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_spacing.c b/menu/m_spacing.c index 25e54e0d..69474773 100644 --- a/menu/m_spacing.c +++ b/menu/m_spacing.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_spacing.c,v 1.13 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_spacing.c,v 1.15 2003/11/08 20:49:06 tom Exp $") #define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8) #define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8) @@ -48,7 +47,7 @@ MODULE_ID("$Id: m_spacing.c,v 1.13 2002/07/06 15:22:16 juergen Exp $") | Facility : libnmenu | Function : int set_menu_spacing(MENU *menu,int desc, int r, int c); | -| Description : Set the spacing between entried +| Description : Set the spacing between entries | | Return Values : E_OK - on success +--------------------------------------------------------------------------*/ diff --git a/menu/m_sub.c b/menu/m_sub.c index 76cb0021..8122e002 100644 --- a/menu/m_sub.c +++ b/menu/m_sub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_sub.c,v 1.6 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_sub.c,v 1.7 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_userptr.c b/menu/m_userptr.c index 908758b1..86f81d22 100644 --- a/menu/m_userptr.c +++ b/menu/m_userptr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_userptr.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_userptr.c,v 1.13 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/m_win.c b/menu/m_win.c index 5fe760c8..7e0e212c 100644 --- a/menu/m_win.c +++ b/menu/m_win.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_win.c,v 1.11 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_win.c,v 1.12 2003/10/25 15:23:42 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu diff --git a/menu/menu.h b/menu/menu.h index d8270722..f0b1f60b 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: menu.h,v 1.18 2003/11/08 20:48:24 tom Exp $ */ + #ifndef ETI_MENU #define ETI_MENU @@ -77,7 +78,7 @@ typedef struct tagITEM short x; bool value; /* Selection value */ - struct tagITEM *left; /* neighbour items */ + struct tagITEM *left; /* neighbor items */ struct tagITEM *right; struct tagITEM *up; struct tagITEM *down; diff --git a/menu/menu.priv.h b/menu/menu.priv.h index b249e435..139dd618 100644 --- a/menu/menu.priv.h +++ b/menu/menu.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: menu.priv.h,v 1.16 2003/10/25 15:24:29 tom Exp $ */ + /*************************************************************************** * Module menu.priv.h * * Top level private header file for all libnmenu modules * diff --git a/menu/mf_common.h b/menu/mf_common.h index 40ed1e29..b9073c81 100644 --- a/menu/mf_common.h +++ b/menu/mf_common.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,9 +28,10 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ +/* $Id: mf_common.h,v 0.19 2003/10/25 15:24:29 tom Exp $ */ + /* Common internal header for menu and form library */ #ifndef MF_COMMON_H_incl diff --git a/misc/csort b/misc/csort new file mode 100755 index 00000000..42faaf3a --- /dev/null +++ b/misc/csort @@ -0,0 +1,36 @@ +#!/bin/sh +# $Id: csort,v 1.2 2002/10/19 21:42:09 tom Exp $ +############################################################################## +# 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. # +############################################################################## +# +# override anything that might cause 'sort' to do the wrong thing... +LANG=C; export LANG +LANGUAGE=C; export LANGUAGE +LC_ALL=C; export LC_ALL +LC_CTYPE=C; export LC_CTYPE +sort $* diff --git a/misc/emx.src b/misc/emx.src index 96625116..2db4d18a 100644 --- a/misc/emx.src +++ b/misc/emx.src @@ -1,4 +1,4 @@ -# $Id: emx.src,v 1.7 2000/08/27 02:16:08 jmcoopr Exp $ +# $Id: emx.src,v 1.8 2003/01/26 01:17:55 tom Exp $ # This is a reformatted copy of the terminfo source for OS/2 EMX from # Juan Jose Garcia Ripoll . # http://www.arrakis.es/~worm/ @@ -85,6 +85,7 @@ klone+sgr|attribute control for ansi.sys displays, smpch=\E[11m, smso=\E[7m, smul=\E[4m, + use=klone+acs, # Highlight controls corresponding to the ANSI.SYS standard. *All* # console drivers for Intel boxes obey these. Does not assume \E[11m will @@ -103,6 +104,7 @@ klone+sgr-dumb|attribute control for ansi.sys displays (no ESC [ 11 m), smacs=\E[12m, smso=\E[7m, smul=\E[4m, + use=klone+acs, # ANSI.SYS color control. # The DOS 5 manual asserts that these sequences meet the ISO 6429 standard. @@ -113,8 +115,17 @@ klone+color|color control for ansi.sys and ISO6429-compatible displays, op=\E[37;40m, 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, + +# This is better than klone+color, it doesn't assume white-on-black as the +# default color pair, but many `ANSI' terminals don't grok the cap. +ecma+color|color control for ECMA-48-compatible terminals, + AX, + colors#8, + ncv#3, + pairs#64, + op=\E[39;49m, + setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, #### ANSI/ECMA-48 terminals and terminal emulators # @@ -209,7 +220,9 @@ ansi.sys|ANSI.SYS 3.1 and later versions, # no_color_video to inform the application that standout(1), underline(2) # reverse(4) and invisible(64) don't work with color. emx-base|DOS special keys, + bce, bw, + it#8, ncv#71, bel=^G, ka1=\0G, @@ -293,7 +306,7 @@ emx-base|DOS special keys, # me <-> sgr0 turn off all atributes # # On my terminal, \E[4m looks dim. -ansi|ANSI.SYS color, +ansi-emx|ANSI.SYS color, blink=\E[5m, bold=\E[1m, kmous=\E[M, @@ -319,17 +332,17 @@ window|ANSI.SYS window, smul=\E[1;31;47m, use=emx-base, os2|OS/2-emx ANSI.SYS, - cuu=\E[%p1%dA, - cuu1=\E[A, + cub=\E[%p1%dD, + cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, - cub=\E[%p1%dD, - cub1=\E[D, - sc=\E[s, + cuu=\E[%p1%dA, + cuu1=\E[A, rc=\E[u, - use=ansi, + sc=\E[s, + use=ansi-emx, use=mono, mono|ANSI.SYS mono, blink=\E[5m, @@ -353,7 +366,7 @@ mono2|ANSI.SYS mono2, smul=\E[1;31;40m, use=mono, # nice colors for Emacs (white on blue, mode line white on cyan) -ansi-color-2|ANSI.SYS color 2, +ansi-color-2-emx|ANSI.SYS color 2, rmcup=\E[0m, rmso=\E[0;37;44m, rmul=\E[0m, @@ -361,9 +374,9 @@ ansi-color-2|ANSI.SYS color 2, smcup=\E[0;37;44m, smso=\E[1;37;46m, smul=\E[1;31;40m, - use=ansi, + use=ansi-emx, # nice colors for Emacs (white on black, mode line black on cyan) -ansi-color-3|ANSI.SYS color 3, +ansi-color-3-emx|ANSI.SYS color 3, rmcup=\E[0m, rmso=\E[0m, rmul=\E[0m, @@ -371,7 +384,7 @@ ansi-color-3|ANSI.SYS color 3, smcup=\E[0m, smso=\E[30;46m, smul=\E[1;31;40m, - use=ansi, + use=ansi-emx, #### X terminal emulators # @@ -437,7 +450,7 @@ x10term|vs100-x10|xterm terminal emulator (X10 window system), # xterm's internal mouse-tracking facility; ncurses will interpret the # following three bytes of mouse status information. # From: Eric S. Raymond 14 Dec 1995 -xterm|vs100|xterm terminal emulator (X11R6 Window System), +xterm-r6|xterm terminal emulator (X11R6 Window System), am, km, mir, @@ -488,7 +501,15 @@ xterm|vs100|xterm terminal emulator (X11R6 Window System), kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, + kf14=\E[26~, + kf15=\E[28~, + kf16=\E[29~, + kf17=\E[31~, + kf18=\E[32~, + kf19=\E[33~, kf2=\E[12~, + kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, @@ -496,6 +517,7 @@ xterm|vs100|xterm terminal emulator (X11R6 Window System), kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kfnd=\E[1~, khome=\EO\0, kich1=\E[2~, kmous=\E[M, @@ -545,6 +567,7 @@ kterm|kterm kanji terminal emulator (X window system), sc=\E7, tsl=\E[?E\E[?%i%dT, use=xterm, + use=ecma+color, # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file xterm-nic|xterm with ich/ich1 suppressed for non-curses programs, @@ -758,7 +781,6 @@ emu|emu native mode, cup=\EE%p1%d;%p2%d;, cuu=\Ep-%p1%d;, cuu1=\EA, - cvvis=\Ea, dch=\EI%p1%d;, dch1=\EI1;, dl=\ER%p1%d;, @@ -816,10 +838,21 @@ emu|emu native mode, rmso=\ES, rmul=\ES, rs2=\ES\Es0;\Er0;, - setab=\Es%i%p1%d; setaf=\Er%i%p1%d;, + setab=\Es%i%p1%d;, + setaf=\Er%i%p1%d;, sgr0=\ES, smacs=\0, smir=\EY, smso=\ES\ET, smul=\ES\EV, tbc=\Ej, +############################################################################### +# Aliases which conflict with terminfo.src +ansi|ANSI.SYS color, + use=ansi-emx, +ansi-color-2|ANSI.SYS color 2, + use=ansi-color-2-emx, +ansi-color-3|ANSI.SYS color 3, + use=ansi-color-3-emx, +xterm|vs100|xterm terminal emulator (X11R6 Window System), + use=xterm-r6, diff --git a/misc/run_tic.in b/misc/run_tic.in index 295ae078..3b208b44 100644 --- a/misc/run_tic.in +++ b/misc/run_tic.in @@ -1,6 +1,6 @@ #!@SHELL@ ############################################################################## -# Copyright (c) 1998,2000 Free Software Foundation, Inc. # +# 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"), # @@ -29,7 +29,7 @@ # # Author: Thomas E. Dickey 1996,2000 # -# $Id: run_tic.in,v 1.11 2001/10/14 00:44:33 tom Exp $ +# $Id: run_tic.in,v 1.15 2003/09/06 22:31:44 Dan.Kegel Exp $ # This script is used to install terminfo.src using tic. We use a script # because the path checking is too awkward to do in a makefile. # @@ -62,10 +62,14 @@ test -z "${DESTDIR}" && DESTDIR= # on the host's copy of tic to compile the terminfo database. if test "$THAT_CC" = "$THIS_CC" ; then case "$PATH" in -:*) PATH=../progs:${DESTDIR}$bindir$PATH ;; -*) PATH=../progs:${DESTDIR}$bindir:$PATH ;; +:*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;; +*) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;; esac export PATH +SHLIB="sh $srcdir/shlib" +else +# Cross-compiling, so don't set PATH or run shlib. +SHLIB= fi # @@ -81,7 +85,7 @@ TERMINFO=${DESTDIR}$ticdir ; export TERMINFO umask 022 # Construct the name of the old (obsolete) pathname, e.g., /usr/lib/terminfo. -TICDIR=`echo $TERMINFO | sed -e 's@/share/@/lib/@'` +TICDIR=`echo $TERMINFO | sed -e 's%/share/%/lib/%'` # Remove the old terminfo stuff; we don't care if it existed before, and it # would generate a lot of confusing error messages if we tried to overwrite it. @@ -91,11 +95,11 @@ TICDIR=`echo $TERMINFO | sed -e 's@/share/@/lib/@'` # If we're not installing into /usr/share/, we'll have to adjust the location # of the tabset files in terminfo.src (which are in a parallel directory). -TABSET=`echo $ticdir | sed -e 's@/terminfo$@/tabset@'` +TABSET=`echo $ticdir | sed -e 's%/terminfo$%/tabset%'` if test "x$TABSET" != "x/usr/share/tabset" ; then echo '** adjusting tabset paths' TMP=${TMPDIR-/tmp}/$$ - sed -e s:/usr/share/tabset:$TABSET:g $source >$TMP + sed -e s%/usr/share/tabset%$TABSET%g $source >$TMP trap "rm -f $TMP" 0 1 2 5 15 source=$TMP fi @@ -111,7 +115,7 @@ Running tic to install $TERMINFO ... problems for older ncurses applications. EOF -if ( $srcdir/shlib tic$suffix -s -o $TERMINFO $source ) +if ( $SHLIB tic$suffix -s -o $TERMINFO $source ) then echo '** built new '$TERMINFO else @@ -140,13 +144,15 @@ if test "$TICDIR" != "$TERMINFO" ; then cd ${DESTDIR}$prefix # Construct a symbolic link that only assumes $ticdir has the # same $prefix as the other installed directories. - RELATIVE=`echo $ticdir|sed -e 's:^'$prefix'/::'` + RELATIVE=`echo $ticdir|sed -e 's%^'$prefix'/%%'` if test "$RELATIVE" != "$ticdir" ; then - RELATIVE=../`echo $ticdir|sed -e 's:^'$prefix'/::' -e 's:^/::'` + RELATIVE=../`echo $ticdir|sed -e 's%^'$prefix'/%%' -e 's%^/%%'` fi if ( @LN_S@ $RELATIVE $TICDIR ) then - echo '** linked '$TICDIR' for compatibility' + echo '** sym-linked '$TICDIR' for compatibility' + else + echo '** could not sym-link '$TICDIR' for compatibility' fi fi fi diff --git a/misc/shlib b/misc/shlib index 6817a0d7..d9d250ac 100755 --- a/misc/shlib +++ b/misc/shlib @@ -29,7 +29,7 @@ # # Author: Thomas E. Dickey 1996 # -# $Id: shlib,v 1.6 2000/05/20 23:01:17 tom Exp $ +# $Id: shlib,v 1.7 2003/07/19 22:58:14 tom Exp $ # Use this script as a wrapper when running executables linked to shared # libraries on systems that use the $LD_LIBRARY_PATH variable and don't embed # the soname's path within the linked executable (such as IRIX), e.g, @@ -84,4 +84,11 @@ if test -n "$q" ; then fi export LD_LIBRARY_PATH fi + +# cygwin doesn't use LD_LIBRARY_PATH, but does use PATH +if test -n "$PATHEXT" ; then + PATH=$LD_LIBRARY_PATH:$PATH; + export PATH +fi + eval "$*" diff --git a/misc/terminfo.src b/misc/terminfo.src index 03add0e1..1dc48996 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -4,13 +4,15 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # +# $Revision: 1.227 $ +# $Date: 2004/01/18 01:37:18 $ +# # The original header is preserved below for reference. It is noted that there # is a newer version which differs in some cosmetic details; we have decided # to not change the header unless there is also a change in content. # #------------------------------------------------------------------------------ # Version 10.2.1 -# $Date: 2002/10/05 18:40:53 $ # terminfo syntax # # Eric S. Raymond (current maintainer) @@ -562,7 +564,7 @@ ansi-generic|generic ansi standard terminal, # # This completely describes the sequences specified in the DOS 2.1 ANSI.SYS # documentation (except for the keyboard key reassignment feature, which -# doen't fit the model well). The klone+acs sequences were valid +# doesn't fit the model well). The klone+acs sequences were valid # though undocumented. The capability is untested but should work for # keys F1-F10 (%p1 values outside this range will yield unpredictable results). # From: Eric S. Raymond Nov 7 1995 @@ -756,6 +758,14 @@ linux-lat|linux with latin1 or latin2 alternate character set, acsc=+\020\,\021-\030.^Y0\333`\004a\013f\370g\361h\260i\316j\211k\214l\206m\203n\305o~p\304q\212r\304s_t\207u\215v\301w\302x\205y\363z\362{\343|\330}\234~\376, use=linux, +# This uses graphics from VT codeset instead of from cp437. +# reason: cp437 (aka "straight to font") is not functional under luit. +# from: Andrey V Lukyanov . +linux-vt|linux console using VT codes for graphics, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz~~, + rmacs=\E(K, rmpch@, sgr@, sgr0=\E[0m\E(K\017, smacs=\E(0, + smpch@, use=linux, + #### Mach # @@ -1468,7 +1478,9 @@ ofcons, kf1=\2330P, kf10=\2330M, kf2=\2330Q, kf3=\2330W, kf4=\2330x, kf5=\2330t, kf6=\2330u, kf7=\2330q, kf8=\2330r, kf9=\2330p, knp=\233/, kpp=\233?, nel=^M^J, rev=\2337m, - rmso=\2330m, rmul=\2330m, sgr0=\2330m, + rmso=\2330m, rmul=\2330m, + sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, + sgr0=\2330m, # NetBSD "wscons" emulator in vt220 mode # These are micro-minimal and probably need to be redone for real @@ -1484,7 +1496,7 @@ wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta, # DECstation/pmax. rcons|BSD rasterconsole, use=sun-il, -# Color version of above. Color currenly only provided by NetBSD. +# Color version of above. Color currently only provided by NetBSD. rcons-color|BSD rasterconsole with ANSI color, bce, colors#8, pairs#64, @@ -1809,6 +1821,44 @@ vt52|dec vt52, # | $Op | $On | | # |___kc1_______K4____|_kc3__K5_|_kent_@8_| # +# Note however, that the arrangement of the 5-key ka1-kc3 do not follow the +# terminfo guidelines. That is a compromise used to assign the remaining +# keys on the keypad to kf5-kf0, used on older systems with legacy termcap +# support: +vt100+keypad|dec vt100 numeric keypad no fkeys, + ka1=\EOq, ka3=\EOs, kb2=\EOr, kc1=\EOp, kc3=\EOn, +vt100+pfkeys|dec vt100 numeric keypad, + kent=\EOM, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + use=vt100+keypad, +vt100+fnkeys|dec vt100 numeric keypad, + kf0=\EOy, kf10=\EOx, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, + kf9=\EOw, use=vt100+pfkeys, +# +# A better adaptation to modern keyboards such as the PC's, which have a dozen +# function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to +# use the 5-key arrangement to model the arrow keys as suggested in the +# terminfo guidelines: +# _______________________________________ +# | PF1 | PF2 | PF3 | PF4 | +# | $OP | $OQ | $OR | $OS | +# |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_| +# | 7 8 9 - | +# | $Ow | $Ox | $Oy | $Om | +# |_ka1__K1_|_________|_ka3__K3_|_________| +# | 4 | 5 | 6 | , | +# | $Ot | $Ou | $Ov | $Ol | +# |_________|_kb2__K2_|_________|_________| +# | 1 | 2 | 3 | | +# | $Oq | $Or | $Os | enter | +# |_kc1__K4_|_________|_kc3__K5_| $OM | +# | 0 | . | | +# | $Op | $On | | +# |___________________|_________|_kent_@8_| +# +vt220+keypad|dec vt220 numeric keypad, + ka1=\EOw, ka3=\EOy, kb2=\EOu, kc1=\EOq, kc3=\EOs, kent=\EOM, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, +# # And here, for those of you with orphaned VT100s lacking documentation, is # a description of the soft switches invoked when you do `Set Up'. # @@ -1853,17 +1903,15 @@ vt100|vt100-am|dec vt100 (w/advanced video), cuf=\E[%p1%dC, cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq, - ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, - kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, - kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, + enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + use=vt100+fnkeys, vt100nam|vt100-nam|vt100 no automargins, am@, xenl@, use=vt100-am, vt100-vb|dec vt100 (w/advanced video) & no beep, @@ -2132,22 +2180,21 @@ vt320|vt300|dec vt320 7 bit terminal, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, is2=\E>\E[?3l\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, - ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kel=\E[4~, kent=\EOM, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, - kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, - kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, - kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I, kpp=\E[5~, - kprv=\E[Z, kslt=\E[4~, mc0=\E[i, mc4=\E[?4i, mc5=\E[?5i, - nel=\EE, rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt300, - ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, kel=\E[4~, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, + kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, + kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, + kf9=\E[20~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I, + kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, mc0=\E[i, mc4=\E[?4i, + mc5=\E[?5i, nel=\EE, rc=\E8, rev=\E[7m, + rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, + rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[5?l\E[?7h\E[?8h\E[1;24r\E[24;1H, sc=\E7, sgr0=\E[m, smacs=\E(0, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[1$}\E[H\E[K, + tsl=\E[1$}\E[H\E[K, use=vt220+keypad, vt320-nam|vt300-nam|dec vt320 7 bit terminal with no am to make SAS happy, am@, is2=\E>\E[?3l\E[?4l\E[5?l\E[?7l\E[?8h\E[1;24r\E[24;1H, @@ -2579,11 +2626,53 @@ ms-vt100|MS telnet imitating dec vt100, # a) This version has no function keys or numeric keypad. Unlike the older # version, the numeric keypad is entirely ignored. # b) The program sets $TERM to "ansi", which of course is inaccurate. -ms-vt100-color|windows 2000 ansi (sic), +ms-vt100-color|vtnt|windows 2000 ansi (sic), bce, dch=\E[%p1%dP, ich=\E[%p1%d@, use=ecma+color, use=ms-vt100, +# Based on comments from Federico Bianchi: +# +# vt100+ is basically a VT102-noSGR with ANSI.SYS colors and a different +# scheme for PF keys. +# +# and PuTTY wishlist: +# +# The modifiers are represented as the codes listed above, prefixed to +# the normal sequences. If the modifier is pressed alone, its sequence +# is transmitted twice in succession. If multiple modifiers apply, +# they're transmitted in the order shift, control, alt. +# +# Shift \E^S +# Alt \E^A, +# Ctrl \E^C, +ms-vt100+|vt100+|windows XP vt100+ (sic), + kdch1=\E-, kend=\Ek, kf1=\E1, kf10=\E0, kf11=\E!, kf12=\E@, + kf13=\E\023\E1, kf14=\E\023\E2, kf15=\E\023\E3, + kf16=\E\023\E4, kf17=\E\023\E5, kf18=\E\023\E6, + kf19=\E\023\E7, kf2=\E2, kf20=\E\023\E8, kf21=\E\023\E9, + kf22=\E\023\E0, kf23=\E\023\E!, kf24=\E\023\E@, + kf25=\E\003\E1, kf26=\E\003\E2, kf27=\E\003\E3, + kf28=\E\003\E4, kf29=\E\003\E5, kf3=\E3, kf30=\E\003\E6, + kf31=\E\003\E7, kf32=\E\003\E8, kf33=\E\003\E9, + kf34=\E\003\E0, kf35=\E\003\E!, kf36=\E\003\E@, + kf37=\E\001\E1, kf38=\E\001\E2, kf39=\E\001\E3, kf4=\E4, + kf40=\E\001\E4, kf41=\E\001\E5, kf42=\E\001\E6, + kf43=\E\001\E7, kf44=\E\001\E8, kf45=\E\001\E9, + kf46=\E\001\E0, kf47=\E\001\E!, kf48=\E\001\E@, kf5=\E5, + kf6=\E6, kf7=\E7, kf8=\E8, kf9=\E9, khome=\Eh, kich1=\E+, + knp=\E/, kpp=\E?, use=ms-vt100-color, + +ms-vt-utf8|vt-utf8|UTF-8 flavor of vt100+, + use=ms-vt100+, + +# a minimal subset of a vt100 (compare with "news-unk). +tt|tkterm|Don Libes' tk text widget terminal emulator, + clear=\E[H\E[J, cr=^M, cuf1=\E[C, cup=\E[%p1%d;%p2%dH, + cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rmso=\E[m, + smso=\E[7m, + #### X terminal emulators # # You can add the following line to your .Xdefaults to change the terminal type @@ -2691,9 +2780,8 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System), ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, - ka1=\EOw, ka3=\EOu, kb2=\EOy, kbeg=\EOE, kbs=^H, kc1=\EOq, - kc3=\EOs, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\177, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~, + kbeg=\EOE, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kdch1=\177, kend=\EOF, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, @@ -2710,7 +2798,7 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System), sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, - vpa=\E[%i%p1%dd, use=ecma+color, + vpa=\E[%i%p1%dd, use=ecma+color, use=vt220+keypad, # This is the stock xterm entry supplied with XFree86 3.3, which uses VT100 # codes for F1-F4 except while in VT220 mode. @@ -2750,10 +2838,11 @@ xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System), sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, smcup=\E[?1049h, use=xterm-xf86-v333, -xterm-xfree86|xterm-new|xterm terminal emulator (XFree86 4.0 Window System), +# This version was released in XFree86 4.3. +xterm-xf86-v43|xterm terminal emulator (XFree86 4.3 Window System), npc, - kDC=\E[3;2~, kEND=\EO2F, kHOM=\EO2H, kIC=\E[2;2~, - kLFT=\EO2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO2C, + kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, + kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\EO2P, kf14=\EO2Q, @@ -2770,6 +2859,11 @@ xterm-xfree86|xterm-new|xterm terminal emulator (XFree86 4.0 Window System), kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, use=xterm-basic, + +# This version is current (XFree86 xterm patch #180). +xterm-xfree86|xterm-new|xterm terminal emulator (XFree86 4.4 Window System), + cnorm=\E[?12l\E[?25h, cvvis=\E[?12;25h, indn=\E[%p1%dS, + rin=\E[%p1%dT, use=xterm-xf86-v43, # # This chunk is used for building the VT220/Sun/PC keyboard variants. xterm-basic|xterm terminal emulator - common (XFree86), @@ -2819,6 +2913,14 @@ xterm-256color|xterm with 256 colors, xterm-88color|xterm with 88 colors, colors#88, pairs#88, use=xterm-256color, +# These two are used to demonstrate the any-event mouse support, i.e., by +# using an extended name "XM" which tells ncurses to put the terminal into +# a special mode when initializing the xterm mouse. +xterm-1002|testing xterm-mouse, + XM=\E[?1002%?%p1%{1}%=%th%el%;, use=xterm-xfree86, +xterm-1003|testing xterm-mouse, + XM=\E[?1003%?%p1%{1}%=%th%el%;, use=xterm-xfree86, + # This is another variant, for XFree86 4.0 xterm (T.Dickey) # This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color. # To use it, your decTerminalID resource must be set to 200 or above. @@ -2895,15 +2997,14 @@ xterm-sco|XFree86 xterm with SCO function keys, # + uses DEC-style control sequences for the application keypad. # xterm-vt220|XFree86 xterm emulating vt220, - ka1=\EOw, ka3=\EOy, kbeg=\EOu, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[4~, - kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, - kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, - kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, - use=xterm-basic, + kbeg=\EOu, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kend=\E[4~, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, + kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, + kf20=\E[34~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, + kmous=\E[M, knp=\E[6~, kpp=\E[5~, use=xterm-basic, + use=vt220+keypad, xterm-vt52|XFree86 xterm emulating dec vt52, cols#80, it#8, lines#24, @@ -2951,7 +3052,7 @@ xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold, # -- MATSUMOTO Shoji) kterm|kterm kanji terminal emulator (X window system), eslok, hs, - acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs=, fsl=\E[?F, kmous=\E[M, rc=\E8, rmacs=\E(B, sc=\E7, smacs=\E(0, tsl=\E[?E\E[?%i%dT, use=xterm-r6, use=ecma+color, @@ -2981,9 +3082,8 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, home=\E[H, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J, - is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, ka1=\EOw, ka3=\EOy, - kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kend=\E[8~, kent=\EOM, kf1=\E[11~, + is1=\E[r\E[m\E[?7h\E[?4;6l\E[4l, kbs=^H, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[7~, kich1=\E[2~, @@ -2995,7 +3095,7 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, sgr0=\E[m, smacs=^N, smam=\E[?7h, smcup=\E[?1;41s\E[?1;41h\E=, smir=\E[4h, smso=\E[7m, - smul=\E[4m, use=ecma+color, + smul=\E[4m, use=ecma+color, use=vt220+keypad, # The 'nxterm' distributed with Redhat Linux 5.2 is a slight rehack of # xterm-sb_right-ansi-3d, which implements ANSI colors, but does not support @@ -3005,7 +3105,9 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X, # # Redhat Linux 6.x distributes XFree86 xterm as "nxterm", which uses bce # colors; note that this is not compatible with the 5.2 version. -nxterm|xterm-color|generic color xterm, +# csw (2002-05-15): make xterm-color primary instead of nxterm, to +# match XFree86's xterm.terminfo usage and prevent circular links +xterm-color|nxterm|generic color xterm, ncv@, op=\E[m, use=xterm-r6, use=klone+color, @@ -3040,8 +3142,32 @@ gnome-rh72|GNOME Terminal, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e\017%;, smam=\E[?7h, tbc@, use=xterm-color, +# GNOME Terminal 2.0.1 (Redhat 8.0) +# +# Documentation now claims it implements vt220 (which is demonstrably false). +# However, it does implement ECH, which is a vt220 feature. And there are +# workable vt100 LNM, DECALN, DECSNM modes, making it possible to display +# more of its bugs using vttest. +# +# However, note that bce and msgr are broken in this release. Tabs (tbc and +# hts) are broken as well. Sometimes flash (as in xterm-xfree86) works. +# +# kf1 and kf10 are not tested since they're assigned (hardcoded?) to menu +# operations. Shift-tab generates a distinct sequence so it can be argued +# that it implements kcbt. +gnome-rh80|GNOME Terminal, + bce@, msgr@, + ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, kbs=\177, + kcbt=\E^I, op=\E[39;49m, use=gnome-rh72, + +# GNOME Terminal 2.2.1 (Redhat 9.0) +# +# bce and msgr are repaired. +gnome-rh90|GNOME Terminal, + bce, msgr, use=gnome-rh80, + gnome|GNOME Terminal, - use=gnome-rh72, + use=gnome-rh90, # This is kvt 0-18.7, shipped with Redhat 6.0 (though whether it supports bce # or not is debatable). @@ -3146,10 +3272,9 @@ rxvt-basic|rxvt terminal base (X Window System), il=\E[%p1%dL, il1=\E[L, ind=^J, is1=\E[?47l\E=\E[?1l, is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kLFT=\E[d, kNXT=\E[6$, - kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, - kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^, - kend=\E[8~, kent=\EOM, kf1=\E[11~, kf10=\E[21~, + kPRV=\E[5$, kRIT=\E[c, kbs=^H, kcbt=\E[Z, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, + kel=\E[8\^, kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, @@ -3162,10 +3287,22 @@ rxvt-basic|rxvt terminal base (X Window System), rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, s0ds=\E(B, s1ds=\E(0, sc=\E7, sgr0=\E[0m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, smkx=\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + smul=\E[4m, tbc=\E[3g, use=vt220+keypad, rxvt|rxvt terminal emulator (X Window System), ncv@, - sgr0=\E[m\017, use=rxvt-basic, use=ecma+color, + cvvis=\E[?25h, hpa=\E[%i%p1%dG, kf0=\E[21~, + sgr0=\E[m\017, vpa=\E[%i%p1%dd, use=rxvt-basic, + use=ecma+color, +rxvt-color|rxvt terminal emulator (X Window System), + use=rxvt, +rxvt-xpm|rxvt terminal emulator (X Window System), + use=rxvt, +rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin, + acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + use=rxvt, +rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygwin, + acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376, + use=rxvt-cygwin, # This variant is supposed to work with rxvt 2.7.7 when compiled with # NO_BRIGHTCOLOR defined. rxvt needs more work... @@ -3227,19 +3364,17 @@ xtermm|xterm terminal emulator (monocrome), dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, getm=\E[%p1%dY, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, - il=\E[%p1%dL, il1=\E[L, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, - kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, - kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kent=\EOM, kf0=\EOy, - kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, - kf9=\EOX, khome=\E[H, kmous=\E[^_, knp=\E[U, kpp=\E[V, - rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM, rmacs=^O, - rmcup=\E@0\E[?4r, rmso=\E[m, + il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD, + kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kf0=\EOy, + kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf5=\EOT, kf6=\EOU, + kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kmous=\E[^_, + knp=\E[U, kpp=\E[V, rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM, + rmacs=^O, rmcup=\E@0\E[?4r, rmso=\E[m, rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smcup=\E@0\E[?4s\E[?4h\E@1, - smso=\E[7m, tbc=\E[3g, + smso=\E[7m, tbc=\E[3g, use=vt100+fnkeys, xtermc|xterm terminal emulator (color), colors#8, ncv#7, pairs#64, @@ -3332,7 +3467,7 @@ emu|emu native mode, # print interface, ANSI X3.64 colour escape sequences, etc. Newsgroup postings # indicate that it emulates more than one terminal, but incompletely. # -# This is dapted from a FreeBSD bug-report by Daniel Rudy +# This is adapted from a FreeBSD bug-report by Daniel Rudy # It is based on vt102's entry, with some subtle differences, but also # has status line # supports ANSI colors (except for 'op' string) @@ -3349,19 +3484,71 @@ mvterm|vv100|SwitchTerm aka mvTERM, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, dsl=\E[?E, ed=\E[J, el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, fsl=\E[?F, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, ka1=\EOq, - ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, - kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, - kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, op=\E[100m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOy, + kf10=\EOx, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, + op=\E[100m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, + rmcup=\E[2J\E[?47l\E8, rmkx=\E[?1l\E>, rmso=\E[m, + rmul=\E[m, rs2=\E>\E[1;3;4;5;6l\E[?7h\E[100m\E[m\E[r\E[2J\E[H, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[?E\E[?%i%p1%dT, + tsl=\E[?E\E[?%i%p1%dT, use=vt100+fnkeys, + +### MTERM +# +# This application is available by email from . +# +# "mterm -type ansi" sets $TERM to "ansi" +mterm-ansi|ANSI emulation, + am, bw, mir, msgr, + it#8, + acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, + cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, + el=\E[K, home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, + il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS, + invis=\E[8m, is2=\E)0\017, kbs=^H, nel=\EE, rev=\E[7m, + ri=\E[T, rin=\E[%p1%dT, rmacs=^O, rmir=\E[4l, rmso=\E[27m, + rmul=\E[24m, sgr0=\E[m, smacs=^N, smir=\E[4h, smso=\E[7m, + smul=\E[4m, vpa=\E[%i%p1%dd, +# mterm normally sets $TERM to "mterm" +mterm|mouse-sun|Der Mouse term, + am, bw, mir, + it#8, + bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^N, cuf1=^S, + cup=\006%p1%d.%p2%d., cuu1=^X, dch1=^Y, dl1=^K, ed=^B, el=^C, + home=^P, ht=^I, il1=^A, ind=^U, kbs=^H, ll=^R, nel=^M^U, ri=^W, + rmir=^O, rmso=^T, smir=^Q, smso=^V, +# "mterm -type decansi" sets $TERM to "decansi" +decansi|ANSI emulation with DEC compatibility hacks, + am, mir, msgr, xenl, + colors#8, it#8, pairs#64, + acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, + clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, + csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, + cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, + dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, enacs=\E(B\E)0, + home=\E[H, hpa=\E[%i%p1%d`, ht=^I, ich1=, il=\E[%p1%dL, + il1=\E[L, ind=\E[S, indn=\E[%p1%dS, invis=\E[8m, + is2=\E)0\E[r\017, kbs=^H, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, nel=\EE, op=\E[0m, rc=\E8, rev=\E[7m, + ri=\E[T, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, sc=\E7, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, + sgr0=\E[m, smacs=^N, smam=\E[?7h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR, + u7=\E[6n, vpa=\E[%i%p1%dd, + #### MGR # # MGR is a Bell Labs window system lighter-weight than X. @@ -3467,11 +3654,18 @@ screen|VT 100/ANSI X3.64 virtual terminal, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, - nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, - sgr0=\E[m, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, - smso=\E[3m, smul=\E[4m, tbc=\E[3g, E0=\E(B, S0=\E(%p1%c, + nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, + rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m, + rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[m, smacs=^N, + smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, + smul=\E[4m, tbc=\E[3g, E0=\E(B, S0=\E(%p1%c, use=ecma+color, +# The bce and status-line entries are from screen 3.9.13 (and require some +# changes to .screenrc). +screen-bce|VT 100/ANSI X3.64 virtual terminal with bce, + bce, use=screen, +screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, + dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen, # Read the fine manpage: # When screen tries to figure out a terminal name for @@ -3508,9 +3702,15 @@ screen.xterm-xfree86|screen customized for XFree86 xterm, screen.xterm-r6|screen customized for X11R6 xterm, bw, use=xterm-r6, # Color applications running in screen and TeraTerm do not play well together -# on Solaris. +# on Solaris because Sun's curses implementation gets confused. screen.teraterm|disable ncv in teraterm, - ncv#127, use=screen, + ncv#127, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + use=screen, +# fix the backspace key +screen.linux|screen in linux console, + bw, + kbs=\177, kcbt@, use=screen, screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, cols#132, use=screen, @@ -3631,7 +3831,7 @@ ncsa-vt220|NCSA Telnet using vt220-compatible function keys, #### Pilot Pro Palm-Top # # Termcap for Top Gun Telnet and SSH on the Palm Pilot. -# http://www.isaac.cs.berkeley.edu/pilot/tgtelnet.html +# http://www.ai/~iang/TGssh/ pilot|tgtelnet|Top Gun Telnet on the Palm Pilot Professional, OTbs, am, xenl, cols#39, lines#16, @@ -3763,6 +3963,9 @@ sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character, sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history, lines#35, rmcup=\E[>4h, smcup=\E[>4l, use=sun, +sun-type4|Sun Workstation console with type 4 keyboard, + kcub1=\E[217z, kcud1=\E[221z, kcuf1=\E[219z, + kcuu1=\E[215z, use=sun-il, #### Iris consoles # @@ -4032,62 +4235,79 @@ dtterm|CDE desktop terminal, #### Non-Unix Consoles # +### EMX termcap.dat compatibility modes +# +# Keypad: Home=\0G Up=\0H PrPag=\0I +# ka1,kh kcuu1 kpp,ka3 +# +# Left=\0K 5=\0L Right=\0M +# kcub1 kb2 kcuf1 +# +# End=\0O Down=\0P NxPag=\0Q +# kc1,kend kcud1 kc3,knp +# +# Ins=\0R Del=\0S +# kich1 kdch1 +# +# On keyboard with 12 function keys, +# shifted f-keys: F13-F24 +# control f-keys: F25-F36 +# alt f-keys: F37-F48 +# The shift/control/alt keys do not modify each other, but alt overrides both, +# and control overrides shift. +# +# Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the +# no_color_video to inform the application that standout(1), underline(2) +# reverse(4) and invisible(64) don't work with color. +emx-base|DOS special keys, + bce, bw, + it#8, ncv#71, + bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q, + kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, + kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205, + kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W, + kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\, + kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_, + kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d, + kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212, + kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l, + kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q, + kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, + kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I, + use=ansi.sys, + # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b, # a Unix-style environment used on OS/2. (Note that the suffix makes some # names longer than 14 characters, the nominal maximum). # # Removed: rmacs=\E[10m, smacs=\E[11m, because OS/2 does not implement acs. ansi-emx|ANSI.SYS color, - am, bce, eo, mir, msgr, xenl, xon, + am, bce, eo, mir, msgr, xon, colors#8, cols#80, it#8, lines#25, pairs#64, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, clear=\E[1;33;44m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, - kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, - kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, - kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, - knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[5;37;41m, - rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;44m\E[1;33m, - rmul=\E[0;44m\E[1;33m, rs1=\Ec, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, sgr0=\E[0m\E[1;33;44m, smir=\E[4h, - smpch=\E[11m, smso=\E[0;31;47m, smul=\E[1;31;44m, - tbc=\E[3g, u8=\E[?6c, u9=\E[c, + kb2=\E[G, kbs=^H, kf0=\0D, kll=\0O, kspd=^Z, nel=^M^J, + rev=\E[5;37;41m, rmir=\E[4l, rmpch=\E[10m, + rmso=\E[0;44m\E[1;33m, rmul=\E[0;44m\E[1;33m, rs1=\Ec, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr0=\E[0m\E[1;33;44m, smir=\E[4h, smpch=\E[11m, + smso=\E[0;31;47m, smul=\E[1;31;44m, tbc=\E[3g, u8=\E[?6c, + u9=\E[c, use=emx-base, +# nice colors for Emacs (white on blue, mode line white on cyan) ansi-color-2-emx|ANSI.SYS color 2, - am, bce, eo, mir, msgr, xenl, xon, - colors#8, cols#80, it#8, lines#25, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, - clear=\E[0;37;44m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, - cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, - home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, - kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, - kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, - kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, - knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[1;37;46m, - rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;37;44m, - rmul=\E[0;37;44m, rs1=\Ec, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, sgr0=\E[0;37;44m, smir=\E[4h, - smpch=\E[11m, smso=\E[1;37;46m, smul=\E[1;36;44m, - tbc=\E[3g, u8=\E[?6c, u9=\E[c, + clear=\E[0;37;44m\E[H\E[J, rev=\E[1;37;46m, + rmso=\E[0;37;44m, rmul=\E[0;37;44m, rs1=\Ec, + setaf=\E[3%p1%dm, sgr0=\E[0;37;44m, smso=\E[1;37;46m, + smul=\E[1;36;44m, use=ansi-emx, +# nice colors for Emacs (white on black, mode line black on cyan) ansi-color-3-emx|ANSI.SYS color 3, - am, bce, eo, mir, msgr, xenl, xon, - colors#8, cols#80, it#8, lines#25, pairs#64, - bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, - clear=\E[0;37;40m\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, - cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch=\E[%p1%dp, ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l, - home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, ind=^J, - kb2=\E[G, kbs=^H, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, - kf0=\0D, kf1=\0;, kf2=\0<, kf3=\0=, kf4=\0>, kf5=\0?, kf6=\0@, - kf7=\0A, kf8=\0B, kf9=\0C, khome=\0G, kich1=\0R, kll=\0O, - knp=\0Q, kpp=\0I, kspd=^Z, nel=^M^J, rev=\E[1;37;46m, - rmir=\E[4l, rmpch=\E[10m, rmso=\E[0;37;40m, - rmul=\E[0;37;40m, rs1=\Ec, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, sgr0=\E[0;10m, smir=\E[4h, - smpch=\E[11m, smso=\E[1;37;46m, smul=\E[0;36;40m, - tbc=\E[3g, u8=\E[?6c, u9=\E[c, + clear=\E[0;37;40m\E[H\E[J, rev=\E[1;37;46m, + rmso=\E[0;37;40m, rmul=\E[0;37;40m, rs1=\Ec, + setaf=\E[3%p1%dm, sgr0=\E[0;10m, smso=\E[1;37;46m, + smul=\E[0;36;40m, use=ansi-emx, mono-emx|stupid monochrome ansi terminal with only one kind of emphasis, am, cols#80, it#8, lines#24, @@ -4117,31 +4337,301 @@ cygwinB19|ansi emulation for cygwin32, # I've indicated which of these were and which I used. # Cheers, earnie_boyd@yahoo.com # several changes based on running with tack and comparing with older entry -TD +# more changes from csw: +# add cbt [backtab] +# remove eo [erase overstrike with blank] +# change clear was \E[H\E[J now \E[2J (faster?) +# remove cols +# remove lines +# remove ncv#3 [colors collide with highlights, bitmask] not applicable +# to MSDOS box? +# add cub [cursor back param] +# add cuf [cursor forward param] +# add cuu [cursor up param] +# add cud [cursor down param] +# add hs [has status line] +# add fsl [return from status line] +# add tsl [go to status line] +# add smacs [Start alt charset] (not sure if this works) +# add rmacs [End alt charset] (ditto) +# add smcup [enter_ca_mode] (save console; thanks Corinna) +# add rmcup [exit_ca_mode] (restore console; thanks Corinna) +# add kb2 [center of keypad] +# add u8 [user string 8] \E[?6c +# add el [clear to end of line] \E[K +# Notes: +# cnorm [make cursor normal] not implemented +# flash [flash] not implemented +# blink [blink] not implemented very usefully in cygwin? \E[5m +# dim [dim] not implemented very usefully in cygwin? \E[2m +# cub1 [cursor back 1] typically \E[D, but ^H is faster? +# kNXT [shifted next key] not implemented +# kPRV [shifted prev key] not implemented +# khome [home key] really is \E[1~ NOT \E[H +# tbc [clear tab stops] not implemented +# xenl [newline ignnored after 80 cols] messes up last line? Ehud Karni +# smpch [Start PC charset] is \E[11m, same as smacs +# rmpch [End PC charset] is \E[10m, same as rmacs +# mir [move in insert mode] fails in tack? +# bce [back color erase] causes problems with change background color? +# cvvis [make cursor very visible] causes a stackdump when testing with +# testcurs using the output option? \E[?25h\E[?8c +# civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c +# ech [erase characters param] broken \E[%p1%dX +# kcbt [back-tab key] not implemented in cygwin? \E[Z cygwin|ansi emulation for Cygwin, - am, eo, in, msgr, xon, - colors#8, cols#80, it#8, lines#25, ncv#3, pairs#64, + am, hs, in, msgr, xon, + colors#8, it#8, pairs#64, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, - bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub1=^H, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, el1=\E[1K, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, - hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, - ind=^J, invis=\E[8m, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, + bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, + home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, + kb2=\E[G, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m, - rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmpch=\E[10m, + rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, + rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, - sgr0=\E[0;10m, smir=\E[4h, smpch=\E[11m, smso=\E[7m, - smul=\E[4m, u6=\E[%i%d;%dR, u7=\E[6n, u9=\E[c, + sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h, + smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];, + u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd, +# I've supplied this so that you can help test new values and add other +# features. Cheers, earnie_boyd@yahoo.com. +# +# Some features are from pcansi. The op value is from linux. Function-keys +# are from linux. These have been tested not to cause problems. xenl was in +# this list, but DOES cause problems so it has been removed +cygwinDBG|Debug Version for Cygwin, + am, eo, mir, msgr, xon, + colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, + cnorm=\E[?25h, cr=^M, cub=\E[%p1%dD, cub1=\E[D, + cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, + dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, + flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG, + ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, + il1=\E[L, ind=^J, invis=\E[8m, kNXT=\E[6$, kPRV=\E[5$, + kb2=\E[G, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, + kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, + knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m, + rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, rmir=\E[4l, + rmso=\E[m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m, + sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m, + smul=\E[4m, tbc=\E[2g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, + u9=\E[c, vpa=\E[%i%p1%dd, + +# Key definitions: +# The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc. match the +# encodings used by other x86 environments. All others are invented for DJGPP. +# Oddly enough, while several combinations of modifiers are tabulated, there is +# none for shifted cursor keys. +# +# F1 \E[[A +# F2 \E[[B +# F3 \E[[C +# F4 \E[[D +# F5 \E[[E +# F6 \E[17~ +# F7 \E[18~ +# F8 \E[19~ +# F9 \E[20~ +# F10 \E[21~ +# F11 \E[23~ +# F12 \E[24~ +# +# Delete \E[3~ +# Down Arrow \E[B +# End \E[4~ +# Home \E[1~ +# Insert \E[2~ +# Left Arrow \E[D +# Page Down \E[6~ +# Page Up \E[5~ +# Right Arrow \E[C +# Up Arrow \E[A +# +# Shift-F1 \E[25~ +# Shift-F2 \E[26~ +# Shift-F3 \E[27~ +# Shift-F4 \E[28~ +# Shift-F5 \E[29~ +# Shift-F6 \E[30~ +# Shift-F7 \E[31~ +# Shift-F8 \E[32~ +# Shift-F9 \E[33~ +# Shift-F10 \E[34~ +# Shift-F11 \E[35~ +# Shift-F12 \E[36~ +# +# Ctrl-F1 \E[47~ +# Ctrl-F2 \E[48~ +# Ctrl-F3 \E[49~ +# Ctrl-F4 \E[50~ +# Ctrl-F5 \E[51~ +# Ctrl-F6 \E[52~ +# Ctrl-F7 \E[53~ +# Ctrl-F8 \E[54~ +# Ctrl-F9 \E[55~ +# Ctrl-F10 \E[56~ +# Ctrl-F11 \E[57~ +# Ctrl-F12 \E[58~ +# +# Ctrl-Delete \E[43~ +# Ctrl-Down Arrow \E[38~ +# Ctrl-End \E[44~ +# Ctrl-Home \E[41~ +# Ctrl-Insert \E[42~ +# Ctrl-Left Arrow \E[39~ +# Ctrl-Page Down \E[46~ +# Ctrl-Page Up \E[45~ +# Ctrl-Right Arrow \E[40~ +# Ctrl-Up Arrow \E[37~ +# +# Alt-F1 \E[59~ +# Alt-F2 \E[60~ +# Alt-F3 \E[61~ +# Alt-F4 \E[62~ +# Alt-F5 \E[63~ +# Alt-F6 \E[64~ +# Alt-F7 \E[65~ +# Alt-F8 \E[66~ +# Alt-F9 \E[67~ +# Alt-F10 \E[68~ +# Alt-F11 \E[79~ +# Alt-F12 \E[80~ +# +# Alt-Delete \E[65~ +# Alt-Down Arrow \E[60~ +# Alt-End \E[66~ +# Alt-Home \E[41~ +# Alt-Insert \E[64~ +# Alt-Left Arrow \E[61~ +# Alt-Page Down \E[68~ +# Alt-Page Up \E[67~ +# Alt-Right Arrow \E[62~ +# Alt-Up Arrow \E[59~ +# +# Also: +# Alt-A \E[82~ +# Alt-B \E[82~ +# Alt-C \E[83~ +# Alt-D \E[84~ +# Alt-E \E[85~ +# Alt-F \E[86~ +# Alt-G \E[87~ +# Alt-H \E[88~ +# Alt-I \E[89~ +# Alt-J \E[90~ +# Alt-K \E[91~ +# Alt-L \E[92~ +# Alt-M \E[93~ +# Alt-N \E[94~ +# Alt-O \E[95~ +# Alt-P \E[96~ +# Alt-Q \E[97~ +# Alt-R \E[98~ +# Alt-S \E[99~ +# Alt-T \E[100~ +# Alt-U \E[101~ +# Alt-V \E[102~ +# Alt-W \E[103~ +# Alt-X \E[104~ +# Alt-Y \E[105~ +# Alt-Z \E[106~ +djgpp|ansi emulation for DJGPP alpha, + am, bce, msgr, xhp, xon, xt, + colors#8, it#8, pairs#64, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, + clear=\E[H\E[J, cnorm=\E[v, cr=^M, cub=\E[%p1%dD, cub1=^H, + cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + cvvis=\E[2v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, + dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, + home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, + indn=\E[%p1%dS, invis=\E[8m, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, + kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=^M^J, + op=\E[37;40m, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%e;25%;%?%p6%t;1%;%?%p7%t;8%;m, + sgr0=\E[m, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, + +djgpp203|Entry for DJGPP 2.03, + OTbs, am, + cols#80, it#8, lines#25, + bel=^G, cr=^M, cub1=^H, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, + kcud1=^J, nel=^M^J, + +djgpp204|Entry for DJGPP 2.04, + OTbs, am, AX, + colors#8, cols#80, it#8, lines#25, ncv#3, pairs#64, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, + clear=\E[H\E[2J, cnorm=\E[v, cr=^M, cub=\E[%p1%dD, + cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, + cuu1=\E[A, cvvis=\E[2v, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, + home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, + il1=\E[L, ind=\E[S, indn=\E[%p1%dS, invis=\E[8m, kbs=^H, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kdch1=\E[3~, kf0=\E[21~, kf1=\E[[A, kf10=\E[21~, kf2=\E[[B, + kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, + kll=\E[4~, knp=\E[6~, kpp=\E[5~, nel=^M^J, rev=\E[7m, + ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, smul=\E[4m, + +# This is tested using U/Win's telnet. Scrolling is omitted because it is +# buggy. Another odd bug appears when displaying "~" in alternate character +# set (the emulator spits out error messages). Compare with att6386 -TD +uwin|U/Win 3.2 console, + am, eo, in, msgr, xenl, xon, + colors#8, it#8, ncv#58, pairs#64, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, + clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, + dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX, + ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, + ich=\E[%p1%d@, ich1=\E[@, kbs=^H, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[Y, kf1=\EOP, + kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf2=\EOQ, kf3=\EOR, + kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, + khome=\E[H, kich1=\E[@, nel=^M^J, op=\E[39;49m, rc=\E8, + rev=\E[7m, rmacs=\E[10m, rmir=\E[4l, rmpch=\E[10m, + rmso=\E[27m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0;10m, + smacs=\E[11m, smir=\E[4h, smpch=\E[11m, smso=\E[7m, + smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, + # This entry fits the Windows NT console when the _POSIX_TERM environment # variable is set to 'on'. While the Windows NT POSIX console is seldom used, # the Telnet client supplied with both the Windows for WorkGroup 3.11 TCP/IP @@ -4201,6 +4691,91 @@ pcmw|PC running Microsoft Works, sgr0=\E[m$<2/>, smso=\E[7m$<2/>, smul=\E[4m$<2/>, tbc=\E[3g$<2/>, +# From: Federico Bianchi +# This is the entry for the OpenNT terminal. +# The ntconsole name is for backward compatability. +# This is for OpenNT 2.0 and later. +# Later OpenNT was renamed to Interix. +# +# Presently it is distributed by Microsoft as Services For Unix (SFU). +# The 3.5 beta contains ncurses 4.2 (that is header files and executables, +# the documentation dates from 1.9.9e) -TD + +interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color, + am, bw, msgr, + colors#8, cols#80, lines#25, ncv#3, pairs#64, + acsc=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\,\021+^P0\333p\304r\304y\363z\362{\343|\330}\234, + bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD, + cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, + cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, + home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\E[S, + indn=\E[%p1%dS, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[M, kend=\E[U, kf0=\EFA, + kf1=\EF1, kf10=\EFA, kf11=\EFB, kf12=\EFC, kf13=\EFD, + kf14=\EFE, kf15=\EFF, kf16=\EFG, kf17=\EFH, kf18=\EFI, + kf19=\EFJ, kf2=\EF2, kf20=\EFK, kf21=\EFL, kf22=\EFM, + kf23=\EFN, kf24=\EFO, kf25=\EFP, kf26=\EFQ, kf27=\EFR, + kf28=\EFS, kf29=\EFT, kf3=\EF3, kf30=\EFU, kf31=\EFV, + kf32=\EFW, kf33=\EFX, kf34=\EFY, kf35=\EFZ, kf36=\EFa, + kf37=\EFb, kf38=\EFc, kf39=\EFd, kf4=\EF4, kf40=\EFe, + kf41=\EFf, kf42=\EFg, kf43=\EFh, kf44=\EFi, kf45=\EFj, + kf46=\EFk, kf47=\EFm, kf48=\EFn, kf49=\EFo, kf5=\EF5, + kf50=\EFp, kf51=\EFq, kf52=\EFr, kf53=\EFs, kf54=\EFt, + kf55=\EFu, kf56=\EFv, kf57=\EFw, kf58=\EFx, kf59=\EFy, + kf6=\EF6, kf60=\EFz, kf61=\EF+, kf62=\EF-, + kf63=\EF\014 kf64=\EF$, kf7=\EF7, kf8=\EF8, kf9=\EF9, + kich1=\E[L, kll=\E[U, knp=\E[T, kpp=\E[S, ll=\E[U, nel=^M^J, + op=\E[m, rc=\E[u, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, + rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec, + sc=\E[s, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm, + sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m, + +opennt-35|ntconsole-35|OpenNT-term35 compatible with color, + lines#35, use=opennt, + +opennt-50|ntconsole-50|OpenNT-term50 compatible with color, + lines#50, use=opennt, + +opennt-60|ntconsole-60|OpenNT-term60 compatible with color, + lines#60, use=opennt, + +opennt-100|ntconsole-100|OpenNT-term100 compatible with color, + lines#100, use=opennt, + +# OpenNT wide terminals +opennt-w|opennt-25-w|ntconsole-w|ntconsole-25-w|OpenNT-term-w compat with color, + cols#125, use=opennt, + +opennt-35-w|ntconsole-35-w|OpenNT-term35-w compatible with color, + lines#35, use=opennt-w, + +opennt-50-w|ntconsole-50-w|OpenNT-term50-w compatible with color, + lines#50, use=opennt-w, + +opennt-60-w|ntconsole-60-w|OpenNT-term60-w compatible with color, + lines#60, use=opennt-w, + +opennt-w-vt|opennt-25-w-vt|ntconsole-w-vt|ntconsole-25-w-vt|OpenNT-term-w-vt compat with color, + cols#132, use=opennt, + +# OpenNT terminals with no smcup/rmcup (names match termcap entries) +interix-nti|opennt-nti|opennt-25-nti|ntconsole-25-nti|OpenNT-nti compatible with color, + rmcup@, smcup@, use=opennt, + +opennt-35-nti|ntconsole-35-nti|OpenNT-term35-nti compatible with color, + lines#35, use=opennt-nti, + +opennt-50-nti|ntconsole-50-nti|OpenNT-term50-nti compatible with color, + lines#50, use=opennt-nti, + +opennt-60-nti|ntconsole-60-nti|OpenNT-term60-nti compatible with color, + lines#60, use=opennt-nti, + +opennt-100-nti|ntconsole-100-nti|OpenNT-term100-nti compatible with color, + lines#100, use=opennt-nti, + ######## COMMON TERMINAL TYPES # # This section describes terminal classes and maker brands that are still @@ -5460,9 +6035,7 @@ qvt203-25-w|QVT 203 PLUS with 25 by 132 columns, # Fax: (408)-954-0623 # # -# There are some tvi terminals that require incredible amounts of padding and -# some that don't. I'm assuming tvi912 and tvi920 are the old slow ones, and -# tvi912b, tvi912c, tvi920b, tvi920c are the new ones that don't need padding. +# These require incredible amounts of padding. # # All of these terminals (912 to 970 and the tvipt) are discontinued. Newer # Televideo terminals are ANSI and PC-ANSI compatible. @@ -5613,22 +6186,132 @@ tvi912|tvi914|tvi920|old televideo 912/914/920, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=^^, rmso=\Ek, rmul=\Em, smso=\Ej, smul=\El, tbc=\E3, -# the 912 has a key that's like shift: 8 xmits "^A8\r". -# The 920 has this plus real function keys that xmit different things. -# Terminfo makes you use the funct key on the 912 but the real keys on the 920. -tvi912c|tvi912b|new televideo 912, - dl1=\ER$<5*>, il1=\EE$<5*>, use=tvi912, -# set to page 1 when entering curses application (\E-17 ) -# reset to page 0 when exiting curses application (\E-07 ) -tvi912-2p|tvi920-2p|tvi-2p|televideo w/2 pages, - rmcup=\E-07\s, smcup=\E-17\s, use=tvi912, # We got some new tvi912c terminals that act really weird on the regular # termcap, so one of our gurus worked this up. Seems that cursor # addressing is broken. tvi912cc|tvi912 at cowell college, cup@, use=tvi912c, -# Here are the switch settings for the tvi920c: +# tvi{912,920}[bc] - TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C +# From: Benjamin C. W. Sittler +# +# Someone has put a scanned copy of the manual online at: +# http://vt100.net/televideo/912b-om/ +# +# These terminals were produced ca. 1979, and had a 12" monochrome +# screen, supported 75-9600 baud (no handshaking), monochrome, 7-bit +# ASCII, and were generally similar to adm3a but with attributes +# (including some with magic cookies), fancy half-duplex mode, and +# different bugs. +# +# Some operations reqire truly incredible amounts of padding. The +# insert_line () and delete_line () operations in particular +# are so slow as to be nearly unusable. +# +# There may or may not have been a separate, earlier series of 912/920 +# terminals (without the "B" and "C" suffix); I have never seen one, +# and the manual only describes the "B" and "C" series. The 912 and 920 +# are quite distinct from the 914 and 924, which were much nicer non- +# magic-cookie terminals similar to the 950. +# +# This is a new description for the following TeleVideo terminals, +# distinguished chiefly by their keyboards: +# +# TVI-912B - very odd layout, no function keys (84 keys) +# TVI-920B - typewriter layout, no function keys (103 keys) +# TVI-912C - very odd layout, function keys F1-F11 (82 keys) +# TVI-920C - typewriter layout, function keys F1-F11 (101 keys) +# +# To choose a setting for the TERM variable, start with the model: +# +# Model || base name +# ----------||----------- +# TVI-912B || tvi912b +# TVI-912C || tvi912c +# TVI-920B || tvi920b +# TVI-920C || tvi920c +# +# Then add a suffix from the following table describing installed options +# and how you'd like to use the terminal: +# +# Use Video | Second | Visual | Magic | Page || feature +# Attributes | Page | Bell | Cookies | Print || suffix +# ------------|--------|--------|---------|-------||--------- +# No | No | N/A | N/A | No || -unk +# No | No | N/A | N/A | Yes || -p +# No | Yes | No | N/A | No || -2p-unk +# No | Yes | No | N/A | Yes || -2p-p +# No | Yes | Yes | N/A | No || -vb-unk +# No | Yes | Yes | N/A | Yes || -vb-p +# Yes | No | N/A | No | N/A || +# Yes | No | N/A | Yes | N/A || -mc +# Yes | Yes | No | No | N/A || -2p +# Yes | Yes | No | Yes | N/A || -2p-mc +# Yes | Yes | Yes | No | N/A || -vb +# Yes | Yes | Yes | Yes | N/A || -vb-mc +# +# So e.g. a model 920 C with second page memory option, visual bell +# and no magic cookies would be tvi920c-vb; a model 912 B without the +# second page memory option and using magic cookies would be +# tvi912b-mc +# +# PADDING +# +# At 9600 baud, the terminal is prone to overflow its input buffer +# during complex operations (insert/delete +# character/line/screen/page), and it does not signal this over the +# RS232 cable. The typical symptom of an overrun is that the terminal +# starts beeping, and output becomes garbled. +# +# The padding delays in this terminfo were derived using tack(1) +# running on a Linux box connected to a TVI-920C with a later-model +# (A49C1-style) ROM running at 9600 baud, so your mileage may +# vary. The numbers below seem to give the terminal enough time so +# that it doesn't overflow its input buffer and start losing +# characters. +# +# KEYS +# +# If you want to use the FUNCT key on a tvi912[bc], use the +# corresponding tvi920[bc] terminfo with FUNCT + ... equivalents from +# the following table (these also work on the 920 series): +# +# Unshifted Function Keys: +# +# Key | capname|| Equivalent +# -----|--------||------------ +# F1 | || FUNCT + @ +# F2 | || FUNCT + A +# F3 | || FUNCT + B +# F4 | || FUNCT + C +# F5 | || FUNCT + D +# F6 | || FUNCT + E +# F7 | || FUNCT + F +# F8 | || FUNCT + G +# F9 | || FUNCT + H +# F10 | || FUNCT + I +# F11 | || FUNCT + J +# +# Shifted Function Keys: +# +# SHIFT + Key | capname|| Equivalent +# -------------|--------||------------ +# SHIFT + F1 | || FUNCT + ` +# SHIFT + F2 | || FUNCT + a +# SHIFT + F3 | || FUNCT + b +# SHIFT + F4 | || FUNCT + c +# SHIFT + F5 | || FUNCT + d +# SHIFT + F6 | || FUNCT + e +# SHIFT + F7 | || FUNCT + f +# SHIFT + F8 | || FUNCT + g +# SHIFT + F9 | || FUNCT + h +# SHIFT + F10 | || FUNCT + i +# SHIFT + F11 | || FUNCT + j +# +# PORTS AND SWITCH SETTINGS +# +# Here are the switch settings for the TVI-912B/TVI-920B and +# TVI-912C/TVI-920C: # # S1 (Line), and S3 (Printer) baud rates -- put one, and only one, switch down: # 2: 9600 3: 4800 4: 2400 5: 1200 @@ -5680,10 +6363,223 @@ tvi912cc|tvi912 at cowell college, # S4/W34: Selects Page Print Mode as initial condition. If not # installed, Extension Mode is selected. # -tvi920b|tvi920c|new televideo 920, - dl1=\ER$<5*>, il1=\EE$<5*>, kf0=^AI\r, kf1=^A@\r, - kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, - kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, use=tvi912, +# NON-STANDARD CAPABILITIES +# +# Sending or returns a cursor position report in the format +# YX\r, where Y and X are as in . This format is described in +# and , but it's not clear how one should write an +# appropriate scanf string, since we need to subtract %' ' from the +# character after reading it. The capability is used by tack(1) +# to synchronize during padding tests, and seems to work for that +# purpose. +# +# This description also includes the obsolete termcap capabilities +# has_hardware_tabs () and backspaces_with_bs (). +# +# FEATURES NOT YET DESCRIBED IN THIS TERMINFO +# +# The FUNCT modifier actually works with every normal key by sending +# ^AX\r, where X is the sequence normally sent by that key. This is a +# sort of meta key not currently describable in terminfo. +# +# There are quite a few other keys (especially on the 920 models,) but +# they are for the most part only useful in block mode. +# +# These terminals have lots of forms manipulation features, mainly +# useful in block mode, including "clear X to nulls" (vs. "clear X to +# spaces"; nulls are sentinels for "send X" operations); "send X" +# operations for uploading all or part of the screen; and block-mode +# editing keys (they don't send escape sequences, but manipulate video +# memory directly). Block mode is used for local editing, and protect +# mode (in conjunction with the "write protect" attribute, +# a.k.a. half-intensity outside of protect mode) is used to control +# which parts of the screen are edited/sent/printed (by ). +# +# There are at least two major families of ROM, "early" and +# A49B1/A49C1; the major difference seems to be that the latter ROMs +# support a few extra escape sequences for manipulating the off-screen +# memory page, and for sending whole pages back to the host (mainly +# useful in block mode.) The descriptions in this file don't use any +# of those sequences: set cursor position including page (\E-PYX, +# where P is \s for page 0 and ! for page 1 [actually only the LSB of +# P is taken into account, so e.g. 0 and 1 work too,] and Y and X are +# as in ); read cursor position (\E/), which is analogous to +# and returns PYX\r, where P is \s for page 0 or ! for page 1, and YX +# are as in , and some "send page" features mainly useful for +# forms manipulation. +# +# The keyboard enable (\E") and disable (\E#) sequences are unused, +# except that a terminal reset () enables the keyboard. +# +# Auto-flip mode (\Ev) is likely faster than the scrolling mode (\Ew) +# enabled in , but auto-flip is very jarring so we don't use it. +# +# BUGS +# +# At least up to the A49B1 and A49C1 ROMs, there are no \Eb and \Ed +# sequences (I infer that in some TeleVideo terminal they may invert +# and uninvert the display) so the sequence given here is a +# cheesy page-flip instead. +# +# The back_tab () sequence (\EI) doesn't work according to +# tack(1), so it is not included in the descriptions below. +# +# It's not clear whether auto_left_margin () flag should be set +# for these terminals; tack says yes, so it is set here, but this +# differs from other descriptions I've seen. +# +# Extension print mode () echoes all characters to the printer +# port [in addition to displaying them] except for the page print mode +# sequence (); this is a slight violation of the terminfo +# definition for but I don't expect it to cause problems. We +# reset to page print mode in since it may have been enabled +# accidentally. +# +# The descriptions with plus signs (+) are building blocks. + +tvi912b-unk|tvi912c-unk|TeleVideo TVI-912B or TVI-912C (no attributes), + OTbs, OTpt, am, bw, + cols#80, it#8, lines#24, + bel=^G, clear=\032$<50>, cr=^M, cub1=^H, cud1=^J, cuf1=^L, + cup=\E=%p1%' '%+%c%p2%' '%+%c, cuu1=^K, dch1=\EW$<30>, + dl1=\ER$<1*>$<100>, ed=\Ey$<2*>$<10>, el=\ET$<15>, + home=^^, ht=^I, hts=\E1, ich1=\EQ$<30>, + if=/usr/share/tabset/stdcrt, il1=\EE$<1*>$<100>, + ind=\n$<10>, is2=\Ew\EA\E'\E"\E(, kcub1=^H, kcud1=^J, + kcuf1=^L, kcuu1=^K, kdch1=\177, kent=^M, khome=^^, mc4=\EA, + mc5=\E@, rs1=\Ek\010\Em\010\Eq\032, tbc=\E3, u6=%c%c\r, + u7=\E?, u8=%c%c\r, u9=\E?, + +# This isn't included in the basic capabilities because it is +# typically unusable in combination with the full range of video +# attributes, since the magic cookie attributes turn into ASCII +# control characters, and the half-intensity ("protected") attribute +# converts all affected characters to spaces. + +tvi912b+printer|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C page print support, + mc0=\EP, + +# This uses half-intensity mode () for standout (), and +# exposes no other attributes (half-intensity is the only attribute +# that does not generate a magic cookie.) + +tvi912b+dim|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C half-intensity attribute support, + msgr, + dim=\E), rmso=\E(, sgr=\E%?%p1%p5%|%t)%e(%;, sgr0=\E(, + smso=\E), + +# Full magic-cookie attribute support, with half-intensity reverse +# video for standout. Note that we add a space in the sequence +# to give a consistent magic-cookie count. Also note that uses +# backspacing (in the TVI-supported order) to apply all requested +# attributes with only a single magic cookie. + +tvi912b+mc|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C full magic-cookie attribute support, + xmc#1, + blink=\E\^, dim=\E)\s, invis=\E_, rev=\Ej, rmso=\E(\Ek, + rmul=\Em, + sgr=\E%?%p1%p5%|%t)%e(%; \010\E%?%p1%p3%|%tj%ek%;\010\E%?%p2%tl%em%;\010\E%?%p7%t_%e%?%p4%t\^%eq%;%;, + sgr0=\E(\Ek\010\Em\010\Eq, smso=\E)\Ej, smul=\El, + +# This uses the second page memory option to save & restore screen +# contents. If your terminal is missing the option, this description +# should still work, but that has not been tested. + +tvi912b+2p|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C second page memory option support, + flash=\EK$<100>\EK, rmcup=\032$<50>\EK\E=7\s, + smcup=\EK\032$<50>\E(\Ek\010\Em\010\Eq\032$<50>, + +# This simulates flashing by briefly toggling to the other page +# (kludge!) + +tvi912b+vb|TeleVideo TVI-912B/TVI-920B and TVI-912C/TVI-920C second page memory option "visible bell" support, + bel=\EK$<100>\EK, use=tvi912b+2p, + +# Function keys ( .. are shifted .. ) + +tvi920b+fn|TeleVideo TVI-920B and TVI-920C function key support, + kf1=^A@\r, kf10=^AI\r, kf11=^AJ\r, kf12=^A`\r, kf13=^Aa\r, + kf14=^Ab\r, kf15=^Ac\r, kf16=^Ad\r, kf17=^Ae\r, kf18=^Af\r, + kf19=^Ag\r, kf2=^AA\r, kf20=^Ah\r, kf21=^Ai\r, kf22=^Aj\r, + kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, + kf8=^AG\r, kf9=^AH\r, + +# Combinations of the basic building blocks + +tvi912b-2p-unk|tvi912c-2p-unk|tvi912b-unk-2p|tvi912c-unk-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; no attributes), + use=tvi912b+2p, use=tvi912b-unk, + +tvi912b-vb-unk|tvi912c-vb-unk|tvi912b-unk-vb|tvi912c-unk-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; no attributes), + use=tvi912b+vb, use=tvi912b-unk, + +tvi912b-p|tvi912c-p|TeleVideo TVI-912B or TVI-912C (no attributes; page print), + use=tvi912b+printer, use=tvi912b-unk, + +tvi912b-2p-p|tvi912c-2p-p|tvi912b-p-2p|tvi912c-p-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; no attributes; page print), + use=tvi912b+2p, use=tvi912b+printer, use=tvi912b-unk, + +tvi912b-vb-p|tvi912c-vb-p|tvi912b-p-vb|tvi912c-p-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; no attributes; page print), + use=tvi912b+vb, use=tvi912b+printer, use=tvi912b-unk, + +tvi912b-2p|tvi912c-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; half-intensity attribute), + use=tvi912b+2p, use=tvi912b+dim, use=tvi912b-unk, + +tvi912b-2p-mc|tvi912c-2p-mc|tvi912b-mc-2p|tvi912c-mc-2p|TeleVideo TVI-912B or TVI-912C (second page memory option; magic cookies), + use=tvi912b+2p, use=tvi912b+mc, use=tvi912b-unk, + +tvi912b-vb|tvi912c-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; half-intensity attribute), + use=tvi912b+vb, use=tvi912b+dim, use=tvi912b-unk, + +tvi912b-vb-mc|tvi912c-vb-mc|tvi912b-mc-vb|tvi912c-mc-vb|TeleVideo TVI-912B or TVI-912C (second page memory option "visible bell"; magic cookies), + use=tvi912b+vb, use=tvi912b+mc, use=tvi912b-unk, + +tvi912b|tvi912c|TeleVideo TVI-912B or TVI-912C (half-intensity attribute), + use=tvi912b+dim, use=tvi912b-unk, + +tvi912b-mc|tvi912c-mc|TeleVideo TVI-912B or TVI-912C (magic cookies), + use=tvi912b+mc, use=tvi912b-unk, + +tvi920b-unk|tvi920c-unk|TeleVideo TVI-920B or TVI-920C (no attributes), + use=tvi920b+fn, use=tvi912b-unk, + +tvi920b-2p-unk|tvi920c-2p-unk|tvi920b-unk-2p|tvi920c-unk-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; no attributes), + use=tvi920b+fn, use=tvi912b+2p, use=tvi912b-unk, + +tvi920b-vb-unk|tvi920c-vb-unk|tvi920b-unk-vb|tvi920c-unk-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; no attributes), + use=tvi920b+fn, use=tvi912b+vb, use=tvi912b-unk, + +tvi920b-p|tvi920c-p|TeleVideo TVI-920B or TVI-920C (no attributes; page print), + use=tvi920b+fn, use=tvi912b+printer, use=tvi912b-unk, + +tvi920b-2p-p|tvi920c-2p-p|tvi920b-p-2p|tvi920c-p-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; no attributes; page print), + use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+printer, + use=tvi912b-unk, + +tvi920b-vb-p|tvi920c-vb-p|tvi920b-p-vb|tvi920c-p-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; no attributes; page print), + use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+printer, + use=tvi912b-unk, + +tvi920b-2p|tvi920c-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; half-intensity attribute), + use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+dim, + use=tvi912b-unk, + +tvi920b-2p-mc|tvi920c-2p-mc|tvi920b-mc-2p|tvi920c-mc-2p|TeleVideo TVI-920B or TVI-920C (second page memory option; magic cookies), + use=tvi920b+fn, use=tvi912b+2p, use=tvi912b+mc, + use=tvi912b-unk, + +tvi920b-vb|tvi920c-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; half-intensity attribute), + use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+dim, + use=tvi912b-unk, + +tvi920b-vb-mc|tvi920c-vb-mc|tvi920b-mc-vb|tvi920c-mc-vb|TeleVideo TVI-920B or TVI-920C (second page memory option "visible bell"; magic cookies), + use=tvi920b+fn, use=tvi912b+vb, use=tvi912b+mc, + use=tvi912b-unk, + +tvi920b|tvi920c|TeleVideo TVI-920B or TVI-920C (half-intensity attribute), + use=tvi920b+fn, use=tvi912b+dim, use=tvi912b-unk, + +tvi920b-mc|tvi920c-mc|TeleVideo TVI-920B or TVI-920C (magic cookies), + use=tvi920b+fn, use=tvi912b+mc, use=tvi912b-unk, # Televideo 921 and variants # From: Tim Theisen 22 Sept 1995 @@ -6939,9 +7835,8 @@ wy75|wyse75|wyse 75, ich=\E[%p1%d@$<1*>, il=\E[%p1%dL$<2*>, il1=\E[L$<2>, ind=\n$<2>, ip=$<1>, is1=\E[2;4;20;30l\E[?1;10l\E[12h\E[?7;8;25h, - is2=\E>\E(B\E)0\017, is3=\E[m, ka1=\EOw, ka3=\EOy, - kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdl1=\E[M, kel=\E[K, kent=\EOM, + is2=\E>\E(B\E)0\017, is3=\E[m, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdl1=\E[M, kel=\E[K, kf1=\E[?5i, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[?3i, @@ -6956,7 +7851,7 @@ wy75|wyse75|wyse 75, sgr=%?%p5%t\E[0t%;%?%p3%p1%|%t\E[1t%;%?%p2%t\E[2t%;%?%p4%t\E[3t%;%?%p1%p2%p3%p4%p5%|%|%|%|%t\E[7m%e\E[m%;%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[?1l\E[?7h\E=, smso=\E[1t\E[7m, smul=\E[2t\E[4m, - tbc=\E[3g, tsl=\E[>\,\001, + tbc=\E[3g, tsl=\E[>\,\001, use=vt220+keypad, # # This terminal description uses the non-hidden attribute mode # (with magic cookie). @@ -7008,23 +7903,22 @@ wy85|wyse85|wyse 85, ich=\E[%p1%d@$<4*>, il=\E[%p1%dL$<5*>, il1=\E[L$<5>, ind=\n$<3>, invis=\E[8m, ip=$<3>, is1=\E[62;1"p\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h$<16>, - is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, - kbs=^H, kc1=\EOq, kc3=\EOs, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kent=\EOM, kf1=\EOP, - kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, - kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, - kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, - kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, kich1=\E[2~, - knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, - lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, - ri=\EM$<3>, rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, - rmso=\E[m, rmul=\E[m, rs1=\E[13l\E[3l\E!p, - rs2=\E[35h\E[?3l$<70>, rs3=\E[?5l, sc=\E7, + is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf10=\E[21~, + kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, + kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, + kf19=\E[33~, kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, + khome=\E[26~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, + mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM$<3>, + rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>, rmso=\E[m, + rmul=\E[m, rs1=\E[13l\E[3l\E!p, rs2=\E[35h\E[?3l$<70>, + rs3=\E[?5l, sc=\E7, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h, smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[40h\E7\E[25;%i%p1%dH, + tsl=\E[40h\E7\E[25;%i%p1%dH, use=vt220+keypad, # # Wyse 85 with visual bell. wy85-vb|wyse85-vb|wyse 85 with visible bell, @@ -7113,25 +8007,24 @@ wy185|wyse185|wyse 185, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, il1=\E[L$<3>, ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25h, - is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOy, kb2=\EOu, - kbs=^H, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kent=\EOM, - kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, - kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, - kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, - khome=\E[26~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, - mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM$<2>, - rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, rmkx=\E>, - rmso=\E[27m, rmul=\E[24m, + is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf1=\EOP, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[32~, kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, + kf4=\EOS, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, kich1=\E[2~, + knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, + lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, + ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, + rmkx=\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[ Q, smir=\E[4h, smkx=\E[?1l\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E7\E[99;%i%p1%dH, vpa=\E[%i%p1%dd, + use=vt220+keypad, # # Wyse 185 with 24 data lines and top status (terminal status) wy185-24|wyse185-24|wyse 185 with 24 data lines, @@ -7322,16 +8215,14 @@ wy370|wyse370|wy370-101k|Wyse 370 with 101 key keyboard, # Function key set for the VT-320 (and wy85) compatible keyboard # wy370-105k|Wyse 370 with 105 key keyboard, - ka1=\EOw, ka3=\EOy, kb2=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, - kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, - kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, + kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kdch1=\E[3~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, - use=wy370-nk, + use=wy370-nk, use=vt220+keypad, # # Function key set for the PC compatible keyboard # @@ -7435,26 +8326,24 @@ wy520|wyse520|wyse 520, hts=\EH, ich=\E[%p1%d@$<2>, il=\E[%p1%dL$<3*>, il1=\E[L$<3>, ind=\n$<2>, invis=\E[8m, ip=$<4>, is1=\E[?5W, is2=\E[2;4;20;30l\E[?1;4;10;16l\E[12h\E[?7;8;25;67h, - is3=\E>\E(B\E)0\017\E[m, ka1=\EOw, ka3=\EOu, kb2=\EOy, - kbs=^H, kc1=\EOq, kc3=\EOs, kcbt=\E[Z, kcub1=\E[D, + is3=\E>\E(B\E)0\017\E[m, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, ked=\E[1~, - kel=\E[4~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, + kel=\E[4~, kent=\EOM, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, - khlp=\E[28~, khome=\E[26~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, kslt=\E[4~, lf1=PF1, lf2=PF2, lf3=PF3, lf4=PF4, - mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, - ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, rmcup=\E[ R, rmir=\E[4l, - rmso=\E[m, rmul=\E[24m, + kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, + kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, khome=\E[26~, + kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, lf1=PF1, + lf2=PF2, lf3=PF3, lf4=PF4, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, + rc=\E8, rev=\E[7m, ri=\EM$<2>, rmacs=^O, rmam=\E[?7l, + rmcup=\E[ R, rmir=\E[4l, rmso=\E[m, rmul=\E[24m, rs1=\E[13l\E[3l\E\\\E[63;1"p\E[!p, rs2=\E[35h\E[?3l, rs3=\E[?5l\E[47h\E[40l\E[r, sc=\E7, sgr=\E[0%?%p2%t;4%;%?%p3%p1%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[ Q\E[?67;8h, smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}\E[%i%p1%d`, - vpa=\E[%i%p1%dd, + vpa=\E[%i%p1%dd, use=vt220+keypad, # # Wyse 520 with 24 data lines and status (terminal status) wy520-24|wyse520-24|wyse 520 with 24 data lines, @@ -7976,17 +8865,15 @@ v5410|att5410 in terms of a vt100, cup=\E[%i%p1%d;%p2%dH$<5>, cuu1=\E[A$<2>, dch1=\E[P, dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ich1=\E[@, - il1=\E[L, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, - kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, - kf8=\EOl, kf9=\EOw, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, - rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, + il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + use=vt100+fnkeys, # # Teletype Model 5420 -- A souped up 5410, with multiple windows, @@ -11380,16 +12267,14 @@ ts100|ts100-sp|falco ts100-sp, cuu1=\E[A$<2>, dch1=\E~W, dl1=\E~R, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ich1=\E~Q, il1=\E~E, ind=^J, is1=\E~)\E~ea, - ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, - kf0=\EOy, kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, - rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + use=vt100+fnkeys, ts100-ctxt|falco ts-100 saving context, rmcup=\E~_b, smcup=\E~_d\E[2J, use=ts100, @@ -13192,19 +14077,17 @@ ncr260vt100an|NCR 2900_260 vt100 with ansi kybd, il1=\E[L$<5>, ind=\ED$<5>, indn=\E[%p1%dE$<5>, invis=\E[8m, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, - ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kent=\EOM, kf1=\EOP, kf2=\EOQ, kf3=\EOR, - kf4=\EOS, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, nel=\EE$<5>, rc=\E8, - rev=\E[7m, ri=\EM$<5>, rmacs=^O, rmir=\E[4l, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, + knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, nel=\EE$<5>, + rc=\E8, rev=\E[7m, ri=\EM$<5>, rmacs=^O, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[0m, rmul=\E[0m, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>, sgr0=\E[0m\017$<20>, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[1;7m, smul=\E[4m, tbc=\E[3g, - tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, + tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, use=vt220+keypad, ncr260vt100wan|NCR 2900_260 vt100 wide mode ansi kybd, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -13242,15 +14125,14 @@ ncr260vt200an|NCR 2900_260 vt200 with ansi kybd, ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, ind=\ED$<5>, indn=\E[%p1%dE$<5>, invis=\E[8m, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, - ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, - kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, - kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf21=\E[31~, - kf22=\E[32~, kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, - kf26=\E[1~, kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, - kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, kf0=\EOy, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, + kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, + kf2=\EOQ, kf20=\E[34~, kf21=\E[31~, kf22=\E[32~, + kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, kf26=\E[1~, + kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, kf30=\E[5~, + kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, kf35=\E[10~, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, @@ -13263,6 +14145,7 @@ ncr260vt200an|NCR 2900_260 vt200 with ansi kybd, sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, + use=vt220+keypad, ncr260vt200wan|NCR 2900_260 vt200 wide mode ansi kybd, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -13298,27 +14181,27 @@ ncr260vt300an|NCR 2900_260 vt300 with ansi kybd, ich=\E[%p1%d@$<5>, il=\E[%p1%dL$<5>, il1=\E[L$<5>, ind=\ED$<5>, indn=\E[%p1%dE$<5>, invis=\E[8m, is2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, - ka1=\EOw, ka3=\EOu, kb2=\EOy, kbs=^H, kc1=\EOq, kc3=\EOs, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, - kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, - kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf21=\E[31~, - kf22=\E[32~, kf23=\E[33~, kf24=\E[34~, kf25=\E[35~, - kf26=\E[1~, kf27=\E[2~, kf28=\E[3~, kf29=\E[4~, kf3=\EOR, - kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, kf33=\E[8~, kf34=\E[9~, - kf35=\E[10~, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, - kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, - kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, - mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, - ri=\EM$<5>, rmacs=\017$<20>, rmam=\E[?7l, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, kf0=\EOy, kf10=\E[21~, kf11=\E[23~, + kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, + kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, + kf20=\E[34~, kf21=\E[31~, kf22=\E[32~, kf23=\E[33~, + kf24=\E[34~, kf25=\E[35~, kf26=\E[1~, kf27=\E[2~, + kf28=\E[3~, kf29=\E[4~, kf30=\E[5~, kf31=\E[6~, kf32=\E[7~, + kf33=\E[8~, kf34=\E[9~, kf35=\E[10~, kf5=\E[M, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, + khlp=\E[28~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + krdo=\E[29~, kslt=\E[4~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, + nel=\EE, rc=\E8, rev=\E[7m, ri=\EM$<5>, rmacs=\017$<20>, + rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, + rmul=\E[24m, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>, sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, + use=vt220+keypad, ncr260vt300wan|NCR 2900_260 vt300 wide mode ansi kybd, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -13406,7 +14289,7 @@ ncr260wy325wpp|NCR 2900_260 wyse 325 wide mode, # ncr260wy350pp|NCR 2900_260 wyse 350, am, bw, hs, km, mc5i, mir, msgr, xon, - colors#16, cols#80, lines#24, ncv#33, nlab#32, xmc#1, + colors#16, cols#80, lines#24, ncv#33, nlab#32, pairs#16, xmc#1, acsc=07a?h;j5k3l2m1n8q\:t4u9v=w0x6, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<20>, cnorm=\E`1, cr=^M, cub1=\010$<5>, cud1=\n$<5>, cuf1=\014$<5>, @@ -14005,17 +14888,15 @@ tek4105-30|4015 emulating 30 line vt100, cuf=\E[%p1%dC, cuf1=\E[C$<2>, cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, - enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq, - ka3=\EOs, kb2=\EOr, kbs=^H, kc1=\EOp, kc3=\EOn, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, - kf1=\EOP, kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, - kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8, + enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m$<2>, rmul=\E[m$<2>, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>, sgr0=\E[m\017$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, + use=vt100+fnkeys, # Tektronix 4105 from BRL # The following setup modes are assumed for normal operation: @@ -14831,15 +15712,14 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J, - ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\177, kc1=\EOp, kc3=\EOn, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m, - ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m, sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, - u8=\E[?1;2c, u9=\E[c, + u8=\E[?1;2c, u9=\E[c, use=vt100+pfkeys, nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, @@ -15026,14 +15906,14 @@ xnuppc+basic|Darwin PowerPC Console basic capabilities, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dsl=\E]2;\007, ed=\E[J, el=\E[K, - el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=^J, ka1=\EOq, - ka3=\EOs, kb2=\EOr, kbs=\177, kc1=\EOp, kc3=\EOn, kcub1=\EOD, - kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, rev=\E[7m, - ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ind=^J, kbs=\177, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rc=\E8, + rev=\E[7m, ri=\EM, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, + rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, + sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + smul=\E[4m, tbc=\E[3g, use=vt100+keypad, xnuppc+c|Darwin PowerPC Console ANSI color support, colors#8, ncv#32, pairs#64, @@ -17642,7 +18522,7 @@ masscomp2|masscomp large screen version 2, # respectively, to be able to restore them when color changes # (because any color change turns off ALL attributes) # 3. and sequences alternate modes, -# rather then simply entering them. Thus we have to check the +# rather than simply entering them. Thus we have to check the # static register B and H to determine the status, before sending the # escape sequence. # 4. now must set the status of all 3 register (A,B,H) to zero @@ -17744,15 +18624,12 @@ xtalk|IBM PC with xtalk communication program (versions up to 3.4), cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, cuu1=\E[A$<2>, dl1=\E[M$<99>, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=^I, hts=\EH, - il1=\E[L$<99>, ind=^J, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H, - kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, - kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP, kf10=\EOx, - kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, - kf8=\EOl, kf9=\EOw, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, + il1=\E[L$<99>, ind=^J, kbs=^H, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, ri=\EM$<5>, rmacs=^O, rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m\s, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr0=\E[m, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m\s, - tbc=\E[3g, + tbc=\E[3g, use=vt100+fnkeys, # The official PC terminal emulator program of the AT&T Product Centers. # Note - insert mode commented out - doesn't seem to work on AT&T PC. @@ -18325,12 +19202,12 @@ v3220|LANPAR Vision II model 3220/3221/3222, # (T) ECMA-48 calls this "Partial Line Forward" but retains the PLD # abbreviation. # -# (U) ECMA-48 calls this "Partial Line Backward" but retains the PLD +# (U) ECMA-48 calls this "Partial Line Backward" but retains the PLU # abbreviation. # # (V) ECMA-48 calls this "Reverse Line Feed" but retains the RI abbreviation. # -# (W) RM/SM modes are as follows: 1 = Guarder Area Transfer Mode (GATM), +# (W) RM/SM modes are as follows: 1 = Guarded Area Transfer Mode (GATM), # 2 = Keyboard Action Mode (KAM), 3 = Control Representation Mode (CRM), # 4 = Insertion Replacement Mode, 5 = Status Report Transfer Mode (SRTM), # 6 = Erasure Mode (ERM), 7 = Line Editing Mode (LEM), 8 = Bi-Directional @@ -19536,9 +20413,70 @@ v3220|LANPAR Vision II model 3220/3221/3222, # * scaled the linux-c terminfo entry to match linux-c-nc, i.e., the # r/g/b parameters of initc are in the range 0 to 1000 -TD # -# 2002-1005 +# 2002-10-05 # * minor fix for scale-factor of linux-c and linux-c-nc -TD # +# 2002-11-09 +# * split-out vt100+keypad and vt220+keypad, fix interchanged ka3/kb2 +# in the latter -TD +# +# 2002-11-16 +# * add entries for mterm (mterm, mterm-ansi, decansi) -TD +# * ncr260wy350pp has only 16 color pairs -TD +# * add sun-type4 from NetBSD -TD +# * update xterm-xfree86 to current (patch 170) -TD +# * add screen-bce, screen-s entries -TD +# * add xterm-1002, xterm-1003 entries -TD +# +# 2003-01-11 +# * update homepage for Top Gun Telnet/SSH +# +# 2003-01-25 +# * reduce duplication in emx entries, added emx-base -TD +# +# 2003-05-24 +# * corrected acs for screen.teraterm -TD +# * add tkterm entry -TD +# +# 2003-07-15 +# * cygwin changes from Charles Wilson: +# misc/terminfo.src (nxterm|xterm-color): make xterm-color +# primary instead of nxterm, to match XFree86's xterm.terminfo +# usage and to prevent circular links. +# (rxvt): add additional codes from rxvt.org. +# (rxvt-color): new alias +# (rxvt-xpm): new alias +# (rxvt-cygwin): like rxvt, but with special acsc codes. +# (rxvt-cygwin-native): ditto. rxvt may be run under XWindows, or +# with a "native" MSWin GUI. Each takes different acsc codes, +# which are both different from the "normal" rxvt's acsc. +# (cygwin): cygwin-in-cmd.exe window. Lots of fixes. +# (cygwinDBG): ditto. +# +# 2003-09-27 +# * update gnome terminal entries -TD +# +# 2003-10-04 +# * add entries for djgpp 2.03 and 2.04 -TD +# +# 2003-10-25 +# * add alias for vtnt -TD +# * update xterm-xfree86 for XFree86 4.4 -TD +# +# 2003-11-22 +# * add linux-vt (Andrey V Lukyanov) +# +# 2003-12-20 +# * add screen.linux -TD +# +# 2004-01-10 +# * revised/improved entries for tvi912b, tvi920b (Benjamin Sittler) +# +# 2004-01-17 +# * add OpenNT/Interix/SFU entries (Federico Bianchi) +# * add vt100+ and vt-utf8 entries -TD +# * add uwin entry -TD +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/mk-1st.awk b/mk-1st.awk index bbd7c40e..8ce72f5c 100644 --- a/mk-1st.awk +++ b/mk-1st.awk @@ -1,6 +1,6 @@ -# $Id: mk-1st.awk,v 1.55 2002/04/20 17:32:47 tom Exp $ +# $Id: mk-1st.awk,v 1.62 2004/01/10 20:48:43 tom Exp $ ############################################################################## -# Copyright (c) 1998,2000,2002 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997,2000 +# Author: Thomas E. Dickey # # Generate list of objects for a given model library # Variables: @@ -38,7 +38,7 @@ # MODEL (e.g., "DEBUG", uppercase; toupper is not portable) # depend (optional dependencies for all objects, e.g, ncurses_cfg.h) # subset ("none", "base", "base+ext_funcs" or "termlib") -# target (cross-compile target, if any) +# host (cross-compile host, if any) # ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable) # ShlibVerInfix ("yes" or "no", determines location of version #) # DoLinks ("yes", "reverse" or "no", flag to add symbolic links) @@ -110,12 +110,12 @@ BEGIN { if (using == 0) { if (found == 0) { print "" - print "# generated by mk-1st.awk" + printf "# generated by mk-1st.awk (subset=%s)\n", subset print "" } using = 1 } - if ( subset == "termlib") { + if ( subset == "termlib" || subset == "termlib+ext_tinfo" ) { name = "tinfo" OBJS = MODEL "_T" } else { @@ -146,7 +146,7 @@ BEGIN { else found = 2 } - printf " \\\n\t../%s/%s.o", model, $1 + printf " \\\n\t../%s/%s$o", model, $1 } } END { @@ -162,8 +162,8 @@ END { if ( MODEL == "SHARED" ) { if (ShlibVerInfix == "cygdll") { - abi_name = sprintf("%s%s$(ABI_VERSION)%s", prefix, name, suffix); - rel_name = sprintf("%s%s$(REL_VERSION)%s", prefix, name, suffix); + abi_name = sprintf("%s%s$(ABI_VERSION)%s", "cyg", name, suffix); + rel_name = sprintf("%s%s$(REL_VERSION)%s", "cyg", name, suffix); imp_name = sprintf("%s%s%s.a", prefix, name, suffix); } else if (ShlibVerInfix == "yes") { abi_name = sprintf("%s%s.$(ABI_VERSION)%s", prefix, name, suffix); @@ -193,8 +193,8 @@ END { printf "../lib/%s : $(%s_OBJS)\n", end_name, OBJS print "\t-@rm -f $@"; } - if ( subset == "termlib") { - printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(TINFO_LIST)\n", OBJS + if ( subset == "termlib" || subset == "termlib+ext_tinfo" ) { + printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(TINFO_LIST) $(LDFLAGS)\n", OBJS } else { printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(SHLIB_LIST) $(LDFLAGS)\n", OBJS } @@ -233,9 +233,15 @@ END { if ( overwrite == "yes" && name == "ncurses" ) { - ovr_name = sprintf("libcurses%s", suffix) - printf "\t@echo linking %s to %s\n", end_name, ovr_name - printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name + if ( ShlibVer == "cygdll" ) { + ovr_name = sprintf("libcurses%s.a", suffix) + printf "\t@echo linking %s to %s\n", imp_name, ovr_name + printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, imp_name, ovr_name + } else { + ovr_name = sprintf("libcurses%s", suffix) + printf "\t@echo linking %s to %s\n", end_name, ovr_name + printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name + } } if ( ldconfig != "" ) { printf "\t- test -z \"$(DESTDIR)\" && %s\n", ldconfig @@ -257,7 +263,11 @@ END { removelinks("$(DESTDIR)$(libdir)") if ( overwrite == "yes" && name == "ncurses" ) { - ovr_name = sprintf("libcurses%s", suffix) + if ( ShlibVer == "cygdll" ) { + ovr_name = sprintf("libcurses%s.a", suffix) + } else { + ovr_name = sprintf("libcurses%s", suffix) + } printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", ovr_name } } @@ -277,19 +287,19 @@ END { } end_name = lib_name; printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS - printf "\tcd ../lib && $(LIBTOOL) $(%s) -o %s $(%s_OBJS:.o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR)\n", compile, lib_name, OBJS + printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)\n", compile, lib_name, OBJS print "" print "install \\" print "install.libs \\" printf "install.%s :: $(DESTDIR)$(libdir) ../lib/%s\n", name, lib_name printf "\t@echo installing ../lib/%s as $(DESTDIR)$(libdir)/%s\n", lib_name, lib_name - printf "\tcd ../lib; $(LIBTOOL) $(INSTALL_DATA) %s $(DESTDIR)$(libdir)\n", lib_name + printf "\tcd ../lib; $(LIBTOOL_INSTALL) $(INSTALL) %s $(DESTDIR)$(libdir)\n", lib_name print "" print "uninstall \\" print "uninstall.libs \\" printf "uninstall.%s ::\n", name printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", lib_name - printf "\t-@$(LIBTOOL) rm -f $(DESTDIR)$(libdir)/%s\n", lib_name + printf "\t-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(libdir)/%s\n", lib_name } else { @@ -297,9 +307,9 @@ END { printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS printf "\t$(AR) $(AR_OPTS) $@ $?\n" printf "\t$(RANLIB) $@\n" - if ( target == "vxworks" ) + if ( host == "vxworks" ) { - printf "\t$(LD) $(LD_OPTS) $? -o $(@:.a=.o)\n" + printf "\t$(LD) $(LD_OPTS) $? -o $(@:.a=$o)\n" } print "" print "install \\" @@ -314,10 +324,10 @@ END { printf "\t(cd $(DESTDIR)$(libdir) && $(LN_S) libncurses.a libcurses.a)\n" } printf "\t$(RANLIB) $(DESTDIR)$(libdir)/%s\n", lib_name - if ( target == "vxworks" ) + if ( host == "vxworks" ) { - printf "\t@echo installing ../lib/lib%s.o as $(DESTDIR)$(libdir)/lib%s.o\n", name, name - printf "\t$(INSTALL_DATA) ../lib/lib%s.o $(DESTDIR)$(libdir)/lib%s.o\n", name, name + printf "\t@echo installing ../lib/lib%s$o as $(DESTDIR)$(libdir)/lib%s$o\n", name, name + printf "\t$(INSTALL_DATA) ../lib/lib%s$o $(DESTDIR)$(libdir)/lib%s$o\n", name, name } print "" print "uninstall \\" @@ -330,10 +340,10 @@ END { printf "\t@echo linking libcurses.a to libncurses.a\n" printf "\t-@rm -f $(DESTDIR)$(libdir)/libcurses.a\n" } - if ( target == "vxworks" ) + if ( host == "vxworks" ) { - printf "\t@echo uninstalling $(DESTDIR)$(libdir)/lib%s.o\n", name - printf "\t-@rm -f $(DESTDIR)$(libdir)/lib%s.o\n", name + printf "\t@echo uninstalling $(DESTDIR)$(libdir)/lib%s$o\n", name + printf "\t-@rm -f $(DESTDIR)$(libdir)/lib%s$o\n", name } } print "" @@ -343,7 +353,7 @@ END { print "mostlyclean::" printf "\t-rm -f $(%s_OBJS)\n", OBJS if ( MODEL == "LIBTOOL" ) { - printf "\t-rm -f $(%s_OBJS:.o=.lo)\n", OBJS + printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS } } else if ( found == 2 ) @@ -352,13 +362,13 @@ END { print "mostlyclean::" printf "\t-rm -f $(%s_OBJS)\n", OBJS if ( MODEL == "LIBTOOL" ) { - printf "\t-rm -f $(%s_OBJS:.o=.lo)\n", OBJS + printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS } print "" print "clean ::" printf "\t-rm -f $(%s_OBJS)\n", OBJS if ( MODEL == "LIBTOOL" ) { - printf "\t-rm -f $(%s_OBJS:.o=.lo)\n", OBJS + printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS } } } diff --git a/mk-2nd.awk b/mk-2nd.awk index 45def012..629b1697 100644 --- a/mk-2nd.awk +++ b/mk-2nd.awk @@ -1,6 +1,6 @@ -# $Id: mk-2nd.awk,v 1.13 2000/10/14 17:57:02 Johnny.C.Lam Exp $ +# $Id: mk-2nd.awk,v 1.15 2003/11/01 22:42:50 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997 +# Author: Thomas E. Dickey # # Generate compile-rules for the modules that we are using in libraries or # programs. We are listing them explicitly because we have turned off the @@ -87,7 +87,7 @@ BEGIN { compile="CC" suffix=".c" } - printf "../%s/%s.o :\t%s/%s%s", model, $1, $3, $1, suffix + printf "../%s/%s$o :\t%s/%s%s", model, $1, $3, $1, suffix for (n = 4; n <= NF; n++) printf " \\\n\t\t\t%s", $n print "" if ( echo == "yes" ) @@ -100,9 +100,9 @@ BEGIN { dir = $3 "/" sub("^\\$\\(srcdir\\)/","",dir); sub("^\\./","",dir); - printf "\t%scd ../%s; $(LIBTOOL) $(%s) $(CFLAGS_%s) -c ../%s/%s%s%s", atsign, model, compile, MODEL, name, dir, $1, suffix + printf "\t%scd ../%s; $(LIBTOOL_COMPILE) $(%s) $(CFLAGS_%s) -c ../%s/%s%s%s", atsign, model, compile, MODEL, name, dir, $1, suffix } else - printf "\t%scd ../%s; $(LIBTOOL) $(%s) $(CFLAGS_%s) -c %s/%s%s", atsign, model, compile, MODEL, $3, $1, suffix + printf "\t%scd ../%s; $(LIBTOOL_COMPILE) $(%s) $(CFLAGS_%s) -c %s/%s%s", atsign, model, compile, MODEL, $3, $1, suffix } else { printf "%s", $1 for (n = 2; n <= NF; n++) printf " %s", $n diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index bbc7622c..5b009107 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.84 2002/06/29 22:36:25 tom Exp $ +# $Id: Makefile.in,v 1.91 2003/11/01 22:48:53 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996-2001 +# Author: Thomas E. Dickey 1996-2002 # # Makefile for ncurses source code. # @@ -48,11 +48,12 @@ SHELL = /bin/sh THIS = Makefile -x = @PROG_EXT@ - CF_MFLAGS = @cf_cv_makeflags@ @SET_MAKE@ +x = @EXEEXT@ +o = .@OBJEXT@ + MODEL = @DFT_LWR_MODEL@ DESTDIR = @DESTDIR@ top_srcdir = @top_srcdir@ @@ -65,6 +66,11 @@ includedir = @includedir@ datadir = @datadir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ @@ -86,10 +92,16 @@ CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) -HOSTCC = @BUILD_CC@ -HOSTCCFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @BUILD_CFLAGS@ @BUILD_CPPFLAGS@ -HOSTLDFLAGS = @BUILD_LDFLAGS@ -HOSTLIBS = @BUILD_LIBS@ +BUILD_CC = @BUILD_CC@ +BUILD_CCFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @BUILD_CPPFLAGS@ @BUILD_CFLAGS@ +BUILD_LDFLAGS = @BUILD_LDFLAGS@ +BUILD_LIBS = @BUILD_LIBS@ + +# The executables built in this directory are used for generating source that +# is compiled into the build, or are test-programs that are not installed. + +BUILD_EXEEXT = @BUILD_EXEEXT@ +x = @PROG_EXT@ CFLAGS_LIBTOOL = $(CCFLAGS) CFLAGS_NORMAL = $(CCFLAGS) @@ -113,7 +125,7 @@ NCURSES_MINOR = @NCURSES_MINOR@ REL_VERSION = @cf_cv_rel_version@ ABI_VERSION = @cf_cv_abi_version@ -RANLIB = @RANLIB@ +RANLIB = @LIB_PREP@ IMPORT_LIB = @IMPORT_LIB@ SHARED_LIB = @SHARED_LIB@ @@ -180,27 +192,27 @@ lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h sh $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h | \ fgrep undef >$@ -init_keytry.h: make_keys$x keys.list +init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list ./make_keys keys.list > $@ keys.list : $(tinfo)/MKkeys_list.sh AWK=$(AWK) sh $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@ -make_keys$x : \ +make_keys$(BUILD_EXEEXT) : \ $(tinfo)/make_keys.c \ names.c - $(HOSTCC) -o $@ $(HOSTCCFLAGS) $(tinfo)/make_keys.c $(HOSTLDFLAGS) $(HOSTLIBS) + $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS) -make_hash$x : \ +make_hash$(BUILD_EXEEXT) : \ $(tinfo)/comp_hash.c \ ../include/hashsize.h - $(HOSTCC) -o $@ $(HOSTCCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(HOSTLDFLAGS) $(HOSTLIBS) + $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS) expanded.c : $(serial)/MKexpanded.sh sh $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@ comp_captab.c: \ - make_hash$x \ + make_hash$(BUILD_EXEEXT) \ ../include/hashsize.h \ $(tinfo)/MKcaptab.awk sh $(tinfo)/MKcaptab.awk $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ > $@ @@ -229,8 +241,8 @@ mostlyclean :: clean :: mostlyclean -rm -f $(AUTO_SRC) - -rm -f make_keys$x - -rm -f make_hash$x + -rm -f make_keys$(BUILD_EXEEXT) + -rm -f make_hash$(BUILD_EXEEXT) -rm -rf .libs distclean :: clean @@ -260,15 +272,15 @@ hashmap$x : $(serial)/hashmap.c $(TEST_DEPS) @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS) lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \ - ../@DFT_OBJ_SUBDIR@/dump_entry.o - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry.o $(TEST_LDFLAGS) + ../@DFT_OBJ_SUBDIR@/dump_entry$o + @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS) link_test$x : link_test.c $(TEST_DEPS) \ - ../@DFT_OBJ_SUBDIR@/link_test.o - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test.o $(TEST_LDFLAGS) + ../@DFT_OBJ_SUBDIR@/link_test$o + @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS) -../@DFT_OBJ_SUBDIR@/dump_entry.o: - cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry.o +../@DFT_OBJ_SUBDIR@/dump_entry$o: + cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o ############################################################################### # The remainder of this file is automatically generated during configuration diff --git a/ncurses/SigAction.h b/ncurses/SigAction.h index 53d12bfd..150fc42b 100644 --- a/ncurses/SigAction.h +++ b/ncurses/SigAction.h @@ -32,7 +32,7 @@ ****************************************************************************/ /* - * $Id: SigAction.h,v 1.6 2000/12/10 02:36:10 tom Exp $ + * $Id: SigAction.h,v 1.7 2003/12/07 01:00:03 tom Exp $ * * This file exists to handle non-POSIX systems which don't have , * and usually no sigaction() nor @@ -105,12 +105,8 @@ typedef unsigned long sigset_t; #undef sigaddset #define sigaddset _nc_sigaddset -extern NCURSES_EXPORT(int) sigaction (int sig, sigaction_t * sigact, sigaction_t * osigact); -extern NCURSES_EXPORT(int) sigprocmask (int how, sigset_t *mask, sigset_t *omask); -extern NCURSES_EXPORT(int) sigemptyset (sigset_t *mask); -extern NCURSES_EXPORT(int) sigsuspend (sigset_t *mask); -extern NCURSES_EXPORT(int) sigdelset (sigset_t *mask, int sig); -extern NCURSES_EXPORT(int) sigaddset (sigset_t *mask, int sig); +/* tty/lib_tstp.c is the only user */ +#include #endif /* HAVE_SIGVEC */ #endif /* HAVE_SIGACTION */ diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh index 7dcef086..583a349b 100755 --- a/ncurses/base/MKlib_gen.sh +++ b/ncurses/base/MKlib_gen.sh @@ -2,10 +2,10 @@ # # MKlib_gen.sh -- generate sources from curses.h macro definitions # -# ($Id: MKlib_gen.sh,v 1.20 2002/09/28 15:02:11 tom Exp $) +# ($Id: MKlib_gen.sh,v 1.23 2004/02/07 13:31:35 tom Exp $) # ############################################################################## -# Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -82,19 +82,19 @@ if test "$USE" = implemented ; then cat >$ED1 <$ED1 <$ED2 <$ED3 <$ED3 <$AW1 <<\EOF1 BEGIN { skip=0; } -/^P_#if/ { +/^P_POUNDCif/ { print "\n" print $0 skip=0; } -/^P_#endif/ { +/^P_POUNDCendif/ { print $0 skip=1; } diff --git a/ncurses/base/define_key.c b/ncurses/base/define_key.c index 7fc885f8..0c8bc48d 100644 --- a/ncurses/base/define_key.c +++ b/ncurses/base/define_key.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -32,11 +32,10 @@ #include -MODULE_ID("$Id: define_key.c,v 1.6 2000/12/10 02:43:26 tom Exp $") +MODULE_ID("$Id: define_key.c,v 1.8 2003/05/17 23:28:05 tom Exp $") NCURSES_EXPORT(int) -define_key -(char *str, int keycode) +define_key(const char *str, int keycode) { int code = ERR; @@ -49,8 +48,12 @@ define_key code = OK; } if (str != 0) { - (void) _nc_add_to_try(&(SP->_keytry), str, keycode); - code = OK; + if (key_defined(str) == 0) { + (void) _nc_add_to_try(&(SP->_keytry), str, keycode); + code = OK; + } else { + code = ERR; + } } } else { while (_nc_remove_string(&(SP->_keytry), str)) diff --git a/ncurses/widechar/lib_ins_nwstr.c b/ncurses/base/key_defined.c similarity index 68% rename from ncurses/widechar/lib_ins_nwstr.c rename to ncurses/base/key_defined.c index 4b737713..dac18874 100644 --- a/ncurses/widechar/lib_ins_nwstr.c +++ b/ncurses/base/key_defined.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002 Free Software Foundation, Inc. * + * 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 * @@ -27,58 +27,50 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas Dickey 2002 * + * Author: Thomas E. Dickey, 2003 * ****************************************************************************/ -/* -** lib_ins_nwstr.c -** -** The routine wins_nwstr(). -** -*/ - #include -#include -MODULE_ID("$Id: lib_ins_nwstr.c,v 1.3 2002/09/28 16:31:33 tom Exp $") +MODULE_ID("$Id: key_defined.c,v 1.3 2003/05/17 23:12:27 tom Exp $") -NCURSES_EXPORT(int) -wins_nwstr(WINDOW *win, const wchar_t * wstr, int n) +static int +find_definition(struct tries *tree, const char *str) { - int code = ERR; - NCURSES_SIZE_T oy; - NCURSES_SIZE_T ox; - const wchar_t *cp; + struct tries *ptr; + int result = 0; - T((T_CALLED("wins_nwstr(%p,%s,%d)"), win, _nc_viswbufn(wstr,n), n)); - - if (win != 0 - && wstr != 0 - && wcwidth(*wstr) > 0) { - code = OK; - if (n < 1) - n = wcslen(wstr); - oy = win->_cury; - ox = win->_curx; - for (cp = wstr; *cp && ((cp - wstr) < n); cp++) { - NCURSES_CH_T wch; - SetChar2(wch, *cp); - if (*cp == '\n' || *cp == '\r' || *cp == '\t' || *cp == '\b') { - _nc_waddch_nosync(win, wch); - } else if (is7bits(*cp) && iscntrl(*cp)) { - winsch(win, ' ' + (chtype) (*cp)); - winsch(win, (chtype) '^'); - win->_curx += 2; - } else if (wins_wch(win, &wch) == ERR - || win->_curx > win->_maxx) { - break; + if (str != 0 && *str != '\0') { + for (ptr = tree; ptr != 0; ptr = ptr->sibling) { + if (UChar(*str) == UChar(ptr->ch)) { + if (str[1] == '\0' && ptr->child != 0) { + result = -1; + } else if ((result = find_definition(ptr->child, str + 1)) == 0) { + result = ptr->value; + } else if (str[1] == '\0') { + result = -1; + } } + if (result != 0) + break; } + } + return (result); +} - win->_curx = ox; - win->_cury = oy; - _nc_synchook(win); - code = OK; +/* + * Returns the keycode associated with the given string. If none is found, + * return 0. If the string is only a prefix to other strings, return -1. + */ +NCURSES_EXPORT(int) +key_defined(const char *str) +{ + int code = ERR; + + T((T_CALLED("key_defined(%s)"), _nc_visbuf(str))); + if (SP != 0 && str != 0) { + code = find_definition(SP->_keytry, str); } + returnCode(code); } diff --git a/ncurses/base/keybound.c b/ncurses/base/keybound.c index c8ca2856..06a1f44f 100644 --- a/ncurses/base/keybound.c +++ b/ncurses/base/keybound.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999,2000 Free Software Foundation, Inc. * + * Copyright (c) 1999-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 * @@ -32,7 +32,7 @@ #include -MODULE_ID("$Id: keybound.c,v 1.3 2000/12/10 02:43:26 tom Exp $") +MODULE_ID("$Id: keybound.c,v 1.4 2003/03/08 19:39:31 tom Exp $") /* * Returns the count'th string definition which is associated with the @@ -42,5 +42,6 @@ MODULE_ID("$Id: keybound.c,v 1.3 2000/12/10 02:43:26 tom Exp $") NCURSES_EXPORT(char *) keybound(int code, int count) { - return _nc_expand_try(SP->_key_ok, code, &count, 0); + T((T_CALLED("keybound(%d,%d)"), code, count)); + returnPtr(_nc_expand_try(SP->_keytry, code, &count, 0)); } diff --git a/ncurses/base/lib_addch.c b/ncurses/base/lib_addch.c index 5b41fedf..63b63bdd 100644 --- a/ncurses/base/lib_addch.c +++ b/ncurses/base/lib_addch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -36,7 +36,7 @@ #include #include -MODULE_ID("$Id: lib_addch.c,v 1.68 2002/09/28 17:48:13 tom Exp $") +MODULE_ID("$Id: lib_addch.c,v 1.80 2004/02/07 18:20:46 tom Exp $") /* * Ugly microtweaking alert. Everything from here to end of module is @@ -68,7 +68,7 @@ render_char(WINDOW *win, NCURSES_CH_T ch) AddAttr(ch, (a & COLOR_MASK(AttrOf(ch)))); } - TR(TRACE_VIRTPUT, ("bkg = %s, attrs = %s -> ch = %s", + TR(TRACE_VIRTPUT, ("render_char bkg %s, attrs %s -> ch %s", _tracech_t2(1, CHREF(win->_nc_bkgd)), _traceattr(win->_attrs), _tracech_t2(3, CHREF(ch)))); @@ -99,15 +99,21 @@ _nc_render(WINDOW *win, NCURSES_CH_T ch) #define CHECK_POSITION(win, x, y) /* nothing */ #endif -static inline int +static +#if !USE_WIDEC_SUPPORT /* cannot be inline if it is recursive */ + inline +#endif +int waddch_literal(WINDOW *win, NCURSES_CH_T ch) { int x; + int y; struct ldat *line; x = win->_curx; + y = win->_cury; - CHECK_POSITION(win, x, win->_cury); + CHECK_POSITION(win, x, y); /* * If we're trying to add a character at the lower-right corner more @@ -122,20 +128,71 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch) #endif ch = render_char(win, ch); - TR(TRACE_VIRTPUT, ("win attr = %s", _traceattr(win->_attrs))); - line = win->_line + win->_cury; + line = win->_line + y; CHANGED_CELL(line, x); + /* + * Build up multibyte characters until we have a wide-character. + */ + if_WIDEC({ + if (WINDOW_EXT(win, addch_used) == 0 && Charable(ch)) { + WINDOW_EXT(win, addch_used) = 0; + } else { + char *buffer = WINDOW_EXT(win, addch_work); + int len; + mbstate_t state; + wchar_t result; + + if ((WINDOW_EXT(win, addch_used) != 0) && + (WINDOW_EXT(win, addch_x) != x || + WINDOW_EXT(win, addch_y) != y)) { + /* discard the incomplete multibyte character */ + WINDOW_EXT(win, addch_used) = 0; + } + WINDOW_EXT(win, addch_x) = x; + WINDOW_EXT(win, addch_y) = y; + + memset(&state, 0, sizeof(state)); + buffer[WINDOW_EXT(win, addch_used)] = CharOf(ch); + WINDOW_EXT(win, addch_used) += 1; + buffer[WINDOW_EXT(win, addch_used)] = '\0'; + if ((len = mbrtowc(&result, + buffer, + WINDOW_EXT(win, addch_used), &state)) > 0) { + attr_t attrs = AttrOf(ch); + SetChar(ch, result, attrs); + WINDOW_EXT(win, addch_used) = 0; + if (CharOf(ch) < 256) { + const char *s = unctrl(CharOf(ch)); + if (s[1] != 0) { + return waddstr(win, s); + } + } + } else { + if (len == -1) { + /* + * An error occurred. We could either discard everything, + * or assume that the error was in the previous input. + * Try the latter. + */ + TR(TRACE_VIRTPUT, ("Alert! mbrtowc returns error")); + buffer[0] = CharOf(ch); + WINDOW_EXT(win, addch_used) = 1; + } + return OK; + } + } + }); + /* * Handle non-spacing characters */ if_WIDEC({ if (wcwidth(CharOf(ch)) == 0) { int i; - int y; - if ((x > 0 && ((y = win->_cury) >= 0)) + if ((x > 0 && y >= 0) || ((y = win->_cury - 1) >= 0 && (x = win->_maxx) > 0)) { wchar_t *chars = (win->_line[y].text[x - 1].chars); @@ -154,8 +211,18 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch) * Provide for multi-column characters */ if_WIDEC({ - if (wcwidth(CharOf(ch)) > 1) + int len = wcwidth(CharOf(ch)); + while (len-- > 1) { + if (x + (len - 1) > win->_maxx) { + NCURSES_CH_T blank = NewChar2(BLANK_TEXT, BLANK_ATTR); + AddAttr(blank, AttrOf(ch)); + if (waddch_literal(win, blank) != ERR) + return waddch_literal(win, ch); + return ERR; + } AddAttr(line->text[x++], WA_NAC); + TR(TRACE_VIRTPUT, ("added NAC %d", x - 1)); + } } testwrapping: ); @@ -192,14 +259,28 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch) /* the workhorse function -- add a character to the given window */ { int x, y; - chtype t = 0; + chtype t = CharOf(ch); const char *s = 0; + /* + * If we are using the alternate character set, forget about locale. + * Otherwise, if unctrl() returns a single-character or the locale + * claims the code is printable, treat it that way. + */ if ((AttrOf(ch) & A_ALTCHARSET) - || ((t = CharOf(ch)) > 127) - || ((s = unctrl(t))[1] == 0)) + || ((s = unctrl(t))[1] == 0 || + ( + isprint(t) +#if USE_WIDEC_SUPPORT + || WINDOW_EXT(win, addch_used) +#endif + ))) return waddch_literal(win, ch); + /* + * Handle carriage control and other codes that are not printable, or are + * known to expand to more than one character according to unctrl(). + */ x = win->_curx; y = win->_cury; @@ -325,41 +406,3 @@ wechochar(WINDOW *win, const chtype ch) TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); return (code); } - -#if USE_WIDEC_SUPPORT -NCURSES_EXPORT(int) -wadd_wch(WINDOW *win, const cchar_t * wch) -{ - int code = ERR; - - TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win, - _tracech_t(wch))); - - if (win && (waddch_nosync(win, *wch) != ERR)) { - _nc_synchook(win); - code = OK; - } - - TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); - return (code); -} - -NCURSES_EXPORT(int) -wecho_wchar(WINDOW *win, const cchar_t * wch) -{ - int code = ERR; - - TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wecho_wchar(%p, %s)"), win, - _tracech_t(wch))); - - if (win && (waddch_nosync(win, *wch) != ERR)) { - bool save_immed = win->_immed; - win->_immed = TRUE; - _nc_synchook(win); - win->_immed = save_immed; - code = OK; - } - TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); - return (code); -} -#endif /* USE_WIDEC_SUPPORT */ diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index d6f93455..1c3e19a4 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,10 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * * + * Rewritten 2001-2002 to support wide-characters by * + * Sven Verdoolaege * + * Thomas Dickey * ****************************************************************************/ /* @@ -40,53 +44,13 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.34 2002/10/06 00:25:25 tom Exp $") - -#if USE_WIDEC_SUPPORT -#define CONV_DATA mbstate_t state; wchar_t cached; int clen = 0 -#define CONV_INIT memset (&state, '\0', sizeof (state)); cached = (wchar_t)WEOF -#define NEXT_CHAR(s,ch, n) \ - { \ - int len, i = 0; \ - memset(&ch, 0, sizeof(cchar_t)); \ - if (cached != (wchar_t) WEOF) { \ - ch.chars[i++] = cached; \ - cached = (wchar_t) WEOF; \ - n -= clen; \ - s += clen; \ - } \ - for (; i < CCHARW_MAX && n > 0; ++i) { \ - if ((len = mbrtowc(&ch.chars[i], s, n, &state)) < 0) { \ - code = ERR; \ - break; \ - } \ - if (i == 0 || wcwidth(ch.chars[i]) == 0) { \ - n -= len; \ - s += len; \ - } else { \ - cached = ch.chars[i]; \ - clen = len; \ - ch.chars[i] = L'\0'; \ - break; \ - } \ - } \ - if (code == ERR) \ - break; \ - } -#else -#define CONV_DATA -#define CONV_INIT -#define NEXT_CHAR(s,ch, n) \ - ch = *s++; \ - --n -#endif +MODULE_ID("$Id: lib_addstr.c,v 1.39 2003/12/06 18:04:33 tom Exp $") NCURSES_EXPORT(int) waddnstr(WINDOW *win, const char *astr, int n) { - unsigned const char *str = (unsigned const char *) astr; + const char *str = astr; int code = ERR; - CONV_DATA; T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbufn(astr, n), n)); @@ -97,11 +61,10 @@ waddnstr(WINDOW *win, const char *astr, int n) n = (int) strlen(astr); TR(TRACE_VIRTPUT, ("str is not null, length = %d", n)); - CONV_INIT; - while ((n > 0) && (*str != '\0')) { + while ((n-- > 0) && (*str != '\0')) { NCURSES_CH_T ch; - TR(TRACE_VIRTPUT, ("*str = %#x", *str)); - NEXT_CHAR(str, ch, n); + TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str))); + SetChar(ch, UChar(*str++), A_NORMAL); if (_nc_waddch_nosync(win, ch) == ERR) { code = ERR; break; @@ -114,7 +77,7 @@ waddnstr(WINDOW *win, const char *astr, int n) } NCURSES_EXPORT(int) -waddchnstr(WINDOW *win, const chtype * astr, int n) +waddchnstr(WINDOW *win, const chtype *astr, int n) { NCURSES_SIZE_T y = win->_cury; NCURSES_SIZE_T x = win->_curx; @@ -155,7 +118,7 @@ waddchnstr(WINDOW *win, const chtype * astr, int n) #if USE_WIDEC_SUPPORT -int +NCURSES_EXPORT(int) _nc_wchstrlen(const cchar_t * s) { int result = 0; @@ -166,7 +129,7 @@ _nc_wchstrlen(const cchar_t * s) } NCURSES_EXPORT(int) -wadd_wchnstr(WINDOW *win, const cchar_t * const astr, int n) +wadd_wchnstr(WINDOW *win, const cchar_t * astr, int n) { NCURSES_SIZE_T y = win->_cury; NCURSES_SIZE_T x = win->_curx; @@ -217,9 +180,8 @@ NCURSES_EXPORT(int) waddnwstr(WINDOW *win, const wchar_t * str, int n) { int code = ERR; - int i; - T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str,n), n)); + T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str, n), n)); if (win && (str != 0)) { TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs))); @@ -230,16 +192,9 @@ waddnwstr(WINDOW *win, const wchar_t * str, int n) TR(TRACE_VIRTPUT, ("str is not null, length = %d", n)); while ((n-- > 0) && (*str != L('\0'))) { NCURSES_CH_T ch; - TR(TRACE_VIRTPUT, ("*str[0] = %#lx", *str)); + TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str)); SetChar(ch, *str++, A_NORMAL); - i = 1; - while (i < CCHARW_MAX && n > 0 && (*str != L('\0')) - && wcwidth(*str) == 0) { - TR(TRACE_VIRTPUT, ("*str[%d] = %#lx", i, *str)); - ch.chars[i++] = *str++; - --n; - } - if (_nc_waddch_nosync(win, ch) == ERR) { + if (wadd_wch(win, &ch) == ERR) { code = ERR; break; } diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c index ca189a65..3f3a2ac7 100644 --- a/ncurses/base/lib_bkgd.c +++ b/ncurses/base/lib_bkgd.c @@ -33,7 +33,7 @@ #include -MODULE_ID("$Id: lib_bkgd.c,v 1.29 2002/09/22 20:30:32 tom Exp $") +MODULE_ID("$Id: lib_bkgd.c,v 1.30 2003/07/05 16:46:49 tom Exp $") /* * Set the window's background information. @@ -70,7 +70,7 @@ wbkgrndset(WINDOW *win, const ARG_CH_T ch) int tmp; wgetbkgrnd(win, &wch); - tmp = wctob(CharOf(wch)); + tmp = _nc_to_char(CharOf(wch)); win->_bkgd = ((tmp == EOF) ? ' ' : (chtype) tmp) | AttrOf(wch); } diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c index f480bc16..cd3f7f66 100644 --- a/ncurses/base/lib_colorset.c +++ b/ncurses/base/lib_colorset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1998 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /* @@ -41,11 +40,10 @@ #include #include -MODULE_ID("$Id: lib_colorset.c,v 1.8 2002/07/13 11:35:08 juergen Exp $") +MODULE_ID("$Id: lib_colorset.c,v 1.10 2003/12/07 00:15:27 tom Exp $") NCURSES_EXPORT(int) -wcolor_set -(WINDOW *win, short color_pair_number, void *opts) +wcolor_set(WINDOW *win, short color_pair_number, void *opts) { T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number)); if (win @@ -53,7 +51,8 @@ wcolor_set && (color_pair_number >= 0) && (color_pair_number < COLOR_PAIRS)) { TR(TRACE_ATTRS, ("... current %ld", (long) PAIR_NUMBER(win->_attrs))); - toggle_attr_on(win->_attrs, COLOR_PAIR(color_pair_number)); + win->_attrs &= ALL_BUT_COLOR; + win->_attrs |= COLOR_PAIR(color_pair_number); returnCode(OK); } else returnCode(ERR); diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c index bce0a73e..607d3495 100644 --- a/ncurses/base/lib_freeall.c +++ b/ncurses/base/lib_freeall.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -39,7 +39,7 @@ extern int malloc_errfd; /* FIXME */ #endif -MODULE_ID("$Id: lib_freeall.c,v 1.20 2002/07/28 00:35:25 tom Exp $") +MODULE_ID("$Id: lib_freeall.c,v 1.26 2003/12/27 18:21:57 tom Exp $") /* * Free all ncurses data. This is used for testing only (there's no practical @@ -51,8 +51,10 @@ _nc_freeall(void) WINDOWLIST *p, *q; char *s; + T((T_CALLED("_nc_freeall()"))); #if NO_LEAKS _nc_free_tparm(); + FreeAndNull(_nc_oldnums); #endif if (SP != 0) { while (_nc_windows != 0) { @@ -78,28 +80,38 @@ _nc_freeall(void) delscreen(SP); } - if (cur_term != 0) { - _nc_free_termtype(&(cur_term->type)); - free(cur_term); - } + del_curterm(cur_term); + _nc_free_entries(_nc_head); if ((s = _nc_home_terminfo()) != 0) free(s); + + (void) _nc_printf_string(0, 0); #ifdef TRACE (void) _nc_trace_buf(-1, 0); #endif + #if HAVE_LIBDBMALLOC malloc_dump(malloc_errfd); #elif HAVE_LIBDMALLOC #elif HAVE_PURIFY purify_all_inuse(); #endif + returnVoid; } NCURSES_EXPORT(void) _nc_free_and_exit(int code) { + char *last_setbuf = (SP != 0) ? SP->_setbuf : 0; + _nc_freeall(); +#ifdef TRACE + trace(0); /* close trace file, freeing its setbuf */ + free(_nc_varargs("?", 0)); +#endif + fclose(stdout); + FreeIfNeeded(last_setbuf); exit(code); } diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 757703d8..84700cc7 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.67 2002/09/07 17:17:59 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.71 2003/05/17 23:49:28 tom Exp $") #include @@ -53,6 +53,32 @@ ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ #define TWAIT_MASK 3 #endif +/* + * Check for mouse activity, returning nonzero if we find any. + */ +static int +check_mouse_activity(int delay EVENTLIST_2nd(_nc_eventlist * evl)) +{ + int rc; + +#if USE_SYSMOUSE + if ((SP->_mouse_type == M_SYSMOUSE) + && (SP->_sysmouse_head < SP->_sysmouse_tail)) { + return 2; + } +#endif + rc = _nc_timed_wait(TWAIT_MASK, delay, (int *) 0 EVENTLIST_2nd(evl)); +#if USE_SYSMOUSE + if ((SP->_mouse_type == M_SYSMOUSE) + && (SP->_sysmouse_head < SP->_sysmouse_tail) + && (rc == 0) + && (errno == EINTR)) { + rc |= 2; + } +#endif + return rc; +} + static inline int fifo_peek(void) { @@ -88,7 +114,7 @@ fifo_push(EVENTLIST_0th(_nc_eventlist * evl)) { int n; int ch = 0; - int mask; + int mask = 0; (void) mask; if (tail == -1) @@ -101,11 +127,11 @@ fifo_push(EVENTLIST_0th(_nc_eventlist * evl)) #ifdef NCURSES_WGETCH_EVENTS if (evl -#if USE_GPM_SUPPORT || defined(USE_EMX_MOUSE) +#if USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE || (SP->_mouse_fd >= 0) #endif ) { - mask = _nc_timed_wait(TWAIT_MASK, -1, (int *) 0, evl); + mask = check_mouse_activity(-1 EVENTLIST_2nd(evl)); } else mask = 0; @@ -114,17 +140,31 @@ fifo_push(EVENTLIST_0th(_nc_eventlist * evl)) ungetch(KEY_EVENT); return KEY_EVENT; } -#elif USE_GPM_SUPPORT || defined(USE_EMX_MOUSE) - if (SP->_mouse_fd >= 0) - mask = _nc_timed_wait(TWAIT_MASK, -1, (int *) 0 EVENTLIST_2nd(evl)); +#elif USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE + if (SP->_mouse_fd >= 0) { + mask = check_mouse_activity(-1 EVENTLIST_2nd(evl)); + } #endif -#if USE_GPM_SUPPORT || defined(USE_EMX_MOUSE) +#if USE_GPM_SUPPORT || USE_EMX_MOUSE if ((SP->_mouse_fd >= 0) && (mask & 2)) { SP->_mouse_event(SP); ch = KEY_MOUSE; n = 1; } else +#endif +#if USE_SYSMOUSE + if ((SP->_mouse_type == M_SYSMOUSE) + && (SP->_sysmouse_head < SP->_sysmouse_tail)) { + SP->_mouse_event(SP); + ch = KEY_MOUSE; + n = 1; + } else if ((SP->_mouse_type == M_SYSMOUSE) + && (mask <= 0) && errno == EINTR) { + SP->_mouse_event(SP); + ch = KEY_MOUSE; + n = 1; + } else #endif { /* Can block... */ unsigned char c2 = 0; @@ -214,13 +254,19 @@ _nc_wgetch(WINDOW *win, * stuff its contents in the FIFO queue, and pop off * the first character to return it. */ - if (head == -1 && !SP->_raw && !SP->_cbreak) { + if (head == -1 && + !SP->_notty && + !SP->_raw && + !SP->_cbreak && + !SP->_called_wgetch) { char buf[MAXCOLUMNS], *sp; int rc; TR(TRACE_IEVENT, ("filling queue in cooked mode")); + SP->_called_wgetch = TRUE; rc = wgetnstr(win, buf, MAXCOLUMNS); + SP->_called_wgetch = FALSE; /* ungetch in reverse order */ #ifdef NCURSES_WGETCH_EVENTS @@ -265,10 +311,7 @@ _nc_wgetch(WINDOW *win, TR(TRACE_IEVENT, ("delay is %d milliseconds", delay)); if (head == -1) { /* fifo is empty */ - int rc = _nc_timed_wait(TWAIT_MASK, - delay, - (int *) 0 - EVENTLIST_2nd(evl)); + int rc = check_mouse_activity(delay EVENTLIST_2nd(evl)); #ifdef NCURSES_WGETCH_EVENTS if (rc & 4) { @@ -308,10 +351,8 @@ _nc_wgetch(WINDOW *win, break; } while (ch == KEY_MOUSE - && (((rc = _nc_timed_wait(TWAIT_MASK, - SP->_maxclick, - (int *) 0 - EVENTLIST_2nd(evl))) != 0 + && (((rc = check_mouse_activity(SP->_maxclick + EVENTLIST_2nd(evl))) != 0 && !(rc & 4)) || !SP->_mouse_parse(runcount))); #ifdef NCURSES_WGETCH_EVENTS @@ -513,14 +554,11 @@ kgetch(EVENTLIST_0th(_nc_eventlist * evl)) int rc; TR(TRACE_IEVENT, ("waiting for rest of sequence")); - rc = _nc_timed_wait(TWAIT_MASK, - timeleft, - &timeleft - EVENTLIST_2nd(evl)); + rc = check_mouse_activity(timeleft EVENTLIST_2nd(evl)); #ifdef NCURSES_WGETCH_EVENTS if (rc & 4) { TR(TRACE_IEVENT, ("interrupted by a user event")); - /* FIXME Should have preserved timeleft for reusal... */ + /* FIXME Should have preserved remainder timeleft for reusal... */ peek = head; /* Restart interpreting later */ return KEY_EVENT; } diff --git a/ncurses/base/lib_initscr.c b/ncurses/base/lib_initscr.c index 1b7750d5..d8ac5c6c 100644 --- a/ncurses/base/lib_initscr.c +++ b/ncurses/base/lib_initscr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -39,13 +40,12 @@ */ #include -#include /* for MAX_ALIAS */ #if HAVE_SYS_TERMIO_H #include /* needed for ISC */ #endif -MODULE_ID("$Id: lib_initscr.c,v 1.32 2002/10/12 15:24:34 tom Exp $") +MODULE_ID("$Id: lib_initscr.c,v 1.33 2003/12/27 19:13:51 tom Exp $") NCURSES_EXPORT(WINDOW *) initscr(void) diff --git a/ncurses/base/lib_insch.c b/ncurses/base/lib_insch.c index c3671e5d..419c9a8b 100644 --- a/ncurses/base/lib_insch.c +++ b/ncurses/base/lib_insch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,8 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Sven Verdoolaege * + * and: Thomas E. Dickey * ****************************************************************************/ /* @@ -39,29 +41,98 @@ */ #include +#include -MODULE_ID("$Id: lib_insch.c,v 1.15 2001/06/09 23:47:38 skimo Exp $") +MODULE_ID("$Id: lib_insch.c,v 1.18 2002/11/23 21:41:05 tom Exp $") + +/* + * Insert the given character, updating the current location to simplify + * inserting a string. + */ +void +_nc_insert_ch(WINDOW *win, chtype ch) +{ + NCURSES_CH_T wch; + int count; + + switch (ch) { + case '\t': + for (count = (TABSIZE - (win->_curx % TABSIZE)); count > 0; count--) + _nc_insert_ch(win, ' '); + break; + case '\n': + case '\r': + case '\b': + SetChar2(wch, ch); + _nc_waddch_nosync(win, wch); + break; + default: + if (is7bits(ch) && iscntrl(ch)) { + _nc_insert_ch(win, '^'); + _nc_insert_ch(win, '@' + (ch)); + } else if (win->_curx <= win->_maxx) { + struct ldat *line = &(win->_line[win->_cury]); + NCURSES_CH_T *end = &(line->text[win->_curx]); + NCURSES_CH_T *temp1 = &(line->text[win->_maxx]); + NCURSES_CH_T *temp2 = temp1 - 1; + + SetChar2(wch, ch); + + CHANGED_TO_EOL(line, win->_curx, win->_maxx); + while (temp1 > end) + *temp1-- = *temp2--; + + *temp1 = _nc_render(win, wch); + + win->_curx++; + } + break; + } +} NCURSES_EXPORT(int) winsch(WINDOW *win, chtype c) { + NCURSES_SIZE_T oy; + NCURSES_SIZE_T ox; int code = ERR; T((T_CALLED("winsch(%p, %s)"), win, _tracechtype(c))); - if (win) { - struct ldat *line = &(win->_line[win->_cury]); - NCURSES_CH_T *end = &(line->text[win->_curx]); - NCURSES_CH_T *temp1 = &(line->text[win->_maxx]); - NCURSES_CH_T *temp2 = temp1 - 1; - NCURSES_CH_T wch; - SetChar2(wch, c); + if (win != 0) { + oy = win->_cury; + ox = win->_curx; + + _nc_insert_ch(win, c); + + win->_curx = ox; + win->_cury = oy; + _nc_synchook(win); + code = OK; + } + returnCode(code); +} + +NCURSES_EXPORT(int) +winsnstr(WINDOW *win, const char *s, int n) +{ + int code = ERR; + NCURSES_SIZE_T oy; + NCURSES_SIZE_T ox; + const unsigned char *str = (const unsigned char *) s; + const unsigned char *cp; - CHANGED_TO_EOL(line, win->_curx, win->_maxx); - while (temp1 > end) - *temp1-- = *temp2--; + T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s, n), n)); - *temp1 = _nc_render(win, wch); + if (win != 0 && str != 0) { + oy = win->_cury; + ox = win->_curx; + for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) { + _nc_insert_ch(win, (chtype) UChar(*cp)); + } + win->_curx = ox; + win->_cury = oy; + _nc_synchook(win); code = OK; } returnCode(code); diff --git a/ncurses/base/lib_insdel.c b/ncurses/base/lib_insdel.c index 432bcace..342c6541 100644 --- a/ncurses/base/lib_insdel.c +++ b/ncurses/base/lib_insdel.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -42,14 +42,14 @@ #include -MODULE_ID("$Id: lib_insdel.c,v 1.11 2001/12/19 01:10:49 tom Exp $") +MODULE_ID("$Id: lib_insdel.c,v 1.12 2003/07/26 22:40:06 tom Exp $") NCURSES_EXPORT(int) winsdelln(WINDOW *win, int n) { int code = ERR; - T((T_CALLED("winsdel(%p,%d)"), win, n)); + T((T_CALLED("winsdelln(%p,%d)"), win, n)); if (win) { if (n != 0) { diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 0555f1fd..b2fc9d54 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -74,7 +75,11 @@ #endif #include + +MODULE_ID("$Id: lib_mouse.c,v 1.68 2003/11/08 21:50:50 tom Exp $") + #include +#include #if USE_GPM_SUPPORT #ifndef LINT /* don't need this for llib-lncurses */ @@ -84,18 +89,33 @@ #endif #endif -MODULE_ID("$Id: lib_mouse.c,v 1.61 2002/09/28 16:08:58 tom Exp $") +#if USE_SYSMOUSE +#undef buttons /* symbol conflict in consio.h */ +#undef mouse_info /* symbol conflict in consio.h */ +#include +#if (__FreeBSD_version >= 400017) +#include +#include +#else +#include +#endif +#endif /* use_SYSMOUSE */ #define MY_TRACE TRACE_ICALLS|TRACE_IEVENT -#define INVALID_EVENT -1 +#define MASK_RELEASE(x) ((001 << (6 * ((x) - 1)))) +#define MASK_PRESS(x) ((002 << (6 * ((x) - 1)))) +#define MASK_CLICK(x) ((004 << (6 * ((x) - 1)))) +#define MASK_DOUBLE_CLICK(x) ((010 << (6 * ((x) - 1)))) +#define MASK_TRIPLE_CLICK(x) ((020 << (6 * ((x) - 1)))) +#define MASK_RESERVED_EVENT(x) ((040 << (6 * ((x) - 1)))) + +#define BUTTON_CLICKED (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED) +#define BUTTON_PRESSED (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED) +#define BUTTON_RELEASED (BUTTON1_RELEASED | BUTTON2_RELEASED | BUTTON3_RELEASED) -static int mousetype; -#define M_XTERM -1 /* use xterm's mouse tracking? */ -#define M_NONE 0 /* no mouse device */ -#define M_GPM 1 /* use GPM */ -#define M_QNX 2 /* QNX mouse on console */ -#define M_QNX_TERM 3 /* QNX mouse on pterm/xterm (using qansi-m) */ +#define INVALID_EVENT -1 +#define NORMAL_EVENT 0 #if USE_GPM_SUPPORT #ifndef LINT @@ -117,7 +137,11 @@ static void _nc_mouse_wrap(SCREEN *); */ static MEVENT events[EV_MAX]; /* hold the last mouse event seen */ static MEVENT *eventp = events; /* next free slot in event queue */ + +#undef NEXT #define NEXT(ep) ((ep == events + EV_MAX - 1) ? events : ep + 1) + +#undef PREV #define PREV(ep) ((ep == events) ? events + EV_MAX - 1 : ep - 1) #ifdef TRACE @@ -135,7 +159,7 @@ _trace_slot(const char *tag) } #endif -#ifdef USE_EMX_MOUSE +#if USE_EMX_MOUSE # define TOP_ROW 0 # define LEFT_COL 0 @@ -229,10 +253,86 @@ server_state(const int state) mouse_activated = state; } +#endif /* USE_EMX_MOUSE */ + +#if USE_SYSMOUSE +static void +handle_sysmouse(int sig GCC_UNUSED) +{ + struct mouse_info the_mouse; + MEVENT *work; + + the_mouse.operation = MOUSE_GETINFO; + if (SP != 0 + && SP->_mouse_fd >= 0 + && SP->_sysmouse_tail < FIFO_SIZE + && ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse) != -1) { + + if (SP->_sysmouse_head > SP->_sysmouse_tail) { + SP->_sysmouse_tail = 0; + SP->_sysmouse_head = 0; + } + work = &(SP->_sysmouse_fifo[SP->_sysmouse_tail]); + memset(work, 0, sizeof(*work)); + work->id = NORMAL_EVENT; /* there's only one mouse... */ + + SP->_sysmouse_old_buttons = SP->_sysmouse_new_buttons; + SP->_sysmouse_new_buttons = the_mouse.u.data.buttons & 0x7; + + if (SP->_sysmouse_new_buttons) { + if (SP->_sysmouse_new_buttons & 1) + work->bstate |= BUTTON1_PRESSED; + if (SP->_sysmouse_new_buttons & 2) + work->bstate |= BUTTON2_PRESSED; + if (SP->_sysmouse_new_buttons & 4) + work->bstate |= BUTTON3_PRESSED; + } else { + if (SP->_sysmouse_old_buttons & 1) + work->bstate |= BUTTON1_RELEASED; + if (SP->_sysmouse_old_buttons & 2) + work->bstate |= BUTTON2_RELEASED; + if (SP->_sysmouse_old_buttons & 4) + work->bstate |= BUTTON3_RELEASED; + } + + /* for cosmetic bug in syscons.c on FreeBSD 3.[34] */ + the_mouse.operation = MOUSE_HIDE; + ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse); + the_mouse.operation = MOUSE_SHOW; + ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse); + + /* + * We're only interested if the button is pressed or released. + * FIXME: implement continuous event-tracking. + */ + if (SP->_sysmouse_new_buttons != SP->_sysmouse_old_buttons) { + SP->_sysmouse_tail += 1; + } + work->x = the_mouse.u.data.x / SP->_sysmouse_char_width; + work->y = the_mouse.u.data.y / SP->_sysmouse_char_height; + } +} #endif static int initialized; +static void +init_xterm_mouse(void) +{ + SP->_mouse_type = M_XTERM; + SP->_mouse_xtermcap = tigetstr("XM"); + if (!VALID_STRING(SP->_mouse_xtermcap)) + SP->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;"; +} + +#if !USE_EMX_MOUSE +static void +enable_xterm_mouse(int enable) +{ + putp(tparm(SP->_mouse_xtermcap, enable)); +} +#endif /* !USE_EMX_MOUSE */ + static void initialize_mousetype(void) { @@ -240,20 +340,23 @@ initialize_mousetype(void) /* Try gpm first, because gpm may be configured to run in xterm */ #if USE_GPM_SUPPORT - /* GPM: initialize connection to gpm server */ - gpm_connect.eventMask = GPM_DOWN | GPM_UP; - gpm_connect.defaultMask = ~(gpm_connect.eventMask | GPM_HARD); - gpm_connect.minMod = 0; - gpm_connect.maxMod = ~((1 << KG_SHIFT) | (1 << KG_SHIFTL) | (1 << KG_SHIFTR)); - if (Gpm_Open(&gpm_connect, 0) >= 0) { /* returns the file-descriptor */ - mousetype = M_GPM; - SP->_mouse_fd = gpm_fd; - return; + /* GPM does printf's without checking if stdout is a terminal */ + if (isatty(fileno(stdout))) { + /* GPM: initialize connection to gpm server */ + gpm_connect.eventMask = GPM_DOWN | GPM_UP; + gpm_connect.defaultMask = ~(gpm_connect.eventMask | GPM_HARD); + gpm_connect.minMod = 0; + gpm_connect.maxMod = ~((1 << KG_SHIFT) | (1 << KG_SHIFTL) | (1 << KG_SHIFTR)); + if (Gpm_Open(&gpm_connect, 0) >= 0) { /* returns the file-descriptor */ + SP->_mouse_type = M_GPM; + SP->_mouse_fd = gpm_fd; + return; + } } #endif /* OS/2 VIO */ -#ifdef USE_EMX_MOUSE +#if USE_EMX_MOUSE if (!mouse_thread && strstr(cur_term->type.term_names, "xterm") == 0 && key_mouse) { @@ -287,22 +390,87 @@ initialize_mousetype(void) printf("mouse thread error %d=%#x", rc, rc); return; } else { - mousetype = M_XTERM; + SP->_mouse_type = M_XTERM; return; } } } #endif +#if USE_SYSMOUSE + { + struct mouse_info the_mouse; + char *the_device = 0; + + if (isatty(SP->_ifd)) + the_device = ttyname(SP->_ifd); + if (the_device == 0) + the_device = "/dev/tty"; + + SP->_mouse_fd = open(the_device, O_RDWR); + + if (SP->_mouse_fd >= 0) { + /* + * sysmouse does not have a usable user interface for obtaining + * mouse events. The logical way to proceed (reading data on a + * stream) only works if one opens the device as root. Even in + * that mode, careful examination shows we lose events + * occasionally. The interface provided for user programs is to + * establish a signal handler. really. + * + * Take over SIGUSR2 for this purpose since SIGUSR1 is more + * likely to be used by an application. getch() will have to + * handle the misleading EINTR's. + */ + signal(SIGUSR2, SIG_IGN); + the_mouse.operation = MOUSE_MODE; + the_mouse.u.mode.mode = 0; + the_mouse.u.mode.signal = SIGUSR2; + if (ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse) != -1) { + signal(SIGUSR2, handle_sysmouse); + the_mouse.operation = MOUSE_SHOW; + ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse); + +#if defined(FBIO_MODEINFO) || defined(CONS_MODEINFO) /* FreeBSD > 2.x */ + { +#ifndef FBIO_GETMODE /* FreeBSD 3.x */ +#define FBIO_GETMODE CONS_GET +#define FBIO_MODEINFO CONS_MODEINFO +#endif /* FBIO_GETMODE */ + video_info_t the_video; + + if (ioctl(SP->_mouse_fd, + FBIO_GETMODE, + &the_video.vi_mode) != -1 + && ioctl(SP->_mouse_fd, + FBIO_MODEINFO, + &the_video) != -1) { + SP->_sysmouse_char_width = the_video.vi_cwidth; + SP->_sysmouse_char_height = the_video.vi_cheight; + } + } +#endif /* defined(FBIO_MODEINFO) || defined(CONS_MODEINFO) */ + + if (SP->_sysmouse_char_width <= 0) + SP->_sysmouse_char_width = 8; + if (SP->_sysmouse_char_height <= 0) + SP->_sysmouse_char_height = 16; + SP->_mouse_type = M_SYSMOUSE; + return; + } + } + } +#endif /* USE_SYSMOUSE */ + /* we know how to recognize mouse events under "xterm" */ if (key_mouse != 0) { if (!strcmp(key_mouse, xterm_kmous)) { - mousetype = M_XTERM; + init_xterm_mouse(); return; } } else if (strstr(cur_term->type.term_names, "xterm") != 0) { (void) _nc_add_to_try(&(SP->_keytry), xterm_kmous, KEY_MOUSE); - mousetype = M_XTERM; + init_xterm_mouse(); return; } } @@ -323,7 +491,7 @@ _nc_mouse_init(void) initialize_mousetype(); - T(("_nc_mouse_init() set mousetype to %d", mousetype)); + T(("_nc_mouse_init() set mousetype to %d", SP->_mouse_type)); } } @@ -334,74 +502,113 @@ _nc_mouse_init(void) static bool _nc_mouse_event(SCREEN * sp GCC_UNUSED) { + bool result = FALSE; + + switch (SP->_mouse_type) { + case M_XTERM: + /* xterm: never have to query, mouse events are in the keyboard stream */ +#if USE_EMX_MOUSE + { + char kbuf[3]; + + int i, res = read(M_FD(sp), &kbuf, 3); /* Eat the prefix */ + if (res != 3) + printf("Got %d chars instead of 3 for prefix.\n", res); + for (i = 0; i < res; i++) { + if (kbuf[i] != key_mouse[i]) + printf("Got char %d instead of %d for prefix.\n", + (int) kbuf[i], (int) key_mouse[i]); + } + result = TRUE; + } +#endif /* USE_EMX_MOUSE */ + break; + #if USE_GPM_SUPPORT - /* GPM: query server for event, return TRUE if we find one */ - Gpm_Event ev; + case M_GPM: + { + /* query server for event, return TRUE if we find one */ + Gpm_Event ev; + + if (Gpm_GetEvent(&ev) == 1) { + /* there's only one mouse... */ + eventp->id = NORMAL_EVENT; + + eventp->bstate = 0; + switch (ev.type & 0x0f) { + case (GPM_DOWN): + if (ev.buttons & GPM_B_LEFT) + eventp->bstate |= BUTTON1_PRESSED; + if (ev.buttons & GPM_B_MIDDLE) + eventp->bstate |= BUTTON2_PRESSED; + if (ev.buttons & GPM_B_RIGHT) + eventp->bstate |= BUTTON3_PRESSED; + break; + case (GPM_UP): + if (ev.buttons & GPM_B_LEFT) + eventp->bstate |= BUTTON1_RELEASED; + if (ev.buttons & GPM_B_MIDDLE) + eventp->bstate |= BUTTON2_RELEASED; + if (ev.buttons & GPM_B_RIGHT) + eventp->bstate |= BUTTON3_RELEASED; + break; + default: + break; + } - if (Gpm_GetEvent(&ev) == 1) { - eventp->id = 0; /* there's only one mouse... */ + eventp->x = ev.x - 1; + eventp->y = ev.y - 1; + eventp->z = 0; - eventp->bstate = 0; - switch (ev.type & 0x0f) { - case (GPM_DOWN): - if (ev.buttons & GPM_B_LEFT) - eventp->bstate |= BUTTON1_PRESSED; - if (ev.buttons & GPM_B_MIDDLE) - eventp->bstate |= BUTTON2_PRESSED; - if (ev.buttons & GPM_B_RIGHT) - eventp->bstate |= BUTTON3_PRESSED; - break; - case (GPM_UP): - if (ev.buttons & GPM_B_LEFT) - eventp->bstate |= BUTTON1_RELEASED; - if (ev.buttons & GPM_B_MIDDLE) - eventp->bstate |= BUTTON2_RELEASED; - if (ev.buttons & GPM_B_RIGHT) - eventp->bstate |= BUTTON3_RELEASED; - break; - default: - break; + /* bump the next-free pointer into the circular list */ + eventp = NEXT(eventp); + result = TRUE; + } } + break; +#endif - eventp->x = ev.x - 1; - eventp->y = ev.y - 1; - eventp->z = 0; +#if USE_SYSMOUSE + case M_SYSMOUSE: + if (SP->_sysmouse_head < SP->_sysmouse_tail) { + *eventp = SP->_sysmouse_fifo[SP->_sysmouse_head]; - /* bump the next-free pointer into the circular list */ - eventp = NEXT(eventp); - return (TRUE); - } -#endif + /* + * Point the fifo-head to the next possible location. If there + * are none, reset the indices. This may be interrupted by the + * signal handler, doing essentially the same reset. + */ + SP->_sysmouse_head += 1; + if (SP->_sysmouse_head == SP->_sysmouse_tail) { + SP->_sysmouse_tail = 0; + SP->_sysmouse_head = 0; + } -#ifdef USE_EMX_MOUSE - { - char kbuf[3]; - - int i, res = read(M_FD(sp), &kbuf, 3); /* Eat the prefix */ - if (res != 3) - printf("Got %d chars instead of 3 for prefix.\n", res); - for (i = 0; i < res; i++) { - if (kbuf[i] != key_mouse[i]) - printf("Got char %d instead of %d for prefix.\n", - (int) kbuf[i], (int) key_mouse[i]); + /* bump the next-free pointer into the circular list */ + eventp = NEXT(eventp); + result = TRUE; } - return TRUE; + break; +#endif /* USE_SYSMOUSE */ + + case M_NONE: + break; } -#endif /* USE_EMX_MOUSE */ - /* xterm: never have to query, mouse events are in the keyboard stream */ - return (FALSE); /* no event waiting */ + return result; /* true if we found an event */ } static bool _nc_mouse_inline(SCREEN * sp) /* mouse report received in the keyboard stream -- parse its info */ { + bool result = FALSE; + TR(MY_TRACE, ("_nc_mouse_inline() called")); - if (mousetype == M_XTERM) { + if (SP->_mouse_type == M_XTERM) { unsigned char kbuf[4]; - MEVENT *prev; + mmask_t prev; size_t grabbed; int res; @@ -438,7 +645,7 @@ _nc_mouse_inline(SCREEN * sp) for (grabbed = 0; grabbed < 3; grabbed += res) { /* For VIO mouse we add extra bit 64 to disambiguate button-up. */ -#ifdef USE_EMX_MOUSE +#if USE_EMX_MOUSE res = read(M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3); #else res = read(sp->_ifd, kbuf + grabbed, 3 - grabbed); @@ -451,59 +658,65 @@ _nc_mouse_inline(SCREEN * sp) TR(TRACE_IEVENT, ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf)); - eventp->id = 0; /* there's only one mouse... */ + /* there's only one mouse... */ + eventp->id = NORMAL_EVENT; /* processing code goes here */ eventp->bstate = 0; + prev = PREV(eventp)->bstate; + +#if USE_EMX_MOUSE +#define PRESS_POSITION(n) \ + eventp->bstate = MASK_PRESS(n); \ + if (kbuf[0] & 0x40) \ + eventp->bstate = MASK_RELEASE(n) +#else +#define PRESS_POSITION(n) \ + eventp->bstate = (prev & MASK_PRESS(n) \ + ? REPORT_MOUSE_POSITION \ + : MASK_PRESS(n)) +#endif + switch (kbuf[0] & 0x3) { case 0x0: - eventp->bstate = BUTTON1_PRESSED; -#ifdef USE_EMX_MOUSE - if (kbuf[0] & 0x40) - eventp->bstate = BUTTON1_RELEASED; -#endif + PRESS_POSITION(1); break; case 0x1: - eventp->bstate = BUTTON2_PRESSED; -#ifdef USE_EMX_MOUSE - if (kbuf[0] & 0x40) - eventp->bstate = BUTTON2_RELEASED; -#endif + PRESS_POSITION(2); break; case 0x2: - eventp->bstate = BUTTON3_PRESSED; -#ifdef USE_EMX_MOUSE - if (kbuf[0] & 0x40) - eventp->bstate = BUTTON3_RELEASED; -#endif + PRESS_POSITION(3); break; case 0x3: /* - * Release events aren't reported for individual buttons, - * just for the button set as a whole... + * Release events aren't reported for individual buttons, just for + * the button set as a whole. However, because there are normally + * no mouse events under xterm that intervene between press and + * release, we can infer the button actually released by looking at + * the previous event. */ - eventp->bstate = - (BUTTON1_RELEASED | - BUTTON2_RELEASED | - BUTTON3_RELEASED); - /* - * ...however, because there are no kinds of mouse events under - * xterm that can intervene between press and release, we can - * deduce which buttons were actually released by looking at the - * previous event. - */ - prev = PREV(eventp); - if (!(prev->bstate & BUTTON1_PRESSED)) - eventp->bstate &= ~BUTTON1_RELEASED; - if (!(prev->bstate & BUTTON2_PRESSED)) - eventp->bstate &= ~BUTTON2_RELEASED; - if (!(prev->bstate & BUTTON3_PRESSED)) - eventp->bstate &= ~BUTTON3_RELEASED; + if (prev & (BUTTON_PRESSED | BUTTON_RELEASED)) { + eventp->bstate = BUTTON_RELEASED; + if (!(prev & BUTTON1_PRESSED)) + eventp->bstate &= ~BUTTON1_RELEASED; + if (!(prev & BUTTON2_PRESSED)) + eventp->bstate &= ~BUTTON2_RELEASED; + if (!(prev & BUTTON3_PRESSED)) + eventp->bstate &= ~BUTTON3_RELEASED; + } else { + /* + * XFree86 xterm will return a stream of release-events to + * let the application know where the mouse is going, if the + * private mode 1002 or 1003 is enabled. + */ + eventp->bstate = REPORT_MOUSE_POSITION; + } break; } + result = (eventp->bstate & REPORT_MOUSE_POSITION) ? TRUE : FALSE; if (kbuf[0] & 4) { eventp->bstate |= BUTTON_SHIFT; @@ -529,7 +742,7 @@ _nc_mouse_inline(SCREEN * sp) #endif } - return (FALSE); + return (result); } static void @@ -542,16 +755,16 @@ mouse_activate(bool on) if (on) { - switch (mousetype) { + switch (SP->_mouse_type) { case M_XTERM: #if NCURSES_EXT_FUNCS keyok(KEY_MOUSE, on); #endif TPUTS_TRACE("xterm mouse initialization"); -#ifdef USE_EMX_MOUSE +#if USE_EMX_MOUSE server_state(1); #else - putp("\033[?1000h"); + enable_xterm_mouse(1); #endif break; #if USE_GPM_SUPPORT @@ -559,6 +772,13 @@ mouse_activate(bool on) SP->_mouse_fd = gpm_fd; break; #endif +#if USE_SYSMOUSE + case M_SYSMOUSE: + signal(SIGUSR2, handle_sysmouse); + break; +#endif + case M_NONE: + return; } /* Make runtime binding to cut down on object size of applications that * do not use the mouse (e.g., 'clear'). @@ -571,19 +791,26 @@ mouse_activate(bool on) } else { - switch (mousetype) { + switch (SP->_mouse_type) { case M_XTERM: TPUTS_TRACE("xterm mouse deinitialization"); -#ifdef USE_EMX_MOUSE +#if USE_EMX_MOUSE server_state(0); #else - putp("\033[?1000l"); + enable_xterm_mouse(0); #endif break; #if USE_GPM_SUPPORT case M_GPM: break; #endif +#if USE_SYSMOUSE + case M_SYSMOUSE: + signal(SIGUSR2, SIG_IGN); + break; +#endif + case M_NONE: + return; } } _nc_flush(); @@ -609,7 +836,7 @@ _nc_mouse_parse(int runcount) * When we enter this routine, the event list next-free pointer * points just past a run of mouse events that we know were separated * in time by less than the critical click interval. The job of this - * routine is to collaps this run into a single higher-level event + * routine is to collapse this run into a single higher-level event * or gesture. * * We accomplish this in two passes. The first pass merges press/release @@ -631,7 +858,7 @@ _nc_mouse_parse(int runcount) ("_nc_mouse_parse: returning simple mouse event %s at slot %ld", _tracemouse(prev), (long) (prev - events))); - return (prev->id >= 0) + return (prev->id >= NORMAL_EVENT) ? ((prev->bstate & eventmask) ? TRUE : FALSE) : FALSE; } @@ -657,7 +884,7 @@ _nc_mouse_parse(int runcount) merge = FALSE; for (ep = runp; (next = NEXT(ep)) != eventp; ep = next) { if (ep->x == next->x && ep->y == next->y - && (ep->bstate & (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED)) + && (ep->bstate & BUTTON_PRESSED) && (!(ep->bstate & BUTTON1_PRESSED) == !(next->bstate & BUTTON1_RELEASED)) && (!(ep->bstate & BUTTON2_PRESSED) @@ -729,10 +956,8 @@ _nc_mouse_parse(int runcount) continue; /* merge click events forward */ - if ((ep->bstate & - (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED)) - && (follower->bstate & - (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) { + if ((ep->bstate & BUTTON_CLICKED) + && (follower->bstate & BUTTON_CLICKED)) { if ((eventmask & BUTTON1_DOUBLE_CLICKED) && (follower->bstate & BUTTON1_CLICKED)) { follower->bstate &= ~BUTTON1_CLICKED; @@ -760,8 +985,7 @@ _nc_mouse_parse(int runcount) (BUTTON1_DOUBLE_CLICKED | BUTTON2_DOUBLE_CLICKED | BUTTON3_DOUBLE_CLICKED)) - && (follower->bstate & - (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) { + && (follower->bstate & BUTTON_CLICKED)) { if ((eventmask & BUTTON1_TRIPLE_CLICKED) && (follower->bstate & BUTTON1_CLICKED)) { follower->bstate &= ~BUTTON1_CLICKED; @@ -831,7 +1055,7 @@ _nc_mouse_wrap(SCREEN * sp GCC_UNUSED) { TR(MY_TRACE, ("_nc_mouse_wrap() called")); - switch (mousetype) { + switch (SP->_mouse_type) { case M_XTERM: if (eventmask) mouse_activate(FALSE); @@ -841,6 +1065,13 @@ _nc_mouse_wrap(SCREEN * sp GCC_UNUSED) case M_GPM: break; #endif +#if USE_SYSMOUSE + case M_SYSMOUSE: + mouse_activate(FALSE); + break; +#endif + case M_NONE: + break; } } @@ -850,11 +1081,27 @@ _nc_mouse_resume(SCREEN * sp GCC_UNUSED) { TR(MY_TRACE, ("_nc_mouse_resume() called")); - /* xterm: re-enable reporting */ - if (mousetype == M_XTERM && eventmask) - mouse_activate(TRUE); + switch (SP->_mouse_type) { + case M_XTERM: + /* xterm: re-enable reporting */ + if (eventmask) + mouse_activate(TRUE); + break; - /* GPM: reclaim our event set */ +#if USE_GPM_SUPPORT + case M_GPM: + /* GPM: reclaim our event set */ + break; +#endif + +#if USE_SYSMOUSE + case M_SYSMOUSE: + mouse_activate(TRUE); + break; +#endif + case M_NONE: + break; + } } /************************************************************************** @@ -869,7 +1116,7 @@ getmouse(MEVENT * aevent) { T((T_CALLED("getmouse(%p)"), aevent)); - if (aevent && (mousetype != M_NONE)) { + if (aevent && (SP->_mouse_type != M_NONE)) { /* compute the current-event pointer */ MEVENT *prev = PREV(eventp); @@ -917,14 +1164,14 @@ mousemask(mmask_t newmask, mmask_t * oldmask) returnBits(0); _nc_mouse_init(); - if (mousetype != M_NONE) { + if (SP->_mouse_type != M_NONE) { eventmask = newmask & - (BUTTON_ALT | BUTTON_CTRL | BUTTON_SHIFT - | BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON1_CLICKED + (REPORT_MOUSE_POSITION | BUTTON_ALT | BUTTON_CTRL | BUTTON_SHIFT + | BUTTON_PRESSED + | BUTTON_RELEASED + | BUTTON_CLICKED | BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED - | BUTTON2_PRESSED | BUTTON2_RELEASED | BUTTON2_CLICKED | BUTTON2_DOUBLE_CLICKED | BUTTON2_TRIPLE_CLICKED - | BUTTON3_PRESSED | BUTTON3_RELEASED | BUTTON3_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED); mouse_activate(eventmask != 0); @@ -977,7 +1224,7 @@ mouseinterval(int maxclick) NCURSES_EXPORT(int) _nc_has_mouse(void) { - return (mousetype == M_NONE ? 0 : 1); + return (SP->_mouse_type == M_NONE ? 0 : 1); } NCURSES_EXPORT(bool) @@ -1010,5 +1257,3 @@ wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen) } returnBool(result); } - -/* lib_mouse.c ends here */ diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index 8d6dd97e..41bbc4ee 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -47,7 +47,7 @@ #include /* clear_screen, cup & friends, cur_term */ #include -MODULE_ID("$Id: lib_newterm.c,v 1.56 2002/10/12 15:24:08 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.57 2002/10/20 00:10:56 Philippe.Blain Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 @@ -119,13 +119,6 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp) if (filter_mode) { LINES = 1; - if (VALID_NUMERIC(init_tabs)) - TABSIZE = init_tabs; - else - TABSIZE = 8; - - T(("TABSIZE = %d", TABSIZE)); - clear_screen = 0; cursor_down = parm_down_cursor = 0; cursor_address = 0; diff --git a/ncurses/base/lib_printw.c b/ncurses/base/lib_printw.c index d08a0b42..03ec6429 100644 --- a/ncurses/base/lib_printw.c +++ b/ncurses/base/lib_printw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -39,10 +39,10 @@ #include -MODULE_ID("$Id: lib_printw.c,v 1.13 2002/10/05 22:52:21 tom Exp $") +MODULE_ID("$Id: lib_printw.c,v 1.15 2003/02/08 20:50:13 tom Exp $") NCURSES_EXPORT(int) -printw(NCURSES_CONST char *fmt,...) +printw(const char *fmt,...) { va_list argp; int code; @@ -62,7 +62,7 @@ printw(NCURSES_CONST char *fmt,...) } NCURSES_EXPORT(int) -wprintw(WINDOW *win, NCURSES_CONST char *fmt,...) +wprintw(WINDOW *win, const char *fmt,...) { va_list argp; int code; @@ -82,7 +82,7 @@ wprintw(WINDOW *win, NCURSES_CONST char *fmt,...) } NCURSES_EXPORT(int) -mvprintw(int y, int x, NCURSES_CONST char *fmt,...) +mvprintw(int y, int x, const char *fmt,...) { va_list argp; int code; @@ -103,7 +103,7 @@ mvprintw(int y, int x, NCURSES_CONST char *fmt,...) } NCURSES_EXPORT(int) -mvwprintw(WINDOW *win, int y, int x, NCURSES_CONST char *fmt,...) +mvwprintw(WINDOW *win, int y, int x, const char *fmt,...) { va_list argp; int code; @@ -124,7 +124,7 @@ mvwprintw(WINDOW *win, int y, int x, NCURSES_CONST char *fmt,...) } NCURSES_EXPORT(int) -vwprintw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp) +vwprintw(WINDOW *win, const char *fmt, va_list argp) { char *buf; int code = ERR; @@ -134,9 +134,6 @@ vwprintw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp) if ((buf = _nc_printf_string(fmt, argp)) != 0) { code = waddstr(win, buf); -#if USE_SAFE_SPRINTF - free(buf); -#endif } returnCode(code); } diff --git a/ncurses/base/lib_scroll.c b/ncurses/base/lib_scroll.c index 39c62d08..f8e16baf 100644 --- a/ncurses/base/lib_scroll.c +++ b/ncurses/base/lib_scroll.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996-2001 * + * Author: Thomas E. Dickey 1996-2003 * * and: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * ****************************************************************************/ @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_scroll.c,v 1.23 2001/12/19 01:06:55 tom Exp $") +MODULE_ID("$Id: lib_scroll.c,v 1.24 2003/07/26 23:25:26 tom Exp $") NCURSES_EXPORT(void) _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top, @@ -77,24 +77,15 @@ _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top, /* shift n lines downwards */ if (n < 0) { limit = top - n; - if (limit > win->_maxy) - limit = win->_maxy; - for (line = bottom; line >= limit; line--) { - if (line + n >= 0) { - TR(TRACE_MOVE, ("...copying %d to %d", line + n, line)); - memcpy(win->_line[line].text, - win->_line[line + n].text, - to_copy); - if_USE_SCROLL_HINTS(win->_line[line].oldindex = - win->_line[line + n].oldindex); - } else { - TR(TRACE_MOVE, ("...filling %d", line)); - for (j = 0; j <= win->_maxx; j++) - win->_line[line].text[j] = blank; - if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); - } + for (line = bottom; line >= limit && line >= 0; line--) { + TR(TRACE_MOVE, ("...copying %d to %d", line + n, line)); + memcpy(win->_line[line].text, + win->_line[line + n].text, + to_copy); + if_USE_SCROLL_HINTS(win->_line[line].oldindex = + win->_line[line + n].oldindex); } - for (line = top; line < limit; line++) { + for (line = top; line < limit && line <= win->_maxy; line++) { TR(TRACE_MOVE, ("...filling %d", line)); for (j = 0; j <= win->_maxx; j++) win->_line[line].text[j] = blank; @@ -105,25 +96,14 @@ _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top, /* shift n lines upwards */ if (n > 0) { limit = bottom - n; - if (limit < 0) - limit = 0; - for (line = top; line <= limit; line++) { - if (line + n <= win->_maxy) { - TR(TRACE_MOVE, ("...copying %d to %d", line + n, line)); - memcpy(win->_line[line].text, - win->_line[line + n].text, - to_copy); - if_USE_SCROLL_HINTS(win->_line[line].oldindex = - win->_line[line + n].oldindex); - } else { - TR(TRACE_MOVE, ("...filling %d", line)); - for (j = 0; j <= win->_maxx; j++) - win->_line[line].text[j] = blank; - if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); - } + for (line = top; line <= limit && line <= win->_maxy; line++) { + memcpy(win->_line[line].text, + win->_line[line + n].text, + to_copy); + if_USE_SCROLL_HINTS(win->_line[line].oldindex = + win->_line[line + n].oldindex); } - for (line = bottom; line > limit; line--) { - TR(TRACE_MOVE, ("...filling %d", line)); + for (line = bottom; line > limit && line >= 0; line--) { for (j = 0; j <= win->_maxx; j++) win->_line[line].text[j] = blank; if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); @@ -142,11 +122,9 @@ wscrl(WINDOW *win, int n) returnCode(ERR); } - if (n == 0) - returnCode(OK); - - _nc_scroll_window(win, n, win->_regtop, win->_regbottom, win->_nc_bkgd); - - _nc_synchook(win); + if (n != 0) { + _nc_scroll_window(win, n, win->_regtop, win->_regbottom, win->_nc_bkgd); + _nc_synchook(win); + } returnCode(OK); } diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index ac24ce07..91f82767 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -43,7 +44,7 @@ #include /* cur_term */ #include -MODULE_ID("$Id: lib_set_term.c,v 1.71 2002/09/14 22:48:00 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.81 2003/11/15 23:57:01 tom Exp $") NCURSES_EXPORT(SCREEN *) set_term(SCREEN * screenp) @@ -61,7 +62,6 @@ set_term(SCREEN * screenp) stdscr = SP->_stdscr; COLORS = SP->_color_count; COLOR_PAIRS = SP->_pair_count; - memcpy(acs_map, SP->_acs_map, sizeof(SP->_acs_map[0]) * ACS_LEN); T((T_RETURN("%p"), oldSP)); return (oldSP); @@ -84,6 +84,7 @@ NCURSES_EXPORT(void) delscreen(SCREEN * sp) { SCREEN **scan = &_nc_screen_chain; + int i; T((T_CALLED("delscreen(%p)"), sp)); @@ -100,8 +101,13 @@ delscreen(SCREEN * sp) (void) _nc_freewin(sp->_stdscr); if (sp->_slk != 0) { - FreeIfNeeded(sp->_slk->ent); - FreeIfNeeded(sp->_slk->buffer); + if (sp->_slk->ent != 0) { + for (i = 0; i < sp->_slk->labcnt; ++i) { + FreeIfNeeded(sp->_slk->ent[i].ent_text); + FreeIfNeeded(sp->_slk->ent[i].form_text); + } + free(sp->_slk->ent); + } free(sp->_slk); sp->_slk = 0; } @@ -204,11 +210,11 @@ extract_fgbg(char *src, int *result) #endif NCURSES_EXPORT(int) -_nc_setupscreen(short slines, short const scolumns, FILE * output) +_nc_setupscreen(short slines, short const scolumns, FILE *output) /* OS-independent screen initializations */ { int bottom_stolen = 0; - size_t i; + int i; T((T_CALLED("_nc_setupscreen(%d, %d, %p)"), slines, scolumns, output)); assert(SP == 0); /* has been reset in newterm() ! */ @@ -218,6 +224,11 @@ _nc_setupscreen(short slines, short const scolumns, FILE * output) SP->_next_screen = _nc_screen_chain; _nc_screen_chain = SP; +#ifdef __DJGPP__ + T(("setting output mode to binary")); + fflush(output); + setmode(output, O_BINARY); +#endif _nc_set_buffer(output, TRUE); SP->_term = cur_term; SP->_lines = slines; @@ -377,8 +388,15 @@ _nc_setupscreen(short slines, short const scolumns, FILE * output) _nc_init_acs(); #if USE_WIDEC_SUPPORT _nc_init_wacs(); + + SP->_screen_acs_fix = (_nc_unicode_locale() && _nc_locale_breaks_acs()); + { + char *env = _nc_get_locale(); + SP->_posix_locale = ((env == 0) + || !strcmp(env, "C") + || !strcmp(env, "POSIX")); + } #endif - memcpy(SP->_acs_map, acs_map, sizeof(chtype) * ACS_LEN); _nc_idcok = TRUE; _nc_idlok = FALSE; @@ -408,7 +426,7 @@ _nc_setupscreen(short slines, short const scolumns, FILE * output) def_shell_mode(); def_prog_mode(); - for (i = 0, rsp = rippedoff; rsp->line && (i < N_RIPS); rsp++, i++) { + for (i = 0, rsp = rippedoff; rsp->line && (i < (int) N_RIPS); rsp++, i++) { T(("ripping off line %d at %s", i, rsp->line < 0 ? "bottom" : "top")); SP->_rippedoff[i] = rippedoff[i]; if (rsp->hook) { diff --git a/ncurses/base/lib_slk.c b/ncurses/base/lib_slk.c index 72fff96d..4bdf8afc 100644 --- a/ncurses/base/lib_slk.c +++ b/ncurses/base/lib_slk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * + * 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 * @@ -41,7 +41,7 @@ #include #include /* num_labels, label_*, plab_norm */ -MODULE_ID("$Id: lib_slk.c,v 1.24 2002/09/28 17:46:40 tom Exp $") +MODULE_ID("$Id: lib_slk.c,v 1.28 2003/05/24 21:10:28 tom Exp $") /* * We'd like to move these into the screen context structure, but cannot, @@ -64,11 +64,25 @@ slk_paint_info(WINDOW *win) wmove(win, 0, 0); for (i = 0; i < SP->_slk->maxlab; i++) { - mvwprintw(win, 0, SP->_slk->ent[i].x, "F%d", i + 1); + mvwprintw(win, 0, SP->_slk->ent[i].ent_x, "F%d", i + 1); } } } +/* + * Free any memory related to soft labels, return an error. + */ +static int +slk_failed(void) +{ + if (SP->_slk) { + FreeIfNeeded(SP->_slk->ent); + free(SP->_slk); + SP->_slk = (SLK *) 0; + } + return ERR; +} + /* * Initialize soft labels. * Called from newterm() @@ -78,19 +92,26 @@ _nc_slk_initialize(WINDOW *stwin, int cols) { int i, x; int res = OK; - char *p; unsigned max_length; - T(("slk_initialize()")); + T((T_CALLED("_nc_slk_initialize()"))); if (SP->_slk) { /* we did this already, so simply return */ - return (OK); + returnCode(OK); } else if ((SP->_slk = typeCalloc(SLK, 1)) == 0) - return (ERR); + returnCode(ERR); SP->_slk->ent = NULL; - SP->_slk->buffer = NULL; - SP->_slk->attr = A_STANDOUT; + + /* + * If we use colors, vidputs() will suppress video attributes that conflict + * with colors. In that case, we're still guaranteed that "reverse" would + * work. + */ + if ((no_color_video & 1) == 0) + SP->_slk->attr = A_STANDOUT; + else + SP->_slk->attr = A_REVERSE; SP->_slk->maxlab = ((num_labels > 0) ? num_labels @@ -106,19 +127,19 @@ _nc_slk_initialize(WINDOW *stwin, int cols) || SP->_slk->labcnt <= 0 || (SP->_slk->ent = typeCalloc(slk_ent, (unsigned) SP->_slk->labcnt)) == NULL) - goto exception; + returnCode(slk_failed()); max_length = SP->_slk->maxlen; - p = SP->_slk->buffer = (char *) calloc((unsigned) (2 * SP->_slk->labcnt), - (1 + max_length)); - if (SP->_slk->buffer == NULL) - goto exception; - for (i = 0; i < SP->_slk->labcnt; i++) { - SP->_slk->ent[i].text = p; - p += (1 + max_length); - SP->_slk->ent[i].form_text = p; - p += (1 + max_length); + + if ((SP->_slk->ent[i].ent_text = (char *)_nc_doalloc(0, max_length + 1)) == 0) + returnCode(slk_failed()); + memset(SP->_slk->ent[i].ent_text, 0, max_length + 1); + + if ((SP->_slk->ent[i].form_text = (char *)_nc_doalloc(0, max_length + 1)) == 0) + returnCode(slk_failed()); + memset(SP->_slk->ent[i].form_text, 0, max_length + 1); + memset(SP->_slk->ent[i].form_text, ' ', max_length); SP->_slk->ent[i].visible = (i < SP->_slk->maxlab); } @@ -129,7 +150,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols) gap = 1; for (i = x = 0; i < SP->_slk->maxlab; i++) { - SP->_slk->ent[i].x = x; + SP->_slk->ent[i].ent_x = x; x += max_length; x += (i == 3 || i == 7) ? gap : 1; } @@ -141,7 +162,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols) if (gap < 1) gap = 1; for (i = x = 0; i < SP->_slk->maxlab; i++) { - SP->_slk->ent[i].x = x; + SP->_slk->ent[i].ent_x = x; x += max_length; x += (i == 3) ? gap : 1; } @@ -153,24 +174,17 @@ _nc_slk_initialize(WINDOW *stwin, int cols) if (gap < 1) gap = 1; for (i = x = 0; i < SP->_slk->maxlab; i++) { - SP->_slk->ent[i].x = x; + SP->_slk->ent[i].ent_x = x; x += max_length; x += (i == 2 || i == 4) ? gap : 1; } } else - goto exception; + returnCode(slk_failed()); } } SP->_slk->dirty = TRUE; if ((SP->_slk->win = stwin) == NULL) { - exception: - if (SP->_slk) { - FreeIfNeeded(SP->_slk->buffer); - FreeIfNeeded(SP->_slk->ent); - free(SP->_slk); - SP->_slk = (SLK *) 0; - res = (ERR); - } + returnCode(slk_failed()); } /* We now reset the format so that the next newterm has again @@ -179,7 +193,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols) */ SP->slk_format = _nc_slk_format; _nc_slk_format = 0; - return (res); + returnCode(res); } /* diff --git a/ncurses/base/lib_slkatr_set.c b/ncurses/base/lib_slkatr_set.c index ec09fddf..45cc89cb 100644 --- a/ncurses/base/lib_slkatr_set.c +++ b/ncurses/base/lib_slkatr_set.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1998 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /* @@ -38,7 +37,7 @@ */ #include -MODULE_ID("$Id: lib_slkatr_set.c,v 1.6 2002/07/06 22:47:23 juergen Exp $") +MODULE_ID("$Id: lib_slkatr_set.c,v 1.7 2003/10/25 15:27:03 tom Exp $") NCURSES_EXPORT(int) slk_attr_set diff --git a/ncurses/base/lib_slkcolor.c b/ncurses/base/lib_slkcolor.c index b6032b4d..d7af4a25 100644 --- a/ncurses/base/lib_slkcolor.c +++ b/ncurses/base/lib_slkcolor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1998 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /* @@ -36,7 +35,7 @@ */ #include -MODULE_ID("$Id: lib_slkcolor.c,v 1.8 2002/07/06 22:49:22 juergen Exp $") +MODULE_ID("$Id: lib_slkcolor.c,v 1.9 2003/10/25 15:27:03 tom Exp $") NCURSES_EXPORT(int) slk_color(short color_pair_number) diff --git a/ncurses/base/lib_slklab.c b/ncurses/base/lib_slklab.c index 0224e9b0..42bb4ac1 100644 --- a/ncurses/base/lib_slklab.c +++ b/ncurses/base/lib_slklab.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -38,7 +38,7 @@ */ #include -MODULE_ID("$Id: lib_slklab.c,v 1.6 2000/12/10 02:43:27 tom Exp $") +MODULE_ID("$Id: lib_slklab.c,v 1.7 2003/03/29 22:53:48 tom Exp $") NCURSES_EXPORT(char *) slk_label(int n) @@ -47,5 +47,5 @@ slk_label(int n) if (SP == NULL || SP->_slk == NULL || n < 1 || n > SP->_slk->labcnt) returnPtr(0); - returnPtr(SP->_slk->ent[n - 1].text); + returnPtr(SP->_slk->ent[n - 1].ent_text); } diff --git a/ncurses/base/lib_slkrefr.c b/ncurses/base/lib_slkrefr.c index 18e5b0c1..9040cc04 100644 --- a/ncurses/base/lib_slkrefr.c +++ b/ncurses/base/lib_slkrefr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -38,7 +38,7 @@ #include #include /* num_labels, label_*, plab_norm */ -MODULE_ID("$Id: lib_slkrefr.c,v 1.10 2000/12/10 02:43:27 tom Exp $") +MODULE_ID("$Id: lib_slkrefr.c,v 1.11 2003/03/29 22:53:48 tom Exp $") /* * Write the soft labels to the soft-key window. @@ -58,7 +58,7 @@ slk_intern_refresh(SLK * slk) putp(tparm(plab_norm, i + 1, slk->ent[i].form_text)); } } else { - wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].x); + wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x); if (SP && SP->_slk) wattrset(slk->win, SP->_slk->attr); waddnstr(slk->win, slk->ent[i].form_text, diff --git a/ncurses/base/lib_slkset.c b/ncurses/base/lib_slkset.c index d15002f1..595a8ad1 100644 --- a/ncurses/base/lib_slkset.c +++ b/ncurses/base/lib_slkset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -38,13 +38,14 @@ #include #include -MODULE_ID("$Id: lib_slkset.c,v 1.7 2001/06/02 22:50:29 skimo Exp $") +MODULE_ID("$Id: lib_slkset.c,v 1.10 2003/04/12 21:32:16 tom Exp $") NCURSES_EXPORT(int) slk_set(int i, const char *astr, int format) { SLK *slk = SP->_slk; size_t len; + int offset; const char *str = astr; const char *p; @@ -64,33 +65,30 @@ slk_set(int i, const char *astr, int format) --i; /* Adjust numbering of labels */ len = (size_t) (p - str); - if (len > (unsigned) slk->maxlen) + if (len > (size_t) slk->maxlen) len = slk->maxlen; if (len == 0) - slk->ent[i].text[0] = 0; + slk->ent[i].ent_text[0] = 0; else - (void) strncpy(slk->ent[i].text, str, len); + strncpy(slk->ent[i].ent_text, str, len)[len] = 0; memset(slk->ent[i].form_text, ' ', (unsigned) slk->maxlen); - slk->ent[i].text[slk->maxlen] = 0; - /* len = strlen(slk->ent[i].text); */ + slk->ent[i].ent_text[slk->maxlen] = 0; switch (format) { + default: case 0: /* left-justified */ - memcpy(slk->ent[i].form_text, - slk->ent[i].text, - len); + offset = 0; break; case 1: /* centered */ - memcpy(slk->ent[i].form_text + (slk->maxlen - len) / 2, - slk->ent[i].text, - len); + offset = (slk->maxlen - len) / 2; break; case 2: /* right-justified */ - memcpy(slk->ent[i].form_text + slk->maxlen - len, - slk->ent[i].text, - len); + offset = slk->maxlen - len; break; } + memcpy(slk->ent[i].form_text + offset, + slk->ent[i].ent_text, + len); slk->ent[i].form_text[slk->maxlen] = 0; slk->ent[i].dirty = TRUE; returnCode(OK); diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c index 9cc8081b..e5b852c7 100644 --- a/ncurses/base/resizeterm.c +++ b/ncurses/base/resizeterm.c @@ -41,10 +41,13 @@ #include #include -MODULE_ID("$Id: resizeterm.c,v 1.14 2002/07/13 21:32:57 tom Exp $") +MODULE_ID("$Id: resizeterm.c,v 1.15 2002/12/28 01:21:34 tom Exp $") #define stolen_lines (screen_lines - SP->_lines_avail) +static int current_lines; +static int current_cols; + NCURSES_EXPORT(bool) is_term_resized(int ToLines, int ToCols) { @@ -99,7 +102,7 @@ static int adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen) { int result; - int bottom = screen_lines + SP->_topstolen - stolen; + int bottom = current_lines + SP->_topstolen - stolen; int myLines = win->_maxy + 1; int myCols = win->_maxx + 1; @@ -109,13 +112,13 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen) getbegy(win), getbegx(win))); if (win->_begy >= bottom) { - win->_begy += (ToLines - screen_lines); + win->_begy += (ToLines - current_lines); } else { - if (myLines == screen_lines - stolen - && ToLines != screen_lines) + if (myLines == current_lines - stolen + && ToLines != current_lines) myLines = ToLines - stolen; - else if (myLines == screen_lines - && ToLines != screen_lines) + else if (myLines == current_lines + && ToLines != current_lines) myLines = ToLines; } @@ -125,12 +128,12 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen) if (myCols > ToCols) myCols = ToCols; - if (myLines == screen_lines - && ToLines != screen_lines) - myCols = ToLines; + if (myLines == current_lines + && ToLines != current_lines) + myLines = ToLines; - if (myCols == screen_columns - && ToCols != screen_columns) + if (myCols == current_cols + && ToCols != current_cols) myCols = ToCols; result = wresize(win, myLines, myCols); @@ -216,15 +219,19 @@ resize_term(int ToLines, int ToCols) screen_lines, screen_columns)); if (is_term_resized(ToLines, ToCols)) { - int myLines = screen_lines; - int myCols = screen_columns; + int myLines = current_lines = screen_lines; + int myCols = current_cols = screen_columns; if (ToLines > screen_lines) { increase_size(myLines = ToLines, myCols, was_stolen); + current_lines = myLines; + current_cols = myCols; } if (ToCols > screen_columns) { increase_size(myLines, myCols = ToCols, was_stolen); + current_lines = myLines; + current_cols = myCols; } if (ToLines < myLines || diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c index cb48365f..81fe44f0 100644 --- a/ncurses/base/safe_sprintf.c +++ b/ncurses/base/safe_sprintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * + * 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 * @@ -33,7 +33,7 @@ #include #include -MODULE_ID("$Id: safe_sprintf.c,v 1.14 2001/07/08 00:58:34 tom Exp $") +MODULE_ID("$Id: safe_sprintf.c,v 1.18 2003/08/09 21:52:04 tom Exp $") #if USE_SAFE_SPRINTF @@ -56,10 +56,13 @@ _nc_printf_length(const char *fmt, va_list ap) char *buffer; char *format; int len = 0; + size_t fmt_len; + char fmt_arg[BUFSIZ]; if (fmt == 0 || *fmt == '\0') - return -1; - if ((format = typeMalloc(char, strlen(fmt) + 1)) == 0) + return 0; + fmt_len = strlen(fmt) + 1; + if ((format = typeMalloc(char, fmt_len)) == 0) return -1; if ((buffer = typeMalloc(char, length)) == 0) { free(format); @@ -106,7 +109,12 @@ _nc_printf_length(const char *fmt, va_list ap) } else if (state == Prec) { prec = ival; } - sprintf(&format[--f], "%d", ival); + sprintf(fmt_arg, "%d", ival); + fmt_len += strlen(fmt_arg); + if ((format = realloc(format, fmt_len)) == 0) { + return -1; + } + strcpy(&format[--f], fmt_arg); f = strlen(format); } else if (isalpha(UChar(*fmt))) { done = TRUE; @@ -203,42 +211,52 @@ _nc_printf_length(const char *fmt, va_list ap) * Wrapper for vsprintf that allocates a buffer big enough to hold the result. */ NCURSES_EXPORT(char *) -_nc_printf_string -(const char *fmt, va_list ap) +_nc_printf_string(const char *fmt, va_list ap) { + static char *buf; + static size_t used; + char *result = 0; + + if (fmt != 0) { #if USE_SAFE_SPRINTF - char *buf = 0; - int len = _nc_printf_length(fmt, ap); + int len = _nc_printf_length(fmt, ap); - if (len > 0) { - if ((buf = typeMalloc(char, len + 1)) == 0) - return (0); - vsprintf(buf, fmt, ap); - } + if ((int) used < len + 1) { + used = 2 * (len + 1); + buf = typeRealloc(char, used, buf); + } + if (buf != 0) { + *buf = '\0'; + if (len >= 0) { + vsprintf(buf, fmt, ap); + } + result = buf; + } #else - static int rows, cols; - static char *buf; - static size_t len; - - if (screen_lines > rows || screen_columns > cols) { - if (screen_lines > rows) - rows = screen_lines; - if (screen_columns > cols) - cols = screen_columns; - len = (rows * (cols + 1)) + 1; - buf = typeRealloc(char, len, buf); - if (buf == 0) { - return (0); + static int rows, cols; + + if (screen_lines > rows || screen_columns > cols) { + if (screen_lines > rows) + rows = screen_lines; + if (screen_columns > cols) + cols = screen_columns; + used = (rows * (cols + 1)) + 1; + buf = typeRealloc(char, used, buf); } - } - if (buf != 0) { + if (buf != 0) { # if HAVE_VSNPRINTF - vsnprintf(buf, len, fmt, ap); /* GNU extension */ + vsnprintf(buf, used, fmt, ap); /* GNU extension */ # else - vsprintf(buf, fmt, ap); /* ANSI */ + vsprintf(buf, fmt, ap); /* ANSI */ # endif - } + result = buf; + } #endif - return buf; + } else if (buf != 0) { /* see _nc_freeall() */ + free(buf); + buf = 0; + used = 0; + } + return result; } diff --git a/ncurses/base/sigaction.c b/ncurses/base/sigaction.c index 8ba8629a..36442e09 100644 --- a/ncurses/base/sigaction.c +++ b/ncurses/base/sigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,37 +29,29 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ -#include - -#include - /* This file provides sigaction() emulation using sigvec() */ /* Use only if this is non POSIX system */ -#if !HAVE_SIGACTION && HAVE_SIGVEC +MODULE_ID("$Id: sigaction.c,v 1.14 2003/12/07 01:06:52 tom Exp $") -MODULE_ID("$Id: sigaction.c,v 1.13 2002/05/18 19:56:26 tom Exp $") - -NCURSES_EXPORT(int) -sigaction -(int sig, sigaction_t * sigact, sigaction_t * osigact) +static int +_nc_sigaction(int sig, sigaction_t * sigact, sigaction_t * osigact) { return sigvec(sig, sigact, osigact); } -NCURSES_EXPORT(int) -sigemptyset -(sigset_t * mask) +static int +_nc_sigemptyset(sigset_t * mask) { *mask = 0; return 0; } -NCURSES_EXPORT(int) -sigprocmask -(int mode, sigset_t * mask, sigset_t * omask) +static int +_nc_sigprocmask(int mode, sigset_t * mask, sigset_t * omask) { sigset_t current = sigsetmask(0); @@ -77,41 +69,31 @@ sigprocmask return 0; } -NCURSES_EXPORT(int) -sigsuspend(sigset_t * mask) +static int +_nc_sigaddset(sigset_t * mask, int sig) { - return sigpause(*mask); + *mask |= sigmask(sig); + return 0; } -NCURSES_EXPORT(int) -sigdelset -(sigset_t * mask, int sig) +/* not used in lib_tstp.c */ +#if 0 +static int +_nc_sigsuspend(sigset_t * mask) { - *mask &= ~sigmask(sig); - return 0; + return sigpause(*mask); } -NCURSES_EXPORT(int) -sigaddset -(sigset_t * mask, int sig) +static int +_nc_sigdelset(sigset_t * mask, int sig) { - *mask |= sigmask(sig); + *mask &= ~sigmask(sig); return 0; } -NCURSES_EXPORT(int) -sigismember -(sigset_t * mask, int sig) +static int +_nc_sigismember(sigset_t * mask, int sig) { return (*mask & sigmask(sig)) != 0; } - -#else -extern -NCURSES_EXPORT(void) -_nc_sigaction(void); /* quiet's gcc warning */ -NCURSES_EXPORT(void) -_nc_sigaction(void) -{ -} /* nonempty for strict ANSI compilers */ #endif diff --git a/ncurses/base/tries.c b/ncurses/base/tries.c index fe7d93ed..3ae47898 100644 --- a/ncurses/base/tries.c +++ b/ncurses/base/tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -39,15 +39,14 @@ #include -MODULE_ID("$Id: tries.c,v 1.15 2001/12/16 00:50:40 tom Exp $") +MODULE_ID("$Id: tries.c,v 1.19 2003/05/17 23:11:24 tom Exp $") /* * Expand a keycode into the string that it corresponds to, returning null if * no match was found, otherwise allocating a string of the result. */ NCURSES_EXPORT(char *) -_nc_expand_try -(struct tries *tree, unsigned short code, int *count, size_t len) +_nc_expand_try(struct tries *tree, unsigned short code, int *count, size_t len) { struct tries *ptr = tree; char *result = 0; @@ -84,8 +83,7 @@ _nc_expand_try * true if the code was found/removed. */ NCURSES_EXPORT(int) -_nc_remove_key -(struct tries **tree, unsigned short code) +_nc_remove_key(struct tries **tree, unsigned short code) { T((T_CALLED("_nc_remove_key(%p,%d)"), tree, code)); @@ -117,7 +115,7 @@ _nc_remove_key * true if the string was found/removed. */ NCURSES_EXPORT(int) -_nc_remove_string(struct tries **tree, char *string) +_nc_remove_string(struct tries **tree, const char *string) { T((T_CALLED("_nc_remove_string(%p,%s)"), tree, _nc_visbuf(string))); @@ -125,18 +123,17 @@ _nc_remove_string(struct tries **tree, char *string) returnCode(FALSE); while (*tree != 0) { - if ((unsigned char) (*tree)->ch == (unsigned char) *string) { + if (UChar((*tree)->ch) == UChar(*string)) { if (string[1] != 0) returnCode(_nc_remove_string(&(*tree)->child, string + 1)); - if ((*tree)->child) { - /* don't cut the whole sub-tree */ - (*tree)->value = 0; - } else { + if ((*tree)->child == 0) { struct tries *to_free = *tree; *tree = (*tree)->sibling; free(to_free); + returnCode(TRUE); + } else { + returnCode(FALSE); } - returnCode(TRUE); } tree = &(*tree)->sibling; } diff --git a/ncurses/base/version.c b/ncurses/base/version.c index b78c99d0..6e7a9870 100644 --- a/ncurses/base/version.c +++ b/ncurses/base/version.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999,2000 Free Software Foundation, Inc. * + * Copyright (c) 1999-2000,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 * @@ -32,16 +32,11 @@ #include -MODULE_ID("$Id: version.c,v 1.4 2000/12/10 02:43:28 tom Exp $") +MODULE_ID("$Id: version.c,v 1.5 2004/01/10 21:18:17 tom Exp $") NCURSES_EXPORT(const char *) curses_version(void) { - static char my_version[80]; - T((T_CALLED("curses_version()"))); - sprintf(my_version, "ncurses %s.%d", - NCURSES_VERSION, - NCURSES_VERSION_PATCH); - returnPtr(my_version); + returnPtr("ncurses " NCURSES_VERSION_STRING); } diff --git a/ncurses/base/vsscanf.c b/ncurses/base/vsscanf.c index 12df4aa3..4d082ee4 100644 --- a/ncurses/base/vsscanf.c +++ b/ncurses/base/vsscanf.c @@ -38,7 +38,7 @@ #if !HAVE_VSSCANF -MODULE_ID("$Id: vsscanf.c,v 1.16 2002/09/07 17:27:56 tom Exp $") +MODULE_ID("$Id: vsscanf.c,v 1.17 2003/05/24 21:10:28 tom Exp $") #if !(HAVE_VFSCANF || HAVE__DOSCAN) @@ -230,7 +230,7 @@ vsscanf(const char *str, const char *format, va_list ap) /* find a chunk */ state = sUnknown; chunk = cUnknown; - other = cUnknown; + other = oUnknown; pointer = 0; for (n = 0; format[n] != 0 && state != sFinal; ++n) { my_fmt[n] = format[n]; diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 403cf50d..12492b27 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.228 2002/10/12 15:49:10 tom Exp $ + * $Id: curses.priv.h,v 1.255 2004/02/01 01:05:58 Stanislav.Ievlev Exp $ * * curses.priv.h * @@ -130,7 +130,9 @@ extern int errno; /* EMX mouse support */ #ifdef __EMX__ -#define USE_EMX_MOUSE +#define USE_EMX_MOUSE 1 +#else +#define USE_EMX_MOUSE 0 #endif #define DEFAULT_MAXCLICK 166 @@ -259,21 +261,32 @@ color_t; struct ldat { - NCURSES_CH_T *text; /* text of the line */ - NCURSES_SIZE_T firstchar; /* first changed character in the line */ - NCURSES_SIZE_T lastchar; /* last changed character in the line */ - NCURSES_SIZE_T oldindex; /* index of the line at last update */ + NCURSES_CH_T *text; /* text of the line */ + NCURSES_SIZE_T firstchar; /* first changed character in the line */ + NCURSES_SIZE_T lastchar; /* last changed character in the line */ + NCURSES_SIZE_T oldindex; /* index of the line at last update */ }; +typedef enum { + M_XTERM = -1 /* use xterm's mouse tracking? */ + ,M_NONE = 0 /* no mouse device */ +#if USE_GPM_SUPPORT + ,M_GPM /* use GPM */ +#endif +#if USE_SYSMOUSE + ,M_SYSMOUSE /* FreeBSD sysmouse on console */ +#endif +} MouseType; + /* * Structure for soft labels. */ typedef struct { - char *text; /* text for the label */ + char *ent_text; /* text for the label */ char *form_text; /* formatted text (left/center/...) */ - int x; /* x coordinate of this field */ + int ent_x; /* x coordinate of this field */ char dirty; /* this label has changed */ char visible; /* field is visible */ } slk_ent; @@ -283,11 +296,10 @@ typedef struct { char hidden; /* soft labels are hidden */ WINDOW *win; slk_ent *ent; - char* buffer; /* buffer for labels */ - short maxlab; /* number of available labels */ - short labcnt; /* number of allocated labels */ - short maxlen; /* length of labels */ - chtype attr; /* soft label attribute */ + short maxlab; /* number of available labels */ + short labcnt; /* number of allocated labels */ + short maxlen; /* length of labels */ + chtype attr; /* soft label attribute */ } SLK; typedef struct { @@ -308,7 +320,7 @@ struct screen { char *_setbuf; /* buffered I/O for output */ int _buffered; /* setvbuf uses _setbuf data */ int _checkfd; /* filedesc for typeahead check */ - struct term *_term; /* terminal type information */ + TERMINAL *_term; /* terminal type information */ short _lines; /* screen lines */ short _columns; /* screen columns */ @@ -326,6 +338,7 @@ struct screen { bool _tried; /* keypad mode was initialized */ bool _keypad_on; /* keypad mode is currently on */ + bool _called_wgetch; /* check for recursion in wgetch() */ int _fifo[FIFO_SIZE]; /* input push-back buffer */ short _fifohead, /* head of fifo queue */ _fifotail, /* tail of fifo queue */ @@ -339,6 +352,7 @@ struct screen { int _cursor; /* visibility of the cursor */ int _cursrow; /* physical cursor row */ int _curscol; /* physical cursor column */ + bool _notty; /* true if we cannot switch non-tty */ int _nl; /* True if NL -> CR/NL is on */ int _raw; /* True if in raw mode */ int _cbreak; /* 1 if in cbreak mode */ @@ -405,7 +419,7 @@ struct screen { #endif chtype _xmc_suppress; /* attributes to suppress if xmc */ chtype _xmc_triggers; /* attributes to process if xmc */ - chtype _acs_map[ACS_LEN]; + chtype _acs_map[ACS_LEN]; /* the real alternate-charset map */ /* used in lib_vidattr.c */ bool _use_rmso; /* true if we may use 'rmso' */ @@ -426,6 +440,7 @@ struct screen { /* * These are the data that support the mouse interface. */ + MouseType _mouse_type; int _maxclick; bool (*_mouse_event) (SCREEN *); bool (*_mouse_inline)(SCREEN *); @@ -433,6 +448,16 @@ struct screen { void (*_mouse_resume)(SCREEN *); void (*_mouse_wrap) (SCREEN *); int _mouse_fd; /* file-descriptor, if any */ + NCURSES_CONST char *_mouse_xtermcap; /* string to enable/disable mouse */ +#if USE_SYSMOUSE + MEVENT _sysmouse_fifo[FIFO_SIZE]; + int _sysmouse_head; + int _sysmouse_tail; + int _sysmouse_char_width; /* character width */ + int _sysmouse_char_height; /* character height */ + int _sysmouse_old_buttons; + int _sysmouse_new_buttons; +#endif /* * This supports automatic resizing @@ -463,6 +488,14 @@ struct screen { bool _cleanup; /* cleanup after int/quit signal */ int (*_outch)(int); /* output handler if not putc */ + + /* recent versions of 'screen' have partially-working support for + * UTF-8, but do not permit ACS at the same time (see tty_update.c). + */ +#if USE_WIDEC_SUPPORT + bool _posix_locale; + bool _screen_acs_fix; +#endif }; extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; @@ -471,21 +504,19 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; #include #endif -/* - * The margins are used in resizeterm() to retain the original layout after - * resizing. - */ WINDOWLIST { + WINDOW win; /* first, so WINDOW_EXT() works */ WINDOWLIST *next; -#if HAVE_RESIZETERM - int l_margin; - int r_margin; - int t_margin; - int b_margin; +#ifdef _XOPEN_SOURCE_EXTENDED + char addch_work[(MB_LEN_MAX * 9) + 1]; + int addch_used; + int addch_x; + int addch_y; #endif - WINDOW win; }; +#define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field) + /* The terminfo source is assumed to be 7-bit ASCII */ #define is7bits(c) ((unsigned)(c) < 128) @@ -539,18 +570,29 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; #define O_BINARY 0 #endif +#ifdef TRACE +#define TRACE_OUTCHARS(n) _nc_outchars += (n); +#else +#define TRACE_OUTCHARS(n) /* nothing */ +#endif + #define UChar(c) ((unsigned char)(c)) #define ChCharOf(c) ((c) & (chtype)A_CHARTEXT) #define ChAttrOf(c) ((c) & (chtype)A_ATTRIBUTES) +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */ +#endif + #if USE_WIDEC_SUPPORT /* { */ +#define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */ #define CharOf(c) ((c).chars[0]) #define AttrOf(c) ((c).attr) #define AddAttr(c,a) (c).attr |= a #define RemAttr(c,a) (c).attr &= ~(a) #define SetAttr(c,a) (c).attr = a -#define NewChar(ch) { ChAttrOf(ch), { ChCharOf(ch) } } -#define NewChar2(c,a) { a, { c } } +#define NewChar(ch) { ChAttrOf(ch), { ChCharOf(ch), NulChar } } +#define NewChar2(c,a) { a, { c, NulChar } } #define CharEq(a,b) (!memcmp(&a, &b, sizeof(a))) #define SetChar(ch,c,a) do { \ NCURSES_CH_T *_cp = &ch; \ @@ -562,9 +604,14 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; #define CARG_CH_T const NCURSES_CH_T * #define PUTC_DATA char PUTC_buf[MB_LEN_MAX]; int PUTC_i, PUTC_n; \ mbstate_t PUT_st; wchar_t PUTC_ch +#define PUTC_INIT memset (&PUT_st, '\0', sizeof (PUT_st)); \ + PUTC_i = 0 #define PUTC(ch,b) do { if(!isnac(ch)) { \ - memset (&PUT_st, '\0', sizeof (PUT_st)); \ - PUTC_i = 0; \ + if (Charable(ch)) { \ + fputc(CharOf(ch), b); \ + TRACE_OUTCHARS(1); \ + } else { \ + PUTC_INIT; \ do { \ PUTC_ch = PUTC_i < CCHARW_MAX ? \ (ch).chars[PUTC_i] : L'\0'; \ @@ -577,7 +624,8 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b); \ ++PUTC_i; \ } while (PUTC_ch != L'\0'); \ - } } while (0) + TRACE_OUTCHARS(PUTC_i); \ + } } } while (0) #define BLANK { WA_NORMAL, ' ' } #define ISBLANK(ch) ((ch).chars[0] == L' ' && (ch).chars[1] == L'\0') @@ -585,9 +633,10 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; #define WA_NAC 1 #define isnac(ch) (AttrOf(ch) & WA_NAC) #define if_WIDEC(code) code -#define Charable(ch) (!isnac(ch) && \ - (ch).chars[1] == L'\0' && \ - (wctob(CharOf(ch)) == (char)CharOf(ch))) +#define Charable(ch) ((SP != 0 && SP->_posix_locale) \ + || (!isnac(ch) && \ + (ch).chars[1] == L'\0' && \ + _nc_is_charable(CharOf(ch)))) #define L(ch) L ## ch #else /* }{ */ @@ -743,7 +792,7 @@ extern NCURSES_EXPORT(void) name (void); \ #define ALL_BUT_COLOR ((chtype)~(A_COLOR)) #define IGNORE_COLOR_OFF FALSE -#define NONBLANK_ATTR (A_BOLD|A_DIM|A_BLINK) +#define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK) #define XMC_CHANGES(c) ((c) & SP->_xmc_suppress) #define toggle_attr_on(S,at) {\ @@ -781,7 +830,7 @@ extern NCURSES_EXPORT(void) name (void); \ : ((enter_insert_mode && exit_insert_mode) \ ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \ : ((insert_character != 0) \ - ? (SP->_ich1_cost * count) \ + ? ((SP->_ich1_cost + SP->_ip_cost) * count) \ : INFINITY))) #if USE_XMC_SUPPORT @@ -847,6 +896,13 @@ extern NCURSES_EXPORT(void) _nc_expanded (void); #define getcwd(buf,len) getwd(buf) #endif +/* charable.c */ +#if USE_WIDEC_SUPPORT +extern NCURSES_EXPORT(bool) _nc_is_charable(wchar_t); +extern NCURSES_EXPORT(int) _nc_to_char(wint_t); +extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int); +#endif + /* doupdate.c */ #if USE_XMC_SUPPORT extern NCURSES_EXPORT(void) _nc_do_xmc_glitch (attr_t); @@ -872,6 +928,9 @@ extern NCURSES_EXPORT(bool) _nc_reset_colors(void); /* lib_getch.c */ extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *)); +/* lib_insch.c */ +extern NCURSES_EXPORT(void) _nc_insert_ch(WINDOW *, chtype); + /* lib_mvcur.c */ #define INFINITY 1000000 /* cost: too high to use */ @@ -890,6 +949,12 @@ extern NCURSES_EXPORT(int) _nc_has_mouse (void); /* lib_mvcur.c */ #define INFINITY 1000000 /* cost: too high to use */ +#define BAUDBYTE 9 /* 9 = 7 bits + 1 parity + 1 stop */ + +/* lib_setup.c */ +extern NCURSES_EXPORT(char *) _nc_get_locale(void); +extern NCURSES_EXPORT(int) _nc_unicode_locale(void); +extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(void); /* lib_wacs.c */ #if USE_WIDEC_SUPPORT @@ -897,9 +962,10 @@ extern NCURSES_EXPORT(void) _nc_init_wacs(void); #endif typedef struct { - char *s_head; - char *s_tail; - size_t s_size; + char *s_head; /* beginning of the string (may be null) */ + char *s_tail; /* end of the string (may be null) */ + size_t s_size; /* current remaining size available */ + size_t s_init; /* total size available */ } string_desc; /* strings.c */ @@ -931,14 +997,15 @@ extern NCURSES_EXPORT(char *) _nc_printf_string (const char *, va_list); extern NCURSES_EXPORT(void) _nc_add_to_try (struct tries **, const char *, unsigned short); extern NCURSES_EXPORT(char *) _nc_expand_try (struct tries *, unsigned short, int *, size_t); extern NCURSES_EXPORT(int) _nc_remove_key (struct tries **, unsigned short); -extern NCURSES_EXPORT(int) _nc_remove_string (struct tries **, char *); +extern NCURSES_EXPORT(int) _nc_remove_string (struct tries **, const char *); /* elsewhere ... */ +extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T); extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int); extern NCURSES_EXPORT(char *) _nc_home_terminfo (void); extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t); -extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T); -extern NCURSES_EXPORT(int) _nc_access (const char *, int); +extern NCURSES_EXPORT(char *) _nc_trace_bufcat (int, const char *); +extern NCURSES_EXPORT(int) _nc_access (const char *, int); extern NCURSES_EXPORT(int) _nc_baudrate (int); extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *); extern NCURSES_EXPORT(int) _nc_getenv_num (const char *); @@ -955,7 +1022,6 @@ extern NCURSES_EXPORT(void) _nc_hash_map (void); extern NCURSES_EXPORT(void) _nc_init_keytry (void); extern NCURSES_EXPORT(void) _nc_keep_tic_dir (const char *); extern NCURSES_EXPORT(void) _nc_make_oldhash (int i); -extern NCURSES_EXPORT(void) _nc_outstr (const char *str); extern NCURSES_EXPORT(void) _nc_scroll_oldhash (int n, int top, int bot); extern NCURSES_EXPORT(void) _nc_scroll_optimize (void); extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, short const, short const, NCURSES_CH_T); @@ -993,9 +1059,7 @@ extern NCURSES_EXPORT_VAR(int *) _nc_oldnums; #define USE_SETBUF_0 0 -#define NC_BUFFERED(flag) \ - if ((SP->_buffered != 0) != flag) \ - _nc_set_buffer(SP->_ofp, flag) +#define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag) #define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout) diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses index 1a378196..efe7bc7c 100644 --- a/ncurses/llib-lncurses +++ b/ncurses/llib-lncurses @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996-2001,2002 * + * Author: Thomas E. Dickey 1996-2003,2004 * ****************************************************************************/ /* LINTLIBRARY */ @@ -59,8 +59,8 @@ void _nc_make_oldhash( #undef _nc_scroll_oldhash void _nc_scroll_oldhash( - int n, - int top, + int n, + int top, int bot) { /* void */ } @@ -70,25 +70,25 @@ void _nc_scroll_oldhash( #undef _nc_render chtype _nc_render( - WINDOW *win, + WINDOW *win, chtype ch) { return(*(chtype *)0); } #undef _nc_waddch_nosync int _nc_waddch_nosync( - WINDOW *win, + WINDOW *win, const chtype c) { return(*(int *)0); } #undef waddch int waddch( - WINDOW *win, + WINDOW *win, const chtype ch) { return(*(int *)0); } #undef wechochar int wechochar( - WINDOW *win, + WINDOW *win, const chtype ch) { return(*(int *)0); } @@ -96,15 +96,15 @@ int wechochar( #undef waddnstr int waddnstr( - WINDOW *win, - const char *astr, + WINDOW *win, + const char *astr, int n) { return(*(int *)0); } #undef waddchnstr int waddchnstr( - WINDOW *win, - const chtype *astr, + WINDOW *win, + const chtype *astr, int n) { return(*(int *)0); } @@ -118,13 +118,13 @@ int beep(void) #undef wbkgdset void wbkgdset( - WINDOW *win, + WINDOW *win, chtype ch) { /* void */ } #undef wbkgd int wbkgd( - WINDOW *win, + WINDOW *win, chtype ch) { return(*(int *)0); } @@ -132,14 +132,14 @@ int wbkgd( #undef wborder int wborder( - WINDOW *win, - chtype ls, - chtype rs, - chtype ts, - chtype bs, - chtype tl, - chtype tr, - chtype bl, + WINDOW *win, + chtype ls, + chtype rs, + chtype ts, + chtype bs, + chtype tl, + chtype tr, + chtype bl, chtype br) { return(*(int *)0); } @@ -147,10 +147,10 @@ int wborder( #undef wchgat int wchgat( - WINDOW *win, - int n, - attr_t attr, - short color, + WINDOW *win, + int n, + attr_t attr, + short color, const void *opts) { return(*(int *)0); } @@ -165,7 +165,7 @@ int wclear( #undef clearok int clearok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -192,22 +192,26 @@ int COLOR_PAIRS; #undef COLORS int COLORS; +#undef _nc_reset_colors +NCURSES_BOOL _nc_reset_colors(void) + { return(*(NCURSES_BOOL *)0); } + #undef start_color int start_color(void) { return(*(int *)0); } #undef init_pair int init_pair( - short pair, - short f, + short pair, + short f, short b) { return(*(int *)0); } #undef init_color int init_color( - short color, - short r, - short g, + short color, + short r, + short g, short b) { return(*(int *)0); } @@ -221,24 +225,24 @@ NCURSES_BOOL has_colors(void) #undef color_content int color_content( - short color, - short *r, - short *g, + short color, + short *r, + short *g, short *b) { return(*(int *)0); } #undef pair_content int pair_content( - short pair, - short *f, + short pair, + short *f, short *b) { return(*(int *)0); } #undef _nc_do_color void _nc_do_color( - int old_pair, - int pair, - NCURSES_BOOL reverse, + int old_pair, + int pair, + NCURSES_BOOL reverse, int (*outc)( int p1)) { /* void */ } @@ -247,8 +251,8 @@ void _nc_do_color( #undef wcolor_set int wcolor_set( - WINDOW *win, - short color_pair_number, + WINDOW *win, + short color_pair_number, void *opts) { return(*(int *)0); } @@ -304,7 +308,7 @@ int addch( #undef addchnstr int addchnstr( - const chtype *a1, + const chtype *a1, int z) { return(*(int *)0); } @@ -315,7 +319,7 @@ int addchstr( #undef addnstr int addnstr( - const char *a1, + const char *a1, int z) { return(*(int *)0); } @@ -341,27 +345,27 @@ int attrset( #undef attr_get int attr_get( - attr_t *a1, - short *a2, + attr_t *a1, + short *a2, void *z) { return(*(int *)0); } #undef attr_off int attr_off( - attr_t a1, + attr_t a1, void *z) { return(*(int *)0); } #undef attr_on int attr_on( - attr_t a1, + attr_t a1, void *z) { return(*(int *)0); } #undef attr_set int attr_set( - attr_t a1, - short a2, + attr_t a1, + short a2, void *z) { return(*(int *)0); } @@ -377,28 +381,28 @@ void bkgdset( #undef border int border( - chtype a1, - chtype a2, - chtype a3, - chtype a4, - chtype a5, - chtype a6, - chtype a7, + chtype a1, + chtype a2, + chtype a3, + chtype a4, + chtype a5, + chtype a6, + chtype a7, chtype z) { return(*(int *)0); } #undef box int box( - WINDOW *a1, - chtype a2, + WINDOW *a1, + chtype a2, chtype z) { return(*(int *)0); } #undef chgat int chgat( - int a1, - attr_t a2, - short a3, + int a1, + attr_t a2, + short a3, const void *z) { return(*(int *)0); } @@ -416,7 +420,7 @@ int clrtoeol(void) #undef color_set int color_set( - short a1, + short a1, void *z) { return(*(int *)0); } @@ -453,7 +457,7 @@ int getch(void) #undef getnstr int getnstr( - char *a1, + char *a1, int z) { return(*(int *)0); } @@ -464,7 +468,7 @@ int getstr( #undef hline int hline( - chtype a1, + chtype a1, int z) { return(*(int *)0); } @@ -474,7 +478,7 @@ chtype inch(void) #undef inchnstr int inchnstr( - chtype *a1, + chtype *a1, int z) { return(*(int *)0); } @@ -485,7 +489,7 @@ int inchstr( #undef innstr int innstr( - char *a1, + char *a1, int z) { return(*(int *)0); } @@ -505,7 +509,7 @@ int insertln(void) #undef insnstr int insnstr( - const char *a1, + const char *a1, int z) { return(*(int *)0); } @@ -521,323 +525,323 @@ int instr( #undef move int move( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvaddch int mvaddch( - int a1, - int a2, + int a1, + int a2, const chtype z) { return(*(int *)0); } #undef mvaddchnstr int mvaddchnstr( - int a1, - int a2, - const chtype *a3, + int a1, + int a2, + const chtype *a3, int z) { return(*(int *)0); } #undef mvaddchstr int mvaddchstr( - int a1, - int a2, + int a1, + int a2, const chtype *z) { return(*(int *)0); } #undef mvaddnstr int mvaddnstr( - int a1, - int a2, - const char *a3, + int a1, + int a2, + const char *a3, int z) { return(*(int *)0); } #undef mvaddstr int mvaddstr( - int a1, - int a2, + int a1, + int a2, const char *z) { return(*(int *)0); } #undef mvchgat int mvchgat( - int a1, - int a2, - int a3, - attr_t a4, - short a5, + int a1, + int a2, + int a3, + attr_t a4, + short a5, const void *z) { return(*(int *)0); } #undef mvdelch int mvdelch( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvgetch int mvgetch( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvgetnstr int mvgetnstr( - int a1, - int a2, - char *a3, + int a1, + int a2, + char *a3, int z) { return(*(int *)0); } #undef mvgetstr int mvgetstr( - int a1, - int a2, + int a1, + int a2, char *z) { return(*(int *)0); } #undef mvhline int mvhline( - int a1, - int a2, - chtype a3, + int a1, + int a2, + chtype a3, int z) { return(*(int *)0); } #undef mvinch chtype mvinch( - int a1, + int a1, int z) { return(*(chtype *)0); } #undef mvinchnstr int mvinchnstr( - int a1, - int a2, - chtype *a3, + int a1, + int a2, + chtype *a3, int z) { return(*(int *)0); } #undef mvinchstr int mvinchstr( - int a1, - int a2, + int a1, + int a2, chtype *z) { return(*(int *)0); } #undef mvinnstr int mvinnstr( - int a1, - int a2, - char *a3, + int a1, + int a2, + char *a3, int z) { return(*(int *)0); } #undef mvinsch int mvinsch( - int a1, - int a2, + int a1, + int a2, chtype z) { return(*(int *)0); } #undef mvinsnstr int mvinsnstr( - int a1, - int a2, - const char *a3, + int a1, + int a2, + const char *a3, int z) { return(*(int *)0); } #undef mvinsstr int mvinsstr( - int a1, - int a2, + int a1, + int a2, const char *z) { return(*(int *)0); } #undef mvinstr int mvinstr( - int a1, - int a2, + int a1, + int a2, char *z) { return(*(int *)0); } #undef mvvline int mvvline( - int a1, - int a2, - chtype a3, + int a1, + int a2, + chtype a3, int z) { return(*(int *)0); } #undef mvwaddch int mvwaddch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const chtype z) { return(*(int *)0); } #undef mvwaddchnstr int mvwaddchnstr( - WINDOW *a1, - int a2, - int a3, - const chtype *a4, + WINDOW *a1, + int a2, + int a3, + const chtype *a4, int z) { return(*(int *)0); } #undef mvwaddchstr int mvwaddchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const chtype *z) { return(*(int *)0); } #undef mvwaddnstr int mvwaddnstr( - WINDOW *a1, - int a2, - int a3, - const char *a4, + WINDOW *a1, + int a2, + int a3, + const char *a4, int z) { return(*(int *)0); } #undef mvwaddstr int mvwaddstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const char *z) { return(*(int *)0); } #undef mvwchgat int mvwchgat( - WINDOW *a1, - int a2, - int a3, - int a4, - attr_t a5, - short a6, + WINDOW *a1, + int a2, + int a3, + int a4, + attr_t a5, + short a6, const void *z) { return(*(int *)0); } #undef mvwdelch int mvwdelch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } #undef mvwgetch int mvwgetch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } #undef mvwgetnstr int mvwgetnstr( - WINDOW *a1, - int a2, - int a3, - char *a4, + WINDOW *a1, + int a2, + int a3, + char *a4, int z) { return(*(int *)0); } #undef mvwgetstr int mvwgetstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, char *z) { return(*(int *)0); } #undef mvwhline int mvwhline( - WINDOW *a1, - int a2, - int a3, - chtype a4, + WINDOW *a1, + int a2, + int a3, + chtype a4, int z) { return(*(int *)0); } #undef mvwinch chtype mvwinch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(chtype *)0); } #undef mvwinchnstr int mvwinchnstr( - WINDOW *a1, - int a2, - int a3, - chtype *a4, + WINDOW *a1, + int a2, + int a3, + chtype *a4, int z) { return(*(int *)0); } #undef mvwinchstr int mvwinchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, chtype *z) { return(*(int *)0); } #undef mvwinnstr int mvwinnstr( - WINDOW *a1, - int a2, - int a3, - char *a4, + WINDOW *a1, + int a2, + int a3, + char *a4, int z) { return(*(int *)0); } #undef mvwinsch int mvwinsch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, chtype z) { return(*(int *)0); } #undef mvwinsnstr int mvwinsnstr( - WINDOW *a1, - int a2, - int a3, - const char *a4, + WINDOW *a1, + int a2, + int a3, + const char *a4, int z) { return(*(int *)0); } #undef mvwinsstr int mvwinsstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const char *z) { return(*(int *)0); } #undef mvwinstr int mvwinstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, char *z) { return(*(int *)0); } #undef mvwvline int mvwvline( - WINDOW *a1, - int a2, - int a3, - chtype a4, + WINDOW *a1, + int a2, + int a3, + chtype a4, int z) { return(*(int *)0); } @@ -867,7 +871,7 @@ int scroll( #undef setscrreg int setscrreg( - int a1, + int a1, int z) { return(*(int *)0); } @@ -886,8 +890,8 @@ void timeout( #undef touchline int touchline( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } @@ -903,67 +907,67 @@ int untouchwin( #undef vline int vline( - chtype a1, + chtype a1, int z) { return(*(int *)0); } #undef vw_printw int vw_printw( - WINDOW *a1, - char *a2, + WINDOW *a1, + const char *a2, va_list z) { return(*(int *)0); } #undef vw_scanw int vw_scanw( - WINDOW *a1, - char *a2, + WINDOW *a1, + char *a2, va_list z) { return(*(int *)0); } #undef waddchstr int waddchstr( - WINDOW *a1, + WINDOW *a1, const chtype *z) { return(*(int *)0); } #undef waddstr int waddstr( - WINDOW *a1, + WINDOW *a1, const char *z) { return(*(int *)0); } #undef wattron int wattron( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattroff int wattroff( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattrset int wattrset( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattr_get int wattr_get( - WINDOW *a1, - attr_t *a2, - short *a3, + WINDOW *a1, + attr_t *a2, + short *a3, void *z) { return(*(int *)0); } #undef wattr_set int wattr_set( - WINDOW *a1, - attr_t a2, - short a3, + WINDOW *a1, + attr_t a2, + short a3, void *z) { return(*(int *)0); } @@ -974,13 +978,13 @@ int wdeleteln( #undef wgetstr int wgetstr( - WINDOW *a1, + WINDOW *a1, char *z) { return(*(int *)0); } #undef winchstr int winchstr( - WINDOW *a1, + WINDOW *a1, chtype *z) { return(*(int *)0); } @@ -991,13 +995,13 @@ int winsertln( #undef winsstr int winsstr( - WINDOW *a1, + WINDOW *a1, const char *z) { return(*(int *)0); } #undef winstr int winstr( - WINDOW *a1, + WINDOW *a1, char *z) { return(*(int *)0); } @@ -1013,8 +1017,8 @@ int wstandend( #undef mouse_trafo NCURSES_BOOL mouse_trafo( - int *a1, - int *a2, + int *a1, + int *a2, NCURSES_BOOL z) { return(*(NCURSES_BOOL *)0); } @@ -1027,8 +1031,8 @@ int ESCDELAY; #undef _nc_wgetch int _nc_wgetch( - WINDOW *win, - unsigned long *result, + WINDOW *win, + unsigned long *result, int use_meta) { return(*(int *)0); } @@ -1041,8 +1045,8 @@ int wgetch( #undef wgetnstr int wgetnstr( - WINDOW *win, - char *str, + WINDOW *win, + char *str, int maxlen) { return(*(int *)0); } @@ -1050,8 +1054,8 @@ int wgetnstr( #undef whline int whline( - WINDOW *win, - chtype ch, + WINDOW *win, + chtype ch, int n) { return(*(int *)0); } @@ -1059,7 +1063,7 @@ int whline( #undef immedok void immedok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { /* void */ } @@ -1067,8 +1071,8 @@ void immedok( #undef winchnstr int winchnstr( - WINDOW *win, - chtype *str, + WINDOW *win, + chtype *str, int n) { return(*(int *)0); } @@ -1080,26 +1084,30 @@ WINDOW *initscr(void) /* ./base/lib_insch.c */ +#undef _nc_insert_ch +void _nc_insert_ch( + WINDOW *win, + chtype ch) + { /* void */ } + #undef winsch int winsch( - WINDOW *win, + WINDOW *win, chtype c) { return(*(int *)0); } -/* ./base/lib_insdel.c */ - -#undef winsdelln -int winsdelln( - WINDOW *win, +#undef winsnstr +int winsnstr( + WINDOW *win, + const char *s, int n) { return(*(int *)0); } -/* ./base/lib_insstr.c */ +/* ./base/lib_insdel.c */ -#undef winsnstr -int winsnstr( - WINDOW *win, - const char *s, +#undef winsdelln +int winsdelln( + WINDOW *win, int n) { return(*(int *)0); } @@ -1107,8 +1115,8 @@ int winsnstr( #undef winnstr int winnstr( - WINDOW *win, - char *str, + WINDOW *win, + char *str, int n) { return(*(int *)0); } @@ -1122,7 +1130,7 @@ NCURSES_BOOL isendwin(void) #undef leaveok int leaveok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -1140,14 +1148,14 @@ int ungetmouse( #undef mousemask mmask_t mousemask( - mmask_t newmask, + mmask_t newmask, mmask_t *oldmask) { return(*(mmask_t *)0); } #undef wenclose NCURSES_BOOL wenclose( - const WINDOW *win, - int y, + const WINDOW *win, + int y, int x) { return(*(NCURSES_BOOL *)0); } @@ -1162,9 +1170,9 @@ int _nc_has_mouse(void) #undef wmouse_trafo NCURSES_BOOL wmouse_trafo( - const WINDOW *win, - int *pY, - int *pX, + const WINDOW *win, + int *pY, + int *pX, NCURSES_BOOL to_screen) { return(*(NCURSES_BOOL *)0); } @@ -1172,8 +1180,8 @@ NCURSES_BOOL wmouse_trafo( #undef wmove int wmove( - WINDOW *win, - int y, + WINDOW *win, + int y, int x) { return(*(int *)0); } @@ -1181,7 +1189,7 @@ int wmove( #undef _nc_msec_cost int _nc_msec_cost( - const char *const cap, + const char *const cap, int affcnt) { return(*(int *)0); } @@ -1199,9 +1207,9 @@ void _nc_mvcur_wrap(void) #undef mvcur int mvcur( - int yold, - int xold, - int ynew, + int yold, + int xold, + int ynew, int xnew) { return(*(int *)0); } @@ -1212,8 +1220,8 @@ int _nc_optimize_enable; #undef mvwin int mvwin( - WINDOW *win, - int by, + WINDOW *win, + int by, int bx) { return(*(int *)0); } @@ -1225,8 +1233,8 @@ void filter(void) #undef newterm SCREEN *newterm( - char *name, - FILE *ofp, + char *name, + FILE *ofp, FILE *ifp) { return(*(SCREEN **)0); } @@ -1239,36 +1247,36 @@ int _nc_freewin( #undef newwin WINDOW *newwin( - int num_lines, - int num_columns, - int begy, + int num_lines, + int num_columns, + int begy, int begx) { return(*(WINDOW **)0); } #undef derwin WINDOW *derwin( - WINDOW *orig, - int num_lines, - int num_columns, - int begy, + WINDOW *orig, + int num_lines, + int num_columns, + int begy, int begx) { return(*(WINDOW **)0); } #undef subwin WINDOW *subwin( - WINDOW *w, - int l, - int c, - int y, + WINDOW *w, + int l, + int c, + int y, int x) { return(*(WINDOW **)0); } #undef _nc_makenew WINDOW *_nc_makenew( - int num_lines, - int num_columns, - int begy, - int begx, + int num_lines, + int num_columns, + int begy, + int begx, int flags) { return(*(WINDOW **)0); } @@ -1286,26 +1294,26 @@ int nonl(void) #undef overlay int overlay( - const WINDOW *win1, + const WINDOW *win1, WINDOW *win2) { return(*(int *)0); } #undef overwrite int overwrite( - const WINDOW *win1, + const WINDOW *win1, WINDOW *win2) { return(*(int *)0); } #undef copywin int copywin( - const WINDOW *src, - WINDOW *dst, - int sminrow, - int smincol, - int dminrow, - int dmincol, - int dmaxrow, - int dmaxcol, + const WINDOW *src, + WINDOW *dst, + int sminrow, + int smincol, + int dminrow, + int dmincol, + int dmaxrow, + int dmaxcol, int over) { return(*(int *)0); } @@ -1313,44 +1321,44 @@ int copywin( #undef newpad WINDOW *newpad( - int l, + int l, int c) { return(*(WINDOW **)0); } #undef subpad WINDOW *subpad( - WINDOW *orig, - int l, - int c, - int begy, + WINDOW *orig, + int l, + int c, + int begy, int begx) { return(*(WINDOW **)0); } #undef prefresh int prefresh( - WINDOW *win, - int pminrow, - int pmincol, - int sminrow, - int smincol, - int smaxrow, + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, int smaxcol) { return(*(int *)0); } #undef pnoutrefresh int pnoutrefresh( - WINDOW *win, - int pminrow, - int pmincol, - int sminrow, - int smincol, - int smaxrow, + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, int smaxcol) { return(*(int *)0); } #undef pechochar int pechochar( - WINDOW *pad, + WINDOW *pad, const chtype ch) { return(*(int *)0); } @@ -1358,38 +1366,38 @@ int pechochar( #undef printw int printw( - char *fmt, + const char *fmt, ...) { return(*(int *)0); } #undef wprintw int wprintw( - WINDOW *win, - char *fmt, + WINDOW *win, + const char *fmt, ...) { return(*(int *)0); } #undef mvprintw int mvprintw( - int y, - int x, - char *fmt, + int y, + int x, + const char *fmt, ...) { return(*(int *)0); } #undef mvwprintw int mvwprintw( - WINDOW *win, - int y, - int x, - char *fmt, + WINDOW *win, + int y, + int x, + const char *fmt, ...) { return(*(int *)0); } #undef vwprintw int vwprintw( - WINDOW *win, - char *fmt, + WINDOW *win, + const char *fmt, va_list argp) { return(*(int *)0); } @@ -1397,8 +1405,8 @@ int vwprintw( #undef wredrawln int wredrawln( - WINDOW *win, - int beg, + WINDOW *win, + int beg, int num) { return(*(int *)0); } @@ -1418,8 +1426,8 @@ int wnoutrefresh( #undef restartterm int restartterm( - char *termp, - int filenum, + char *termp, + int filenum, int *errret) { return(*(int *)0); } @@ -1427,38 +1435,38 @@ int restartterm( #undef vwscanw int vwscanw( - WINDOW *win, - char *fmt, + WINDOW *win, + char *fmt, va_list argp) { return(*(int *)0); } #undef scanw int scanw( - char *fmt, + char *fmt, ...) { return(*(int *)0); } #undef wscanw int wscanw( - WINDOW *win, - char *fmt, + WINDOW *win, + char *fmt, ...) { return(*(int *)0); } #undef mvscanw int mvscanw( - int y, - int x, - char *fmt, + int y, + int x, + char *fmt, ...) { return(*(int *)0); } #undef mvwscanw int mvwscanw( - WINDOW *win, - int y, - int x, - char *fmt, + WINDOW *win, + int y, + int x, + char *fmt, ...) { return(*(int *)0); } @@ -1471,7 +1479,7 @@ WINDOW *getwin( #undef putwin int putwin( - WINDOW *win, + WINDOW *win, FILE *filep) { return(*(int *)0); } @@ -1499,16 +1507,16 @@ int scr_set( #undef _nc_scroll_window void _nc_scroll_window( - WINDOW *win, - int const n, - short const top, - short const bottom, + WINDOW *win, + int const n, + short const top, + short const bottom, chtype blank) { /* void */ } #undef wscrl int wscrl( - WINDOW *win, + WINDOW *win, int n) { return(*(int *)0); } @@ -1516,7 +1524,7 @@ int wscrl( #undef scrollok int scrollok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -1524,8 +1532,8 @@ int scrollok( #undef wsetscrreg int wsetscrreg( - WINDOW *win, - int top, + WINDOW *win, + int top, int bottom) { return(*(int *)0); } @@ -1543,24 +1551,24 @@ void delscreen( #undef _nc_setupscreen int _nc_setupscreen( - short slines, - short const scolumns, + short slines, + short const scolumns, FILE *output) { return(*(int *)0); } #undef _nc_ripoffline int _nc_ripoffline( - int line, + int line, int (*init)( - WINDOW *p1, + WINDOW *p1, int p2)) { return(*(int *)0); } #undef ripoffline int ripoffline( - int line, + int line, int (*init)( - WINDOW *p1, + WINDOW *p1, int p2)) { return(*(int *)0); } @@ -1571,7 +1579,7 @@ int _nc_slk_format; #undef _nc_slk_initialize int _nc_slk_initialize( - WINDOW *stwin, + WINDOW *stwin, int cols) { return(*(int *)0); } @@ -1583,8 +1591,8 @@ int slk_restore(void) #undef slk_attr_set int slk_attr_set( - const attr_t attr, - short color_pair_number, + const attr_t attr, + short color_pair_number, void *opts) { return(*(int *)0); } @@ -1656,8 +1664,8 @@ int slk_refresh(void) #undef slk_set int slk_set( - int i, - const char *astr, + int i, + const char *astr, int format) { return(*(int *)0); } @@ -1671,7 +1679,7 @@ int slk_touch(void) #undef is_linetouched NCURSES_BOOL is_linetouched( - WINDOW *win, + WINDOW *win, int line) { return(*(NCURSES_BOOL *)0); } @@ -1682,9 +1690,9 @@ NCURSES_BOOL is_wintouched( #undef wtouchln int wtouchln( - WINDOW *win, - int y, - int n, + WINDOW *win, + int y, + int n, int changed) { return(*(int *)0); } @@ -1692,7 +1700,7 @@ int wtouchln( #undef _traceattr2 char *_traceattr2( - int bufnum, + int bufnum, attr_t newmode) { return(*(char **)0); } @@ -1708,13 +1716,13 @@ attr_t _nc_retrace_attr_t( #undef _nc_altcharset_name const char *_nc_altcharset_name( - attr_t attr, + attr_t attr, chtype ch) { return(*(const char **)0); } #undef _tracechtype2 char *_tracechtype2( - int bufnum, + int bufnum, chtype ch) { return(*(char **)0); } @@ -1724,15 +1732,15 @@ char *_tracechtype( { return(*(char **)0); } #undef _nc_retrace_chtype -attr_t _nc_retrace_chtype( - attr_t code) - { return(*(attr_t *)0); } +chtype _nc_retrace_chtype( + chtype code) + { return(*(chtype *)0); } /* ./trace/lib_tracedmp.c */ #undef _tracedump void _tracedump( - const char *name, + const char *name, WINDOW *win) { /* void */ } @@ -1767,7 +1775,7 @@ int ungetch( #undef vidputs int vidputs( - chtype newmode, + chtype newmode, int (*outc)( int p1)) { return(*(int *)0); } @@ -1785,8 +1793,8 @@ chtype termattrs(void) #undef wvline int wvline( - WINDOW *win, - chtype ch, + WINDOW *win, + chtype ch, int n) { return(*(int *)0); } @@ -1794,8 +1802,8 @@ int wvline( #undef wattr_off int wattr_off( - WINDOW *win, - attr_t at, + WINDOW *win, + attr_t at, void *opts) { return(*(int *)0); } @@ -1803,8 +1811,8 @@ int wattr_off( #undef wattr_on int wattr_on( - WINDOW *win, - attr_t at, + WINDOW *win, + attr_t at, void *opts) { return(*(int *)0); } @@ -1824,14 +1832,14 @@ void _nc_synchook( #undef mvderwin int mvderwin( - WINDOW *win, - int y, + WINDOW *win, + int y, int x) { return(*(int *)0); } #undef syncok int syncok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL bf) { return(*(int *)0); } @@ -1865,7 +1873,7 @@ struct panelhook *_nc_panelhook(void) #undef _nc_printf_string char *_nc_printf_string( - const char *fmt, + const char *fmt, va_list ap) { return(*(char **)0); } @@ -1878,16 +1886,11 @@ char *_nc_printf_string( int doupdate(void) { return(*(int *)0); } -#undef _nc_outstr -void _nc_outstr( - const char *str) - { /* void */ } - #undef _nc_scrolln int _nc_scrolln( - int n, - int top, - int bot, + int n, + int top, + int bot, int maxy) { return(*(int *)0); } @@ -1910,13 +1913,9 @@ void _nc_do_xmc_glitch( /* ./trace/varargs.c */ -typedef enum { - atUnknown = 0, atInteger, atFloat, atPoint, atString -} ARGTYPE; - #undef _nc_varargs char *_nc_varargs( - const char *fmt, + const char *fmt, va_list ap) { return(*(char **)0); } @@ -1926,23 +1925,25 @@ char *_nc_varargs( void _nc_memmove(void) { /* void */ } -/* ./base/sigaction.c */ - -#undef _nc_sigaction -void _nc_sigaction(void) - { /* void */ } - /* ./base/vsscanf.c */ #undef _nc_vsscanf void _nc_vsscanf(void) { /* void */ } +/* ./base/lib_freeall.c */ + +#include + +#undef _nc_freeall +void _nc_freeall(void) + { /* void */ } + /* ./base/define_key.c */ #undef define_key int define_key( - char *str, + const char *str, int keycode) { return(*(int *)0); } @@ -1950,13 +1951,13 @@ int define_key( #undef _nc_toggle_attr_on void _nc_toggle_attr_on( - attr_t *S, + attr_t *S, attr_t at) { /* void */ } #undef _nc_toggle_attr_off void _nc_toggle_attr_off( - attr_t *S, + attr_t *S, attr_t at) { /* void */ } @@ -1975,11 +1976,18 @@ void _nc_UpdateAttrs( chtype c) { /* void */ } +/* ./base/key_defined.c */ + +#undef key_defined +int key_defined( + const char *str) + { return(*(int *)0); } + /* ./base/keybound.c */ #undef keybound char *keybound( - int code, + int code, int count) { return(*(char **)0); } @@ -1987,7 +1995,7 @@ char *keybound( #undef keyok int keyok( - int c, + int c, NCURSES_BOOL flag) { return(*(int *)0); } @@ -1999,23 +2007,15 @@ int use_default_colors(void) #undef assume_default_colors int assume_default_colors( - int fg, + int fg, int bg) { return(*(int *)0); } -/* ./base/lib_freeall.c */ - -#include - -#undef _nc_freeall -void _nc_freeall(void) - { /* void */ } - /* ./tinfo/lib_print.c */ #undef mcprint int mcprint( - char *data, + char *data, int len) { return(*(int *)0); } @@ -2023,19 +2023,19 @@ int mcprint( #undef is_term_resized NCURSES_BOOL is_term_resized( - int ToLines, + int ToLines, int ToCols) { return(*(NCURSES_BOOL *)0); } #undef resize_term int resize_term( - int ToLines, + int ToLines, int ToCols) { return(*(int *)0); } #undef resizeterm int resizeterm( - int ToLines, + int ToLines, int ToCols) { return(*(int *)0); } @@ -2050,22 +2050,22 @@ void _nc_trace_xnames( #undef _nc_expand_try char *_nc_expand_try( - struct tries *tree, - unsigned short code, - int *count, + struct tries *tree, + unsigned short code, + int *count, size_t len) { return(*(char **)0); } #undef _nc_remove_key int _nc_remove_key( - struct tries **tree, + struct tries **tree, unsigned short code) { return(*(int *)0); } #undef _nc_remove_string int _nc_remove_string( - struct tries **tree, - char *string) + struct tries **tree, + const char *string) { return(*(int *)0); } /* ./base/version.c */ @@ -2078,8 +2078,8 @@ const char *curses_version(void) #undef wresize int wresize( - WINDOW *win, - int ToLines, + WINDOW *win, + int ToLines, int ToCols) { return(*(int *)0); } @@ -2090,6 +2090,11 @@ char *_nc_rootname( char *path) { return(*(char **)0); } +#undef _nc_pathlast +unsigned _nc_pathlast( + const char *path) + { return(*(unsigned *)0); } + #undef _nc_basename char *_nc_basename( char *path) @@ -2097,7 +2102,7 @@ char *_nc_basename( #undef _nc_access int _nc_access( - const char *path, + const char *path, int mode) { return(*(int *)0); } @@ -2109,8 +2114,8 @@ int _nc_env_access(void) #undef _nc_add_to_try void _nc_add_to_try( - struct tries **tree, - const char *str, + struct tries **tree, + const char *str, unsigned short code) { /* void */ } @@ -2133,13 +2138,13 @@ char *_nc_save_str( #undef _nc_wrap_entry void _nc_wrap_entry( - ENTRY *const ep, + ENTRY *const ep, NCURSES_BOOL copy_strings) { /* void */ } #undef _nc_merge_entry void _nc_merge_entry( - TERMTYPE *const to, + TERMTYPE *const to, TERMTYPE *const from) { /* void */ } @@ -2147,13 +2152,13 @@ void _nc_merge_entry( #undef _nc_align_termtype void _nc_align_termtype( - TERMTYPE *to, + TERMTYPE *to, TERMTYPE *from) { /* void */ } #undef _nc_copy_termtype void _nc_copy_termtype( - TERMTYPE *dst, + TERMTYPE *dst, TERMTYPE *src) { /* void */ } @@ -2161,16 +2166,16 @@ void _nc_copy_termtype( #undef _nc_captoinfo char *_nc_captoinfo( - const char *cap, - const char *s, - int const parametrized) + const char *cap, + const char *s, + int const parameterized) { return(*(char **)0); } #undef _nc_infotocap char *_nc_infotocap( - const char *cap, - const char *str, - int const parametrized) + const char *cap, + const char *str, + int const parameterized) { return(*(char **)0); } /* ./codes.c */ @@ -2231,19 +2236,19 @@ void _nc_get_type( #undef _nc_warning void _nc_warning( - const char *const fmt, + const char *const fmt, ...) { /* void */ } #undef _nc_err_abort void _nc_err_abort( - const char *const fmt, + const char *const fmt, ...) { /* void */ } #undef _nc_syserr_abort void _nc_syserr_abort( - const char *const fmt, + const char *const fmt, ...) { /* void */ } @@ -2251,8 +2256,8 @@ void _nc_syserr_abort( #undef _nc_tic_expand char *_nc_tic_expand( - const char *srcp, - NCURSES_BOOL tic_format, + const char *srcp, + NCURSES_BOOL tic_format, int numbers) { return(*(char **)0); } @@ -2262,14 +2267,14 @@ char *_nc_tic_expand( #undef _nc_find_entry struct name_table_entry const *_nc_find_entry( - const char *string, + const char *string, const struct name_table_entry *const *hash_table) { return(*(struct name_table_entry const **)0); } #undef _nc_find_type_entry struct name_table_entry const *_nc_find_type_entry( - const char *string, - int type, + const char *string, + int type, const struct name_table_entry *table) { return(*(struct name_table_entry const **)0); } @@ -2290,16 +2295,16 @@ void _nc_free_entries( #undef _nc_entry_match NCURSES_BOOL _nc_entry_match( - char *n1, + char *n1, char *n2) { return(*(NCURSES_BOOL *)0); } #undef _nc_read_entry_source void _nc_read_entry_source( - FILE *fp, - char *buf, - int literal, - NCURSES_BOOL silent, + FILE *fp, + char *buf, + int literal, + NCURSES_BOOL silent, NCURSES_BOOL (*hook)( ENTRY *p1)) { /* void */ } @@ -2333,7 +2338,7 @@ int _nc_get_token( #undef _nc_trans_string char _nc_trans_string( - char *ptr, + char *ptr, char *last) { return(*(char *)0); } @@ -2349,7 +2354,7 @@ void _nc_panic_mode( #undef _nc_reset_input void _nc_reset_input( - FILE *fp, + FILE *fp, char *buf) { /* void */ } @@ -2357,7 +2362,7 @@ void _nc_reset_input( #undef _nc_doalloc void *_nc_doalloc( - void *oldp, + void *oldp, size_t amount) { return(*(void **)0); } @@ -2414,7 +2419,7 @@ void _nc_init_keytry(void) /* ./tinfo/lib_acs.c */ #undef acs_map -chtype acs_map[128 ]; +chtype acs_map[128]; #undef _nc_init_acs void _nc_init_acs(void) @@ -2424,11 +2429,6 @@ void _nc_init_acs(void) #include -struct speed { - int s; - int sp; -}; - #undef _nc_baudrate int _nc_baudrate( int OSpeed) @@ -2524,13 +2524,13 @@ int napms( #undef idlok int idlok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef idcok void idcok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { /* void */ } @@ -2541,31 +2541,31 @@ int halfdelay( #undef nodelay int nodelay( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef notimeout int notimeout( - WINDOW *win, + WINDOW *win, NCURSES_BOOL f) { return(*(int *)0); } #undef wtimeout void wtimeout( - WINDOW *win, + WINDOW *win, int delay) { /* void */ } #undef keypad int keypad( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef meta int meta( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -2617,7 +2617,7 @@ void noqiflush(void) #undef intrflush int intrflush( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -2625,11 +2625,8 @@ int intrflush( #include -#undef use_env -void use_env( - NCURSES_BOOL f) - { /* void */ } - +#undef ttytype +char ttytype[256]; #undef LINES int LINES; #undef COLS @@ -2637,17 +2634,31 @@ int COLS; #undef TABSIZE int TABSIZE; +#undef use_env +void use_env( + NCURSES_BOOL f) + { /* void */ } + #undef _nc_update_screensize void _nc_update_screensize(void) { /* void */ } -#undef ttytype -char ttytype[256 ]; +#undef _nc_get_locale +char *_nc_get_locale(void) + { return(*(char **)0); } + +#undef _nc_unicode_locale +int _nc_unicode_locale(void) + { return(*(int *)0); } + +#undef _nc_locale_breaks_acs +int _nc_locale_breaks_acs(void) + { return(*(int *)0); } #undef setupterm int setupterm( - char *tname, - int Filedes, + char *tname, + int Filedes, int *errret) { return(*(int *)0); } @@ -2660,7 +2671,7 @@ char *BC; #undef tgetent int tgetent( - char *bufp, + char *bufp, const char *name) { return(*(int *)0); } @@ -2682,7 +2693,7 @@ int tgetnum( #undef tgetstr char *tgetstr( - char *id, + char *id, char **area) { return(*(char **)0); } @@ -2696,8 +2707,8 @@ char *termname(void) #undef tgoto char *tgoto( - const char *string, - int x, + const char *string, + int x, int y) { return(*(char **)0); } @@ -2720,20 +2731,19 @@ char *tigetstr( /* ./tinfo/lib_tparm.c */ -typedef struct { - union { - int num; - char *str; - } data; - NCURSES_BOOL num_type; -} stack_frame; - #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_tparm_analyze +int _nc_tparm_analyze( + const char *string, + char *p_is_s[9], + int *popcount) + { return(*(int *)0); } + #undef tparm char *tparm( - char *string, + char *string, ...) { return(*(char **)0); } @@ -2767,8 +2777,8 @@ int putp( #undef tputs int tputs( - const char *string, - int affcnt, + const char *string, + int affcnt, int (*outc)( int p1)) { return(*(int *)0); } @@ -2789,15 +2799,25 @@ void trace( #undef _tracef void _tracef( - const char *fmt, + const char *fmt, ...) { /* void */ } +#undef _nc_retrace_bool +NCURSES_BOOL _nc_retrace_bool( + NCURSES_BOOL code) + { return(*(NCURSES_BOOL *)0); } + #undef _nc_retrace_int int _nc_retrace_int( int code) { return(*(int *)0); } +#undef _nc_retrace_unsigned +unsigned _nc_retrace_unsigned( + unsigned code) + { return(*(unsigned *)0); } + #undef _nc_retrace_ptr char *_nc_retrace_ptr( char *code) @@ -2815,11 +2835,6 @@ WINDOW *_nc_retrace_win( /* ./trace/lib_tracebits.c */ -typedef struct { - unsigned int val; - const char *name; -} BITNAMES; - #undef _nc_trace_ttymode char *_nc_trace_ttymode( struct termios *tty) @@ -2876,8 +2891,8 @@ int resetty(void) #undef _nc_timed_wait int _nc_timed_wait( - int mode, - int milliseconds, + int mode, + int milliseconds, int *timeleft) { return(*(int *)0); } @@ -2890,8 +2905,8 @@ char *_nc_first_name( #undef _nc_name_match int _nc_name_match( - const char *const namelst, - const char *const name, + const char *const namelst, + const char *const name, const char *const delim) { return(*(int *)0); } @@ -2914,22 +2929,17 @@ char *const strfnames[] = {0}; #undef _nc_parse_entry int _nc_parse_entry( - struct entry *entryp, - int literal, + struct entry *entryp, + int literal, NCURSES_BOOL silent) { return(*(int *)0); } #undef _nc_capcmp int _nc_capcmp( - const char *s, + const char *s, const char *t) { return(*(int *)0); } -typedef struct { - const char *from; - const char *to; -} assoc; - /* ./tinfo/read_entry.c */ #undef _nc_tic_dir @@ -2944,14 +2954,14 @@ void _nc_keep_tic_dir( #undef _nc_read_file_entry int _nc_read_file_entry( - const char *const filename, + const char *const filename, TERMTYPE *ptr) { return(*(int *)0); } #undef _nc_read_entry int _nc_read_entry( - const char *const tn, - char *const filename, + const char *const tn, + char *const filename, TERMTYPE *const tp) { return(*(int *)0); } @@ -2959,7 +2969,7 @@ int _nc_read_entry( #undef _nc_read_termcap_entry int _nc_read_termcap_entry( - const char *const tn, + const char *const tn, TERMTYPE *const tp) { return(*(int *)0); } @@ -2967,7 +2977,7 @@ int _nc_read_termcap_entry( #undef _nc_set_buffer void _nc_set_buffer( - FILE *ofp, + FILE *ofp, NCURSES_BOOL buffered) { /* void */ } @@ -2975,48 +2985,49 @@ void _nc_set_buffer( #undef _nc_str_init string_desc *_nc_str_init( - string_desc *dst, - char *src, + string_desc *dst, + char *src, size_t len) { return(*(string_desc **)0); } #undef _nc_str_null string_desc *_nc_str_null( - string_desc *dst, + string_desc *dst, size_t len) { return(*(string_desc **)0); } #undef _nc_str_copy string_desc *_nc_str_copy( - string_desc *dst, + string_desc *dst, string_desc *src) { return(*(string_desc **)0); } #undef _nc_safe_strcat NCURSES_BOOL _nc_safe_strcat( - string_desc *dst, + string_desc *dst, const char *src) { return(*(NCURSES_BOOL *)0); } #undef _nc_safe_strcpy NCURSES_BOOL _nc_safe_strcpy( - string_desc *dst, + string_desc *dst, const char *src) { return(*(NCURSES_BOOL *)0); } /* ./trace/trace_buf.c */ -typedef struct { - char *text; - size_t size; -} LIST; - #undef _nc_trace_buf char *_nc_trace_buf( - int bufnum, + int bufnum, size_t want) { return(*(char **)0); } +#undef _nc_trace_bufcat +char *_nc_trace_bufcat( + int bufnum, + const char *value) + { return(*(char **)0); } + /* ./trace/trace_tries.c */ #undef _nc_trace_tries @@ -3035,7 +3046,7 @@ char *unctrl( #undef _nc_visbuf2 const char *_nc_visbuf2( - int bufnum, + int bufnum, const char *buf) { return(*(const char **)0); } @@ -3044,6 +3055,12 @@ const char *_nc_visbuf( const char *buf) { return(*(const char **)0); } +#undef _nc_visbufn +const char *_nc_visbufn( + const char *buf, + int len) + { return(*(const char **)0); } + /* ./tinfo/write_entry.c */ #undef _nc_set_writedir diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw index 7256eb98..ab8b1d4f 100644 --- a/ncurses/llib-lncursesw +++ b/ncurses/llib-lncursesw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001,2002 Free Software Foundation, Inc. * + * Copyright (c) 2001-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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2001,2002 * + * Author: Thomas E. Dickey 2001-2004 * ****************************************************************************/ /* LINTLIBRARY */ @@ -59,8 +59,8 @@ void _nc_make_oldhash( #undef _nc_scroll_oldhash void _nc_scroll_oldhash( - int n, - int top, + int n, + int top, int bot) { /* void */ } @@ -70,53 +70,41 @@ void _nc_scroll_oldhash( #undef _nc_render cchar_t _nc_render( - WINDOW *win, + WINDOW *win, cchar_t ch) { return(*(cchar_t *)0); } #undef _nc_waddch_nosync int _nc_waddch_nosync( - WINDOW *win, + WINDOW *win, const cchar_t c) { return(*(int *)0); } #undef waddch int waddch( - WINDOW *win, + WINDOW *win, const chtype ch) { return(*(int *)0); } #undef wechochar int wechochar( - WINDOW *win, + WINDOW *win, const chtype ch) { return(*(int *)0); } -#undef wadd_wch -int wadd_wch( - WINDOW *win, - const cchar_t *wch) - { return(*(int *)0); } - -#undef wecho_wchar -int wecho_wchar( - WINDOW *win, - const cchar_t *wch) - { return(*(int *)0); } - /* ./base/lib_addstr.c */ #undef waddnstr int waddnstr( - WINDOW *win, - const char *astr, + WINDOW *win, + const char *astr, int n) { return(*(int *)0); } #undef waddchnstr int waddchnstr( - WINDOW *win, - const chtype *astr, + WINDOW *win, + const chtype *astr, int n) { return(*(int *)0); } @@ -127,15 +115,15 @@ int _nc_wchstrlen( #undef wadd_wchnstr int wadd_wchnstr( - WINDOW *win, - const cchar_t *const astr, + WINDOW *win, + const cchar_t *astr, int n) { return(*(int *)0); } #undef waddnwstr int waddnwstr( - WINDOW *win, - const wchar_t *str, + WINDOW *win, + const wchar_t *str, int n) { return(*(int *)0); } @@ -149,25 +137,25 @@ int beep(void) #undef wbkgrndset void wbkgrndset( - WINDOW *win, + WINDOW *win, const cchar_t *ch) { /* void */ } #undef wbkgdset void wbkgdset( - WINDOW *win, + WINDOW *win, chtype ch) { /* void */ } #undef wbkgrnd int wbkgrnd( - WINDOW *win, + WINDOW *win, const cchar_t *ch) { return(*(int *)0); } #undef wbkgd int wbkgd( - WINDOW *win, + WINDOW *win, chtype ch) { return(*(int *)0); } @@ -175,14 +163,14 @@ int wbkgd( #undef wborder int wborder( - WINDOW *win, - chtype ls, - chtype rs, - chtype ts, - chtype bs, - chtype tl, - chtype tr, - chtype bl, + WINDOW *win, + chtype ls, + chtype rs, + chtype ts, + chtype bs, + chtype tl, + chtype tr, + chtype bl, chtype br) { return(*(int *)0); } @@ -190,10 +178,10 @@ int wborder( #undef wchgat int wchgat( - WINDOW *win, - int n, - attr_t attr, - short color, + WINDOW *win, + int n, + attr_t attr, + short color, const void *opts) { return(*(int *)0); } @@ -208,7 +196,7 @@ int wclear( #undef clearok int clearok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -235,22 +223,26 @@ int COLOR_PAIRS; #undef COLORS int COLORS; +#undef _nc_reset_colors +NCURSES_BOOL _nc_reset_colors(void) + { return(*(NCURSES_BOOL *)0); } + #undef start_color int start_color(void) { return(*(int *)0); } #undef init_pair int init_pair( - short pair, - short f, + short pair, + short f, short b) { return(*(int *)0); } #undef init_color int init_color( - short color, - short r, - short g, + short color, + short r, + short g, short b) { return(*(int *)0); } @@ -264,24 +256,24 @@ NCURSES_BOOL has_colors(void) #undef color_content int color_content( - short color, - short *r, - short *g, + short color, + short *r, + short *g, short *b) { return(*(int *)0); } #undef pair_content int pair_content( - short pair, - short *f, + short pair, + short *f, short *b) { return(*(int *)0); } #undef _nc_do_color void _nc_do_color( - int old_pair, - int pair, - NCURSES_BOOL reverse, + int old_pair, + int pair, + NCURSES_BOOL reverse, int (*outc)( int p1)) { /* void */ } @@ -290,8 +282,8 @@ void _nc_do_color( #undef wcolor_set int wcolor_set( - WINDOW *win, - short color_pair_number, + WINDOW *win, + short color_pair_number, void *opts) { return(*(int *)0); } @@ -347,7 +339,7 @@ int addch( #undef addchnstr int addchnstr( - const chtype *a1, + const chtype *a1, int z) { return(*(int *)0); } @@ -358,7 +350,7 @@ int addchstr( #undef addnstr int addnstr( - const char *a1, + const char *a1, int z) { return(*(int *)0); } @@ -384,27 +376,27 @@ int attrset( #undef attr_get int attr_get( - attr_t *a1, - short *a2, + attr_t *a1, + short *a2, void *z) { return(*(int *)0); } #undef attr_off int attr_off( - attr_t a1, + attr_t a1, void *z) { return(*(int *)0); } #undef attr_on int attr_on( - attr_t a1, + attr_t a1, void *z) { return(*(int *)0); } #undef attr_set int attr_set( - attr_t a1, - short a2, + attr_t a1, + short a2, void *z) { return(*(int *)0); } @@ -420,28 +412,28 @@ void bkgdset( #undef border int border( - chtype a1, - chtype a2, - chtype a3, - chtype a4, - chtype a5, - chtype a6, - chtype a7, + chtype a1, + chtype a2, + chtype a3, + chtype a4, + chtype a5, + chtype a6, + chtype a7, chtype z) { return(*(int *)0); } #undef box int box( - WINDOW *a1, - chtype a2, + WINDOW *a1, + chtype a2, chtype z) { return(*(int *)0); } #undef chgat int chgat( - int a1, - attr_t a2, - short a3, + int a1, + attr_t a2, + short a3, const void *z) { return(*(int *)0); } @@ -459,7 +451,7 @@ int clrtoeol(void) #undef color_set int color_set( - short a1, + short a1, void *z) { return(*(int *)0); } @@ -496,7 +488,7 @@ int getch(void) #undef getnstr int getnstr( - char *a1, + char *a1, int z) { return(*(int *)0); } @@ -507,7 +499,7 @@ int getstr( #undef hline int hline( - chtype a1, + chtype a1, int z) { return(*(int *)0); } @@ -517,7 +509,7 @@ chtype inch(void) #undef inchnstr int inchnstr( - chtype *a1, + chtype *a1, int z) { return(*(int *)0); } @@ -528,7 +520,7 @@ int inchstr( #undef innstr int innstr( - char *a1, + char *a1, int z) { return(*(int *)0); } @@ -548,7 +540,7 @@ int insertln(void) #undef insnstr int insnstr( - const char *a1, + const char *a1, int z) { return(*(int *)0); } @@ -564,323 +556,323 @@ int instr( #undef move int move( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvaddch int mvaddch( - int a1, - int a2, + int a1, + int a2, const chtype z) { return(*(int *)0); } #undef mvaddchnstr int mvaddchnstr( - int a1, - int a2, - const chtype *a3, + int a1, + int a2, + const chtype *a3, int z) { return(*(int *)0); } #undef mvaddchstr int mvaddchstr( - int a1, - int a2, + int a1, + int a2, const chtype *z) { return(*(int *)0); } #undef mvaddnstr int mvaddnstr( - int a1, - int a2, - const char *a3, + int a1, + int a2, + const char *a3, int z) { return(*(int *)0); } #undef mvaddstr int mvaddstr( - int a1, - int a2, + int a1, + int a2, const char *z) { return(*(int *)0); } #undef mvchgat int mvchgat( - int a1, - int a2, - int a3, - attr_t a4, - short a5, + int a1, + int a2, + int a3, + attr_t a4, + short a5, const void *z) { return(*(int *)0); } #undef mvdelch int mvdelch( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvgetch int mvgetch( - int a1, + int a1, int z) { return(*(int *)0); } #undef mvgetnstr int mvgetnstr( - int a1, - int a2, - char *a3, + int a1, + int a2, + char *a3, int z) { return(*(int *)0); } #undef mvgetstr int mvgetstr( - int a1, - int a2, + int a1, + int a2, char *z) { return(*(int *)0); } #undef mvhline int mvhline( - int a1, - int a2, - chtype a3, + int a1, + int a2, + chtype a3, int z) { return(*(int *)0); } #undef mvinch chtype mvinch( - int a1, + int a1, int z) { return(*(chtype *)0); } #undef mvinchnstr int mvinchnstr( - int a1, - int a2, - chtype *a3, + int a1, + int a2, + chtype *a3, int z) { return(*(int *)0); } #undef mvinchstr int mvinchstr( - int a1, - int a2, + int a1, + int a2, chtype *z) { return(*(int *)0); } #undef mvinnstr int mvinnstr( - int a1, - int a2, - char *a3, + int a1, + int a2, + char *a3, int z) { return(*(int *)0); } #undef mvinsch int mvinsch( - int a1, - int a2, + int a1, + int a2, chtype z) { return(*(int *)0); } #undef mvinsnstr int mvinsnstr( - int a1, - int a2, - const char *a3, + int a1, + int a2, + const char *a3, int z) { return(*(int *)0); } #undef mvinsstr int mvinsstr( - int a1, - int a2, + int a1, + int a2, const char *z) { return(*(int *)0); } #undef mvinstr int mvinstr( - int a1, - int a2, + int a1, + int a2, char *z) { return(*(int *)0); } #undef mvvline int mvvline( - int a1, - int a2, - chtype a3, + int a1, + int a2, + chtype a3, int z) { return(*(int *)0); } #undef mvwaddch int mvwaddch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const chtype z) { return(*(int *)0); } #undef mvwaddchnstr int mvwaddchnstr( - WINDOW *a1, - int a2, - int a3, - const chtype *a4, + WINDOW *a1, + int a2, + int a3, + const chtype *a4, int z) { return(*(int *)0); } #undef mvwaddchstr int mvwaddchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const chtype *z) { return(*(int *)0); } #undef mvwaddnstr int mvwaddnstr( - WINDOW *a1, - int a2, - int a3, - const char *a4, + WINDOW *a1, + int a2, + int a3, + const char *a4, int z) { return(*(int *)0); } #undef mvwaddstr int mvwaddstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const char *z) { return(*(int *)0); } #undef mvwchgat int mvwchgat( - WINDOW *a1, - int a2, - int a3, - int a4, - attr_t a5, - short a6, + WINDOW *a1, + int a2, + int a3, + int a4, + attr_t a5, + short a6, const void *z) { return(*(int *)0); } #undef mvwdelch int mvwdelch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } #undef mvwgetch int mvwgetch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } #undef mvwgetnstr int mvwgetnstr( - WINDOW *a1, - int a2, - int a3, - char *a4, + WINDOW *a1, + int a2, + int a3, + char *a4, int z) { return(*(int *)0); } #undef mvwgetstr int mvwgetstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, char *z) { return(*(int *)0); } #undef mvwhline int mvwhline( - WINDOW *a1, - int a2, - int a3, - chtype a4, + WINDOW *a1, + int a2, + int a3, + chtype a4, int z) { return(*(int *)0); } #undef mvwinch chtype mvwinch( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(chtype *)0); } #undef mvwinchnstr int mvwinchnstr( - WINDOW *a1, - int a2, - int a3, - chtype *a4, + WINDOW *a1, + int a2, + int a3, + chtype *a4, int z) { return(*(int *)0); } #undef mvwinchstr int mvwinchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, chtype *z) { return(*(int *)0); } #undef mvwinnstr int mvwinnstr( - WINDOW *a1, - int a2, - int a3, - char *a4, + WINDOW *a1, + int a2, + int a3, + char *a4, int z) { return(*(int *)0); } #undef mvwinsch int mvwinsch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, chtype z) { return(*(int *)0); } #undef mvwinsnstr int mvwinsnstr( - WINDOW *a1, - int a2, - int a3, - const char *a4, + WINDOW *a1, + int a2, + int a3, + const char *a4, int z) { return(*(int *)0); } #undef mvwinsstr int mvwinsstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const char *z) { return(*(int *)0); } #undef mvwinstr int mvwinstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, char *z) { return(*(int *)0); } #undef mvwvline int mvwvline( - WINDOW *a1, - int a2, - int a3, - chtype a4, + WINDOW *a1, + int a2, + int a3, + chtype a4, int z) { return(*(int *)0); } @@ -910,19 +902,19 @@ int scroll( #undef setscrreg int setscrreg( - int a1, + int a1, int z) { return(*(int *)0); } #undef slk_attr_off int slk_attr_off( - const attr_t a1, + const attr_t a1, void *z) { return(*(int *)0); } #undef slk_attr_on int slk_attr_on( - attr_t a1, + attr_t a1, void *z) { return(*(int *)0); } @@ -941,8 +933,8 @@ void timeout( #undef touchline int touchline( - WINDOW *a1, - int a2, + WINDOW *a1, + int a2, int z) { return(*(int *)0); } @@ -958,67 +950,67 @@ int untouchwin( #undef vline int vline( - chtype a1, + chtype a1, int z) { return(*(int *)0); } #undef vw_printw int vw_printw( - WINDOW *a1, - char *a2, + WINDOW *a1, + const char *a2, va_list z) { return(*(int *)0); } #undef vw_scanw int vw_scanw( - WINDOW *a1, - char *a2, + WINDOW *a1, + char *a2, va_list z) { return(*(int *)0); } #undef waddchstr int waddchstr( - WINDOW *a1, + WINDOW *a1, const chtype *z) { return(*(int *)0); } #undef waddstr int waddstr( - WINDOW *a1, + WINDOW *a1, const char *z) { return(*(int *)0); } #undef wattron int wattron( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattroff int wattroff( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattrset int wattrset( - WINDOW *a1, + WINDOW *a1, int z) { return(*(int *)0); } #undef wattr_get int wattr_get( - WINDOW *a1, - attr_t *a2, - short *a3, + WINDOW *a1, + attr_t *a2, + short *a3, void *z) { return(*(int *)0); } #undef wattr_set int wattr_set( - WINDOW *a1, - attr_t a2, - short a3, + WINDOW *a1, + attr_t a2, + short a3, void *z) { return(*(int *)0); } @@ -1029,13 +1021,13 @@ int wdeleteln( #undef wgetstr int wgetstr( - WINDOW *a1, + WINDOW *a1, char *z) { return(*(int *)0); } #undef winchstr int winchstr( - WINDOW *a1, + WINDOW *a1, chtype *z) { return(*(int *)0); } @@ -1046,13 +1038,13 @@ int winsertln( #undef winsstr int winsstr( - WINDOW *a1, + WINDOW *a1, const char *z) { return(*(int *)0); } #undef winstr int winstr( - WINDOW *a1, + WINDOW *a1, char *z) { return(*(int *)0); } @@ -1073,7 +1065,7 @@ int add_wch( #undef add_wchnstr int add_wchnstr( - const cchar_t *a1, + const cchar_t *a1, int z) { return(*(int *)0); } @@ -1084,7 +1076,7 @@ int add_wchstr( #undef addnwstr int addnwstr( - const wchar_t *a1, + const wchar_t *a1, int z) { return(*(int *)0); } @@ -1105,20 +1097,20 @@ void bkgrndset( #undef border_set int border_set( - const cchar_t *a1, - const cchar_t *a2, - const cchar_t *a3, - const cchar_t *a4, - const cchar_t *a5, - const cchar_t *a6, - const cchar_t *a7, + const cchar_t *a1, + const cchar_t *a2, + const cchar_t *a3, + const cchar_t *a4, + const cchar_t *a5, + const cchar_t *a6, + const cchar_t *a7, const cchar_t *z) { return(*(int *)0); } #undef box_set int box_set( - WINDOW *a1, - const cchar_t *a2, + WINDOW *a1, + const cchar_t *a2, const cchar_t *z) { return(*(int *)0); } @@ -1129,12 +1121,12 @@ int echo_wchar( #undef get_wch int get_wch( - wint_t *z) + wint_t *z) { return(*(int *)0); } #undef get_wstr int get_wstr( - wint_t *z) + wint_t *z) { return(*(int *)0); } #undef getbkgrnd @@ -1144,13 +1136,13 @@ int getbkgrnd( #undef getn_wstr int getn_wstr( - wint_t *a1, + wint_t *a1, int z) { return(*(int *)0); } #undef hline_set int hline_set( - const cchar_t *a1, + const cchar_t *a1, int z) { return(*(int *)0); } @@ -1161,7 +1153,7 @@ int in_wch( #undef in_wchnstr int in_wchnstr( - cchar_t *a1, + cchar_t *a1, int z) { return(*(int *)0); } @@ -1172,13 +1164,13 @@ int in_wchstr( #undef innwstr int innwstr( - wchar_t *a1, + wchar_t *a1, int z) { return(*(int *)0); } #undef ins_nwstr int ins_nwstr( - const wchar_t *a1, + const wchar_t *a1, int z) { return(*(int *)0); } @@ -1194,335 +1186,335 @@ int ins_wstr( #undef inwstr int inwstr( - wchar_t *z) + wchar_t *z) { return(*(int *)0); } #undef mvadd_wch int mvadd_wch( - int a1, - int a2, + int a1, + int a2, const cchar_t *z) { return(*(int *)0); } #undef mvadd_wchnstr int mvadd_wchnstr( - int a1, - int a2, - const cchar_t *a3, + int a1, + int a2, + const cchar_t *a3, int z) { return(*(int *)0); } #undef mvadd_wchstr int mvadd_wchstr( - int a1, - int a2, + int a1, + int a2, const cchar_t *z) { return(*(int *)0); } #undef mvaddnwstr int mvaddnwstr( - int a1, - int a2, - const wchar_t *a3, + int a1, + int a2, + const wchar_t *a3, int z) { return(*(int *)0); } #undef mvaddwstr int mvaddwstr( - int a1, - int a2, + int a1, + int a2, const wchar_t *z) { return(*(int *)0); } #undef mvget_wch int mvget_wch( - int a1, - int a2, - wint_t *z) + int a1, + int a2, + wint_t *z) { return(*(int *)0); } #undef mvget_wstr int mvget_wstr( - int a1, - int a2, - wint_t *z) + int a1, + int a2, + wint_t *z) { return(*(int *)0); } #undef mvgetn_wstr int mvgetn_wstr( - int a1, - int a2, - wint_t *a3, + int a1, + int a2, + wint_t *a3, int z) { return(*(int *)0); } #undef mvhline_set int mvhline_set( - int a1, - int a2, - const cchar_t *a3, + int a1, + int a2, + const cchar_t *a3, int z) { return(*(int *)0); } #undef mvin_wch int mvin_wch( - int a1, - int a2, + int a1, + int a2, cchar_t *z) { return(*(int *)0); } #undef mvin_wchnstr int mvin_wchnstr( - int a1, - int a2, - cchar_t *a3, + int a1, + int a2, + cchar_t *a3, int z) { return(*(int *)0); } #undef mvin_wchstr int mvin_wchstr( - int a1, - int a2, + int a1, + int a2, cchar_t *z) { return(*(int *)0); } #undef mvinnwstr int mvinnwstr( - int a1, - int a2, - wchar_t *a3, + int a1, + int a2, + wchar_t *a3, int z) { return(*(int *)0); } #undef mvins_nwstr int mvins_nwstr( - int a1, - int a2, - const wchar_t *a3, + int a1, + int a2, + const wchar_t *a3, int z) { return(*(int *)0); } #undef mvins_wch int mvins_wch( - int a1, - int a2, + int a1, + int a2, const cchar_t *z) { return(*(int *)0); } #undef mvins_wstr int mvins_wstr( - int a1, - int a2, + int a1, + int a2, const wchar_t *z) { return(*(int *)0); } #undef mvinwstr int mvinwstr( - int a1, - int a2, - wchar_t *z) + int a1, + int a2, + wchar_t *z) { return(*(int *)0); } #undef mvvline_set int mvvline_set( - int a1, - int a2, - const cchar_t *a3, + int a1, + int a2, + const cchar_t *a3, int z) { return(*(int *)0); } #undef mvwadd_wch int mvwadd_wch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const cchar_t *z) { return(*(int *)0); } #undef mvwadd_wchnstr int mvwadd_wchnstr( - WINDOW *a1, - int a2, - int a3, - const cchar_t *a4, + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, int z) { return(*(int *)0); } #undef mvwadd_wchstr int mvwadd_wchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const cchar_t *z) { return(*(int *)0); } #undef mvwaddnwstr int mvwaddnwstr( - WINDOW *a1, - int a2, - int a3, - const wchar_t *a4, + WINDOW *a1, + int a2, + int a3, + const wchar_t *a4, int z) { return(*(int *)0); } #undef mvwaddwstr int mvwaddwstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const wchar_t *z) { return(*(int *)0); } #undef mvwget_wch int mvwget_wch( - WINDOW *a1, - int a2, - int a3, - wint_t *z) + WINDOW *a1, + int a2, + int a3, + wint_t *z) { return(*(int *)0); } #undef mvwget_wstr int mvwget_wstr( - WINDOW *a1, - int a2, - int a3, - wint_t *z) + WINDOW *a1, + int a2, + int a3, + wint_t *z) { return(*(int *)0); } #undef mvwgetn_wstr int mvwgetn_wstr( - WINDOW *a1, - int a2, - int a3, - wint_t *a4, + WINDOW *a1, + int a2, + int a3, + wint_t *a4, int z) { return(*(int *)0); } #undef mvwhline_set int mvwhline_set( - WINDOW *a1, - int a2, - int a3, - const cchar_t *a4, + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, int z) { return(*(int *)0); } #undef mvwin_wch int mvwin_wch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, cchar_t *z) { return(*(int *)0); } #undef mvwin_wchnstr int mvwin_wchnstr( - WINDOW *a1, - int a2, - int a3, - cchar_t *a4, + WINDOW *a1, + int a2, + int a3, + cchar_t *a4, int z) { return(*(int *)0); } #undef mvwin_wchstr int mvwin_wchstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, cchar_t *z) { return(*(int *)0); } #undef mvwinnwstr int mvwinnwstr( - WINDOW *a1, - int a2, - int a3, - wchar_t *a4, + WINDOW *a1, + int a2, + int a3, + wchar_t *a4, int z) { return(*(int *)0); } #undef mvwins_nwstr int mvwins_nwstr( - WINDOW *a1, - int a2, - int a3, - const wchar_t *a4, + WINDOW *a1, + int a2, + int a3, + const wchar_t *a4, int z) { return(*(int *)0); } #undef mvwins_wch int mvwins_wch( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const cchar_t *z) { return(*(int *)0); } #undef mvwins_wstr int mvwins_wstr( - WINDOW *a1, - int a2, - int a3, + WINDOW *a1, + int a2, + int a3, const wchar_t *z) { return(*(int *)0); } #undef mvwinwstr int mvwinwstr( - WINDOW *a1, - int a2, - int a3, - wchar_t *z) + WINDOW *a1, + int a2, + int a3, + wchar_t *z) { return(*(int *)0); } #undef mvwvline_set int mvwvline_set( - WINDOW *a1, - int a2, - int a3, - const cchar_t *a4, + WINDOW *a1, + int a2, + int a3, + const cchar_t *a4, int z) { return(*(int *)0); } #undef vline_set int vline_set( - const cchar_t *a1, + const cchar_t *a1, int z) { return(*(int *)0); } #undef wadd_wchstr int wadd_wchstr( - WINDOW *a1, + WINDOW *a1, const cchar_t *z) { return(*(int *)0); } #undef waddwstr int waddwstr( - WINDOW *a1, + WINDOW *a1, const wchar_t *z) { return(*(int *)0); } #undef wget_wstr int wget_wstr( - WINDOW *a1, - wint_t *z) + WINDOW *a1, + wint_t *z) { return(*(int *)0); } #undef win_wchstr int win_wchstr( - WINDOW *a1, + WINDOW *a1, cchar_t *z) { return(*(int *)0); } #undef wins_wstr int wins_wstr( - WINDOW *a1, + WINDOW *a1, const wchar_t *z) { return(*(int *)0); } #undef mouse_trafo NCURSES_BOOL mouse_trafo( - int *a1, - int *a2, + int *a1, + int *a2, NCURSES_BOOL z) { return(*(NCURSES_BOOL *)0); } @@ -1535,8 +1527,8 @@ int ESCDELAY; #undef _nc_wgetch int _nc_wgetch( - WINDOW *win, - unsigned long *result, + WINDOW *win, + unsigned long *result, int use_meta) { return(*(int *)0); } @@ -1549,8 +1541,8 @@ int wgetch( #undef wgetnstr int wgetnstr( - WINDOW *win, - char *str, + WINDOW *win, + char *str, int maxlen) { return(*(int *)0); } @@ -1558,8 +1550,8 @@ int wgetnstr( #undef whline int whline( - WINDOW *win, - chtype ch, + WINDOW *win, + chtype ch, int n) { return(*(int *)0); } @@ -1567,7 +1559,7 @@ int whline( #undef immedok void immedok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { /* void */ } @@ -1575,8 +1567,8 @@ void immedok( #undef winchnstr int winchnstr( - WINDOW *win, - chtype *str, + WINDOW *win, + chtype *str, int n) { return(*(int *)0); } @@ -1588,26 +1580,30 @@ WINDOW *initscr(void) /* ./base/lib_insch.c */ +#undef _nc_insert_ch +void _nc_insert_ch( + WINDOW *win, + chtype ch) + { /* void */ } + #undef winsch int winsch( - WINDOW *win, + WINDOW *win, chtype c) { return(*(int *)0); } -/* ./base/lib_insdel.c */ - -#undef winsdelln -int winsdelln( - WINDOW *win, +#undef winsnstr +int winsnstr( + WINDOW *win, + const char *s, int n) { return(*(int *)0); } -/* ./base/lib_insstr.c */ +/* ./base/lib_insdel.c */ -#undef winsnstr -int winsnstr( - WINDOW *win, - const char *s, +#undef winsdelln +int winsdelln( + WINDOW *win, int n) { return(*(int *)0); } @@ -1615,8 +1611,8 @@ int winsnstr( #undef winnstr int winnstr( - WINDOW *win, - char *str, + WINDOW *win, + char *str, int n) { return(*(int *)0); } @@ -1630,7 +1626,7 @@ NCURSES_BOOL isendwin(void) #undef leaveok int leaveok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -1648,14 +1644,14 @@ int ungetmouse( #undef mousemask mmask_t mousemask( - mmask_t newmask, + mmask_t newmask, mmask_t *oldmask) { return(*(mmask_t *)0); } #undef wenclose NCURSES_BOOL wenclose( - const WINDOW *win, - int y, + const WINDOW *win, + int y, int x) { return(*(NCURSES_BOOL *)0); } @@ -1670,9 +1666,9 @@ int _nc_has_mouse(void) #undef wmouse_trafo NCURSES_BOOL wmouse_trafo( - const WINDOW *win, - int *pY, - int *pX, + const WINDOW *win, + int *pY, + int *pX, NCURSES_BOOL to_screen) { return(*(NCURSES_BOOL *)0); } @@ -1680,8 +1676,8 @@ NCURSES_BOOL wmouse_trafo( #undef wmove int wmove( - WINDOW *win, - int y, + WINDOW *win, + int y, int x) { return(*(int *)0); } @@ -1689,7 +1685,7 @@ int wmove( #undef _nc_msec_cost int _nc_msec_cost( - const char *const cap, + const char *const cap, int affcnt) { return(*(int *)0); } @@ -1707,9 +1703,9 @@ void _nc_mvcur_wrap(void) #undef mvcur int mvcur( - int yold, - int xold, - int ynew, + int yold, + int xold, + int ynew, int xnew) { return(*(int *)0); } @@ -1720,8 +1716,8 @@ int _nc_optimize_enable; #undef mvwin int mvwin( - WINDOW *win, - int by, + WINDOW *win, + int by, int bx) { return(*(int *)0); } @@ -1733,8 +1729,8 @@ void filter(void) #undef newterm SCREEN *newterm( - char *name, - FILE *ofp, + char *name, + FILE *ofp, FILE *ifp) { return(*(SCREEN **)0); } @@ -1747,36 +1743,36 @@ int _nc_freewin( #undef newwin WINDOW *newwin( - int num_lines, - int num_columns, - int begy, + int num_lines, + int num_columns, + int begy, int begx) { return(*(WINDOW **)0); } #undef derwin WINDOW *derwin( - WINDOW *orig, - int num_lines, - int num_columns, - int begy, + WINDOW *orig, + int num_lines, + int num_columns, + int begy, int begx) { return(*(WINDOW **)0); } #undef subwin WINDOW *subwin( - WINDOW *w, - int l, - int c, - int y, + WINDOW *w, + int l, + int c, + int y, int x) { return(*(WINDOW **)0); } #undef _nc_makenew WINDOW *_nc_makenew( - int num_lines, - int num_columns, - int begy, - int begx, + int num_lines, + int num_columns, + int begy, + int begx, int flags) { return(*(WINDOW **)0); } @@ -1794,26 +1790,26 @@ int nonl(void) #undef overlay int overlay( - const WINDOW *win1, + const WINDOW *win1, WINDOW *win2) { return(*(int *)0); } #undef overwrite int overwrite( - const WINDOW *win1, + const WINDOW *win1, WINDOW *win2) { return(*(int *)0); } #undef copywin int copywin( - const WINDOW *src, - WINDOW *dst, - int sminrow, - int smincol, - int dminrow, - int dmincol, - int dmaxrow, - int dmaxcol, + const WINDOW *src, + WINDOW *dst, + int sminrow, + int smincol, + int dminrow, + int dmincol, + int dmaxrow, + int dmaxcol, int over) { return(*(int *)0); } @@ -1821,44 +1817,44 @@ int copywin( #undef newpad WINDOW *newpad( - int l, + int l, int c) { return(*(WINDOW **)0); } #undef subpad WINDOW *subpad( - WINDOW *orig, - int l, - int c, - int begy, + WINDOW *orig, + int l, + int c, + int begy, int begx) { return(*(WINDOW **)0); } #undef prefresh int prefresh( - WINDOW *win, - int pminrow, - int pmincol, - int sminrow, - int smincol, - int smaxrow, + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, int smaxcol) { return(*(int *)0); } #undef pnoutrefresh int pnoutrefresh( - WINDOW *win, - int pminrow, - int pmincol, - int sminrow, - int smincol, - int smaxrow, + WINDOW *win, + int pminrow, + int pmincol, + int sminrow, + int smincol, + int smaxrow, int smaxcol) { return(*(int *)0); } #undef pechochar int pechochar( - WINDOW *pad, + WINDOW *pad, const chtype ch) { return(*(int *)0); } @@ -1866,38 +1862,38 @@ int pechochar( #undef printw int printw( - char *fmt, + const char *fmt, ...) { return(*(int *)0); } #undef wprintw int wprintw( - WINDOW *win, - char *fmt, + WINDOW *win, + const char *fmt, ...) { return(*(int *)0); } #undef mvprintw int mvprintw( - int y, - int x, - char *fmt, + int y, + int x, + const char *fmt, ...) { return(*(int *)0); } #undef mvwprintw int mvwprintw( - WINDOW *win, - int y, - int x, - char *fmt, + WINDOW *win, + int y, + int x, + const char *fmt, ...) { return(*(int *)0); } #undef vwprintw int vwprintw( - WINDOW *win, - char *fmt, + WINDOW *win, + const char *fmt, va_list argp) { return(*(int *)0); } @@ -1905,8 +1901,8 @@ int vwprintw( #undef wredrawln int wredrawln( - WINDOW *win, - int beg, + WINDOW *win, + int beg, int num) { return(*(int *)0); } @@ -1926,8 +1922,8 @@ int wnoutrefresh( #undef restartterm int restartterm( - char *termp, - int filenum, + char *termp, + int filenum, int *errret) { return(*(int *)0); } @@ -1935,38 +1931,38 @@ int restartterm( #undef vwscanw int vwscanw( - WINDOW *win, - char *fmt, + WINDOW *win, + char *fmt, va_list argp) { return(*(int *)0); } #undef scanw int scanw( - char *fmt, + char *fmt, ...) { return(*(int *)0); } #undef wscanw int wscanw( - WINDOW *win, - char *fmt, + WINDOW *win, + char *fmt, ...) { return(*(int *)0); } #undef mvscanw int mvscanw( - int y, - int x, - char *fmt, + int y, + int x, + char *fmt, ...) { return(*(int *)0); } #undef mvwscanw int mvwscanw( - WINDOW *win, - int y, - int x, - char *fmt, + WINDOW *win, + int y, + int x, + char *fmt, ...) { return(*(int *)0); } @@ -1979,7 +1975,7 @@ WINDOW *getwin( #undef putwin int putwin( - WINDOW *win, + WINDOW *win, FILE *filep) { return(*(int *)0); } @@ -2007,16 +2003,16 @@ int scr_set( #undef _nc_scroll_window void _nc_scroll_window( - WINDOW *win, - int const n, - short const top, - short const bottom, + WINDOW *win, + int const n, + short const top, + short const bottom, cchar_t blank) { /* void */ } #undef wscrl int wscrl( - WINDOW *win, + WINDOW *win, int n) { return(*(int *)0); } @@ -2024,7 +2020,7 @@ int wscrl( #undef scrollok int scrollok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -2032,8 +2028,8 @@ int scrollok( #undef wsetscrreg int wsetscrreg( - WINDOW *win, - int top, + WINDOW *win, + int top, int bottom) { return(*(int *)0); } @@ -2051,24 +2047,24 @@ void delscreen( #undef _nc_setupscreen int _nc_setupscreen( - short slines, - short const scolumns, + short slines, + short const scolumns, FILE *output) { return(*(int *)0); } #undef _nc_ripoffline int _nc_ripoffline( - int line, + int line, int (*init)( - WINDOW *p1, + WINDOW *p1, int p2)) { return(*(int *)0); } #undef ripoffline int ripoffline( - int line, + int line, int (*init)( - WINDOW *p1, + WINDOW *p1, int p2)) { return(*(int *)0); } @@ -2079,7 +2075,7 @@ int _nc_slk_format; #undef _nc_slk_initialize int _nc_slk_initialize( - WINDOW *stwin, + WINDOW *stwin, int cols) { return(*(int *)0); } @@ -2091,8 +2087,8 @@ int slk_restore(void) #undef slk_attr_set int slk_attr_set( - const attr_t attr, - short color_pair_number, + const attr_t attr, + short color_pair_number, void *opts) { return(*(int *)0); } @@ -2164,8 +2160,8 @@ int slk_refresh(void) #undef slk_set int slk_set( - int i, - const char *astr, + int i, + const char *astr, int format) { return(*(int *)0); } @@ -2179,7 +2175,7 @@ int slk_touch(void) #undef is_linetouched NCURSES_BOOL is_linetouched( - WINDOW *win, + WINDOW *win, int line) { return(*(NCURSES_BOOL *)0); } @@ -2190,9 +2186,9 @@ NCURSES_BOOL is_wintouched( #undef wtouchln int wtouchln( - WINDOW *win, - int y, - int n, + WINDOW *win, + int y, + int n, int changed) { return(*(int *)0); } @@ -2200,7 +2196,7 @@ int wtouchln( #undef _traceattr2 char *_traceattr2( - int bufnum, + int bufnum, attr_t newmode) { return(*(char **)0); } @@ -2216,13 +2212,13 @@ attr_t _nc_retrace_attr_t( #undef _nc_altcharset_name const char *_nc_altcharset_name( - attr_t attr, + attr_t attr, chtype ch) { return(*(const char **)0); } #undef _tracechtype2 char *_tracechtype2( - int bufnum, + int bufnum, chtype ch) { return(*(char **)0); } @@ -2232,13 +2228,13 @@ char *_tracechtype( { return(*(char **)0); } #undef _nc_retrace_chtype -attr_t _nc_retrace_chtype( - attr_t code) - { return(*(attr_t *)0); } +chtype _nc_retrace_chtype( + chtype code) + { return(*(chtype *)0); } #undef _tracecchar_t2 char *_tracecchar_t2( - int bufnum, + int bufnum, const cchar_t *ch) { return(*(char **)0); } @@ -2251,7 +2247,7 @@ char *_tracecchar_t( #undef _tracedump void _tracedump( - const char *name, + const char *name, WINDOW *win) { /* void */ } @@ -2286,7 +2282,7 @@ int ungetch( #undef vidputs int vidputs( - chtype newmode, + chtype newmode, int (*outc)( int p1)) { return(*(int *)0); } @@ -2304,8 +2300,8 @@ chtype termattrs(void) #undef wvline int wvline( - WINDOW *win, - chtype ch, + WINDOW *win, + chtype ch, int n) { return(*(int *)0); } @@ -2313,8 +2309,8 @@ int wvline( #undef wattr_off int wattr_off( - WINDOW *win, - attr_t at, + WINDOW *win, + attr_t at, void *opts) { return(*(int *)0); } @@ -2322,8 +2318,8 @@ int wattr_off( #undef wattr_on int wattr_on( - WINDOW *win, - attr_t at, + WINDOW *win, + attr_t at, void *opts) { return(*(int *)0); } @@ -2343,14 +2339,14 @@ void _nc_synchook( #undef mvderwin int mvderwin( - WINDOW *win, - int y, + WINDOW *win, + int y, int x) { return(*(int *)0); } #undef syncok int syncok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL bf) { return(*(int *)0); } @@ -2384,7 +2380,7 @@ struct panelhook *_nc_panelhook(void) #undef _nc_printf_string char *_nc_printf_string( - const char *fmt, + const char *fmt, va_list ap) { return(*(char **)0); } @@ -2397,16 +2393,11 @@ char *_nc_printf_string( int doupdate(void) { return(*(int *)0); } -#undef _nc_outstr -void _nc_outstr( - const char *str) - { /* void */ } - #undef _nc_scrolln int _nc_scrolln( - int n, - int top, - int bot, + int n, + int top, + int bot, int maxy) { return(*(int *)0); } @@ -2429,13 +2420,9 @@ void _nc_do_xmc_glitch( /* ./trace/varargs.c */ -typedef enum { - atUnknown = 0, atInteger, atFloat, atPoint, atString -} ARGTYPE; - #undef _nc_varargs char *_nc_varargs( - const char *fmt, + const char *fmt, va_list ap) { return(*(char **)0); } @@ -2445,30 +2432,63 @@ char *_nc_varargs( void _nc_memmove(void) { /* void */ } -/* ./base/sigaction.c */ - -#undef _nc_sigaction -void _nc_sigaction(void) - { /* void */ } - /* ./base/vsscanf.c */ #undef _nc_vsscanf void _nc_vsscanf(void) { /* void */ } +/* ./base/lib_freeall.c */ + +#include + +#undef _nc_freeall +void _nc_freeall(void) + { /* void */ } + +/* ./widechar/charable.c */ + +#undef _nc_is_charable +NCURSES_BOOL _nc_is_charable( + wchar_t ch) + { return(*(NCURSES_BOOL *)0); } + +#undef _nc_to_char +int _nc_to_char( + wint_t ch) + { return(*(int *)0); } + +#undef _nc_to_widechar +wint_t _nc_to_widechar( + int ch) + { return(*(wint_t *)0); } + +/* ./widechar/lib_add_wch.c */ + +#undef wadd_wch +int wadd_wch( + WINDOW *win, + const cchar_t *wch) + { return(*(int *)0); } + +#undef wecho_wchar +int wecho_wchar( + WINDOW *win, + const cchar_t *wch) + { return(*(int *)0); } + /* ./widechar/lib_box_set.c */ #undef wborder_set int wborder_set( - WINDOW *win, - const cchar_t *ls, - const cchar_t *rs, - const cchar_t *ts, - const cchar_t *bs, - const cchar_t *tl, - const cchar_t *tr, - const cchar_t *bl, + WINDOW *win, + const cchar_t *ls, + const cchar_t *rs, + const cchar_t *ts, + const cchar_t *bs, + const cchar_t *tl, + const cchar_t *tr, + const cchar_t *bl, const cchar_t *br) { return(*(int *)0); } @@ -2476,19 +2496,19 @@ int wborder_set( #undef setcchar int setcchar( - cchar_t *wcval, - const wchar_t *wch, - const attr_t attrs, - short color_pair, + cchar_t *wcval, + const wchar_t *wch, + const attr_t attrs, + short color_pair, const void *opts) { return(*(int *)0); } #undef getcchar int getcchar( - const cchar_t *wcval, - wchar_t *wch, - attr_t *attrs, - short *color_pair, + const cchar_t *wcval, + wchar_t *wch, + attr_t *attrs, + short *color_pair, void *opts) { return(*(int *)0); } @@ -2496,28 +2516,28 @@ int getcchar( #undef wget_wch int wget_wch( - WINDOW *win, - wint_t *result) + WINDOW *win, + wint_t *result) { return(*(int *)0); } /* ./widechar/lib_erasewchar.c */ #undef erasewchar int erasewchar( - wchar_t *wch) + wchar_t *wch) { return(*(int *)0); } #undef killwchar int killwchar( - wchar_t *wch) + wchar_t *wch) { return(*(int *)0); } /* ./widechar/lib_get_wstr.c */ #undef wgetn_wstr int wgetn_wstr( - WINDOW *win, - wint_t *str, + WINDOW *win, + wint_t *str, int maxlen) { return(*(int *)0); } @@ -2525,8 +2545,8 @@ int wgetn_wstr( #undef whline_set int whline_set( - WINDOW *win, - const cchar_t *ch, + WINDOW *win, + const cchar_t *ch, int n) { return(*(int *)0); } @@ -2534,7 +2554,7 @@ int whline_set( #undef win_wch int win_wch( - WINDOW *win, + WINDOW *win, cchar_t *wcval) { return(*(int *)0); } @@ -2542,17 +2562,8 @@ int win_wch( #undef win_wchnstr int win_wchnstr( - WINDOW *win, - cchar_t *wchstr, - int n) - { return(*(int *)0); } - -/* ./widechar/lib_ins_nwstr.c */ - -#undef wins_nwstr -int wins_nwstr( - WINDOW *win, - const wchar_t *wstr, + WINDOW *win, + cchar_t *wchstr, int n) { return(*(int *)0); } @@ -2560,23 +2571,47 @@ int wins_nwstr( #undef wins_wch int wins_wch( - WINDOW *win, + WINDOW *win, const cchar_t *wch) { return(*(int *)0); } +#undef wins_nwstr +int wins_nwstr( + WINDOW *win, + const wchar_t *wstr, + int n) + { return(*(int *)0); } + /* ./widechar/lib_inwstr.c */ #undef winnwstr int winnwstr( - WINDOW *win, - wchar_t *wstr, + WINDOW *win, + wchar_t *wstr, int n) { return(*(int *)0); } #undef winwstr int winwstr( - WINDOW *win, - wchar_t *wstr) + WINDOW *win, + wchar_t *wstr) + { return(*(int *)0); } + +/* ./widechar/lib_pecho_wchar.c */ + +#undef pecho_wchar +int pecho_wchar( + WINDOW *pad, + const cchar_t *wch) + { return(*(int *)0); } + +/* ./widechar/lib_slk_wset.c */ + +#undef slk_wset +int slk_wset( + int i, + const wchar_t *astr, + int format) { return(*(int *)0); } /* ./widechar/lib_unget_wch.c */ @@ -2590,17 +2625,17 @@ int unget_wch( #undef vid_puts int vid_puts( - attr_t newmode, - short pair, - void *opts, + attr_t newmode, + short pair, + void *opts, int (*outc)( int p1)) { return(*(int *)0); } #undef vid_attr int vid_attr( - attr_t newmode, - short pair, + attr_t newmode, + short pair, void *opts) { return(*(int *)0); } @@ -2612,8 +2647,8 @@ attr_t term_attrs(void) #undef wvline_set int wvline_set( - WINDOW *win, - const cchar_t *ch, + WINDOW *win, + const cchar_t *ch, int n) { return(*(int *)0); } @@ -2629,7 +2664,7 @@ void _nc_init_wacs(void) /* ./widechar/lib_wunctrl.c */ #undef wunctrl -wchar_t *wunctrl( +wchar_t *wunctrl( cchar_t *wc) { return(*(wchar_t **)0); } @@ -2637,7 +2672,7 @@ wchar_t *wunctrl( #undef define_key int define_key( - char *str, + const char *str, int keycode) { return(*(int *)0); } @@ -2645,13 +2680,13 @@ int define_key( #undef _nc_toggle_attr_on void _nc_toggle_attr_on( - attr_t *S, + attr_t *S, attr_t at) { /* void */ } #undef _nc_toggle_attr_off void _nc_toggle_attr_off( - attr_t *S, + attr_t *S, attr_t at) { /* void */ } @@ -2670,11 +2705,18 @@ void _nc_UpdateAttrs( chtype c) { /* void */ } +/* ./base/key_defined.c */ + +#undef key_defined +int key_defined( + const char *str) + { return(*(int *)0); } + /* ./base/keybound.c */ #undef keybound char *keybound( - int code, + int code, int count) { return(*(char **)0); } @@ -2682,7 +2724,7 @@ char *keybound( #undef keyok int keyok( - int c, + int c, NCURSES_BOOL flag) { return(*(int *)0); } @@ -2694,23 +2736,15 @@ int use_default_colors(void) #undef assume_default_colors int assume_default_colors( - int fg, + int fg, int bg) { return(*(int *)0); } -/* ./base/lib_freeall.c */ - -#include - -#undef _nc_freeall -void _nc_freeall(void) - { /* void */ } - /* ./tinfo/lib_print.c */ #undef mcprint int mcprint( - char *data, + char *data, int len) { return(*(int *)0); } @@ -2718,19 +2752,19 @@ int mcprint( #undef is_term_resized NCURSES_BOOL is_term_resized( - int ToLines, + int ToLines, int ToCols) { return(*(NCURSES_BOOL *)0); } #undef resize_term int resize_term( - int ToLines, + int ToLines, int ToCols) { return(*(int *)0); } #undef resizeterm int resizeterm( - int ToLines, + int ToLines, int ToCols) { return(*(int *)0); } @@ -2745,22 +2779,22 @@ void _nc_trace_xnames( #undef _nc_expand_try char *_nc_expand_try( - struct tries *tree, - unsigned short code, - int *count, + struct tries *tree, + unsigned short code, + int *count, size_t len) { return(*(char **)0); } #undef _nc_remove_key int _nc_remove_key( - struct tries **tree, + struct tries **tree, unsigned short code) { return(*(int *)0); } #undef _nc_remove_string int _nc_remove_string( - struct tries **tree, - char *string) + struct tries **tree, + const char *string) { return(*(int *)0); } /* ./base/version.c */ @@ -2773,8 +2807,8 @@ const char *curses_version(void) #undef wresize int wresize( - WINDOW *win, - int ToLines, + WINDOW *win, + int ToLines, int ToCols) { return(*(int *)0); } @@ -2785,6 +2819,11 @@ char *_nc_rootname( char *path) { return(*(char **)0); } +#undef _nc_pathlast +unsigned _nc_pathlast( + const char *path) + { return(*(unsigned *)0); } + #undef _nc_basename char *_nc_basename( char *path) @@ -2792,7 +2831,7 @@ char *_nc_basename( #undef _nc_access int _nc_access( - const char *path, + const char *path, int mode) { return(*(int *)0); } @@ -2804,8 +2843,8 @@ int _nc_env_access(void) #undef _nc_add_to_try void _nc_add_to_try( - struct tries **tree, - const char *str, + struct tries **tree, + const char *str, unsigned short code) { /* void */ } @@ -2828,13 +2867,13 @@ char *_nc_save_str( #undef _nc_wrap_entry void _nc_wrap_entry( - ENTRY *const ep, + ENTRY *const ep, NCURSES_BOOL copy_strings) { /* void */ } #undef _nc_merge_entry void _nc_merge_entry( - TERMTYPE *const to, + TERMTYPE *const to, TERMTYPE *const from) { /* void */ } @@ -2842,13 +2881,13 @@ void _nc_merge_entry( #undef _nc_align_termtype void _nc_align_termtype( - TERMTYPE *to, + TERMTYPE *to, TERMTYPE *from) { /* void */ } #undef _nc_copy_termtype void _nc_copy_termtype( - TERMTYPE *dst, + TERMTYPE *dst, TERMTYPE *src) { /* void */ } @@ -2856,16 +2895,16 @@ void _nc_copy_termtype( #undef _nc_captoinfo char *_nc_captoinfo( - const char *cap, - const char *s, - int const parametrized) + const char *cap, + const char *s, + int const parameterized) { return(*(char **)0); } #undef _nc_infotocap char *_nc_infotocap( - const char *cap, - const char *str, - int const parametrized) + const char *cap, + const char *str, + int const parameterized) { return(*(char **)0); } /* ./codes.c */ @@ -2926,19 +2965,19 @@ void _nc_get_type( #undef _nc_warning void _nc_warning( - const char *const fmt, + const char *const fmt, ...) { /* void */ } #undef _nc_err_abort void _nc_err_abort( - const char *const fmt, + const char *const fmt, ...) { /* void */ } #undef _nc_syserr_abort void _nc_syserr_abort( - const char *const fmt, + const char *const fmt, ...) { /* void */ } @@ -2946,8 +2985,8 @@ void _nc_syserr_abort( #undef _nc_tic_expand char *_nc_tic_expand( - const char *srcp, - NCURSES_BOOL tic_format, + const char *srcp, + NCURSES_BOOL tic_format, int numbers) { return(*(char **)0); } @@ -2957,14 +2996,14 @@ char *_nc_tic_expand( #undef _nc_find_entry struct name_table_entry const *_nc_find_entry( - const char *string, + const char *string, const struct name_table_entry *const *hash_table) { return(*(struct name_table_entry const **)0); } #undef _nc_find_type_entry struct name_table_entry const *_nc_find_type_entry( - const char *string, - int type, + const char *string, + int type, const struct name_table_entry *table) { return(*(struct name_table_entry const **)0); } @@ -2985,16 +3024,16 @@ void _nc_free_entries( #undef _nc_entry_match NCURSES_BOOL _nc_entry_match( - char *n1, + char *n1, char *n2) { return(*(NCURSES_BOOL *)0); } #undef _nc_read_entry_source void _nc_read_entry_source( - FILE *fp, - char *buf, - int literal, - NCURSES_BOOL silent, + FILE *fp, + char *buf, + int literal, + NCURSES_BOOL silent, NCURSES_BOOL (*hook)( ENTRY *p1)) { /* void */ } @@ -3028,7 +3067,7 @@ int _nc_get_token( #undef _nc_trans_string char _nc_trans_string( - char *ptr, + char *ptr, char *last) { return(*(char *)0); } @@ -3044,7 +3083,7 @@ void _nc_panic_mode( #undef _nc_reset_input void _nc_reset_input( - FILE *fp, + FILE *fp, char *buf) { /* void */ } @@ -3052,7 +3091,7 @@ void _nc_reset_input( #undef _nc_doalloc void *_nc_doalloc( - void *oldp, + void *oldp, size_t amount) { return(*(void **)0); } @@ -3109,7 +3148,7 @@ void _nc_init_keytry(void) /* ./tinfo/lib_acs.c */ #undef acs_map -chtype acs_map[128 ]; +chtype acs_map[128]; #undef _nc_init_acs void _nc_init_acs(void) @@ -3119,11 +3158,6 @@ void _nc_init_acs(void) #include -struct speed { - int s; - int sp; -}; - #undef _nc_baudrate int _nc_baudrate( int OSpeed) @@ -3202,7 +3236,7 @@ char *keyname( #undef key_name char *key_name( - wchar_t c) + wchar_t c) { return(*(char **)0); } /* ./tinfo/lib_longname.c */ @@ -3224,13 +3258,13 @@ int napms( #undef idlok int idlok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef idcok void idcok( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { /* void */ } @@ -3241,31 +3275,31 @@ int halfdelay( #undef nodelay int nodelay( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef notimeout int notimeout( - WINDOW *win, + WINDOW *win, NCURSES_BOOL f) { return(*(int *)0); } #undef wtimeout void wtimeout( - WINDOW *win, + WINDOW *win, int delay) { /* void */ } #undef keypad int keypad( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } #undef meta int meta( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -3317,7 +3351,7 @@ void noqiflush(void) #undef intrflush int intrflush( - WINDOW *win, + WINDOW *win, NCURSES_BOOL flag) { return(*(int *)0); } @@ -3325,11 +3359,8 @@ int intrflush( #include -#undef use_env -void use_env( - NCURSES_BOOL f) - { /* void */ } - +#undef ttytype +char ttytype[256]; #undef LINES int LINES; #undef COLS @@ -3337,17 +3368,31 @@ int COLS; #undef TABSIZE int TABSIZE; +#undef use_env +void use_env( + NCURSES_BOOL f) + { /* void */ } + #undef _nc_update_screensize void _nc_update_screensize(void) { /* void */ } -#undef ttytype -char ttytype[256 ]; +#undef _nc_get_locale +char *_nc_get_locale(void) + { return(*(char **)0); } + +#undef _nc_unicode_locale +int _nc_unicode_locale(void) + { return(*(int *)0); } + +#undef _nc_locale_breaks_acs +int _nc_locale_breaks_acs(void) + { return(*(int *)0); } #undef setupterm int setupterm( - char *tname, - int Filedes, + char *tname, + int Filedes, int *errret) { return(*(int *)0); } @@ -3360,7 +3405,7 @@ char *BC; #undef tgetent int tgetent( - char *bufp, + char *bufp, const char *name) { return(*(int *)0); } @@ -3382,7 +3427,7 @@ int tgetnum( #undef tgetstr char *tgetstr( - char *id, + char *id, char **area) { return(*(char **)0); } @@ -3396,8 +3441,8 @@ char *termname(void) #undef tgoto char *tgoto( - const char *string, - int x, + const char *string, + int x, int y) { return(*(char **)0); } @@ -3420,20 +3465,19 @@ char *tigetstr( /* ./tinfo/lib_tparm.c */ -typedef struct { - union { - int num; - char *str; - } data; - NCURSES_BOOL num_type; -} stack_frame; - #undef _nc_tparm_err int _nc_tparm_err; +#undef _nc_tparm_analyze +int _nc_tparm_analyze( + const char *string, + char *p_is_s[9], + int *popcount) + { return(*(int *)0); } + #undef tparm char *tparm( - char *string, + char *string, ...) { return(*(char **)0); } @@ -3442,7 +3486,7 @@ char *tparm( #undef PC char PC; #undef ospeed -short ospeed; +NCURSES_OSPEED ospeed; #undef _nc_nulls_sent int _nc_nulls_sent; @@ -3467,8 +3511,8 @@ int putp( #undef tputs int tputs( - const char *string, - int affcnt, + const char *string, + int affcnt, int (*outc)( int p1)) { return(*(int *)0); } @@ -3489,15 +3533,25 @@ void trace( #undef _tracef void _tracef( - const char *fmt, + const char *fmt, ...) { /* void */ } +#undef _nc_retrace_bool +NCURSES_BOOL _nc_retrace_bool( + NCURSES_BOOL code) + { return(*(NCURSES_BOOL *)0); } + #undef _nc_retrace_int int _nc_retrace_int( int code) { return(*(int *)0); } +#undef _nc_retrace_unsigned +unsigned _nc_retrace_unsigned( + unsigned code) + { return(*(unsigned *)0); } + #undef _nc_retrace_ptr char *_nc_retrace_ptr( char *code) @@ -3515,11 +3569,6 @@ WINDOW *_nc_retrace_win( /* ./trace/lib_tracebits.c */ -typedef struct { - unsigned int val; - const char *name; -} BITNAMES; - #undef _nc_trace_ttymode char *_nc_trace_ttymode( struct termios *tty) @@ -3576,8 +3625,8 @@ int resetty(void) #undef _nc_timed_wait int _nc_timed_wait( - int mode, - int milliseconds, + int mode, + int milliseconds, int *timeleft) { return(*(int *)0); } @@ -3590,8 +3639,8 @@ char *_nc_first_name( #undef _nc_name_match int _nc_name_match( - const char *const namelst, - const char *const name, + const char *const namelst, + const char *const name, const char *const delim) { return(*(int *)0); } @@ -3614,22 +3663,17 @@ char *const strfnames[] = {0}; #undef _nc_parse_entry int _nc_parse_entry( - struct entry *entryp, - int literal, + struct entry *entryp, + int literal, NCURSES_BOOL silent) { return(*(int *)0); } #undef _nc_capcmp int _nc_capcmp( - const char *s, + const char *s, const char *t) { return(*(int *)0); } -typedef struct { - const char *from; - const char *to; -} assoc; - /* ./tinfo/read_entry.c */ #undef _nc_tic_dir @@ -3644,14 +3688,14 @@ void _nc_keep_tic_dir( #undef _nc_read_file_entry int _nc_read_file_entry( - const char *const filename, + const char *const filename, TERMTYPE *ptr) { return(*(int *)0); } #undef _nc_read_entry int _nc_read_entry( - const char *const tn, - char *const filename, + const char *const tn, + char *const filename, TERMTYPE *const tp) { return(*(int *)0); } @@ -3659,7 +3703,7 @@ int _nc_read_entry( #undef _nc_read_termcap_entry int _nc_read_termcap_entry( - const char *const tn, + const char *const tn, TERMTYPE *const tp) { return(*(int *)0); } @@ -3667,7 +3711,7 @@ int _nc_read_termcap_entry( #undef _nc_set_buffer void _nc_set_buffer( - FILE *ofp, + FILE *ofp, NCURSES_BOOL buffered) { /* void */ } @@ -3675,48 +3719,49 @@ void _nc_set_buffer( #undef _nc_str_init string_desc *_nc_str_init( - string_desc *dst, - char *src, + string_desc *dst, + char *src, size_t len) { return(*(string_desc **)0); } #undef _nc_str_null string_desc *_nc_str_null( - string_desc *dst, + string_desc *dst, size_t len) { return(*(string_desc **)0); } #undef _nc_str_copy string_desc *_nc_str_copy( - string_desc *dst, + string_desc *dst, string_desc *src) { return(*(string_desc **)0); } #undef _nc_safe_strcat NCURSES_BOOL _nc_safe_strcat( - string_desc *dst, + string_desc *dst, const char *src) { return(*(NCURSES_BOOL *)0); } #undef _nc_safe_strcpy NCURSES_BOOL _nc_safe_strcpy( - string_desc *dst, + string_desc *dst, const char *src) { return(*(NCURSES_BOOL *)0); } /* ./trace/trace_buf.c */ -typedef struct { - char *text; - size_t size; -} LIST; - #undef _nc_trace_buf char *_nc_trace_buf( - int bufnum, + int bufnum, size_t want) { return(*(char **)0); } +#undef _nc_trace_bufcat +char *_nc_trace_bufcat( + int bufnum, + const char *value) + { return(*(char **)0); } + /* ./trace/trace_tries.c */ #undef _nc_trace_tries @@ -3735,7 +3780,7 @@ char *unctrl( #undef _nc_visbuf2 const char *_nc_visbuf2( - int bufnum, + int bufnum, const char *buf) { return(*(const char **)0); } @@ -3744,9 +3789,15 @@ const char *_nc_visbuf( const char *buf) { return(*(const char **)0); } +#undef _nc_visbufn +const char *_nc_visbufn( + const char *buf, + int len) + { return(*(const char **)0); } + #undef _nc_viswbuf2 const char *_nc_viswbuf2( - int bufnum, + int bufnum, const wchar_t *buf) { return(*(const char **)0); } @@ -3755,16 +3806,22 @@ const char *_nc_viswbuf( const wchar_t *buf) { return(*(const char **)0); } +#undef _nc_viswbufn +const char *_nc_viswbufn( + const wchar_t *buf, + int len) + { return(*(const char **)0); } + #undef _nc_viscbuf2 const char *_nc_viscbuf2( - int bufnum, - const cchar_t *buf, + int bufnum, + const cchar_t *buf, int len) { return(*(const char **)0); } #undef _nc_viscbuf const char *_nc_viscbuf( - const cchar_t *buf, + const cchar_t *buf, int len) { return(*(const char **)0); } diff --git a/ncurses/modules b/ncurses/modules index 541df6f2..bd08c392 100644 --- a/ncurses/modules +++ b/ncurses/modules @@ -1,6 +1,6 @@ -# $Id: modules,v 1.90 2002/05/11 20:14:41 tom Exp $ +# $Id: modules,v 1.100 2004/01/10 19:08:23 tom Exp $ ############################################################################## -# Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -61,7 +61,6 @@ lib_inchstr lib $(base) lib_initscr lib $(base) $(INCDIR)/tic.h lib_insch lib $(base) lib_insdel lib $(base) -lib_insstr lib $(base) lib_instr lib $(base) lib_isendwin lib $(base) lib_leaveok lib $(base) @@ -101,7 +100,7 @@ lib_touch lib $(base) lib_traceatr lib $(trace) ../include/term.h lib_tracedmp lib $(trace) lib_tracemse lib $(trace) -lib_tstp lib $(serial) +lib_tstp lib $(serial) $(srcdir)/SigAction.h lib_ungetch lib $(base) lib_vidattr lib $(serial) ../include/term.h lib_vline lib $(base) @@ -117,11 +116,15 @@ varargs lib $(trace) # Modules for porting memmove lib $(base) -sigaction lib $(base) vsscanf lib $(base) +# actually an extension, but with its own configure option (--disable-leaks) +lib_freeall lib $(base) + # XSI extensions to the base library (wide-character) @ widechar +charable lib $(wide) +lib_add_wch lib $(wide) lib_box_set lib $(wide) lib_cchar lib $(wide) lib_get_wch lib $(wide) @@ -130,9 +133,10 @@ lib_get_wstr lib $(wide) lib_hline_set lib $(wide) lib_in_wch lib $(wide) lib_in_wchnstr lib $(wide) -lib_ins_nwstr lib $(wide) lib_ins_wch lib $(wide) lib_inwstr lib $(wide) +lib_pecho_wchar lib $(wide) +lib_slk_wset lib $(wide) lib_unget_wch lib $(wide) lib_vid_attr lib $(wide) ../include/term.h lib_vline_set lib $(wide) @@ -143,15 +147,14 @@ lib_wunctrl lib $(wide) @ ext_funcs define_key lib $(base) expanded lib . +key_defined lib $(base) keybound lib $(base) keyok lib $(base) lib_dft_fgbg lib $(base) ../include/term.h -lib_freeall lib $(base) lib_print lib $(tinfo) ../include/term.h resizeterm lib $(base) ../include/term.h trace_xnames lib $(trace) ../include/term.h $(INCDIR)/term_entry.h tries lib $(base) -version lib $(base) wresize lib $(base) ../include/term.h # Support for termcap (and tic, etc.), which can be a separate library @@ -209,3 +212,7 @@ trace_tries lib $(trace) unctrl lib . visbuf lib $(trace) $(INCDIR)/tic.h write_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h + +# Extensions to the termlib library +@ ext_tinfo +version lib $(base) diff --git a/ncurses/tinfo/MKkeys_list.sh b/ncurses/tinfo/MKkeys_list.sh index 98d5b137..14017b01 100755 --- a/ncurses/tinfo/MKkeys_list.sh +++ b/ncurses/tinfo/MKkeys_list.sh @@ -1,7 +1,7 @@ #! /bin/sh -# $Id: MKkeys_list.sh,v 1.2 2001/06/16 16:50:35 tom Exp $ +# $Id: MKkeys_list.sh,v 1.4 2003/10/25 16:19:54 tom Exp $ ############################################################################## -# Copyright (c) 2001 Free Software Foundation, Inc. # +# Copyright (c) 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"), # @@ -30,7 +30,7 @@ # # MKkey_defs.sh -- generate list of function-keys for terminfo database # -# Author: Thomas E. Dickey 2001 +# Author: Thomas E. Dickey 2001 # # Extract function-key names from the Caps file # @@ -39,7 +39,7 @@ DATA=${1-../../include/Caps} data=data$$ trap 'rm -f $data' 0 1 2 5 15 -sed -e 's/[ ]\+/ /g' < $DATA >$data +sed -e 's/[ ][ ]*/ /g' < $DATA >$data cat < #include -MODULE_ID("$Id: access.c,v 1.9 2001/06/23 22:11:49 tom Exp $") +MODULE_ID("$Id: access.c,v 1.10 2003/07/05 19:31:28 tom Exp $") #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) @@ -64,19 +64,28 @@ _nc_rootname(char *path) return result; } -NCURSES_EXPORT(char *) -_nc_basename(char *path) +/* + * Return index of the basename + */ +NCURSES_EXPORT(unsigned) +_nc_pathlast(const char *path) { - char *result = strrchr(path, '/'); + const char *test = strrchr(path, '/'); #ifdef __EMX__ - if (result == 0) - result = strrchr(path, '\\'); + if (test == 0) + test = strrchr(path, '\\'); #endif - if (result == 0) - result = path; + if (test == 0) + test = path; else - result++; - return result; + test++; + return (test - path); +} + +NCURSES_EXPORT(char *) +_nc_basename(char *path) +{ + return path + _nc_pathlast(path); } NCURSES_EXPORT(int) diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index 16f04f8d..2ff0cdf1 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -47,7 +48,7 @@ #include #include -MODULE_ID("$Id: alloc_entry.c,v 1.37 2002/09/07 20:04:15 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.40 2003/11/08 21:29:54 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 @@ -61,10 +62,10 @@ NCURSES_EXPORT(void) _nc_init_entry(TERMTYPE * const tp) /* initialize a terminal type data block */ { - int i; + unsigned i; if (stringbuf == 0) - stringbuf = malloc(MAX_STRTAB); + stringbuf = (char *) malloc(MAX_STRTAB); #if NCURSES_XNAMES tp->num_Booleans = BOOLCOUNT; @@ -126,7 +127,8 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) /* copy the string parts to allocated storage, preserving pointers to it */ { int offsets[MAX_ENTRY_SIZE / 2], useoffsets[MAX_USES]; - int i, n; + unsigned i, n; + unsigned nuses = ep->nuses; TERMTYPE *tp = &(ep->tterm); if (copy_strings) { @@ -141,7 +143,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) } } - for (i = 0; i < ep->nuses; i++) { + for (i = 0; i < nuses; i++) { if (ep->uses[i].name == 0) { ep->uses[i].name = _nc_save_str(ep->uses[i].name); } @@ -160,7 +162,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) offsets[i] = tp->Strings[i] - stringbuf; } - for (i = 0; i < ep->nuses; i++) { + for (i = 0; i < nuses; i++) { if (ep->uses[i].name == 0) useoffsets[i] = ABSENT_OFFSET; else @@ -200,7 +202,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) } #endif - for (i = 0; i < ep->nuses; i++) { + for (i = 0; i < nuses; i++) { if (useoffsets[i] == ABSENT_OFFSET) ep->uses[i].name = 0; else @@ -209,31 +211,34 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings) } NCURSES_EXPORT(void) -_nc_merge_entry -(TERMTYPE * const to, TERMTYPE * const from) +_nc_merge_entry(TERMTYPE * const to, TERMTYPE * const from) /* merge capabilities from `from' entry into `to' entry */ { - int i; + unsigned i; #if NCURSES_XNAMES _nc_align_termtype(to, from); #endif for_each_boolean(i, from) { - int mergebool = from->Booleans[i]; + if (to->Booleans[i] != CANCELLED_BOOLEAN) { + int mergebool = from->Booleans[i]; - if (mergebool == CANCELLED_BOOLEAN) - to->Booleans[i] = FALSE; - else if (mergebool == TRUE) - to->Booleans[i] = mergebool; + if (mergebool == CANCELLED_BOOLEAN) + to->Booleans[i] = FALSE; + else if (mergebool == TRUE) + to->Booleans[i] = mergebool; + } } for_each_number(i, from) { - int mergenum = from->Numbers[i]; + if (to->Numbers[i] != CANCELLED_NUMERIC) { + int mergenum = from->Numbers[i]; - if (mergenum == CANCELLED_NUMERIC) - to->Numbers[i] = ABSENT_NUMERIC; - else if (mergenum != ABSENT_NUMERIC) - to->Numbers[i] = mergenum; + if (mergenum == CANCELLED_NUMERIC) + to->Numbers[i] = ABSENT_NUMERIC; + else if (mergenum != ABSENT_NUMERIC) + to->Numbers[i] = mergenum; + } } /* @@ -242,11 +247,13 @@ _nc_merge_entry * we ever want to deallocate entries. */ for_each_string(i, from) { - char *mergestring = from->Strings[i]; + if (to->Strings[i] != CANCELLED_STRING) { + char *mergestring = from->Strings[i]; - if (mergestring == CANCELLED_STRING) - to->Strings[i] = ABSENT_STRING; - else if (mergestring != ABSENT_STRING) - to->Strings[i] = mergestring; + if (mergestring == CANCELLED_STRING) + to->Strings[i] = ABSENT_STRING; + else if (mergestring != ABSENT_STRING) + to->Strings[i] = mergestring; + } } } diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c index bbc850e8..36747186 100644 --- a/ncurses/tinfo/alloc_ttype.c +++ b/ncurses/tinfo/alloc_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2000,2002 Free Software Foundation, Inc. * + * 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 * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: alloc_ttype.c,v 1.13 2002/09/28 15:28:43 tom Exp $") +MODULE_ID("$Id: alloc_ttype.c,v 1.14 2003/05/24 21:10:28 tom Exp $") #if NCURSES_XNAMES /* @@ -92,8 +92,10 @@ find_name(char **table, int length, char *name) } static void -realign_data(TERMTYPE * to, char **ext_Names, int ext_Booleans, int - ext_Numbers, int ext_Strings) +realign_data(TERMTYPE * to, char **ext_Names, + int ext_Booleans, + int ext_Numbers, + int ext_Strings) { int n, m, base; int limit = (to->ext_Booleans + to->ext_Numbers + to->ext_Strings); @@ -371,8 +373,7 @@ adjust_cancels(TERMTYPE * to, TERMTYPE * from) } NCURSES_EXPORT(void) -_nc_align_termtype -(TERMTYPE * to, TERMTYPE * from) +_nc_align_termtype(TERMTYPE * to, TERMTYPE * from) { int na = NUM_EXT_NAMES(to); int nb = NUM_EXT_NAMES(from); @@ -457,10 +458,9 @@ _nc_align_termtype #endif NCURSES_EXPORT(void) -_nc_copy_termtype -(TERMTYPE * dst, TERMTYPE * src) +_nc_copy_termtype(TERMTYPE * dst, TERMTYPE * src) { - int i; + unsigned i; *dst = *src; /* ...to copy the sizes and string-tables */ dst->Booleans = typeMalloc(char, NUM_BOOLEANS(dst)); diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index e1b50b7b..e2c81308 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -39,7 +39,7 @@ * * There is just one entry point: * - * char *_nc_captoinfo(n, s, parametrized) + * char *_nc_captoinfo(n, s, parameterized) * * Convert value s for termcap string capability named n into terminfo * format. @@ -92,7 +92,7 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.43 2002/09/28 16:38:59 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.45 2003/11/08 21:28:04 tom Exp $") #define MAX_PUSHED 16 /* max # args we can push onto the stack */ @@ -272,12 +272,12 @@ getparm(int parm, int n) * Convert a termcap string to terminfo format. * 'cap' is the relevant terminfo capability index. * 's' is the string value of the capability. - * 'parametrized' tells what type of translations to do: + * 'parameterized' tells what type of translations to do: * % translations if 1 * pad translations if >=0 */ char * -_nc_captoinfo(const char *cap, const char *s, int const parametrized) +_nc_captoinfo(const char *cap, const char *s, int const parameterized) { const char *capstart; @@ -294,7 +294,7 @@ _nc_captoinfo(const char *cap, const char *s, int const parametrized) capstart = 0; if (s == 0) s = ""; - if (parametrized >= 0 && isdigit(UChar(*s))) + if (parameterized >= 0 && isdigit(UChar(*s))) for (capstart = s;; s++) if (!(isdigit(UChar(*s)) || *s == '*' || *s == '.')) break; @@ -303,7 +303,7 @@ _nc_captoinfo(const char *cap, const char *s, int const parametrized) switch (*s) { case '%': s++; - if (parametrized < 1) { + if (parameterized < 1) { dp = save_char(dp, '%'); break; } @@ -637,7 +637,7 @@ save_tc_inequality(char *bufptr, int c1, int c2) * _nc_captoinfo(). */ char * -_nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parametrized) +_nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameterized) { int seenone = 0, seentwo = 0, saw_m = 0, saw_n = 0; const char *padding; @@ -649,11 +649,11 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parametrize /* we may have to move some trailing mandatory padding up front */ padding = str + strlen(str) - 1; - if (*padding == '>' && *--padding == '/') { + if (padding > str && *padding == '>' && *--padding == '/') { --padding; while (isdigit(UChar(*padding)) || *padding == '.' || *padding == '*') padding--; - if (*padding == '<' && *--padding == '$') + if (padding > str && *padding == '<' && *--padding == '$') trimmed = padding; padding += 2; @@ -678,7 +678,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parametrize --str; } else if (str[0] == '%' && str[1] == '%') { /* escaped '%' */ bufptr = save_string(bufptr, "%%"); - } else if (*str != '%' || (parametrized < 1)) { + } else if (*str != '%' || (parameterized < 1)) { bufptr = save_char(bufptr, *str); } else if (sscanf(str, "%%?%%{%d}%%>%%t%%{%d}%%+%%;", &c1, &c2) == 2) { str = strchr(str, ';'); diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c index 9f2ee710..dabc0c55 100644 --- a/ncurses/tinfo/comp_hash.c +++ b/ncurses/tinfo/comp_hash.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -48,7 +48,7 @@ #define DEBUG(level, params) /*nothing */ #endif -MODULE_ID("$Id: comp_hash.c,v 1.25 2001/06/02 22:50:42 skimo Exp $") +MODULE_ID("$Id: comp_hash.c,v 1.26 2003/11/08 21:58:36 tom Exp $") static int hash_function(const char *); @@ -97,7 +97,7 @@ _nc_make_hash_table(struct name_table_entry *table, * Computes the hashing function on the given string. * * The current hash function is the sum of each consectutive pair - * of characters, taken as two-byte integers, mod Hashtabsize. + * of characters, taken as two-byte integers, mod HASHTABSIZE. * */ diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index a5dc70ce..203276cd 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -52,7 +52,7 @@ #include #include -MODULE_ID("$Id: comp_parse.c,v 1.53 2002/09/07 20:01:28 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.57 2003/10/25 22:25:36 tom Exp $") static void sanity_check(TERMTYPE *); NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype) (TERMTYPE *) = sanity_check; @@ -163,7 +163,7 @@ _nc_entry_match(char *n1, char *n2) ****************************************************************************/ NCURSES_EXPORT(void) -_nc_read_entry_source(FILE * fp, char *buf, +_nc_read_entry_source(FILE *fp, char *buf, int literal, bool silent, bool(*hook) (ENTRY *)) /* slurp all entries in the given file into core */ @@ -216,7 +216,7 @@ _nc_resolve_uses(bool fullresolve) { ENTRY *qp, *rp, *lastread = 0; bool keepgoing; - int i, j, unresolved, total_unresolved, multiples; + int i, unresolved, total_unresolved, multiples; DEBUG(2, ("RESOLUTION BEGINNING")); @@ -389,26 +389,6 @@ _nc_resolve_uses(bool fullresolve) (keepgoing); DEBUG(2, ("MERGES COMPLETED OK")); - - /* - * The exit condition of the loop above is such that all entries - * must now be resolved. Now handle cancellations. In a resolved - * entry there should be no cancellation markers. - */ - for_entry_list(qp) { - for_each_boolean(j, &(qp->tterm)) { - if ((int) qp->tterm.Booleans[j] == CANCELLED_BOOLEAN) - qp->tterm.Booleans[j] = ABSENT_BOOLEAN; - } - for_each_number(j, &(qp->tterm)) { - if (qp->tterm.Numbers[j] == CANCELLED_NUMERIC) - qp->tterm.Numbers[j] = ABSENT_NUMERIC; - } - for_each_string(j, &(qp->tterm)) { - if (qp->tterm.Strings[j] == CANCELLED_STRING) - qp->tterm.Strings[j] = ABSENT_STRING; - } - } } /* diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 2c82b4b9..c819edca 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -50,7 +50,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.61 2002/09/07 20:04:09 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.66 2003/12/14 00:32:40 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -84,6 +84,7 @@ _nc_curr_token = *****************************************************************************/ static bool first_column; /* See 'next_char()' below */ +static bool had_newline; static char separator; /* capability separator */ static int pushtype; /* type of pushback token */ static char *pushname; @@ -93,10 +94,10 @@ NCURSES_EXPORT_VAR(bool) _nc_disable_period = FALSE; /* used by tic -a option */ #endif +static bool end_of_stream(void); static int last_char(void); static int next_char(void); static long stream_pos(void); -static bool end_of_stream(void); static void push_back(char c); /* Assume we may be looking at a termcap-style continuation */ @@ -148,8 +149,11 @@ _nc_get_token(bool silent) static const char terminfo_punct[] = "@%&*!#"; static char *buffer; + char *after_list; + char *after_name; char *numchk; char *ptr; + char *s; char numbuf[80]; int ch; int dot_flag = FALSE; @@ -173,13 +177,20 @@ _nc_get_token(bool silent) return (retval); } - if (end_of_stream()) + if (end_of_stream()) { + if (buffer != 0) { + FreeAndNull(buffer); + } return (EOF); + } start_token: token_start = stream_pos(); - while ((ch = next_char()) == '\n' || iswhite(ch)) + while ((ch = next_char()) == '\n' || iswhite(ch)) { + if (ch == '\n') + had_newline = TRUE; continue; + } ch = eat_escaped_newline(ch); @@ -227,17 +238,21 @@ _nc_get_token(bool silent) *(ptr++) = ch; if (first_column) { - char *desc; - _nc_comment_start = token_start; _nc_comment_end = _nc_curr_file_pos; _nc_start_line = _nc_curr_line; _nc_syntax = ERR; + after_name = 0; + after_list = 0; while ((ch = next_char()) != '\n') { - if (ch == EOF) + if (ch == EOF) { _nc_err_abort(MSG_NO_MEMORY); - else if (ch == ':' && last_char() != ',') { + } else if (ch == '|') { + after_list = ptr; + if (after_name == 0) + after_name = ptr; + } else if (ch == ':' && last_char() != ',') { _nc_syntax = SYN_TERMCAP; separator = ':'; break; @@ -245,14 +260,18 @@ _nc_get_token(bool silent) _nc_syntax = SYN_TERMINFO; separator = ','; /* - * Fall-through here is not an accident. The idea is that - * if we see a comma, we figure this is terminfo unless we - * subsequently run into a colon -- but we don't stop - * looking for that colon until hitting a newline. This + * If we did not see a '|', then we found a name with no + * aliases or description. + */ + if (after_name == 0) + break; + /* + * If we see a comma, we assume this is terminfo unless we + * subsequently run into a colon. But we don't stop + * looking for a colon until hitting a newline. This * allows commas to be embedded in description fields of * either syntax. */ - /* FALLTHRU */ } else ch = eat_escaped_newline(ch); @@ -277,56 +296,60 @@ _nc_get_token(bool silent) /* * This is the soonest we have the terminal name fetched. Set up - * for following warning messages. + * for following warning messages. If there's no '|', then there + * is no description. */ - ptr = strchr(buffer, '|'); - if (ptr == (char *) NULL) - ptr = buffer + strlen(buffer); - ch = *ptr; - *ptr = '\0'; - _nc_set_type(buffer); - *ptr = ch; + if (after_name != 0) { + ch = *after_name; + *after_name = '\0'; + _nc_set_type(buffer); + *after_name = ch; + } /* * Compute the boundary between the aliases and the description * field for syntax-checking purposes. */ - desc = strrchr(buffer, '|'); - if (!silent && desc) { - if (*desc == '\0') - _nc_warning("empty longname field"); - else if (strchr(desc, ' ') == (char *) NULL) - _nc_warning("older tic versions may treat the description field as an alias"); + if (after_list != 0) { + if (!silent) { + if (*after_list == '\0') + _nc_warning("empty longname field"); + else if (strchr(after_list, ' ') == 0) + _nc_warning("older tic versions may treat the description field as an alias"); + } + } else { + after_list = buffer + strlen(buffer); + DEBUG(1, ("missing description")); } - if (!desc) - desc = buffer + strlen(buffer); /* * Whitespace in a name field other than the long name can confuse * rdist and some termcap tools. Slashes are a no-no. Other * special characters can be dangerous due to shell expansion. */ - for (ptr = buffer; ptr < desc; ptr++) { - if (isspace(UChar(*ptr))) { + for (s = buffer; s < after_list; ++s) { + if (isspace(UChar(*s))) { if (!silent) _nc_warning("whitespace in name or alias field"); break; - } else if (*ptr == '/') { + } else if (*s == '/') { if (!silent) _nc_warning("slashes aren't allowed in names or aliases"); break; - } else if (strchr("$[]!*?", *ptr)) { + } else if (strchr("$[]!*?", *s)) { if (!silent) - _nc_warning("dubious character `%c' in name or alias field", *ptr); + _nc_warning("dubious character `%c' in name or alias field", *s); break; } } - ptr = buffer; - _nc_curr_token.tk_name = buffer; type = NAMES; } else { + if (had_newline && _nc_syntax == SYN_TERMCAP) { + _nc_warning("Missing backslash before newline"); + had_newline = FALSE; + } while ((ch = next_char()) != EOF) { if (!isalnum(ch)) { if (_nc_syntax == SYN_TERMINFO) { @@ -592,6 +615,8 @@ _nc_trans_string(char *ptr, char *last) default: _nc_warning("Illegal character %s in \\ sequence", unctrl(ch)); + /* FALLTHRU */ + case '|': *(ptr++) = (char) ch; } /* endswitch (ch) */ } /* endelse (ch < '0' || ch > '7') */ @@ -684,7 +709,7 @@ static FILE *yyin; /* scanner's input file descriptor */ */ NCURSES_EXPORT(void) -_nc_reset_input(FILE * fp, char *buf) +_nc_reset_input(FILE *fp, char *buf) { pushtype = NO_PUSHBACK; if (pushname != 0) @@ -766,7 +791,7 @@ next_char(void) if (used == 0) _nc_curr_file_pos = ftell(yyin); - if (fgets(result + used, allocated - used, yyin) != NULL) { + if (fgets(result + used, allocated - used, yyin) != 0) { bufstart = result; if (used == 0) { _nc_curr_line++; @@ -801,6 +826,8 @@ next_char(void) } first_column = (bufptr == bufstart); + if (first_column) + had_newline = FALSE; _nc_curr_col++; return (*bufptr++); diff --git a/ncurses/tinfo/free_ttype.c b/ncurses/tinfo/free_ttype.c index b8b9c592..08dac4ec 100644 --- a/ncurses/tinfo/free_ttype.c +++ b/ncurses/tinfo/free_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2000,2002 Free Software Foundation, Inc. * + * 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 * @@ -43,11 +43,43 @@ #include #include -MODULE_ID("$Id: free_ttype.c,v 1.8 2002/09/01 20:29:03 tom Exp $") +MODULE_ID("$Id: free_ttype.c,v 1.10 2003/08/09 21:22:03 tom Exp $") NCURSES_EXPORT(void) _nc_free_termtype(TERMTYPE * ptr) { + T(("_nc_free_termtype(%s)", ptr->term_names)); + + if (ptr->str_table == 0 + || (ptr->term_names < ptr->str_table + || ptr->term_names >= ptr->str_table + MAX_ENTRY_SIZE)) { + FreeIfNeeded(ptr->term_names); + } +#if NO_LEAKS + else { + if (ptr->str_table != 0 + && (ptr->term_names < ptr->str_table + MAX_ENTRY_SIZE)) { + int j; + char *last = ptr->str_table; + /* + * We should have saved the entry-size someplace. Too late, + * but this is useful for the memory-leak checking, though more + * work/time than should be in the normal library. + */ + for (j = 0; j < NUM_STRINGS(ptr); j++) { + char *s = ptr->Strings[j]; + if (VALID_STRING(s)) { + char *t = s + strlen(s) + 1; + if (t > last) + last = t; + } + } + if (last < ptr->term_names) { + FreeIfNeeded(ptr->term_names); + } + } + } +#endif FreeIfNeeded(ptr->str_table); FreeIfNeeded(ptr->Booleans); FreeIfNeeded(ptr->Numbers); @@ -66,7 +98,9 @@ NCURSES_EXPORT(int) use_extended_names(bool flag) { int oldflag = _nc_user_definable; + + T((T_CALLED("use_extended_names(%d)"), flag)); _nc_user_definable = flag; - return oldflag; + returnBool(oldflag); } #endif diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c index ad2f5f6e..fac19bf5 100644 --- a/ncurses/tinfo/home_terminfo.c +++ b/ncurses/tinfo/home_terminfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1998,2000 * + * Author: Thomas E. Dickey 1998,2000,2004 * ****************************************************************************/ /* @@ -37,7 +37,7 @@ #include #include -MODULE_ID("$Id: home_terminfo.c,v 1.7 2002/09/07 20:04:51 tom Exp $") +MODULE_ID("$Id: home_terminfo.c,v 1.8 2004/01/14 02:18:16 tom Exp $") #define my_length (strlen(home) + sizeof(PRIVATE_INFO)) @@ -46,6 +46,7 @@ MODULE_ID("$Id: home_terminfo.c,v 1.7 2002/09/07 20:04:51 tom Exp $") NCURSES_EXPORT(char *) _nc_home_terminfo(void) { +#ifdef USE_HOME_TERMINFO char *home; static char *temp = 0; @@ -61,5 +62,6 @@ _nc_home_terminfo(void) } return temp; } +#endif return 0; } diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c index ba35ab70..3b017450 100644 --- a/ncurses/tinfo/lib_acs.c +++ b/ncurses/tinfo/lib_acs.c @@ -34,7 +34,7 @@ #include #include /* ena_acs, acs_chars */ -MODULE_ID("$Id: lib_acs.c,v 1.22 2002/09/01 19:26:57 tom Exp $") +MODULE_ID("$Id: lib_acs.c,v 1.25 2002/12/28 16:26:46 tom Exp $") #if BROKEN_LINKER NCURSES_EXPORT_VAR(chtype *) @@ -55,101 +55,88 @@ NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] = NCURSES_EXPORT(void) _nc_init_acs(void) { + chtype *fake_map = acs_map; + chtype *real_map = SP != 0 ? SP->_acs_map : fake_map; + int j; + T(("initializing ACS map")); -#if !BROKEN_LINKER - memset(acs_map, 0, sizeof(acs_map)); -#endif + + /* + * If we're using this from curses (rather than terminfo), we are storing + * the mapping information in the SCREEN struct so we can decide how to + * render it. + */ + if (real_map != fake_map) { + for (j = 1; j < ACS_LEN; ++j) { + real_map[j] = 0; + fake_map[j] = A_ALTCHARSET | j; + } + } else { + for (j = 1; j < ACS_LEN; ++j) { + real_map[j] = 0; + } + } /* * Initializations for a UNIX-like multi-terminal environment. Use * ASCII chars and count on the terminfo description to do better. */ - ACS_ULCORNER = '+'; /* should be upper left corner */ - ACS_LLCORNER = '+'; /* should be lower left corner */ - ACS_URCORNER = '+'; /* should be upper right corner */ - ACS_LRCORNER = '+'; /* should be lower right corner */ - ACS_RTEE = '+'; /* should be tee pointing left */ - ACS_LTEE = '+'; /* should be tee pointing right */ - ACS_BTEE = '+'; /* should be tee pointing up */ - ACS_TTEE = '+'; /* should be tee pointing down */ - ACS_HLINE = '-'; /* should be horizontal line */ - ACS_VLINE = '|'; /* should be vertical line */ - ACS_PLUS = '+'; /* should be large plus or crossover */ - ACS_S1 = '~'; /* should be scan line 1 */ - ACS_S9 = '_'; /* should be scan line 9 */ - ACS_DIAMOND = '+'; /* should be diamond */ - ACS_CKBOARD = ':'; /* should be checker board (stipple) */ - ACS_DEGREE = '\''; /* should be degree symbol */ - ACS_PLMINUS = '#'; /* should be plus/minus */ - ACS_BULLET = 'o'; /* should be bullet */ - ACS_LARROW = '<'; /* should be arrow pointing left */ - ACS_RARROW = '>'; /* should be arrow pointing right */ - ACS_DARROW = 'v'; /* should be arrow pointing down */ - ACS_UARROW = '^'; /* should be arrow pointing up */ - ACS_BOARD = '#'; /* should be board of squares */ - ACS_LANTERN = '#'; /* should be lantern symbol */ - ACS_BLOCK = '#'; /* should be solid square block */ + real_map['l'] = '+'; /* should be upper left corner */ + real_map['m'] = '+'; /* should be lower left corner */ + real_map['k'] = '+'; /* should be upper right corner */ + real_map['j'] = '+'; /* should be lower right corner */ + real_map['u'] = '+'; /* should be tee pointing left */ + real_map['t'] = '+'; /* should be tee pointing right */ + real_map['v'] = '+'; /* should be tee pointing up */ + real_map['w'] = '+'; /* should be tee pointing down */ + real_map['q'] = '-'; /* should be horizontal line */ + real_map['x'] = '|'; /* should be vertical line */ + real_map['n'] = '+'; /* should be large plus or crossover */ + real_map['o'] = '~'; /* should be scan line 1 */ + real_map['s'] = '_'; /* should be scan line 9 */ + real_map['`'] = '+'; /* should be diamond */ + real_map['a'] = ':'; /* should be checker board (stipple) */ + real_map['f'] = '\''; /* should be degree symbol */ + real_map['g'] = '#'; /* should be plus/minus */ + real_map['~'] = 'o'; /* should be bullet */ + real_map[','] = '<'; /* should be arrow pointing left */ + real_map['+'] = '>'; /* should be arrow pointing right */ + real_map['.'] = 'v'; /* should be arrow pointing down */ + real_map['-'] = '^'; /* should be arrow pointing up */ + real_map['h'] = '#'; /* should be board of squares */ + real_map['i'] = '#'; /* should be lantern symbol */ + real_map['0'] = '#'; /* should be solid square block */ /* these defaults were invented for ncurses */ - ACS_S3 = '-'; /* should be scan line 3 */ - ACS_S7 = '-'; /* should be scan line 7 */ - ACS_LEQUAL = '<'; /* should be less-than-or-equal-to */ - ACS_GEQUAL = '>'; /* should be greater-than-or-equal-to */ - ACS_PI = '*'; /* should be greek pi */ - ACS_NEQUAL = '!'; /* should be not-equal */ - ACS_STERLING = 'f'; /* should be pound-sterling symbol */ + real_map['p'] = '-'; /* should be scan line 3 */ + real_map['r'] = '-'; /* should be scan line 7 */ + real_map['y'] = '<'; /* should be less-than-or-equal-to */ + real_map['z'] = '>'; /* should be greater-than-or-equal-to */ + real_map['{'] = '*'; /* should be greek pi */ + real_map['|'] = '!'; /* should be not-equal */ + real_map['}'] = 'f'; /* should be pound-sterling symbol */ + +#if !USE_WIDEC_SUPPORT + if (_nc_unicode_locale() && _nc_locale_breaks_acs()) { + acs_chars = NULL; + ena_acs = NULL; + } +#endif if (ena_acs != NULL) { TPUTS_TRACE("ena_acs"); putp(ena_acs); } -#define ALTCHAR(c) ((chtype)(((unsigned char)(c)) | A_ALTCHARSET)) if (acs_chars != NULL) { size_t i = 0; size_t length = strlen(acs_chars); - while (i < length) - switch (acs_chars[i]) { - case 'l': - case 'm': - case 'k': - case 'j': - case 'u': - case 't': - case 'v': - case 'w': - case 'q': - case 'x': - case 'n': - case 'o': - case 's': - case '`': - case 'a': - case 'f': - case 'g': - case '~': - case ',': - case '+': - case '.': - case '-': - case 'h': - case 'i': - case '0': - case 'p': - case 'r': - case 'y': - case 'z': - case '{': - case '|': - case '}': - acs_map[(unsigned int) acs_chars[i]] = - ALTCHAR(acs_chars[i + 1]); - i++; - /* FALLTHRU */ - default: - i++; - break; + while (i + 1 < length) { + if (acs_chars[i] != 0 && UChar(acs_chars[i]) < ACS_LEN) { + real_map[UChar(acs_chars[i])] = UChar(acs_chars[i + 1]) | A_ALTCHARSET; } + i += 2; + } } #ifdef TRACE /* Show the equivalent mapping, noting if it does not match the @@ -159,9 +146,9 @@ _nc_init_acs(void) size_t n, m; char show[ACS_LEN + 1]; for (n = 1, m = 0; n < ACS_LEN; n++) { - if (acs_map[n] != 0) { + if (real_map[n] != 0) { show[m++] = (char) n; - show[m++] = ChCharOf(acs_map[n]); + show[m++] = ChCharOf(real_map[n]); } } show[m] = 0; diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c index 8f269e59..8fccc2f8 100644 --- a/ncurses/tinfo/lib_cur_term.c +++ b/ncurses/tinfo/lib_cur_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * + * 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 * @@ -40,7 +40,7 @@ #include /* TTY, cur_term */ #include /* ospeed */ -MODULE_ID("$Id: lib_cur_term.c,v 1.11 2000/12/10 02:55:07 tom Exp $") +MODULE_ID("$Id: lib_cur_term.c,v 1.13 2003/12/27 18:21:30 tom Exp $") NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0; @@ -49,11 +49,14 @@ set_curterm(TERMINAL * termp) { TERMINAL *oldterm = cur_term; + T((T_CALLED("set_curterm(%p)"), termp)); + if ((cur_term = termp) != 0) { ospeed = _nc_ospeed(cur_term->_baudrate); PC = (pad_char != NULL) ? pad_char[0] : 0; } - return oldterm; + T((T_RETURN("%p"), oldterm)); + return (oldterm); } NCURSES_EXPORT(int) @@ -63,6 +66,7 @@ del_curterm(TERMINAL * termp) if (termp != 0) { _nc_free_termtype(&(termp->type)); + FreeIfNeeded(termp->_termname); free(termp); if (termp == cur_term) cur_term = 0; diff --git a/ncurses/tinfo/lib_has_cap.c b/ncurses/tinfo/lib_has_cap.c index 6fb7b3a9..0dc66bd9 100644 --- a/ncurses/tinfo/lib_has_cap.c +++ b/ncurses/tinfo/lib_has_cap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -42,7 +43,7 @@ #include -MODULE_ID("$Id: lib_has_cap.c,v 1.3 2000/12/10 02:55:07 tom Exp $") +MODULE_ID("$Id: lib_has_cap.c,v 1.4 2003/10/25 19:43:55 tom Exp $") NCURSES_EXPORT(bool) has_ic(void) diff --git a/ncurses/tinfo/lib_kernel.c b/ncurses/tinfo/lib_kernel.c index b4d3c7f4..84d40d6b 100644 --- a/ncurses/tinfo/lib_kernel.c +++ b/ncurses/tinfo/lib_kernel.c @@ -48,12 +48,12 @@ #include #include /* cur_term */ -MODULE_ID("$Id: lib_kernel.c,v 1.22 2002/05/11 20:32:18 tom Exp $") +MODULE_ID("$Id: lib_kernel.c,v 1.23 2003/01/26 00:24:53 tom Exp $") static int _nc_vdisable(void) { - int value; + int value = -1; #if defined(_POSIX_VDISABLE) && defined(HAVE_UNISTD_H) value = _POSIX_VDISABLE; #endif diff --git a/ncurses/tinfo/lib_napms.c b/ncurses/tinfo/lib_napms.c index f4975ad5..1003fa41 100644 --- a/ncurses/tinfo/lib_napms.c +++ b/ncurses/tinfo/lib_napms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -36,6 +36,8 @@ * * The routine napms. * + * (This file was originally written by Eric Raymond; however except for + * comments, none of the original code remains - T.Dickey). */ #include @@ -47,7 +49,7 @@ #endif #endif -MODULE_ID("$Id: lib_napms.c,v 1.13 2002/09/01 17:46:11 tom Exp $") +MODULE_ID("$Id: lib_napms.c,v 1.14 2003/11/30 00:54:29 Philippe.Blain Exp $") NCURSES_EXPORT(int) napms(int ms) @@ -56,10 +58,14 @@ napms(int ms) #if HAVE_NANOSLEEP { - struct timespec ts; - ts.tv_sec = ms / 1000; - ts.tv_nsec = (ms % 1000) * 1000000; - nanosleep(&ts, NULL); + struct timespec request, remaining; + int err; + request.tv_sec = ms / 1000; + request.tv_nsec = (ms % 1000) * 1000000; + while ((err = nanosleep(&request, &remaining)) == -1 + && errno == EINTR) { + request = remaining; + } } #else _nc_timed_wait(0, ms, (int *) 0 EVENTLIST_2nd(0)); diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index 05bd4768..0edf9d5a 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -42,7 +43,7 @@ #include -MODULE_ID("$Id: lib_options.c,v 1.46 2002/02/02 19:40:54 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.47 2003/10/25 19:51:38 tom Exp $") NCURSES_EXPORT(int) idlok(WINDOW *win, bool flag) @@ -72,7 +73,7 @@ halfdelay(int t) { T((T_CALLED("halfdelay(%d)"), t)); - if (t < 1 || t > 255) + if (t < 1 || t > 255 || SP == 0) returnCode(ERR); cbreak(); @@ -133,19 +134,24 @@ keypad(WINDOW *win, bool flag) NCURSES_EXPORT(int) meta(WINDOW *win GCC_UNUSED, bool flag) { + int result = ERR; + /* Ok, we stay relaxed and don't signal an error if win is NULL */ T((T_CALLED("meta(%p,%d)"), win, flag)); - SP->_use_meta = flag; - - if (flag && meta_on) { - TPUTS_TRACE("meta_on"); - putp(meta_on); - } else if (!flag && meta_off) { - TPUTS_TRACE("meta_off"); - putp(meta_off); + if (SP != 0) { + SP->_use_meta = flag; + + if (flag && meta_on) { + TPUTS_TRACE("meta_on"); + putp(meta_on); + } else if (!flag && meta_off) { + TPUTS_TRACE("meta_off"); + putp(meta_off); + } + result = OK; } - returnCode(OK); + returnCode(result); } /* curs_set() moved here to narrow the kernel interface */ @@ -196,8 +202,12 @@ NCURSES_EXPORT(int) typeahead(int fd) { T((T_CALLED("typeahead(%d)"), fd)); - SP->_checkfd = fd; - returnCode(OK); + if (SP != 0) { + SP->_checkfd = fd; + returnCode(OK); + } else { + returnCode(ERR); + } } /* @@ -224,7 +234,7 @@ NCURSES_EXPORT(int) has_key(int keycode) { T((T_CALLED("has_key(%d)"), keycode)); - returnCode(has_key_internal(keycode, SP->_keytry)); + returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE); } #endif /* NCURSES_EXT_FUNCS */ @@ -248,7 +258,7 @@ _nc_keypad(bool flag) _nc_flush(); } - if (flag && !SP->_tried) { + if (flag && SP != 0 && !SP->_tried) { _nc_init_keytry(); SP->_tried = TRUE; } diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 6a69493b..05caca22 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -48,7 +49,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.70 2002/10/12 21:50:18 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.79 2003/12/27 18:24:26 tom Exp $") /**************************************************************************** * @@ -90,9 +91,12 @@ MODULE_ID("$Id: lib_setup.c,v 1.70 2002/10/12 21:50:18 tom Exp $") # endif #endif -static int _use_env = TRUE; +NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = ""; +NCURSES_EXPORT_VAR(int) LINES = 0; +NCURSES_EXPORT_VAR(int) COLS = 0; +NCURSES_EXPORT_VAR(int) TABSIZE = 0; -static void do_prototype(void); +static int _use_env = TRUE; NCURSES_EXPORT(void) use_env(bool f) @@ -102,10 +106,6 @@ use_env(bool f) returnVoid; } -NCURSES_EXPORT_VAR(int) LINES = 0; -NCURSES_EXPORT_VAR(int) COLS = 0; -NCURSES_EXPORT_VAR(int) TABSIZE = 0; - static void _nc_get_screensize(int *linep, int *colp) /* Obtain lines/columns values from the environment and/or terminfo entry */ @@ -199,7 +199,6 @@ _nc_get_screensize(int *linep, int *colp) else TABSIZE = 8; T(("TABSIZE = %d", TABSIZE)); - } #if USE_SIZECHANGE @@ -241,7 +240,9 @@ static int grab_entry(const char *const tn, TERMTYPE * const tp) /* return 1 if entry found, 0 if not found, -1 if database not accessible */ { +#if USE_DATABASE char filename[PATH_MAX]; +#endif int status; /* @@ -275,7 +276,7 @@ grab_entry(const char *const tn, TERMTYPE * const tp) * a string is cancelled, for merging entries). */ if (status == 1) { - int n; + unsigned n; for_each_boolean(n, tp) { if (!VALID_BOOLEAN(tp->Booleans[n])) tp->Booleans[n] = FALSE; @@ -289,7 +290,82 @@ grab_entry(const char *const tn, TERMTYPE * const tp) } #endif -NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = ""; +/* +** do_prototype() +** +** Take the real command character out of the CC environment variable +** and substitute it in for the prototype given in 'command_character'. +** +*/ +static void +do_prototype(void) +{ + int i; + char CC; + char proto; + char *tmp; + + tmp = getenv("CC"); + CC = *tmp; + proto = *command_character; + + for_each_string(i, &(cur_term->type)) { + for (tmp = cur_term->type.Strings[i]; *tmp; tmp++) { + if (*tmp == proto) + *tmp = CC; + } + } +} + +/* + * Check if we are running in a UTF-8 locale. + */ +NCURSES_EXPORT(char *) +_nc_get_locale(void) +{ + char *env; + if (((env = getenv("LC_ALL")) != 0 && *env != '\0') + || ((env = getenv("LC_CTYPE")) != 0 && *env != '\0') + || ((env = getenv("LANG")) != 0 && *env != '\0')) { + return env; + } + return 0; +} + +/* + * Check if we are running in a UTF-8 locale. + */ +NCURSES_EXPORT(int) +_nc_unicode_locale(void) +{ + char *env = _nc_get_locale(); + if (env != 0) { + if (strstr(env, ".UTF-8") != 0) + return 1; + } + return 0; +} + +/* + * Check for known broken cases where a UTF-8 locale breaks the alternate + * character set. + */ +NCURSES_EXPORT(int) +_nc_locale_breaks_acs(void) +{ + char *env = getenv("TERM"); + if (env != 0) { + if (strstr(env, "linux")) + return 1; /* always broken */ + if (strstr(env, "screen") != 0 + && ((env = getenv("TERMCAP")) != 0 + && strstr(env, "screen") != 0) + && strstr(env, "hhII00") != 0) { + return 1; + } + } + return 0; +} /* * setupterm(termname, Filedes, errret) @@ -302,7 +378,6 @@ NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = ""; NCURSES_EXPORT(int) setupterm(NCURSES_CONST char *tname, int Filedes, int *errret) { - struct term *term_ptr; int status; START_TRACE(); @@ -321,77 +396,95 @@ setupterm(NCURSES_CONST char *tname, int Filedes, int *errret) T(("your terminal name is %s", tname)); - term_ptr = typeCalloc(TERMINAL, 1); + /* + * Allow output redirection. This is what SVr3 does. If stdout is + * directed to a file, screen updates go to standard error. + */ + if (Filedes == STDOUT_FILENO && !isatty(Filedes)) + Filedes = STDERR_FILENO; - if (term_ptr == 0) { - ret_error0(-1, "Not enough memory to create terminal structure.\n"); - } + /* + * Check if we have already initialized to use this terminal. If so, we + * do not need to re-read the terminfo entry, or obtain TTY settings. + * + * This is an improvement on SVr4 curses. If an application mixes curses + * and termcap calls, it may call both initscr and tgetent. This is not + * really a good thing to do, but can happen if someone tries using ncurses + * with the readline library. The problem we are fixing is that when + * tgetent calls setupterm, the resulting Ottyb struct in cur_term is + * zeroed. A subsequent call to endwin uses the zeroed terminal settings + * rather than the ones saved in initscr. So we check if cur_term appears + * to contain terminal settings for the same output file as our current + * call - and copy those terminal settings. (SVr4 curses does not do this, + * however applications that are working around the problem will still work + * properly with this feature). + */ + if (cur_term != 0 + && cur_term->Filedes == Filedes + && cur_term->_termname != 0 + && !strcmp(cur_term->_termname, tname) + && _nc_name_match(cur_term->type.term_names, tname, "|")) { + T(("reusing existing terminal information and mode-settings")); + } else { + TERMINAL *term_ptr; + + term_ptr = typeCalloc(TERMINAL, 1); + + if (term_ptr == 0) { + ret_error0(-1, + "Not enough memory to create terminal structure.\n"); + } #if USE_DATABASE || USE_TERMCAP - status = grab_entry(tname, &term_ptr->type); + status = grab_entry(tname, &term_ptr->type); #else - status = 0; + status = 0; #endif - /* try fallback list if entry on disk */ - if (status != 1) { - const TERMTYPE *fallback = _nc_fallback(tname); + /* try fallback list if entry on disk */ + if (status != 1) { + const TERMTYPE *fallback = _nc_fallback(tname); - if (fallback) { - term_ptr->type = *fallback; - status = 1; + if (fallback) { + term_ptr->type = *fallback; + status = 1; + } } - } - if (status == -1) { - ret_error0(-1, "terminals database is inaccessible\n"); - } else if (status == 0) { - ret_error(0, "'%s': unknown terminal type.\n", tname); - } + if (status <= 0) { + del_curterm(term_ptr); + if (status == -1) { + ret_error0(-1, "terminals database is inaccessible\n"); + } else if (status == 0) { + ret_error(0, "'%s': unknown terminal type.\n", tname); + } + } - /* - * Improve on SVr4 curses. If an application mixes curses and termcap - * calls, it may call both initscr and tgetent. This is not really a - * good thing to do, but can happen if someone tries using ncurses with - * the readline library. The problem we are fixing is that when - * tgetent calls setupterm, the resulting Ottyb struct in cur_term is - * zeroed. A subsequent call to endwin uses the zeroed terminal - * settings rather than the ones saved in initscr. So we check if - * cur_term appears to contain terminal settings for the same output - * file as our current call - and copy those terminal settings. (SVr4 - * curses does not do this, however applications that are working - * around the problem will still work properly with this feature). - */ - if (cur_term != 0) { - if (cur_term->Filedes == Filedes) - term_ptr->Ottyb = cur_term->Ottyb; - } + set_curterm(term_ptr); - set_curterm(term_ptr); + if (command_character && getenv("CC")) + do_prototype(); - if (command_character && getenv("CC")) - do_prototype(); + strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1); + ttytype[NAMESIZE - 1] = '\0'; - strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1); - ttytype[NAMESIZE - 1] = '\0'; + cur_term->Filedes = Filedes; + cur_term->_termname = strdup(tname); - /* - * Allow output redirection. This is what SVr3 does. If stdout is - * directed to a file, screen updates go to standard error. - */ - if (Filedes == STDOUT_FILENO && !isatty(Filedes)) - Filedes = STDERR_FILENO; - cur_term->Filedes = Filedes; + /* + * If an application calls setupterm() rather than initscr() or + * newterm(), we will not have the def_prog_mode() call in + * _nc_setupscreen(). Do it now anyway, so we can initialize the + * baudrate. + */ + if (isatty(Filedes)) { + def_prog_mode(); + baudrate(); + } + } /* - * If an application calls setupterm() rather than initscr() or newterm(), - * we will not have the def_prog_mode() call in _nc_setupscreen(). Do it - * now anyway, so we can initialize the baudrate. + * We should always check the screensize, just in case. */ - if (isatty(Filedes)) { - def_prog_mode(); - baudrate(); - } - _nc_get_screensize(&LINES, &COLS); if (errret) @@ -407,31 +500,3 @@ setupterm(NCURSES_CONST char *tname, int Filedes, int *errret) } returnCode(OK); } - -/* -** do_prototype() -** -** Take the real command character out of the CC environment variable -** and substitute it in for the prototype given in 'command_character'. -** -*/ - -static void -do_prototype(void) -{ - int i; - char CC; - char proto; - char *tmp; - - tmp = getenv("CC"); - CC = *tmp; - proto = *command_character; - - for_each_string(i, &(cur_term->type)) { - for (tmp = cur_term->type.Strings[i]; *tmp; tmp++) { - if (*tmp == proto) - *tmp = CC; - } - } -} diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index c03a601f..d03488cf 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_termcap.c,v 1.43 2002/05/25 12:24:13 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.44 2003/05/24 21:10:28 tom Exp $") #define CSI 233 #define ESC 033 /* ^[ */ @@ -233,7 +233,7 @@ tgetent(char *bufp GCC_UNUSED, const char *name) NCURSES_EXPORT(int) tgetflag(NCURSES_CONST char *id) { - int i; + unsigned i; T((T_CALLED("tgetflag(%s)"), id)); if (cur_term != 0) { @@ -261,7 +261,7 @@ tgetflag(NCURSES_CONST char *id) NCURSES_EXPORT(int) tgetnum(NCURSES_CONST char *id) { - int i; + unsigned i; T((T_CALLED("tgetnum(%s)"), id)); if (cur_term != 0) { @@ -290,7 +290,7 @@ tgetnum(NCURSES_CONST char *id) NCURSES_EXPORT(char *) tgetstr(NCURSES_CONST char *id, char **area) { - int i; + unsigned i; char *result = NULL; T((T_CALLED("tgetstr(%s,%p)"), id, area)); diff --git a/ncurses/tinfo/lib_termname.c b/ncurses/tinfo/lib_termname.c index 57ce807a..713d0be8 100644 --- a/ncurses/tinfo/lib_termname.c +++ b/ncurses/tinfo/lib_termname.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -27,22 +27,18 @@ ****************************************************************************/ #include -#include /* for MAX_ALIAS */ -MODULE_ID("$Id: lib_termname.c,v 1.7 2001/08/04 19:29:38 tom Exp $") +MODULE_ID("$Id: lib_termname.c,v 1.8 2003/12/27 18:23:01 tom Exp $") NCURSES_EXPORT(char *) termname(void) { - char *name = getenv("TERM"); - static char ret[MAX_ALIAS + 1]; + char *name = 0; T((T_CALLED("termname()"))); - if (name != 0) { - ret[0] = '\0'; - (void) strncat(ret, name, sizeof(ret) - 1); - name = ret; - } + if (cur_term != 0) + name = cur_term->_termname; + returnPtr(name); } diff --git a/ncurses/tinfo/lib_tgoto.c b/ncurses/tinfo/lib_tgoto.c index 77fc6cea..84d4a7f3 100644 --- a/ncurses/tinfo/lib_tgoto.c +++ b/ncurses/tinfo/lib_tgoto.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2000-2001,2002 Free Software Foundation, Inc. * + * Copyright (c) 2000-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 * @@ -35,7 +35,7 @@ #include #include -MODULE_ID("$Id: lib_tgoto.c,v 1.10 2002/08/31 22:14:47 Philippe.Blain Exp $") +MODULE_ID("$Id: lib_tgoto.c,v 1.11 2003/11/30 00:22:18 Juha.Jarvi Exp $") #if !PURE_TERMINFO static bool @@ -155,7 +155,7 @@ tgoto_internal(const char *string, int x, int y) *value = 16 * (*value / 10) + (*value % 10); break; case 'D': /* Reverse coding (Delta Data) */ - *value -= 2 * (*value / 16); + *value -= 2 * (*value % 16); break; } if (fmt != 0) { diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c index 8ef86658..df460f95 100644 --- a/ncurses/tinfo/lib_ti.c +++ b/ncurses/tinfo/lib_ti.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * + * 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 * @@ -36,12 +36,12 @@ #include #include -MODULE_ID("$Id: lib_ti.c,v 1.22 2000/12/10 02:55:08 tom Exp $") +MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $") NCURSES_EXPORT(int) tigetflag(NCURSES_CONST char *str) { - int i; + unsigned i; T((T_CALLED("tigetflag(%s)"), str)); @@ -62,7 +62,7 @@ tigetflag(NCURSES_CONST char *str) NCURSES_EXPORT(int) tigetnum(NCURSES_CONST char *str) { - int i; + unsigned i; T((T_CALLED("tigetnum(%s)"), str)); @@ -84,7 +84,7 @@ tigetnum(NCURSES_CONST char *str) NCURSES_EXPORT(char *) tigetstr(NCURSES_CONST char *str) { - int i; + unsigned i; T((T_CALLED("tigetstr(%s)"), str)); diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index 6df1e2d0..041667b4 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.62 2002/10/05 19:33:24 Frank.Henigman Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.68 2004/02/07 20:52:51 tom Exp $") /* * char * @@ -129,6 +129,9 @@ static char *out_buff; static size_t out_size; static size_t out_used; +static char *fmt_buff; +static size_t fmt_size; + #if NO_LEAKS NCURSES_EXPORT(void) _nc_free_tparm(void) @@ -137,6 +140,8 @@ _nc_free_tparm(void) FreeAndNull(out_buff); out_size = 0; out_used = 0; + FreeAndNull(fmt_buff); + fmt_size = 0; } } #endif @@ -247,153 +252,136 @@ spop(void) static inline const char * parse_format(const char *s, char *format, int *len) { - bool done = FALSE; - bool allowminus = FALSE; - bool dot = FALSE; - bool err = FALSE; - char *fmt = format; - int my_width = 0; - int my_prec = 0; - int value = 0; - *len = 0; - *format++ = '%'; - while (*s != '\0' && !done) { - switch (*s) { - case 'c': /* FALLTHRU */ - case 'd': /* FALLTHRU */ - case 'o': /* FALLTHRU */ - case 'x': /* FALLTHRU */ - case 'X': /* FALLTHRU */ - case 's': - *format++ = *s; - done = TRUE; - break; - case '.': - *format++ = *s++; - if (dot) { - err = TRUE; - } else { /* value before '.' is the width */ - dot = TRUE; - my_width = value; - } - value = 0; - break; - case '#': - *format++ = *s++; - break; - case ' ': - *format++ = *s++; - break; - case ':': - s++; - allowminus = TRUE; - break; - case '-': - if (allowminus) { - *format++ = *s++; - } else { + if (format != 0) { + bool done = FALSE; + bool allowminus = FALSE; + bool dot = FALSE; + bool err = FALSE; + char *fmt = format; + int my_width = 0; + int my_prec = 0; + int value = 0; + + *len = 0; + *format++ = '%'; + while (*s != '\0' && !done) { + switch (*s) { + case 'c': /* FALLTHRU */ + case 'd': /* FALLTHRU */ + case 'o': /* FALLTHRU */ + case 'x': /* FALLTHRU */ + case 'X': /* FALLTHRU */ + case 's': + *format++ = *s; done = TRUE; - } - break; - default: - if (isdigit(UChar(*s))) { - value = (value * 10) + (*s - '0'); - if (value > 10000) + break; + case '.': + *format++ = *s++; + if (dot) { err = TRUE; + } else { /* value before '.' is the width */ + dot = TRUE; + my_width = value; + } + value = 0; + break; + case '#': *format++ = *s++; - } else { - done = TRUE; + break; + case ' ': + *format++ = *s++; + break; + case ':': + s++; + allowminus = TRUE; + break; + case '-': + if (allowminus) { + *format++ = *s++; + } else { + done = TRUE; + } + break; + default: + if (isdigit(UChar(*s))) { + value = (value * 10) + (*s - '0'); + if (value > 10000) + err = TRUE; + *format++ = *s++; + } else { + done = TRUE; + } } } - } - /* - * If we found an error, ignore (and remove) the flags. - */ - if (err) { - my_width = my_prec = value = 0; - format = fmt; - *format++ = '%'; - *format++ = *s; - } + /* + * If we found an error, ignore (and remove) the flags. + */ + if (err) { + my_width = my_prec = value = 0; + format = fmt; + *format++ = '%'; + *format++ = *s; + } - /* - * Any value after '.' is the precision. If we did not see '.', then - * the value is the width. - */ - if (dot) - my_prec = value; - else - my_width = value; - - *format = '\0'; - /* return maximum string length in print */ - *len = (my_width > my_prec) ? my_width : my_prec; + /* + * Any value after '.' is the precision. If we did not see '.', then + * the value is the width. + */ + if (dot) + my_prec = value; + else + my_width = value; + + *format = '\0'; + /* return maximum string length in print */ + *len = (my_width > my_prec) ? my_width : my_prec; + } return s; } #define isUPPER(c) ((c) >= 'A' && (c) <= 'Z') #define isLOWER(c) ((c) >= 'a' && (c) <= 'z') -static inline char * -tparam_internal(const char *string, va_list ap) +/* + * Analyze the string to see how many parameters we need from the varargs list, + * and what their types are. We will only accept string parameters if they + * appear as a %l or %s format following an explicit parameter reference (e.g., + * %p2%s). All other parameters are numbers. + * + * 'number' counts coarsely the number of pop's we see in the string, and + * 'popcount' shows the highest parameter number in the string. We would like + * to simply use the latter count, but if we are reading termcap strings, there + * may be cases that we cannot see the explicit parameter numbers. + */ +NCURSES_EXPORT(int) +_nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount) { -#define NUM_VARS 26 - char *p_is_s[9]; - long param[9]; - int lastpop; - int popcount; - int number; - int len; - int level; - int x, y; - int i; size_t len2; - register const char *cp; - static size_t len_fmt; + int i; + int lastpop = -1; + int len; + int number = 0; + const char *cp = string; static char dummy[] = ""; - static char *format; - static int dynamic_var[NUM_VARS]; - static int static_vars[NUM_VARS]; - out_used = 0; - if (string == NULL) - return NULL; + if (cp == 0) + return 0; - if ((len2 = strlen(string)) > len_fmt) { - len_fmt = len2 + len_fmt + 2; - if ((format = typeRealloc(char, len_fmt, format)) == 0) + if ((len2 = strlen(cp)) > fmt_size) { + fmt_size = len2 + fmt_size + 2; + if ((fmt_buff = typeRealloc(char, fmt_size, fmt_buff)) == 0) return 0; } - /* - * Find the highest parameter-number referred to in the format string. - * Use this value to limit the number of arguments copied from the - * variable-length argument list. - */ - - number = 0; - lastpop = -1; - popcount = 0; - memset(p_is_s, 0, sizeof(p_is_s)); + memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM); + *popcount = 0; - /* - * Analyze the string to see how many parameters we need from the varargs - * list, and what their types are. We will only accept string parameters - * if they appear as a %l or %s format following an explicit parameter - * reference (e.g., %p2%s). All other parameters are numbers. - * - * 'number' counts coarsely the number of pop's we see in the string, and - * 'popcount' shows the highest parameter number in the string. We would - * like to simply use the latter count, but if we are reading termcap - * strings, there may be cases that we cannot see the explicit parameter - * numbers. - */ - for (cp = string; (cp - string) < (int) len2;) { + while ((cp - string) < (int) len2) { if (*cp == '%') { cp++; - cp = parse_format(cp, format, &len); + cp = parse_format(cp, fmt_buff, &len); switch (*cp) { default: break; @@ -403,7 +391,8 @@ tparam_internal(const char *string, va_list ap) case 'x': /* FALLTHRU */ case 'X': /* FALLTHRU */ case 'c': /* FALLTHRU */ - number++; + if (lastpop <= 0) + number++; lastpop = -1; break; @@ -416,11 +405,11 @@ tparam_internal(const char *string, va_list ap) case 'p': cp++; - i = (*cp - '0'); - if (i >= 0 && i <= 9) { + i = (UChar(*cp) - '0'); + if (i >= 0 && i <= NUM_PARM) { lastpop = i; - if (lastpop > popcount) - popcount = lastpop; + if (lastpop > *popcount) + *popcount = lastpop; } break; @@ -440,7 +429,7 @@ tparam_internal(const char *string, va_list ap) case L_BRACE: cp++; - while (*cp >= '0' && *cp <= '9') { + while (isdigit(UChar(*cp))) { cp++; } break; @@ -469,9 +458,7 @@ tparam_internal(const char *string, va_list ap) break; case 'i': - lastpop = -1; - if (popcount < 2) - popcount = 2; + /* will add 1 to first (usually two) parameters */ break; } } @@ -479,8 +466,43 @@ tparam_internal(const char *string, va_list ap) cp++; } - if (number > 9) - number = 9; + if (number > NUM_PARM) + number = NUM_PARM; + return number; +} + +static inline char * +tparam_internal(const char *string, va_list ap) +{ +#define NUM_VARS 26 + char *p_is_s[NUM_PARM]; + long param[NUM_PARM]; + int popcount; + int number; + int len; + int level; + int x, y; + int i; + const char *cp = string; + size_t len2; + static int dynamic_var[NUM_VARS]; + static int static_vars[NUM_VARS]; + + if (cp == NULL) + return NULL; + + out_used = 0; + len2 = strlen(cp); + + /* + * Find the highest parameter-number referred to in the format string. + * Use this value to limit the number of arguments copied from the + * variable-length argument list. + */ + number = _nc_tparm_analyze(cp, p_is_s, &popcount); + if (fmt_buff == 0) + return NULL; + for (i = 0; i < max(popcount, number); i++) { /* * A few caps (such as plab_norm) have string-valued parms. @@ -517,18 +539,18 @@ tparam_internal(const char *string, va_list ap) else save_number(", %d", param[i], 0); } - _tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(string), out_buff); + _tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(cp), out_buff); out_used = 0; } #endif /* TRACE */ - while (*string) { - if (*string != '%') { - save_char(*string); + while ((cp - string) < (int) len2) { + if (*cp != '%') { + save_char(UChar(*cp)); } else { - tparam_base = string++; - string = parse_format(string, format, &len); - switch (*string) { + tparam_base = cp++; + cp = parse_format(cp, fmt_buff, &len); + switch (*cp) { default: break; case '%': @@ -539,7 +561,7 @@ tparam_internal(const char *string, va_list ap) case 'o': /* FALLTHRU */ case 'x': /* FALLTHRU */ case 'X': /* FALLTHRU */ - save_number(format, npop(), len); + save_number(fmt_buff, npop(), len); break; case 'c': /* FALLTHRU */ @@ -551,13 +573,13 @@ tparam_internal(const char *string, va_list ap) break; case 's': - save_text(format, spop(), len); + save_text(fmt_buff, spop(), len); break; case 'p': - string++; - i = (*string - '1'); - if (i >= 0 && i < 9) { + cp++; + i = (UChar(*cp) - '1'); + if (i >= 0 && i < NUM_PARM) { if (p_is_s[i]) spush(p_is_s[i]); else @@ -566,39 +588,39 @@ tparam_internal(const char *string, va_list ap) break; case 'P': - string++; - if (isUPPER(*string)) { - i = (*string - 'A'); + cp++; + if (isUPPER(*cp)) { + i = (UChar(*cp) - 'A'); static_vars[i] = npop(); - } else if (isLOWER(*string)) { - i = (*string - 'a'); + } else if (isLOWER(*cp)) { + i = (UChar(*cp) - 'a'); dynamic_var[i] = npop(); } break; case 'g': - string++; - if (isUPPER(*string)) { - i = (*string - 'A'); + cp++; + if (isUPPER(*cp)) { + i = (UChar(*cp) - 'A'); npush(static_vars[i]); - } else if (isLOWER(*string)) { - i = (*string - 'a'); + } else if (isLOWER(*cp)) { + i = (UChar(*cp) - 'a'); npush(dynamic_var[i]); } break; case S_QUOTE: - string++; - npush(*string); - string++; + cp++; + npush(UChar(*cp)); + cp++; break; case L_BRACE: number = 0; - string++; - while (*string >= '0' && *string <= '9') { - number = number * 10 + *string - '0'; - string++; + cp++; + while (isdigit(UChar(*cp))) { + number = (number * 10) + (UChar(*cp) - '0'); + cp++; } npush(number); break; @@ -689,38 +711,38 @@ tparam_internal(const char *string, va_list ap) x = npop(); if (!x) { /* scan forward for %e or %; at level zero */ - string++; + cp++; level = 0; - while (*string) { - if (*string == '%') { - string++; - if (*string == '?') + while (*cp) { + if (*cp == '%') { + cp++; + if (*cp == '?') level++; - else if (*string == ';') { + else if (*cp == ';') { if (level > 0) level--; else break; - } else if (*string == 'e' && level == 0) + } else if (*cp == 'e' && level == 0) break; } - if (*string) - string++; + if (*cp) + cp++; } } break; case 'e': /* scan forward for a %; at level zero */ - string++; + cp++; level = 0; - while (*string) { - if (*string == '%') { - string++; - if (*string == '?') + while (*cp) { + if (*cp == '%') { + cp++; + if (*cp == '?') level++; - else if (*string == ';') { + else if (*cp == ';') { if (level > 0) level--; else @@ -728,22 +750,22 @@ tparam_internal(const char *string, va_list ap) } } - if (*string) - string++; + if (*cp) + cp++; } break; case ';': break; - } /* endswitch (*string) */ - } /* endelse (*string == '%') */ + } /* endswitch (*cp) */ + } /* endelse (*cp == '%') */ - if (*string == '\0') + if (*cp == '\0') break; - string++; - } /* endwhile (*string) */ + cp++; + } /* endwhile (*cp) */ get_space(1); out_buff[out_used] = '\0'; diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c index 2273b877..3a18ffd7 100644 --- a/ncurses/tinfo/lib_tputs.c +++ b/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -45,7 +45,7 @@ #include /* ospeed */ #include -MODULE_ID("$Id: lib_tputs.c,v 1.60 2002/08/17 23:44:08 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.62 2003/08/23 21:39:20 tom Exp $") NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ @@ -65,7 +65,7 @@ delay_output(int ms) } else { register int nullcount; - nullcount = (ms * _nc_baudrate(ospeed)) / 10000; + nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000); for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--) my_outch(PC); if (my_outch == _nc_outch) @@ -84,9 +84,7 @@ _nc_flush(void) NCURSES_EXPORT(int) _nc_outch(int ch) { -#ifdef TRACE - _nc_outchars++; -#endif /* TRACE */ + TRACE_OUTCHARS(1); if (SP != 0 && SP->_cleanup) { diff --git a/ncurses/tinfo/lib_ttyflags.c b/ncurses/tinfo/lib_ttyflags.c index 8c420e82..ab9c0045 100644 --- a/ncurses/tinfo/lib_ttyflags.c +++ b/ncurses/tinfo/lib_ttyflags.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -38,7 +38,7 @@ #include #include /* cur_term */ -MODULE_ID("$Id: lib_ttyflags.c,v 1.9 2002/10/12 21:28:16 tom Exp $") +MODULE_ID("$Id: lib_ttyflags.c,v 1.11 2003/05/17 23:50:37 tom Exp $") #undef tabs @@ -60,8 +60,10 @@ NCURSES_EXPORT(int) _nc_get_tty_mode(TTY * buf) { if (cur_term == 0 - || GET_TTY(cur_term->Filedes, buf) != 0) + || GET_TTY(cur_term->Filedes, buf) != 0) { + memset(buf, 0, sizeof(*buf)); return (ERR); + } TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s", cur_term->Filedes, _nc_trace_ttymode(buf))); return (OK); @@ -71,8 +73,11 @@ NCURSES_EXPORT(int) _nc_set_tty_mode(TTY * buf) { if (cur_term == 0 - || SET_TTY(cur_term->Filedes, buf) != 0) + || SET_TTY(cur_term->Filedes, buf) != 0) { + if ((errno == ENOTTY) && (SP != 0)) + SP->_notty = TRUE; return (ERR); + } TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s", cur_term->Filedes, _nc_trace_ttymode(buf))); return (OK); diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c index 87e424f7..578e86ee 100644 --- a/ncurses/tinfo/parse_entry.c +++ b/ncurses/tinfo/parse_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ /* @@ -47,7 +48,7 @@ #include #include -MODULE_ID("$Id: parse_entry.c,v 1.57 2002/08/31 17:02:02 tom Exp $") +MODULE_ID("$Id: parse_entry.c,v 1.60 2003/11/08 21:57:09 tom Exp $") #ifdef LINT static short const parametrized[] = @@ -188,20 +189,24 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type) * if the token was not a name in column 1, complain and die * save names in entry's string table * while (get_token() is not EOF and not NAMES) - * check for existance and type-correctness + * check for existence and type-correctness * enter cap into structure * if STRING * save string in entry's string table * push back token */ +#define BAD_TC_USAGE if (!bad_tc_usage) \ + { bad_tc_usage = TRUE; \ + _nc_warning("Legacy termcap allows only a trailing tc= clause"); } + NCURSES_EXPORT(int) -_nc_parse_entry -(struct entry *entryp, int literal, bool silent) +_nc_parse_entry(struct entry *entryp, int literal, bool silent) { int token_type; struct name_table_entry const *entry_ptr; char *ptr, *base; + bool bad_tc_usage = FALSE; token_type = _nc_get_token(silent); @@ -217,11 +222,21 @@ _nc_parse_entry entryp->startline = _nc_start_line; DEBUG(2, ("Comment range is %ld to %ld", entryp->cstart, entryp->cend)); - /* junk the 2-character termcap name, if present */ + /* + * Strip off the 2-character termcap name, if present. Originally termcap + * used that as an indexing aid. We can retain 2-character terminfo names, + * but note that they would be lost if we translate to/from termcap. This + * feature is supposedly obsolete since "newer" BSD implementations do not + * use it; however our reference for this feature is SunOS 4.x, which + * implemented it. Note that the resulting terminal type was never the + * 2-character name, but was instead the first alias after that. + */ ptr = _nc_curr_token.tk_name; - if (ptr[2] == '|') { - ptr = _nc_curr_token.tk_name + 3; - _nc_curr_token.tk_name[2] = '\0'; + if (_nc_syntax == SYN_TERMCAP) { + if (ptr[2] == '|') { + ptr += 3; + _nc_curr_token.tk_name[2] = '\0'; + } } entryp->tterm.str_table = entryp->tterm.term_names = _nc_save_str(ptr); @@ -252,11 +267,15 @@ _nc_parse_entry for (token_type = _nc_get_token(silent); token_type != EOF && token_type != NAMES; token_type = _nc_get_token(silent)) { - if (strcmp(_nc_curr_token.tk_name, "use") == 0 - || strcmp(_nc_curr_token.tk_name, "tc") == 0) { + bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0); + bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0); + if (is_use || is_tc) { entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring); entryp->uses[entryp->nuses].line = _nc_curr_line; entryp->nuses++; + if (entryp->nuses > 1 && is_tc) { + BAD_TC_USAGE + } } else { /* normal token lookup */ entry_ptr = _nc_find_entry(_nc_curr_token.tk_name, @@ -274,6 +293,9 @@ _nc_parse_entry const struct alias *ap; if (_nc_syntax == SYN_TERMCAP) { + if (entryp->nuses != 0) { + BAD_TC_USAGE + } for (ap = _nc_capalias_table; ap->from; ap++) if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) { if (ap->to == (char *) 0) { diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index 006e56c3..363b9970 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey * ****************************************************************************/ /* @@ -41,10 +42,10 @@ #include #include -MODULE_ID("$Id: read_entry.c,v 1.72 2000/12/10 02:55:08 tom Exp $") +MODULE_ID("$Id: read_entry.c,v 1.79 2004/01/11 01:57:05 tom Exp $") #if !HAVE_TELL -#define tell(fd) 0 /* lseek() is POSIX, but not tell() - odd... */ +#define tell(fd) lseek(fd, 0, SEEK_CUR) /* lseek() is POSIX, but not tell() */ #endif /* @@ -156,9 +157,10 @@ read_termtype(int fd, TERMTYPE * ptr) { int name_size, bool_count, num_count, str_count, str_size; int i; - char buf[MAX_ENTRY_SIZE]; + char buf[MAX_ENTRY_SIZE + 1]; + unsigned want, have; - TR(TRACE_DATABASE, ("READ termtype header @%d", tell(fd))); + TR(TRACE_DATABASE, ("READ termtype header @%ld", (long) tell(fd))); memset(ptr, 0, sizeof(*ptr)); @@ -168,7 +170,6 @@ read_termtype(int fd, TERMTYPE * ptr) return (0); } - _nc_free_termtype(ptr); name_size = LOW_MSB(buf + 2); bool_count = LOW_MSB(buf + 4); num_count = LOW_MSB(buf + 6); @@ -197,16 +198,19 @@ read_termtype(int fd, TERMTYPE * ptr) str_count = 0; } - /* grab the name (a null-terminate string) */ - read(fd, buf, min(MAX_NAME_SIZE, (unsigned) name_size)); - buf[MAX_NAME_SIZE] = '\0'; + /* grab the name (a null-terminated string) */ + want = min(MAX_NAME_SIZE, (unsigned) name_size); + if ((have = read(fd, buf, want)) != want) { + memset(buf + have, 0, want - have); + } + buf[want] = '\0'; ptr->term_names = typeCalloc(char, strlen(buf) + 1); if (ptr->term_names == NULL) { return (0); } (void) strcpy(ptr->term_names, buf); - if (name_size > MAX_NAME_SIZE) - lseek(fd, (off_t) (name_size - MAX_NAME_SIZE), 1); + if (have > MAX_NAME_SIZE) + lseek(fd, (off_t) (have - MAX_NAME_SIZE), 1); /* grab the booleans */ if ((ptr->Booleans = typeCalloc(char, max(BOOLCOUNT, bool_count))) == 0 @@ -252,7 +256,7 @@ read_termtype(int fd, TERMTYPE * ptr) * Read extended entries, if any, after the normal end of terminfo data. */ even_boundary(str_size); - TR(TRACE_DATABASE, ("READ extended_header @%d", tell(fd))); + TR(TRACE_DATABASE, ("READ extended_header @%ld", (long) tell(fd))); if (_nc_user_definable && read_shorts(fd, buf, 5)) { int ext_bool_count = LOW_MSB(buf + 0); int ext_num_count = LOW_MSB(buf + 2); @@ -284,8 +288,8 @@ read_termtype(int fd, TERMTYPE * ptr) ext_bool_count, ext_num_count, ext_str_count, ext_str_size, ext_str_limit)); - TR(TRACE_DATABASE, ("READ %d extended-booleans @%d", - ext_bool_count, tell(fd))); + TR(TRACE_DATABASE, ("READ %d extended-booleans @%ld", + ext_bool_count, (long) tell(fd))); if ((ptr->ext_Booleans = ext_bool_count) != 0) { if (read(fd, ptr->Booleans + BOOLCOUNT, (unsigned) ext_bool_count) != ext_bool_count) @@ -293,8 +297,8 @@ read_termtype(int fd, TERMTYPE * ptr) } even_boundary(ext_bool_count); - TR(TRACE_DATABASE, ("READ %d extended-numbers @%d", - ext_num_count, tell(fd))); + TR(TRACE_DATABASE, ("READ %d extended-numbers @%ld", + ext_num_count, (long) tell(fd))); if ((ptr->ext_Numbers = ext_num_count) != 0) { if (!read_shorts(fd, buf, ext_num_count)) return (0); @@ -302,13 +306,13 @@ read_termtype(int fd, TERMTYPE * ptr) convert_shorts(buf, ptr->Numbers + NUMCOUNT, ext_num_count); } - TR(TRACE_DATABASE, ("READ extended-offsets @%d", tell(fd))); + TR(TRACE_DATABASE, ("READ extended-offsets @%ld", (long) tell(fd))); if ((ext_str_count || need) && !read_shorts(fd, buf, ext_str_count + need)) return (0); - TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%d", - ext_str_limit, tell(fd))); + TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%ld", + ext_str_limit, (long) tell(fd))); if (ext_str_limit) { if ((ptr->ext_str_table = typeMalloc(char, ext_str_limit)) == 0) @@ -374,8 +378,7 @@ read_termtype(int fd, TERMTYPE * ptr) } NCURSES_EXPORT(int) -_nc_read_file_entry -(const char *const filename, TERMTYPE * ptr) +_nc_read_file_entry(const char *const filename, TERMTYPE * ptr) /* return 1 if read, 0 if not found or garbled */ { int code, fd = -1; @@ -383,14 +386,14 @@ _nc_read_file_entry if (_nc_access(filename, R_OK) < 0 || (fd = open(filename, O_RDONLY | O_BINARY)) < 0) { T(("cannot open terminfo %s (errno=%d)", filename, errno)); - return (0); + code = 0; + } else { + T(("read terminfo %s", filename)); + if ((code = read_termtype(fd, ptr)) == 0) + _nc_free_termtype(ptr); + close(fd); } - T(("read terminfo %s", filename)); - if ((code = read_termtype(fd, ptr)) == 0) - _nc_free_termtype(ptr); - close(fd); - return (code); } @@ -402,10 +405,9 @@ static int _nc_read_tic_entry(char *const filename, const char *const dir, const char *ttn, TERMTYPE * const tp) { -/* maximum safe length of terminfo root directory name */ -#define MAX_TPATH (PATH_MAX - MAX_ALIAS - 6) + int need = 2 + strlen(dir) + strlen(ttn); - if (strlen(dir) > MAX_TPATH) + if (need > PATH_MAX) return 0; (void) sprintf(filename, "%s/%s", dir, ttn); return _nc_read_file_entry(filename, tp); @@ -458,14 +460,21 @@ _nc_read_terminfo_dirs(const char *dirs, char *const filename, const char *const */ NCURSES_EXPORT(int) -_nc_read_entry -(const char *const tn, char *const filename, TERMTYPE * const tp) +_nc_read_entry(const char *const tn, char *const filename, TERMTYPE * const tp) { char *envp; - char ttn[MAX_ALIAS + 3]; + char ttn[PATH_MAX]; + + if (strlen(tn) == 0 + || strcmp(tn, ".") == 0 + || strcmp(tn, "..") == 0 + || _nc_pathlast(tn) != 0) { + T(("illegal or missing entry name '%s'", tn)); + return 0; + } - /* truncate the terminal name to prevent dangerous buffer airline */ - (void) sprintf(ttn, "%c/%.*s", *tn, MAX_ALIAS, tn); + /* truncate the terminal name to prevent buffer overflow */ + (void) sprintf(ttn, "%c/%.*s", *tn, (int) sizeof(ttn) - 3, tn); /* This is System V behavior, in conjunction with our requirements for * writing terminfo entries. @@ -482,7 +491,7 @@ _nc_read_entry /* this is an ncurses extension */ if ((envp = _nc_home_terminfo()) != 0) { if (_nc_read_tic_entry(filename, envp, ttn, tp) == 1) { - return (1); + return 1; } } diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index c6e7e358..e226b69d 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -57,11 +57,11 @@ #include #include -MODULE_ID("$Id: read_termcap.c,v 1.58 2001/10/28 01:11:34 tom Exp $") +MODULE_ID("$Id: read_termcap.c,v 1.61 2003/11/08 20:22:45 tom Exp $") #if !PURE_TERMINFO -#ifdef __EMX__ +#if defined(__EMX__) || defined(__DJGPP__) #define is_pathname(s) ((((s) != 0) && ((s)[0] == '/')) \ || (((s)[0] != 0) && ((s)[1] == ':'))) #else @@ -945,6 +945,15 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp) static int lineno; T(("read termcap entry for %s", tn)); + + if (strlen(tn) == 0 + || strcmp(tn, ".") == 0 + || strcmp(tn, "..") == 0 + || _nc_pathlast(tn) != 0) { + T(("illegal or missing entry name '%s'", tn)); + return 0; + } + if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0 && !is_pathname(p) && _nc_name_match(p, tn, "|:")) { /* TERMCAP holds a termcap entry */ diff --git a/ncurses/tinfo/setbuf.c b/ncurses/tinfo/setbuf.c index 6d0201bf..94bb6d34 100644 --- a/ncurses/tinfo/setbuf.c +++ b/ncurses/tinfo/setbuf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: setbuf.c,v 1.7 2000/12/10 02:55:08 tom Exp $") +MODULE_ID("$Id: setbuf.c,v 1.12 2003/11/15 23:55:34 tom Exp $") /* * If the output file descriptor is connected to a tty (the typical case) it @@ -98,47 +98,53 @@ MODULE_ID("$Id: setbuf.c,v 1.7 2000/12/10 02:55:08 tom Exp $") * buffer. So we disable this by default (there may yet be a workaround). */ NCURSES_EXPORT(void) -_nc_set_buffer(FILE * ofp, bool buffered) +_nc_set_buffer(FILE *ofp, bool buffered) { /* optional optimization hack -- do before any output to ofp */ #if HAVE_SETVBUF || HAVE_SETBUFFER - unsigned buf_len; - char *buf_ptr; + if (SP->_buffered != (int)buffered) { + unsigned buf_len; + char *buf_ptr; - if (getenv("NCURSES_NO_SETBUF") != 0) - return; + if (getenv("NCURSES_NO_SETBUF") != 0) + return; - fflush(ofp); - if ((SP->_buffered = buffered) != 0) { - buf_len = min(LINES * (COLS + 6), 2800); - if ((buf_ptr = SP->_setbuf) == 0) { - if ((buf_ptr = typeMalloc(char, buf_len)) == NULL) - return; - SP->_setbuf = buf_ptr; - /* Don't try to free this! */ - } + fflush(ofp); +#ifdef __DJGPP__ + setmode(ofp, O_BINARY); +#endif + if (buffered != 0) { + buf_len = min(LINES * (COLS + 6), 2800); + if ((buf_ptr = SP->_setbuf) == 0) { + if ((buf_ptr = typeMalloc(char, buf_len)) == NULL) + return; + SP->_setbuf = buf_ptr; + /* Don't try to free this! */ + } #if !USE_SETBUF_0 - else - return; + else + return; #endif - } else { + } else { #if !USE_SETBUF_0 - return; + return; #else - buf_len = 0; - buf_ptr = 0; + buf_len = 0; + buf_ptr = 0; #endif - } + } #if HAVE_SETVBUF #ifdef SETVBUF_REVERSED /* pre-svr3? */ - (void) setvbuf(ofp, buf_ptr, buf_len, buf_len ? _IOFBF : _IOLBF); + (void) setvbuf(ofp, buf_ptr, buf_len, buf_len ? _IOFBF : _IOLBF); #else - (void) setvbuf(ofp, buf_ptr, buf_len ? _IOFBF : _IOLBF, buf_len); + (void) setvbuf(ofp, buf_ptr, buf_len ? _IOFBF : _IOLBF, buf_len); #endif #elif HAVE_SETBUFFER - (void) setbuffer(ofp, buf_ptr, (int) buf_len); + (void) setbuffer(ofp, buf_ptr, (int) buf_len); #endif + SP->_buffered = buffered; + } #endif /* HAVE_SETVBUF || HAVE_SETBUFFER */ } diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c index 5fa68caf..d5377fe0 100644 --- a/ncurses/tinfo/strings.c +++ b/ncurses/tinfo/strings.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2000 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: strings.c,v 1.3 2000/12/10 02:55:08 tom Exp $") +MODULE_ID("$Id: strings.c,v 1.5 2003/08/16 23:46:00 tom Exp $") /**************************************************************************** * Useful string functions (especially for mvcur) @@ -44,8 +44,7 @@ MODULE_ID("$Id: strings.c,v 1.3 2000/12/10 02:55:08 tom Exp $") #if !HAVE_STRSTR NCURSES_EXPORT(char *) -_nc_strstr -(const char *haystack, const char *needle) +_nc_strstr(const char *haystack, const char *needle) { size_t len1 = strlen(haystack); size_t len2 = strlen(needle); @@ -63,16 +62,18 @@ _nc_strstr #endif /* - * Initialize the descriptor so we can append to it. + * Initialize the descriptor so we can append to it. Note that 'src' may + * be a null pointer (see _nc_str_null), so the corresponding strcat and + * strcpy calls have to allow for this. */ NCURSES_EXPORT(string_desc *) -_nc_str_init -(string_desc * dst, char *src, size_t len) +_nc_str_init(string_desc * dst, char *src, size_t len) { if (dst != 0) { dst->s_head = src; dst->s_tail = src; dst->s_size = len - 1; + dst->s_init = dst->s_size; if (src != 0) *src = 0; } @@ -83,8 +84,7 @@ _nc_str_init * Initialize the descriptor for only tracking the amount of memory used. */ NCURSES_EXPORT(string_desc *) -_nc_str_null -(string_desc * dst, size_t len) +_nc_str_null(string_desc * dst, size_t len) { return _nc_str_init(dst, 0, len); } @@ -93,8 +93,7 @@ _nc_str_null * Copy a descriptor */ NCURSES_EXPORT(string_desc *) -_nc_str_copy -(string_desc * dst, string_desc * src) +_nc_str_copy(string_desc * dst, string_desc * src) { *dst = *src; return dst; @@ -135,7 +134,7 @@ _nc_safe_strcpy(string_desc * dst, const char *src) strcpy(dst->s_head, src); dst->s_tail = dst->s_head + len; } - dst->s_size -= len; + dst->s_size = dst->s_init - len; return TRUE; } } diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index 57d49f3d..8a5d7e6a 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -40,7 +40,7 @@ #include -MODULE_ID("$Id: lib_trace.c,v 1.50 2002/10/12 15:20:15 tom Exp $") +MODULE_ID("$Id: lib_trace.c,v 1.53 2003/11/23 00:39:30 tom Exp $") NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ @@ -48,21 +48,30 @@ NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = ""; NCURSES_EXPORT_VAR(long) _nc_outchars = 0; -static FILE *tracefp; /* default to writing to stderr */ +static FILE *tracefp = 0; /* default to writing to stderr */ NCURSES_EXPORT(void) -trace(const unsigned int tracelevel GCC_UNUSED) +trace(const unsigned int tracelevel) { static bool been_here = FALSE; - static char my_name[] = "trace"; + static char my_name[PATH_MAX]; - if (!been_here && tracelevel) { - been_here = TRUE; + if ((tracefp == 0) && tracelevel) { + const char *mode = been_here ? "ab" : "wb"; + + if (*my_name == '\0') { + if (getcwd(my_name, sizeof(my_name) - 10) == 0) { + perror("curses: Can't get working directory"); + exit(EXIT_FAILURE); + } + strcat(my_name, "/trace"); + } + been_here = TRUE; _nc_tracing = tracelevel; if (_nc_access(my_name, W_OK) < 0 - || (tracefp = fopen(my_name, "wb")) == 0) { - perror("curses: Can't open 'trace' file: "); + || (tracefp = fopen(my_name, mode)) == 0) { + perror("curses: Can't open 'trace' file"); exit(EXIT_FAILURE); } /* Try to set line-buffered mode, or (failing that) unbuffered, @@ -74,8 +83,16 @@ trace(const unsigned int tracelevel GCC_UNUSED) #elif HAVE_SETBUF /* POSIX */ (void) setbuffer(tracefp, (char *) 0); #endif - _tracef("TRACING NCURSES version %s (tracelevel=%#x)", - curses_version(), tracelevel); + _tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)", + NCURSES_VERSION, + NCURSES_VERSION_PATCH, + tracelevel); + } else if (tracelevel == 0) { + if (tracefp != 0) { + fclose(tracefp); + tracefp = 0; + } + _nc_tracing = tracelevel; } else if (_nc_tracing != tracelevel) { _nc_tracing = tracelevel; _tracef("tracelevel=%#x", tracelevel); diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index 6cda1c8d..a9c53c9f 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas Dickey 1996-2001 * + * Author: Thomas Dickey 1996-2003 * * and: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * ****************************************************************************/ @@ -39,7 +39,7 @@ #include #include /* acs_chars */ -MODULE_ID("$Id: lib_traceatr.c,v 1.43 2002/09/28 12:37:03 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.48 2004/01/25 22:31:38 tom Exp $") #define COLOR_OF(c) (c < 0 || c > 7 ? "default" : colors[c].name) @@ -52,7 +52,7 @@ NCURSES_EXPORT(char *) _traceattr2(int bufnum, attr_t newmode) { char *buf = _nc_trace_buf(bufnum, BUFSIZ); - char *tmp = buf; + char temp[80]; static const struct { unsigned int val; const char *name; @@ -92,39 +92,39 @@ _traceattr2(int bufnum, attr_t newmode) unsigned save_nc_tracing = _nc_tracing; _nc_tracing = 0; - strcpy(tmp++, l_brace); + strcpy(buf, l_brace); for (n = 0; n < SIZEOF(names); n++) { if ((newmode & names[n].val) != 0) { if (buf[1] != '\0') - strcat(tmp, "|"); - strcat(tmp, names[n].name); - tmp += strlen(tmp); + buf = _nc_trace_bufcat(bufnum, "|"); + buf = _nc_trace_bufcat(bufnum, names[n].name); if (names[n].val == A_COLOR) { short pairnum = PAIR_NUMBER(newmode); short fg, bg; - if (pair_content(pairnum, &fg, &bg) == OK) - (void) sprintf(tmp, + if (pair_content(pairnum, &fg, &bg) == OK) { + (void) sprintf(temp, "{%d = {%s, %s}}", pairnum, COLOR_OF(fg), - COLOR_OF(bg) - ); - else - (void) sprintf(tmp, "{%d}", pairnum); + COLOR_OF(bg)); + } else { + (void) sprintf(temp, "{%d}", pairnum); + } + buf = _nc_trace_bufcat(bufnum, temp); } } } if (ChAttrOf(newmode) == A_NORMAL) { if (buf[1] != '\0') - strcat(tmp, "|"); - strcat(tmp, "A_NORMAL"); + (void) _nc_trace_bufcat(bufnum, "|"); + (void) _nc_trace_bufcat(bufnum, "A_NORMAL"); } _nc_tracing = save_nc_tracing; - return (strcat(buf, r_brace)); + return (_nc_trace_bufcat(bufnum, r_brace)); } NCURSES_EXPORT(char *) @@ -146,7 +146,7 @@ _nc_altcharset_name(attr_t attr, chtype ch) { const char *result = 0; - if (attr & A_ALTCHARSET) { + if ((attr & A_ALTCHARSET) && (acs_chars != 0)) { char *cp; char *found = 0; static const struct { @@ -214,20 +214,21 @@ _nc_altcharset_name(attr_t attr, chtype ch) NCURSES_EXPORT(char *) _tracechtype2(int bufnum, chtype ch) { - char *buf = _nc_trace_buf(bufnum, BUFSIZ); const char *found; - strcpy(buf, l_brace); + strcpy(_nc_trace_buf(bufnum, BUFSIZ), l_brace); if ((found = _nc_altcharset_name(ChAttrOf(ch), ch)) != 0) { - (void) strcat(buf, found); + (void) _nc_trace_bufcat(bufnum, found); } else - (void) strcat(buf, _tracechar(ChCharOf(ch))); + (void) _nc_trace_bufcat(bufnum, _tracechar(ChCharOf(ch))); - if (ChAttrOf(ch) != A_NORMAL) - (void) sprintf(buf + strlen(buf), " | %s", + if (ChAttrOf(ch) != A_NORMAL) { + (void) _nc_trace_bufcat(bufnum, " | "); + (void) _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, ChAttrOf(ch))); + } - return (strcat(buf, r_brace)); + return (_nc_trace_bufcat(bufnum, r_brace)); } NCURSES_EXPORT(char *) @@ -256,37 +257,44 @@ _tracecchar_t2 (int bufnum, const cchar_t *ch) if (ch != 0) { attr = AttrOfD(ch); if ((found = _nc_altcharset_name(attr, CharOfD(ch))) != 0) { - (void) strcat(buf, found); + (void) _nc_trace_bufcat(bufnum, found); attr &= ~A_ALTCHARSET; - } else if (!isnac(CHDEREF(ch))) { + } else if (isnac(CHDEREF(ch))) { + (void) _nc_trace_bufcat(bufnum, "{NAC}"); + } else { PUTC_DATA; int n; - memset (&PUT_st, '\0', sizeof (PUT_st)); - PUTC_i = 0; - (void) strcat(buf, "{ "); + PUTC_INIT; + (void) _nc_trace_bufcat(bufnum, "{ "); do { PUTC_ch = PUTC_i < CCHARW_MAX ? ch->chars[PUTC_i] : L'\0'; PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st); if (PUTC_ch == L'\0') --PUTC_n; - if (PUTC_n <= 0) + if (PUTC_n <= 0) { + if (PUTC_ch != L'\0') { + /* it could not be a multibyte sequence */ + (void) _nc_trace_bufcat(bufnum, _tracechar(UChar(ch->chars[PUTC_i]))); + } break; + } for (n = 0; n < PUTC_n; n++) { if (n) - (void) strcat(buf, ", "); - (void) strcat(buf, _tracechar(UChar(PUTC_buf[n]))); + (void) _nc_trace_bufcat(bufnum, ", "); + (void) _nc_trace_bufcat(bufnum, _tracechar(UChar(PUTC_buf[n]))); } ++PUTC_i; } while (PUTC_ch != L'\0'); - (void) strcat(buf, " }"); + (void) _nc_trace_bufcat(bufnum, " }"); + } + if (attr != A_NORMAL) { + (void) _nc_trace_bufcat(bufnum, " | "); + (void) _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr)); } - if (attr != A_NORMAL) - (void) sprintf(buf + strlen(buf), " | %s", - _traceattr2(bufnum + 20, attr)); } - return (strcat(buf, r_brace)); + return (_nc_trace_bufcat(bufnum, r_brace)); } NCURSES_EXPORT(char *) diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index 2f33391b..5ceeed2a 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -36,19 +36,36 @@ */ #include -MODULE_ID("$Id: lib_tracechr.c,v 1.9 2002/05/25 23:34:19 tom Exp $") +#include + +MODULE_ID("$Id: lib_tracechr.c,v 1.10 2003/06/14 11:05:42 tom Exp $") #ifdef TRACE NCURSES_EXPORT(char *) _tracechar(int ch) { - static char crep[40]; - (void) sprintf(crep, "'%.30s' = %#03o", - ((ch > KEY_MIN || ch < 0) - ? keyname(ch) - : unctrl(ch)), - ch); - return (crep); + static char result[40]; + char *name; + + if (ch > KEY_MIN || ch < 0) { + name = keyname(ch); + if (name == 0 || *name == '\0') + name = "NULL"; + (void) sprintf(result, "'%.30s' = %#03o", name, ch); + } else if (!isprint(ch) || ch > 255) { + /* + * workaround for glibc bug: + * sprintf changes the result from unctrl() to an empty string if it + * does not correspond to a valid multibyte sequence. + */ + (void) sprintf(result, "%#03o", ch); + } else { + name = unctrl(ch); + if (name == 0 || *name == 0) + name = "null"; /* shouldn't happen */ + (void) sprintf(result, "'%.30s' = %#03o", name, ch); + } + return (result); } #else empty_module(_nc_lib_tracechr) diff --git a/ncurses/trace/trace_buf.c b/ncurses/trace/trace_buf.c index 4fef57ee..85b4fbe6 100644 --- a/ncurses/trace/trace_buf.c +++ b/ncurses/trace/trace_buf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -35,15 +35,15 @@ #include -MODULE_ID("$Id: trace_buf.c,v 1.11 2002/07/14 00:08:08 tom Exp $") +MODULE_ID("$Id: trace_buf.c,v 1.12 2003/03/15 21:21:36 tom Exp $") typedef struct { char *text; size_t size; } LIST; -NCURSES_EXPORT(char *) -_nc_trace_buf(int bufnum, size_t want) +static char * +_nc_trace_alloc(int bufnum, size_t want) { char *result = 0; static LIST *list; @@ -65,8 +65,6 @@ _nc_trace_buf(int bufnum, size_t want) list[bufnum].size = want; } - if (list[bufnum].text != 0) - *(list[bufnum].text) = '\0'; result = list[bufnum].text; } #if NO_LEAKS @@ -82,3 +80,30 @@ _nc_trace_buf(int bufnum, size_t want) #endif return result; } + +/* + * (re)Allocate a buffer big enough for the caller's wants. + */ +NCURSES_EXPORT(char *) +_nc_trace_buf(int bufnum, size_t want) +{ + char *result = _nc_trace_alloc(bufnum, want); + if (result != 0) + *result = '\0'; + return result; +} + +/* + * Append a new string to an existing buffer. + */ +NCURSES_EXPORT(char *) +_nc_trace_bufcat(int bufnum, const char *value) +{ + char *buffer = _nc_trace_alloc(bufnum, 0); + size_t have = strlen(buffer); + + buffer = _nc_trace_alloc(bufnum, 1 + have + strlen(value)); + (void) strcpy(buffer + have, value); + + return buffer; +} diff --git a/ncurses/trace/varargs.c b/ncurses/trace/varargs.c index 0b3c28c4..aee20105 100644 --- a/ncurses/trace/varargs.c +++ b/ncurses/trace/varargs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -34,7 +34,7 @@ #include -MODULE_ID("$Id: varargs.c,v 1.3 2002/10/05 23:04:17 tom Exp $") +MODULE_ID("$Id: varargs.c,v 1.4 2003/05/24 21:10:28 tom Exp $") #ifdef TRACE @@ -46,7 +46,7 @@ typedef enum { #define VA_INT(type) ival = va_arg(ap, type) #define VA_FLT(type) fval = va_arg(ap, type) -#define VA_PTR(type) pval = (void *)va_arg(ap, type) +#define VA_PTR(type) pval = (char *)va_arg(ap, type) #define VA_STR(type) sval = va_arg(ap, type) /* diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c index 4fbecc50..ed8f872e 100644 --- a/ncurses/trace/visbuf.c +++ b/ncurses/trace/visbuf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001 Free Software Foundation, Inc. * + * Copyright (c) 2001-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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996-2001 * + * Author: Thomas E. Dickey 1996-2004 * * and: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * ****************************************************************************/ @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: visbuf.c,v 1.6 2002/10/06 00:03:43 tom Exp $") +MODULE_ID("$Id: visbuf.c,v 1.9 2004/02/03 01:16:37 tom Exp $") static char * _nc_vischar(char *tp, unsigned c) @@ -71,6 +71,7 @@ _nc_vischar(char *tp, unsigned c) sprintf(tp, "\\%03lo", ChCharOf(c)); tp += strlen(tp); } + *tp = 0; return tp; } @@ -187,9 +188,7 @@ _nc_viswbufn(const wchar_t * buf, int len) NCURSES_EXPORT(const char *) _nc_viscbuf2(int bufnum, const cchar_t * buf, int len) { - size_t have = BUFSIZ; - char *result = _nc_trace_buf(bufnum, have); - char *tp = result; + char *result = _nc_trace_buf(bufnum, BUFSIZ); int n; bool same = TRUE; attr_t attr = A_NORMAL; @@ -211,17 +210,18 @@ _nc_viscbuf2(int bufnum, const cchar_t * buf, int len) * detailed trace function that displays each character separately. */ if (same) { - *tp++ = D_QUOTE; + static const char d_quote[] = + {D_QUOTE, 0}; + + result = _nc_trace_bufcat(bufnum, d_quote); while (len-- > 0) { if ((found = _nc_altcharset_name(attr, CharOfD(buf))) != 0) { - (void) strcpy(tp, found); - tp += strlen(tp); + result = _nc_trace_bufcat(bufnum, found); attr &= ~A_ALTCHARSET; } else if (!isnac(CHDEREF(buf))) { PUTC_DATA; - memset(&PUT_st, '\0', sizeof(PUT_st)); - PUTC_i = 0; + PUTC_INIT; do { PUTC_ch = PUTC_i < CCHARW_MAX ? buf->chars[PUTC_i] : L'\0'; PUTC_n = wcrtomb(PUTC_buf, buf->chars[PUTC_i], &PUT_st); @@ -230,33 +230,31 @@ _nc_viscbuf2(int bufnum, const cchar_t * buf, int len) if (PUTC_n <= 0) break; for (n = 0; n < PUTC_n; n++) { - tp = _nc_vischar(tp, UChar(PUTC_buf[n])); + char temp[80]; + _nc_vischar(temp, UChar(PUTC_buf[n])); + result = _nc_trace_bufcat(bufnum, temp); } ++PUTC_i; } while (PUTC_ch != L'\0'); } buf++; } - *tp++ = D_QUOTE; - *tp++ = '\0'; - if (attr != A_NORMAL) - (void) sprintf(tp, " | %s", - _traceattr2(bufnum + 20, attr)); + result = _nc_trace_bufcat(bufnum, d_quote); + if (attr != A_NORMAL) { + result = _nc_trace_bufcat(bufnum, " | "); + result = _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr)); + } } else { - *tp++ = L_BRACE; + static const char l_brace[] = + {L_BRACE, 0}; + static const char r_brace[] = + {R_BRACE, 0}; + strcpy(result, l_brace); while (len-- > 0) { - char *temp = _tracecchar_t2(bufnum + 20, buf++); - size_t used = (tp - result); - size_t want = strlen(temp) + 5 + used; - if (want > have) { - result = _nc_trace_buf(bufnum, have = want); - tp = result + used; - } - (void) strcpy(tp, temp); - tp += strlen(tp); + result = _nc_trace_bufcat(bufnum, + _tracecchar_t2(bufnum + 20, buf++)); } - *tp++ = R_BRACE; - *tp++ = '\0'; + result = _nc_trace_bufcat(bufnum, r_brace); } return result; } diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 78581242..43ea8e51 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -108,7 +108,9 @@ * LONG_DIST and (b) further inward from the right or left edge than LONG_DIST, * we'll consider nonlocal. */ -#define NOT_LOCAL(fy, fx, ty, tx) ((tx > LONG_DIST) && (tx < screen_lines - 1 - LONG_DIST) && (abs(ty-fy) + abs(tx-fx) > LONG_DIST)) +#define NOT_LOCAL(fy, fx, ty, tx) ((tx > LONG_DIST) \ + && (tx < screen_columns - 1 - LONG_DIST) \ + && (abs(ty-fy) + abs(tx-fx) > LONG_DIST)) /**************************************************************************** * @@ -152,12 +154,8 @@ #include #include -MODULE_ID("$Id: lib_mvcur.c,v 1.86 2002/09/14 23:02:06 Philippe.Blain Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.97 2003/12/27 16:43:59 tom Exp $") -#define CURRENT_ROW SP->_cursrow /* phys cursor row */ -#define CURRENT_COLUMN SP->_curscol /* phys cursor column */ -#define CURRENT_ATTR SP->_current_attr /* current phys attribute */ -#define REAL_ATTR SP->_current_attr /* phys current attribute */ #define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */ #define BAUDRATE cur_term->_baudrate /* bits per second */ @@ -296,10 +294,11 @@ NCURSES_EXPORT(void) _nc_mvcur_init(void) /* initialize the cost structure */ { - /* - * 9 = 7 bits + 1 parity + 1 stop. - */ - SP->_char_padding = (9 * 1000 * 10) / (BAUDRATE > 0 ? BAUDRATE : 9600); + if (isatty(fileno(SP->_ofp))) + SP->_char_padding = ((BAUDBYTE * 1000 * 10) + / (BAUDRATE > 0 ? BAUDRATE : 9600)); + else + SP->_char_padding = 1; /* must be nonzero */ if (SP->_char_padding <= 0) SP->_char_padding = 1; /* must be nonzero */ TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding)); @@ -371,6 +370,13 @@ _nc_mvcur_init(void) SP->_dch1_cost = NormalizedCost(delete_character, 1); SP->_ich1_cost = NormalizedCost(insert_character, 1); + /* + * If this is a bce-terminal, we want to bias the choice so we use clr_eol + * rather than spaces at the end of a line. + */ + if (back_color_erase) + SP->_el_cost = 0; + /* parameterized screen-update strings */ SP->_dch_cost = NormalizedCost(tparm(parm_dch, 23), 1); SP->_ich_cost = NormalizedCost(tparm(parm_ich, 23), 1); @@ -508,10 +514,10 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int n = (from_y - to_y); if (parm_up_cursor - && SP->_cup_cost < vcost + && SP->_cuu_cost < vcost && _nc_safe_strcat(_nc_str_copy(target, &save), tparm(parm_up_cursor, n))) { - vcost = SP->_cup_cost; + vcost = SP->_cuu_cost; } if (cursor_up && (n * SP->_cuu1_cost < vcost)) { @@ -570,7 +576,6 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int } #endif /* USE_HARD_TABS */ -#if defined(REAL_ATTR) && defined(WANT_CHAR) if (n <= 0 || n >= (int) check.s_size) ovw = FALSE; #if BSD_TPUTS @@ -601,7 +606,7 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int for (i = 0; i < n; i++) { NCURSES_CH_T ch = WANT_CHAR(to_y, from_x + i); - if (AttrOf(ch) != CURRENT_ATTR + if (AttrOf(ch) != SP->_current_attr #if USE_WIDEC_SUPPORT || !Charable(ch) #endif @@ -619,9 +624,7 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int *check.s_tail = '\0'; check.s_size -= n; lhcost += n * SP->_char_padding; - } else -#endif /* defined(REAL_ATTR) && defined(WANT_CHAR) */ - { + } else { lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost, n, cursor_right); } @@ -817,20 +820,22 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw) } #endif /* !NO_OPTIMIZE */ + nonlocal: #if defined(MAIN) || defined(NCURSES_TEST) gettimeofday(&after, NULL); diff = after.tv_usec - before.tv_usec + (after.tv_sec - before.tv_sec) * 1000000; if (!profiling) (void) fprintf(stderr, - "onscreen: %d msec, %f 28.8Kbps char-equivalents\n", + "onscreen: %d microsec, %f 28.8Kbps char-equivalents\n", (int) diff, diff / 288); #endif /* MAIN */ - nonlocal: if (usecost != INFINITY) { TPUTS_TRACE("mvcur"); tputs(buffer, 1, _nc_outch); + SP->_cursrow = ynew; + SP->_curscol = xnew; return (OK); } else return (ERR); @@ -840,67 +845,95 @@ NCURSES_EXPORT(int) mvcur(int yold, int xold, int ynew, int xnew) /* optimized cursor move from (yold, xold) to (ynew, xnew) */ { + attr_t oldattr; + int code; + TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"), yold, xold, ynew, xnew)); - if (SP == 0) - returnCode(ERR); + if (SP == 0) { + code = ERR; + } else if (yold == ynew && xold == xnew) { + code = OK; + } else { - if (yold == ynew && xold == xnew) - returnCode(OK); + /* + * Most work here is rounding for terminal boundaries getting the + * column position implied by wraparound or the lack thereof and + * rolling up the screen to get ynew on the screen. + */ + if (xnew >= screen_columns) { + ynew += xnew / screen_columns; + xnew %= screen_columns; + } - /* - * Most work here is rounding for terminal boundaries getting the - * column position implied by wraparound or the lack thereof and - * rolling up the screen to get ynew on the screen. - */ + /* + * Force restore even if msgr is on when we're in an alternate + * character set -- these have a strong tendency to screw up the CR & + * LF used for local character motions! + */ + oldattr = SP->_current_attr; + if ((oldattr & A_ALTCHARSET) + || (oldattr && !move_standout_mode)) { + TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move", + oldattr, _traceattr(oldattr))); + (void) vidattr(A_NORMAL); + } - if (xnew >= screen_columns) { - ynew += xnew / screen_columns; - xnew %= screen_columns; - } - if (xold >= screen_columns) { - int l; - - if (SP->_nl) { - l = (xold + 1) / screen_columns; - yold += l; - if (yold >= screen_lines) - l -= (yold - screen_lines - 1); - - while (l > 0) { - if (newline) { - TPUTS_TRACE("newline"); - tputs(newline, 0, _nc_outch); - } else - putchar('\n'); - l--; - if (xold > 0) { + if (xold >= screen_columns) { + int l; + + if (SP->_nl) { + l = (xold + 1) / screen_columns; + yold += l; + if (yold >= screen_lines) + l -= (yold - screen_lines - 1); + + if (l > 0) { if (carriage_return) { TPUTS_TRACE("carriage_return"); - tputs(carriage_return, 0, _nc_outch); + putp(carriage_return); } else - putchar('\r'); + _nc_outch('\r'); xold = 0; + + while (l > 0) { + if (newline) { + TPUTS_TRACE("newline"); + putp(newline); + } else + _nc_outch('\n'); + l--; + } } + } else { + /* + * If caller set nonl(), we cannot really use newlines to + * position to the next row. + */ + xold = -1; + yold = -1; } - } else { - /* - * If caller set nonl(), we cannot really use newlines to position - * to the next row. - */ - xold = -1; - yold = -1; } - } - if (yold > screen_lines - 1) - yold = screen_lines - 1; - if (ynew > screen_lines - 1) - ynew = screen_lines - 1; + if (yold > screen_lines - 1) + yold = screen_lines - 1; + if (ynew > screen_lines - 1) + ynew = screen_lines - 1; + + /* destination location is on screen now */ + code = onscreen_mvcur(yold, xold, ynew, xnew, TRUE); - /* destination location is on screen now */ - returnCode(onscreen_mvcur(yold, xold, ynew, xnew, TRUE)); + /* + * Restore attributes if we disabled them before moving. + */ + if (oldattr != SP->_current_attr) { + TR(TRACE_CHARPUT, ("turning on (%#lx) %s after move", + oldattr, _traceattr(oldattr))); + (void) vidattr(oldattr); + } + } + returnCode(code); } #if defined(TRACE) || defined(NCURSES_TEST) @@ -952,7 +985,7 @@ delay_output(int ms GCC_UNUSED) return OK; } -static char tname[MAX_ALIAS]; +static char tname[PATH_MAX]; static void load_term(void) diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c index a907914a..7402a103 100644 --- a/ncurses/tty/lib_twait.c +++ b/ncurses/tty/lib_twait.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -61,7 +61,7 @@ # endif #endif -MODULE_ID("$Id: lib_twait.c,v 1.46 2002/09/01 00:28:18 tom Exp $") +MODULE_ID("$Id: lib_twait.c,v 1.49 2003/11/30 00:34:36 Philippe.Blain Exp $") static long _nc_gettime(bool first) @@ -75,9 +75,16 @@ _nc_gettime(bool first) gettimeofday(&t1, (struct timezone *) 0); if (first) { t0 = t1; + res = 0; + } else { + /* .tv_sec and .tv_usec are unsigned, be careful when subtracting */ + if (t0.tv_usec > t1.tv_usec) { /* Convert 1s in 1e6 microsecs */ + t1.tv_usec += 1000000; + t1.tv_sec--; + } + res = (t1.tv_sec - t0.tv_sec) * 1000 + + (t1.tv_usec - t0.tv_usec) / 1000; } - res = (t1.tv_sec - t0.tv_sec) * 1000 - + (t1.tv_usec - t0.tv_usec) / 1000; #else # define PRECISE_GETTIME 0 static time_t t0; @@ -380,7 +387,7 @@ _nc_timed_wait(int mode, } #endif -#if PRECISE_GETTIME +#if PRECISE_GETTIME && HAVE_NANOSLEEP /* * If the timeout hasn't expired, and we've gotten no data, * this is probably a system where 'select()' needs to be left @@ -388,7 +395,7 @@ _nc_timed_wait(int mode, * then come back for more. */ if (result == 0 && milliseconds > 100) { - napms(100); + napms(100); /* FIXME: this won't be right if I recur! */ milliseconds -= 100; goto retry; } diff --git a/ncurses/tty/tty_display.h b/ncurses/tty/tty_display.h index 8382c823..3322f747 100644 --- a/ncurses/tty/tty_display.h +++ b/ncurses/tty/tty_display.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * 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 * @@ -29,6 +29,9 @@ #ifndef TTY_DISPLAY_H #define TTY_DISPLAY_H 1 +/* + * $Id: tty_display.h,v 1.5 2003/08/02 22:59:07 Philippe.Blain Exp $ + */ extern NCURSES_EXPORT(bool) _nc_tty_beep (void); extern NCURSES_EXPORT(bool) _nc_tty_check_resize (void); extern NCURSES_EXPORT(bool) _nc_tty_cursor (int); @@ -111,7 +114,7 @@ struct tty_display_data { : ((enter_insert_mode && exit_insert_mode) \ ? D->_smir_cost + D->_rmir_cost + (D->_ip_cost * count) \ : ((insert_character != 0) \ - ? (D->_ich1_cost * count) \ + ? ((D->_ich1_cost + D->_ip_cost) * count) \ : INFINITY))) #if USE_XMC_SUPPORT diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index c792402d..78dc78cd 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,15 +29,16 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2004 * ****************************************************************************/ /*----------------------------------------------------------------- * * lib_doupdate.c * - * The routine doupdate() and its dependents. Also _nc_outstr(), - * so all physical output is concentrated here (except _nc_outch() - * in lib_tputs.c). + * The routine doupdate() and its dependents. + * All physical output is concentrated here (except _nc_outch() + * in lib_tputs.c). * *-----------------------------------------------------------------*/ @@ -70,9 +71,10 @@ #endif #endif +#include #include -MODULE_ID("$Id: tty_update.c,v 1.177 2002/09/28 20:41:55 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.205 2004/02/07 18:02:42 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -165,61 +167,95 @@ position_check(int expected_y, int expected_x, char *legend) static inline void GoTo(int const row, int const col) { - attr_t oldattr = SP->_current_attr; - TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)", row, col, SP->_cursrow, SP->_curscol)); position_check(SP->_cursrow, SP->_curscol, "GoTo"); - /* - * Force restore even if msgr is on when we're in an alternate - * character set -- these have a strong tendency to screw up the - * CR & LF used for local character motions! - */ - if ((oldattr & A_ALTCHARSET) - || (oldattr && !move_standout_mode)) { - TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move", - oldattr, _traceattr(oldattr))); - vidattr(A_NORMAL); - } - mvcur(SP->_cursrow, SP->_curscol, row, col); - SP->_cursrow = row; - SP->_curscol = col; position_check(SP->_cursrow, SP->_curscol, "GoTo2"); } static inline void PutAttrChar(CARG_CH_T ch) { + int chlen = 1; + NCURSES_CH_T my_ch; PUTC_DATA; NCURSES_CH_T tilde; + NCURSES_ATTR_T attr = AttrOfD(ch); + + TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", + _tracech_t(ch), + SP->_cursrow, SP->_curscol)); +#if USE_WIDEC_SUPPORT + /* + * If this is not a valid character, there is nothing more to do. + */ + if (isnac(CHDEREF(ch))) + return; + /* + * Determine the number of character cells which the 'ch' value will use + * on the screen. It should be at least one. + */ + if ((chlen = wcwidth(CharOf(CHDEREF(ch)))) <= 0) { + static NCURSES_CH_T blank = NewChar(BLANK_TEXT); + if (isprint(CharOf(CHDEREF(ch))) + || (SP->_posix_locale && CharOf(CHDEREF(ch)) >= 160)) { + ; + } else { + ch = CHREF(blank); + TR(TRACE_CHARPUT, ("forced to blank")); + } + chlen = 1; + } +#endif + + if ((attr & A_ALTCHARSET) + && SP->_acs_map != 0 + && CharOfD(ch) < ACS_LEN) { + my_ch = CHDEREF(ch); /* work around const param */ +#if USE_WIDEC_SUPPORT + /* + * This is crude & ugly, but works most of the time. It checks if the + * acs_chars string specified that we have a mapping for this + * character, and uses the wide-character mapping when we expect the + * normal one to be broken (by mis-design ;-). + */ + if (SP->_screen_acs_fix + && SP->_acs_map[CharOf(my_ch)] & A_ALTCHARSET) { + attr &= ~(A_ALTCHARSET); + my_ch = _nc_wacs[CharOf(my_ch)]; + } +#endif + if (attr & A_ALTCHARSET) { + chtype temp = UChar(SP->_acs_map[CharOfD(ch)]); + if (temp != 0) + SetChar(my_ch, temp, attr); + RemAttr(my_ch, A_ALTCHARSET); + } + ch = CHREF(my_ch); + } if (tilde_glitch && (CharOfD(ch) == L('~'))) { - SetChar(tilde, L('`'), AttrOfD(ch)); + SetChar(tilde, L('`'), attr); ch = CHREF(tilde); } - TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", - _tracech_t(ch), - SP->_cursrow, SP->_curscol)); - UpdateAttrs(AttrOfD(ch)); + UpdateAttrs(attr); #if !USE_WIDEC_SUPPORT /* FIXME - we do this special case for signal handling, should see how to * make it work for wide characters. */ if (SP->_outch != 0) { - SP->_outch((int) ch); + SP->_outch(UChar(ch)); } else #endif { PUTC(CHDEREF(ch), SP->_ofp); /* macro's fastest... */ -#ifdef TRACE - _nc_outchars++; -#endif /* TRACE */ + TRACE_OUTCHARS(1); } - SP->_curscol++; + SP->_curscol += chlen; if (char_padding) { TPUTS_TRACE("char_padding"); putp(char_padding); @@ -456,7 +492,8 @@ EmitRange(const NCURSES_CH_T * ntext, int num) rep_count--; UpdateAttrs(AttrOf(ntext0)); - putp(tparm(repeat_char, CharOf(ntext0), rep_count)); + tputs(tparm(repeat_char, CharOf(ntext0), rep_count), + rep_count, _nc_outch); SP->_curscol += rep_count; if (wrap_possible) @@ -490,27 +527,32 @@ PutRange(const NCURSES_CH_T * otext, int row, int first, int last) { - int j, run; + int i, j, same; TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)", otext, ntext, row, first, last)); if (otext != ntext && (last - first + 1) > SP->_inline_cost) { - for (j = first, run = 0; j <= last; j++) { - if (!run && isnac(otext[j])) + for (j = first, same = 0; j <= last; j++) { + if (!same && isnac(otext[j])) continue; if (CharEq(otext[j], ntext[j])) { - run++; + same++; } else { - if (run > SP->_inline_cost) { - int before_run = (j - run); - EmitRange(ntext + first, before_run - first); + if (same > SP->_inline_cost) { + EmitRange(ntext + first, j - same - first); GoTo(row, first = j); } - run = 0; + same = 0; } } + i = EmitRange(ntext + first, j - same - first); + /* + * Always return 1 for the next GoTo() after a PutRange() if we found + * identical characters at end of interval + */ + return (same == 0 ? i : 1); } return EmitRange(ntext + first, last - first + 1); } @@ -888,12 +930,12 @@ ClrToEOL(NCURSES_CH_T blank, bool needclear) if (needclear) { UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("clr_eol"); - if (SP->_el_cost > (screen_columns - SP->_curscol)) { + if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) { + putp(clr_eol); + } else { int count = (screen_columns - SP->_curscol); while (count-- > 0) PutChar(CHREF(blank)); - } else { - putp(clr_eol); } } } @@ -939,7 +981,7 @@ ClrBottom(int total) int col; int top = total; int last = min(screen_columns, newscr->_maxx + 1); - NCURSES_CH_T blank = ClrBlank(stdscr); + NCURSES_CH_T blank = newscr->_line[total - 1].text[last - 1]; bool ok; if (clr_eos && can_clear_with(CHREF(blank))) { @@ -959,17 +1001,16 @@ ClrBottom(int total) } /* don't use clr_eos for just one line if clr_eol available */ - if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) { + if (top < total) { GoTo(top, 0); ClrToEOS(blank); - total = top; if (SP->oldhash && SP->newhash) { for (row = top; row < screen_lines; row++) SP->oldhash[row] = SP->newhash[row]; } } } - return total; + return top; } #if USE_XMC_SUPPORT @@ -1060,8 +1101,10 @@ TransformLine(int const lineno) if (ceol_standout_glitch && clr_eol) { firstChar = 0; while (firstChar < screen_columns) { - if (AttrOf(newLine[firstChar]) != AttrOf(oldLine[firstChar])) + if (AttrOf(newLine[firstChar]) != AttrOf(oldLine[firstChar])) { attrchanged = TRUE; + break; + } firstChar++; } } @@ -1124,17 +1167,9 @@ TransformLine(int const lineno) } else { NCURSES_CH_T blank; - /* find the first differing character */ - while (firstChar < screen_columns && - CharEq(newLine[firstChar], oldLine[firstChar])) - firstChar++; - - /* if there wasn't one, we're done */ - if (firstChar >= screen_columns) - return; - /* it may be cheap to clear leading whitespace with clr_bol */ - if (clr_bol && (blank = newLine[0], can_clear_with(CHREF(blank)))) { + blank = newLine[0]; + if (clr_bol && can_clear_with(CHREF(blank))) { int oFirstChar, nFirstChar; for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++) @@ -1144,26 +1179,43 @@ TransformLine(int const lineno) if (!CharEq(newLine[nFirstChar], blank)) break; - if (nFirstChar > oFirstChar + SP->_el1_cost) { - if (nFirstChar >= screen_columns && SP->_el_cost <= SP->_el1_cost) { - GoTo(lineno, 0); - UpdateAttrs(AttrOf(blank)); - TPUTS_TRACE("clr_eol"); - putp(clr_eol); - } else { - GoTo(lineno, nFirstChar - 1); - UpdateAttrs(AttrOf(blank)); - TPUTS_TRACE("clr_bol"); - putp(clr_bol); - } - - while (firstChar < nFirstChar) - oldLine[firstChar++] = blank; + if (nFirstChar == oFirstChar) { + firstChar = nFirstChar; + /* find the first differing character */ + while (firstChar < screen_columns + && CharEq(newLine[firstChar], oldLine[firstChar])) + firstChar++; + } else if (oFirstChar > nFirstChar) { + firstChar = nFirstChar; + } else { /* oFirstChar < nFirstChar */ + firstChar = oFirstChar; + if (SP->_el1_cost < nFirstChar - oFirstChar) { + if (nFirstChar >= screen_columns + && SP->_el_cost <= SP->_el1_cost) { + GoTo(lineno, 0); + UpdateAttrs(AttrOf(blank)); + TPUTS_TRACE("clr_eol"); + putp(clr_eol); + } else { + GoTo(lineno, nFirstChar - 1); + UpdateAttrs(AttrOf(blank)); + TPUTS_TRACE("clr_bol"); + putp(clr_bol); + } - if (firstChar >= screen_columns) - return; + while (firstChar < nFirstChar) + oldLine[firstChar++] = blank; + } } + } else { + /* find the first differing character */ + while (firstChar < screen_columns + && CharEq(newLine[firstChar], oldLine[firstChar])) + firstChar++; } + /* if there wasn't one, we're done */ + if (firstChar >= screen_columns) + return; blank = newLine[screen_columns - 1]; @@ -1314,7 +1366,7 @@ ClearScreen(NCURSES_CH_T blank) UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("clr_eos"); - putp(clr_eos); + tputs(clr_eos, screen_lines, _nc_outch); } else if (clr_eol) { SP->_cursrow = SP->_curscol = -1; @@ -1423,19 +1475,6 @@ DelChar(int count) } } -/* -** _nc_outstr(char *str) -** -** Emit a string without waiting for update. -*/ - -NCURSES_EXPORT(void) -_nc_outstr(const char *str) -{ - (void) putp(str); - _nc_flush(); -} - /* * Physical-scrolling support * @@ -1478,12 +1517,12 @@ scroll_csr_forward(int n, int top, int bot, int miny, int maxy, NCURSES_CH_T bla GoTo(bot, 0); UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("scroll_forward"); - tputs(scroll_forward, 0, _nc_outch); + putp(scroll_forward); } else if (n == 1 && delete_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("delete_line"); - tputs(delete_line, 0, _nc_outch); + putp(delete_line); } else if (parm_index && top == miny && bot == maxy) { GoTo(bot, 0); UpdateAttrs(AttrOf(blank)); @@ -1499,14 +1538,14 @@ scroll_csr_forward(int n, int top, int bot, int miny, int maxy, NCURSES_CH_T bla UpdateAttrs(AttrOf(blank)); for (i = 0; i < n; i++) { TPUTS_TRACE("scroll_forward"); - tputs(scroll_forward, 0, _nc_outch); + putp(scroll_forward); } } else if (delete_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(AttrOf(blank)); for (i = 0; i < n; i++) { TPUTS_TRACE("delete_line"); - tputs(delete_line, 0, _nc_outch); + putp(delete_line); } } else return ERR; @@ -1536,12 +1575,12 @@ scroll_csr_backward(int n, int top, int bot, int miny, int maxy, GoTo(top, 0); UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("scroll_reverse"); - tputs(scroll_reverse, 0, _nc_outch); + putp(scroll_reverse); } else if (n == 1 && insert_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(AttrOf(blank)); TPUTS_TRACE("insert_line"); - tputs(insert_line, 0, _nc_outch); + putp(insert_line); } else if (parm_rindex && top == miny && bot == maxy) { GoTo(top, 0); UpdateAttrs(AttrOf(blank)); @@ -1557,14 +1596,14 @@ scroll_csr_backward(int n, int top, int bot, int miny, int maxy, UpdateAttrs(AttrOf(blank)); for (i = 0; i < n; i++) { TPUTS_TRACE("scroll_reverse"); - tputs(scroll_reverse, 0, _nc_outch); + putp(scroll_reverse); } } else if (insert_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(AttrOf(blank)); for (i = 0; i < n; i++) { TPUTS_TRACE("insert_line"); - tputs(insert_line, 0, _nc_outch); + putp(insert_line); } } else return ERR; @@ -1596,14 +1635,14 @@ scroll_idl(int n, int del, int ins, NCURSES_CH_T blank) UpdateAttrs(AttrOf(blank)); if (n == 1 && delete_line) { TPUTS_TRACE("delete_line"); - tputs(delete_line, 0, _nc_outch); + putp(delete_line); } else if (parm_delete_line) { TPUTS_TRACE("parm_delete_line"); tputs(tparm(parm_delete_line, n, 0), n, _nc_outch); } else { /* if (delete_line) */ for (i = 0; i < n; i++) { TPUTS_TRACE("delete_line"); - tputs(delete_line, 0, _nc_outch); + putp(delete_line); } } @@ -1611,20 +1650,28 @@ scroll_idl(int n, int del, int ins, NCURSES_CH_T blank) UpdateAttrs(AttrOf(blank)); if (n == 1 && insert_line) { TPUTS_TRACE("insert_line"); - tputs(insert_line, 0, _nc_outch); + putp(insert_line); } else if (parm_insert_line) { TPUTS_TRACE("parm_insert_line"); tputs(tparm(parm_insert_line, n, 0), n, _nc_outch); } else { /* if (insert_line) */ for (i = 0; i < n; i++) { TPUTS_TRACE("insert_line"); - tputs(insert_line, 0, _nc_outch); + putp(insert_line); } } return OK; } +/* + * Note: some terminals require the cursor to be within the scrolling margins + * before setting them. Generally, the cursor must be at the appropriate end + * of the scrolling margins when issuing an indexing operation (it is not + * apparent whether it must also be at the left margin; we do this just to be + * safe). To make the related cursor movement a little faster, we use the + * save/restore cursor capabilities if the terminal has them. + */ NCURSES_EXPORT(int) _nc_scrolln(int n, int top, int bot, int maxy) /* scroll region from top to bot by n lines */ @@ -1658,13 +1705,13 @@ _nc_scrolln(int n, int top, int bot, int maxy) && save_cursor && restore_cursor) { cursor_saved = TRUE; TPUTS_TRACE("save_cursor"); - tputs(save_cursor, 0, _nc_outch); + putp(save_cursor); } TPUTS_TRACE("change_scroll_region"); - tputs(tparm(change_scroll_region, top, bot), 0, _nc_outch); + putp(tparm(change_scroll_region, top, bot)); if (cursor_saved) { TPUTS_TRACE("restore_cursor"); - tputs(restore_cursor, 0, _nc_outch); + putp(restore_cursor); } else { SP->_cursrow = SP->_curscol = -1; } @@ -1672,7 +1719,7 @@ _nc_scrolln(int n, int top, int bot, int maxy) res = scroll_csr_forward(n, top, bot, top, bot, blank); TPUTS_TRACE("change_scroll_region"); - tputs(tparm(change_scroll_region, 0, maxy), 0, _nc_outch); + putp(tparm(change_scroll_region, 0, maxy)); SP->_cursrow = SP->_curscol = -1; } @@ -1686,7 +1733,7 @@ _nc_scrolln(int n, int top, int bot, int maxy) && (non_dest_scroll_region || (memory_below && bot == maxy))) { NCURSES_CH_T blank2 = NewChar(BLANK_TEXT); if (bot == maxy && clr_eos) { - GoTo(bot - n, 0); + GoTo(bot - n + 1, 0); ClrToEOS(blank2); } else { for (i = 0; i < n; i++) { @@ -1704,13 +1751,13 @@ _nc_scrolln(int n, int top, int bot, int maxy) && save_cursor && restore_cursor) { cursor_saved = TRUE; TPUTS_TRACE("save_cursor"); - tputs(save_cursor, 0, _nc_outch); + putp(save_cursor); } TPUTS_TRACE("change_scroll_region"); - tputs(tparm(change_scroll_region, top, bot), 0, _nc_outch); + putp(tparm(change_scroll_region, top, bot)); if (cursor_saved) { TPUTS_TRACE("restore_cursor"); - tputs(restore_cursor, 0, _nc_outch); + putp(restore_cursor); } else { SP->_cursrow = SP->_curscol = -1; } @@ -1718,7 +1765,7 @@ _nc_scrolln(int n, int top, int bot, int maxy) res = scroll_csr_backward(-n, top, bot, top, bot, blank); TPUTS_TRACE("change_scroll_region"); - tputs(tparm(change_scroll_region, 0, maxy), 0, _nc_outch); + putp(tparm(change_scroll_region, 0, maxy)); SP->_cursrow = SP->_curscol = -1; } @@ -1811,8 +1858,6 @@ _nc_screen_wrap(void) SP->_default_color = FALSE; mvcur(SP->_cursrow, SP->_curscol, screen_lines - 1, 0); - SP->_cursrow = screen_lines - 1; - SP->_curscol = 0; ClrToEOL(blank, TRUE); } diff --git a/ncurses/widechar/charable.c b/ncurses/widechar/charable.c new file mode 100644 index 00000000..7e7dfe67 --- /dev/null +++ b/ncurses/widechar/charable.c @@ -0,0 +1,77 @@ +/**************************************************************************** + * 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. * + ****************************************************************************/ + +/* +** Support functions for wide/narrow conversion. +*/ + +#include + +MODULE_ID("$Id: charable.c,v 1.2 2003/07/05 18:04:08 tom Exp $") + +NCURSES_EXPORT(bool) _nc_is_charable(wchar_t ch) +{ + bool result; +#if HAVE_WCTOB + result = (wctob(ch) == ch); +#else + result = (_nc_to_char(ch) >= 0); +#endif + return result; +} + +NCURSES_EXPORT(int) _nc_to_char(wint_t ch) +{ + int result; +#if HAVE_WCTOB + result = wctob(ch); +#elif HAVE_WCTOMB + char temp[MB_LEN_MAX]; + result = wctomb(temp, ch); + if (strlen(temp) == 1) + result = UChar(temp[0]); + else + result = -1; +#endif + return result; +} + +NCURSES_EXPORT(wint_t) _nc_to_widechar(int ch) +{ + wint_t result; +#if HAVE_BTOWC + result = btowc(ch); +#elif HAVE_MBTOWC + char temp[2]; + temp[0] = ch; + temp[1] = '\0'; + if (mbtowc((wchar_t *) (&result), temp, 1) != 1) + result = WEOF; +#endif + return result; +} diff --git a/ncurses/widechar/lib_add_wch.c b/ncurses/widechar/lib_add_wch.c new file mode 100644 index 00000000..8d4346ef --- /dev/null +++ b/ncurses/widechar/lib_add_wch.c @@ -0,0 +1,109 @@ +/**************************************************************************** + * Copyright (c) 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. * + ****************************************************************************/ + +/* +** lib_add_wch.c +** +** The routine wadd_wch(). +** +*/ + +#include + +MODULE_ID("$Id: lib_add_wch.c,v 1.2 2004/02/07 17:53:33 tom Exp $") + +NCURSES_EXPORT(int) +wadd_wch(WINDOW *win, const cchar_t * wch) +{ + PUTC_DATA; + int n; + int code = ERR; + + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win, + _tracech_t(wch))); + + if (win != 0) { + PUTC_INIT; + while (PUTC_i < CCHARW_MAX) { + if ((PUTC_ch = wch->chars[PUTC_i++]) == L'\0') + break; + if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) { + code = ERR; + if (PUTC_ch < 256) + code = waddch(win, UChar(PUTC_ch)); + break; + } + for (n = 0; n < PUTC_n; n++) { + if ((code = waddch(win, UChar(PUTC_buf[n]))) == ERR) { + break; + } + } + if (code == ERR) + break; + } + } + + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); + return (code); +} + +NCURSES_EXPORT(int) +wecho_wchar(WINDOW *win, const cchar_t * wch) +{ + PUTC_DATA; + int n; + int code = ERR; + + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wecho_wchar(%p, %s)"), win, + _tracech_t(wch))); + + if (win != 0) { + PUTC_INIT; + while (PUTC_i < CCHARW_MAX) { + if ((PUTC_ch = wch->chars[PUTC_i++]) == L'\0') + break; + if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) { + code = ERR; + if (PUTC_ch < 256) + code = waddch(win, UChar(PUTC_ch)); + break; + } + for (n = 0; n < PUTC_n; n++) { + if ((code = waddch(win, UChar(PUTC_buf[n]))) == ERR) { + break; + } + } + if (code == ERR) + break; + } + wrefresh(win); + } + + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); + return (code); +} diff --git a/ncurses/widechar/lib_box_set.c b/ncurses/widechar/lib_box_set.c index 1c8480f7..35fce46d 100644 --- a/ncurses/widechar/lib_box_set.c +++ b/ncurses/widechar/lib_box_set.c @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_box_set.c,v 1.3 2002/09/15 00:18:05 tom Exp $") +MODULE_ID("$Id: lib_box_set.c,v 1.4 2003/12/06 18:02:13 tom Exp $") NCURSES_EXPORT(int) wborder_set(WINDOW *win, @@ -66,7 +66,7 @@ wborder_set(WINDOW *win, if (!win) returnCode(ERR); -#define RENDER_WITH_DEFAULT(ch,def) w ##ch = _nc_render(win, (ch == 0) ? *def : *ch) +#define RENDER_WITH_DEFAULT(ch,def) w ##ch = _nc_render(win, (ch == 0) ? *(const ARG_CH_T)def : *ch) RENDER_WITH_DEFAULT(ls, WACS_VLINE); RENDER_WITH_DEFAULT(rs, WACS_VLINE); diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c index 86b5e2ef..75dbf4a5 100644 --- a/ncurses/widechar/lib_cchar.c +++ b/ncurses/widechar/lib_cchar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -35,7 +35,7 @@ #include -MODULE_ID("$Id: lib_cchar.c,v 1.6 2002/08/10 22:27:37 tom Exp $") +MODULE_ID("$Id: lib_cchar.c,v 1.8 2003/05/25 00:07:41 tom Exp $") /* * The SuSv2 description leaves some room for interpretation. We'll assume wch @@ -55,26 +55,28 @@ setcchar(cchar_t * wcval, const wchar_t * wch, const attr_t attrs, wcval, _nc_viswbuf(wch), attrs, color_pair, opts)); if (opts != NULL || (len = wcslen(wch)) > CCHARW_MAX - || (len > 0 && wcwidth(wch[0]) < 0)) { + || (len > 1 && wcwidth(wch[0]) < 0)) { code = ERR; } else { + /* + * If we have a following spacing-character, stop at that point. We + * are only interested in adding non-spacing characters. + */ for (i = 1; i < len; ++i) { if (wcwidth(wch[i]) != 0) { - code = ERR; + len = i; break; } } - if (code != ERR) { - memset(wcval, 0, sizeof(*wcval)); + memset(wcval, 0, sizeof(*wcval)); - if (len != 0) { - SetAttr(*wcval, attrs | color_pair); - memcpy(&wcval->chars, wch, len * sizeof(wchar_t)); - TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len, - _tracecchar_t(wcval))); - } + if (len != 0) { + SetAttr(*wcval, attrs | color_pair); + memcpy(&wcval->chars, wch, len * sizeof(wchar_t)); + TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len, + _tracecchar_t(wcval))); } } @@ -100,6 +102,8 @@ getcchar(const cchar_t * wcval, wchar_t * wch, attr_t * attrs, if (wch == NULL) { code = len; + } else if (attrs == 0 || color_pair == 0) { + code = ERR; } else if (len >= 0) { *attrs = AttrOf(*wcval); *color_pair = AttrOf(*wcval) & A_COLOR; diff --git a/ncurses/widechar/lib_get_wch.c b/ncurses/widechar/lib_get_wch.c index e2a7ce55..24300f6e 100644 --- a/ncurses/widechar/lib_get_wch.c +++ b/ncurses/widechar/lib_get_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002 Free Software Foundation, Inc. * + * Copyright (c) 2002,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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2002 * + * Author: Thomas E. Dickey 2002,2004 * ****************************************************************************/ /* @@ -39,7 +39,21 @@ #include -MODULE_ID("$Id: lib_get_wch.c,v 1.5 2002/09/02 00:04:25 tom Exp $") +MODULE_ID("$Id: lib_get_wch.c,v 1.6 2004/01/18 01:18:17 tom Exp $") + +#if HAVE_MBTOWC && HAVE_MBLEN +#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0) +#define count_mbytes(buffer,length,state) mblen(buffer,length) +#define check_mbytes(wch,buffer,length,state) \ + (int) mbtowc(&wch, buffer, count) +#elif HAVE_MBRTOWC && HAVE_MBRLEN +#define reset_mbytes(state) memset(&state, 0, sizeof(state)) +#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state) +#define check_mbytes(wch,buffer,length,state) \ + (int) mbrtowc(&wch, buffer, count, &state) +#else +make an error +#endif NCURSES_EXPORT(int) wget_wch(WINDOW *win, wint_t * result) @@ -53,6 +67,8 @@ wget_wch(WINDOW *win, wint_t * result) wchar_t wch; T((T_CALLED("wget_wch(%p)"), win)); + (void) state; + /* * We can get a stream of single-byte characters and KEY_xxx codes from * _nc_wgetch(), while we want to return a wide character or KEY_xxx code. @@ -81,11 +97,11 @@ wget_wch(WINDOW *win, wint_t * result) break; } else { buffer[count++] = UChar(value); - memset(&state, 0, sizeof(state)); - status = mbrlen(buffer, count, &state); + reset_mbytes(state); + status = count_mbytes(buffer, count, state); if (status >= 0) { - memset(&state, 0, sizeof(state)); - if ((int) mbrtowc(&wch, buffer, count, &state) != status) { + reset_mbytes(state); + if (check_mbytes(wch, buffer, count, state) != status) { code = ERR; /* the two calls should match */ } value = wch; diff --git a/ncurses/widechar/lib_get_wstr.c b/ncurses/widechar/lib_get_wstr.c index 9467e53f..906e02a6 100644 --- a/ncurses/widechar/lib_get_wstr.c +++ b/ncurses/widechar/lib_get_wstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002 Free Software Foundation, Inc. * + * 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 * @@ -40,7 +40,7 @@ #include #include -MODULE_ID("$Id: lib_get_wstr.c,v 1.4 2002/07/20 19:28:29 tom Exp $") +MODULE_ID("$Id: lib_get_wstr.c,v 1.6 2003/05/17 21:33:03 tom Exp $") /* * This wipes out the last character, no matter whether it was a tab, control @@ -109,6 +109,25 @@ wgetn_wstr(WINDOW *win, wint_t * str, int maxlen) wrefresh(win); while ((code = wget_wch(win, &ch)) != ERR) { + /* + * Map special characters into key-codes. + */ + if (ch == '\r') + ch = '\n'; + if (ch == '\n') { + code = KEY_CODE_YES; + ch = KEY_ENTER; + } + if (ch < KEY_MIN) { + if (ch == erasec) { + ch = KEY_BACKSPACE; + code = KEY_CODE_YES; + } + if (ch == killc) { + ch = KEY_EOL; + code = KEY_CODE_YES; + } + } if (code == KEY_CODE_YES) { /* * Some terminals (the Wyse-50 is the most common) generate a \n @@ -116,21 +135,18 @@ wgetn_wstr(WINDOW *win, wint_t * str, int maxlen) * choice whether to set kcud=\n for wget_wch(); terminating * *getn_wstr() with \n should work either way. */ - if (ch == '\n' - || ch == '\r' - || ch == KEY_DOWN - || ch == KEY_ENTER) { + if (ch == KEY_DOWN || ch == KEY_ENTER) { if (oldecho == TRUE && win->_cury == win->_maxy && win->_scroll) wechochar(win, (chtype) '\n'); break; } - if (ch == erasec || ch == KEY_LEFT || ch == KEY_BACKSPACE) { + if (ch == KEY_LEFT || ch == KEY_BACKSPACE) { if (tmpstr > oldstr) { tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho); } - } else if (ch == killc) { + } else if (ch == KEY_EOL) { while (tmpstr > oldstr) { tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho); } @@ -141,6 +157,7 @@ wgetn_wstr(WINDOW *win, wint_t * str, int maxlen) beep(); } else { *tmpstr++ = ch; + *tmpstr = 0; if (oldecho == TRUE) { int oldy = win->_cury; cchar_t tmp; @@ -193,7 +210,7 @@ wgetn_wstr(WINDOW *win, wint_t * str, int maxlen) *tmpstr = 0; if (code == ERR) { if (tmpstr == oldstr) { - *tmpstr++ = (wchar_t)WEOF; + *tmpstr++ = (wchar_t) WEOF; *tmpstr = 0; } returnCode(ERR); diff --git a/ncurses/widechar/lib_ins_wch.c b/ncurses/widechar/lib_ins_wch.c index 0821ee59..6417eea2 100644 --- a/ncurses/widechar/lib_ins_wch.c +++ b/ncurses/widechar/lib_ins_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002 Free Software Foundation, Inc. * + * 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 * @@ -39,16 +39,16 @@ #include -MODULE_ID("$Id: lib_ins_wch.c,v 1.1 2002/03/10 22:25:06 tom Exp $") +MODULE_ID("$Id: lib_ins_wch.c,v 1.3 2003/03/29 21:52:29 tom Exp $") -NCURSES_EXPORT(int) -wins_wch(WINDOW *win, const cchar_t * wch) +/* + * Insert the given character, updating the current location to simplify + * inserting a string. + */ +static void +_nc_insert_wch(WINDOW *win, const cchar_t * wch) { - int code = ERR; - - T((T_CALLED("wins_wch(%p, %s)"), win, _tracecchar_t(wch))); - - if (win) { + if (win->_curx <= win->_maxx) { struct ldat *line = &(win->_line[win->_cury]); NCURSES_CH_T *end = &(line->text[win->_curx]); NCURSES_CH_T *temp1 = &(line->text[win->_maxx]); @@ -59,6 +59,71 @@ wins_wch(WINDOW *win, const cchar_t * wch) *temp1-- = *temp2--; *temp1 = _nc_render(win, *wch); + + win->_curx++; + } +} + +NCURSES_EXPORT(int) +wins_wch(WINDOW *win, const cchar_t * wch) +{ + NCURSES_SIZE_T oy; + NCURSES_SIZE_T ox; + int code = ERR; + + T((T_CALLED("wins_wch(%p, %s)"), win, _tracecchar_t(wch))); + + if (win != 0) { + oy = win->_cury; + ox = win->_curx; + + _nc_insert_wch(win, wch); + + win->_curx = ox; + win->_cury = oy; + _nc_synchook(win); + code = OK; + } + returnCode(code); +} + +NCURSES_EXPORT(int) +wins_nwstr(WINDOW *win, const wchar_t * wstr, int n) +{ + int code = ERR; + NCURSES_SIZE_T oy; + NCURSES_SIZE_T ox; + const wchar_t *cp; + + T((T_CALLED("wins_nwstr(%p,%s,%d)"), win, _nc_viswbufn(wstr, n), n)); + + if (win != 0 + && wstr != 0) { + if (n < 1) + n = wcslen(wstr); + if (n > 0) { + oy = win->_cury; + ox = win->_curx; + for (cp = wstr; *cp && ((cp - wstr) < n); cp++) { + if (wcwidth(*cp) > 1) { + cchar_t tmp_cchar; + wchar_t tmp_wchar = *cp; + memset(&tmp_cchar, 0, sizeof(tmp_cchar)); + (void) setcchar(&tmp_cchar, + &tmp_wchar, + WA_NORMAL, + 0, + (void *) 0); + _nc_insert_wch(win, &tmp_cchar); + } else { + _nc_insert_ch(win, *cp); /* tabs, other ASCII stuff */ + } + } + + win->_curx = ox; + win->_cury = oy; + _nc_synchook(win); + } code = OK; } returnCode(code); diff --git a/ncurses/base/lib_insstr.c b/ncurses/widechar/lib_pecho_wchar.c similarity index 64% rename from ncurses/base/lib_insstr.c rename to ncurses/widechar/lib_pecho_wchar.c index 347b3561..e6127757 100644 --- a/ncurses/base/lib_insstr.c +++ b/ncurses/widechar/lib_pecho_wchar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -27,57 +27,31 @@ ****************************************************************************/ /**************************************************************************** - * Author: Zeyd M. Ben-Halim 1992,1995 * - * and: Eric S. Raymond * + * Author: Thomas E. Dickey * ****************************************************************************/ -/* -** lib_insstr.c -** -** The routine winsnstr(). -** -*/ - #include -#include -MODULE_ID("$Id: lib_insstr.c,v 1.20 2002/09/28 16:22:34 tom Exp $") +MODULE_ID("$Id: lib_pecho_wchar.c,v 1.1 2004/01/03 21:42:01 tom Exp $") NCURSES_EXPORT(int) -winsnstr(WINDOW *win, const char *s, int n) +pecho_wchar(WINDOW *pad, const cchar_t * wch) { - int code = ERR; - NCURSES_SIZE_T oy; - NCURSES_SIZE_T ox; - const unsigned char *str = (const unsigned char *) s; - const unsigned char *cp; + T((T_CALLED("pecho_wchar(%p, %s)"), pad, _tracech_t(wch))); + + if (pad == 0) + returnCode(ERR); - T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s,n), n)); + if (!(pad->_flags & _ISPAD)) + returnCode(wecho_wchar(pad, wch)); - if (win && str) { - oy = win->_cury; - ox = win->_curx; - for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) { - if (*cp == '\n' || *cp == '\r' || *cp == '\t' || *cp == '\b') { - NCURSES_CH_T wch; - SetChar2(wch, *cp); - _nc_waddch_nosync(win, wch); - } else if (is7bits(*cp) && iscntrl(*cp)) { - winsch(win, ' ' + (chtype) (*cp)); - winsch(win, (chtype) '^'); - win->_curx += 2; - } else { - winsch(win, (chtype) (*cp)); - win->_curx++; - } - if (win->_curx > win->_maxx) - win->_curx = win->_maxx; - } + wadd_wch(pad, wch); + prefresh(pad, pad->_pad._pad_y, + pad->_pad._pad_x, + pad->_pad._pad_top, + pad->_pad._pad_left, + pad->_pad._pad_bottom, + pad->_pad._pad_right); - win->_curx = ox; - win->_cury = oy; - _nc_synchook(win); - code = OK; - } - returnCode(code); + returnCode(OK); } diff --git a/ncurses/widechar/lib_slk_wset.c b/ncurses/widechar/lib_slk_wset.c new file mode 100644 index 00000000..cda5eae3 --- /dev/null +++ b/ncurses/widechar/lib_slk_wset.c @@ -0,0 +1,149 @@ +/**************************************************************************** + * Copyright (c) 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: Thomas E. Dickey, 2003 * + ****************************************************************************/ + +/* + * lib_slk_wset.c + * Set soft label text. + */ +#include + +#ifdef HAVE_WCTYPE_H +#include +#endif + +MODULE_ID("$Id: lib_slk_wset.c,v 1.6 2004/01/03 21:14:03 tom Exp $") + +NCURSES_EXPORT(int) +slk_wset(int i, const wchar_t * astr, int format) +{ + static wchar_t empty[] = + {L'\0'}; + int result = ERR; + SLK *slk = SP->_slk; + int offset; + size_t arglen; + const wchar_t *p; + + T((T_CALLED("slk_wset(%d, %s, %d)"), i, _nc_viswbuf(astr), format)); + + if (astr == 0) + astr = empty; + arglen = wcslen(astr); + while (iswspace(*astr)) { + --arglen; + ++astr; /* skip over leading spaces */ + } + p = astr; + while (iswprint(*p)) + p++; /* The first non-print stops */ + + arglen = (size_t) (p - astr); + + if (slk != NULL && + i >= 1 && + i <= slk->labcnt && + format >= 0 && + format <= 2) { + char *new_text; + size_t n; + size_t used = 0; + int mycols; + mbstate_t state; + + --i; /* Adjust numbering of labels */ + + /* + * Reduce the actual number of columns to fit in the label field. + */ + while (arglen != 0 && wcswidth(astr, arglen) > slk->maxlen) { + --arglen; + } + mycols = wcswidth(astr, arglen); + + /* + * translate the wide-character string to multibyte form. + */ + memset(&state, 0, sizeof(state)); + + if ((new_text = (char *) _nc_doalloc(0, MB_LEN_MAX * arglen)) == 0) + returnCode(ERR); + + for (n = 0; n < arglen; ++n) { + used += wcrtomb(new_text + used, astr[n], &state); + } + new_text[used] = '\0'; + + if (used >= (size_t) (slk->maxlen + 1)) { + if ((slk->ent[i].ent_text = (char *) _nc_doalloc(slk->ent[i].ent_text, + used + 1)) == 0) + returnCode(ERR); + if ((slk->ent[i].form_text = (char *) _nc_doalloc(slk->ent[i].form_text, + used + 1)) == 0) + returnCode(ERR); + } + + (void) strcpy(slk->ent[i].ent_text, new_text); + free(new_text); + + sprintf(slk->ent[i].form_text, "%*s", (size_t) slk->maxlen, " "); + + switch (format) { + default: + case 0: /* left-aligned */ + offset = 0; + break; + case 1: /* centered */ + offset = (slk->maxlen - mycols) / 2; + break; + case 2: /* right-aligned */ + offset = slk->maxlen - mycols; + break; + } + if (offset < 0) + offset = 0; + strcpy(slk->ent[i].form_text + offset, + slk->ent[i].ent_text); + /* + * Pad the display with blanks on the right, unless it is already + * right-aligned. + */ + if (format != 2 && mycols < slk->maxlen) { + sprintf(slk->ent[i].form_text + offset + used, + "%*s", + slk->maxlen - (mycols - offset), + " "); + } + slk->ent[i].dirty = TRUE; + result = OK; + } + returnCode(result); +} diff --git a/ncurses/widechar/lib_unget_wch.c b/ncurses/widechar/lib_unget_wch.c index 7a062fd2..f4d0c518 100644 --- a/ncurses/widechar/lib_unget_wch.c +++ b/ncurses/widechar/lib_unget_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002 Free Software Foundation, Inc. * + * 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 * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_unget_wch.c,v 1.3 2002/06/29 21:11:02 tom Exp $") +MODULE_ID("$Id: lib_unget_wch.c,v 1.5 2003/07/05 19:46:51 tom Exp $") NCURSES_EXPORT(int) unget_wch(const wchar_t wch) @@ -49,25 +49,29 @@ unget_wch(const wchar_t wch) size_t length; int n; - T((T_CALLED("unget_wch(%#lx)"), wch)); + T((T_CALLED("unget_wch(%#lx)"), (unsigned long) wch)); memset(&state, 0, sizeof(state)); length = wcrtomb(0, wch, &state); if (length != (size_t) (-1) && length != 0) { - char *string = malloc(length); + char *string; - memset(&state, 0, sizeof(state)); - wcrtomb(string, wch, &state); + if ((string = (char *) malloc(length)) != 0) { + memset(&state, 0, sizeof(state)); + wcrtomb(string, wch, &state); - for (n = (int) (length - 1); n >= 0; --n) { - if (ungetch(string[n]) != OK) { - result = ERR; - break; + for (n = (int) (length - 1); n >= 0; --n) { + if (ungetch(string[n]) != OK) { + result = ERR; + break; + } } + free(string); + } else { + result = ERR; } - free(string); } else { result = ERR; } diff --git a/ncurses/widechar/lib_wacs.c b/ncurses/widechar/lib_wacs.c index 4f8a3f6e..c956cfdb 100644 --- a/ncurses/widechar/lib_wacs.c +++ b/ncurses/widechar/lib_wacs.c @@ -33,23 +33,10 @@ #include #include -MODULE_ID("$Id: lib_wacs.c,v 1.5 2002/08/31 19:44:17 tom Exp $") +MODULE_ID("$Id: lib_wacs.c,v 1.6 2002/12/21 12:30:19 tom Exp $") NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0; -static int -_nc_unicode_locale(void) -{ - char *s; - if (((s = getenv("LC_ALL")) != 0 && *s != '\0') - || ((s = getenv("LC_ALL")) != 0 && *s != '\0') - || ((s = getenv("LC_ALL")) != 0 && *s != '\0')) { - if (strstr(s, ".UTF-8") != 0) - return 1; - } - return 0; -} - NCURSES_EXPORT(void) _nc_init_wacs(void) { diff --git a/ncurses/widechar/lib_wunctrl.c b/ncurses/widechar/lib_wunctrl.c index f4887d12..89430e56 100644 --- a/ncurses/widechar/lib_wunctrl.c +++ b/ncurses/widechar/lib_wunctrl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001 Free Software Foundation, Inc. * + * Copyright (c) 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 * @@ -37,7 +37,7 @@ #if USE_WIDEC_SUPPORT -MODULE_ID("$Id: lib_wunctrl.c,v 1.6 2001/09/22 19:18:02 tom Exp $") +MODULE_ID("$Id: lib_wunctrl.c,v 1.7 2003/07/05 17:01:43 tom Exp $") NCURSES_EXPORT(wchar_t *) wunctrl(cchar_t * wc) @@ -46,8 +46,8 @@ wunctrl(cchar_t * wc) if (Charable(*wc)) { const char *p; - for (p = unctrl(wctob(CharOf(*wc))), sp = str; *p;) - *sp++ = btowc(*p++); + for (p = unctrl(_nc_to_char(CharOf(*wc))), sp = str; *p;) + *sp++ = _nc_to_widechar(*p++); return str; } else return wc->chars; diff --git a/panel/Makefile.in b/panel/Makefile.in index c3592526..e796c400 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.41 2002/01/20 00:41:18 tom Exp $ +# $Id: Makefile.in,v 1.46 2003/11/01 22:44:33 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997 +# Author: Thomas E. Dickey 1996-2002 # # Makefile for panels source code. # @@ -45,6 +45,9 @@ SHELL = /bin/sh THIS = Makefile +x = @EXEEXT@ +o = .@OBJEXT@ + MODEL = @DFT_LWR_MODEL@ DESTDIR = @DESTDIR@ srcdir = @srcdir@ @@ -56,6 +59,11 @@ includedir = @includedir@ datadir = @datadir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ @@ -72,8 +80,7 @@ CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -I@top_srcdir@/ncurses \ - -DHAVE_CONFIG_H +CPPFLAGS = -I@top_srcdir@/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -85,7 +92,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL) $(CC) +LINK = $(LIBTOOL_LINK) $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -98,7 +105,7 @@ NCURSES_MINOR = @NCURSES_MINOR@ REL_VERSION = @cf_cv_rel_version@ ABI_VERSION = @cf_cv_abi_version@ -RANLIB = @RANLIB@ +RANLIB = @LIB_PREP@ IMPORT_LIB = @IMPORT_LIB@ SHARED_LIB = @SHARED_LIB@ diff --git a/progs/MKtermsort.sh b/progs/MKtermsort.sh index 7f5b79a8..18b90ac2 100755 --- a/progs/MKtermsort.sh +++ b/progs/MKtermsort.sh @@ -1,10 +1,10 @@ #!/bin/sh -# $Id: MKtermsort.sh,v 1.8 2002/06/29 20:02:48 tom Exp $ +# $Id: MKtermsort.sh,v 1.9 2003/01/11 22:23:50 tom Exp $ # # MKtermsort.sh -- generate indirection vectors for the various sort methods # ############################################################################## -# Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. # +# 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"), # @@ -47,7 +47,7 @@ DATA=${2-../include/Caps} data=data$$ trap 'rm -f $data' 1 2 5 15 -sed -e 's/[ ]\+/ /g' < $DATA >$data +sed -e 's/[ ][ ]*/ /g' < $DATA >$data DATA=$data echo "/*"; diff --git a/progs/Makefile.in b/progs/Makefile.in index 43b85c43..c40cd00c 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.56 2001/12/08 18:48:01 tom Exp $ +# $Id: Makefile.in,v 1.62 2003/11/01 22:45:57 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997 +# Author: Thomas E. Dickey 1996-2003 # # Makefile for ncurses source code. # @@ -47,7 +47,9 @@ THIS = Makefile CF_MFLAGS = @cf_cv_makeflags@ @SET_MAKE@ -x = @PROG_EXT@ + +x = @EXEEXT@ +o = .@OBJEXT@ MODEL = ../@DFT_OBJ_SUBDIR@ DESTDIR = @DESTDIR@ @@ -60,6 +62,11 @@ includedir = @includedir@ datadir = @datadir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -73,8 +80,7 @@ CPP = @CPP@ CFLAGS = @CFLAGS@ INCDIR = $(srcdir)/../include -CPPFLAGS = -I../progs -I$(srcdir) @CPPFLAGS@ \ - -DHAVE_CONFIG_H +CPPFLAGS = -I../progs -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -87,15 +93,15 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) LD = @LD@ -LINK = @LINK_PROGS@ $(LIBTOOL) $(CC) +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC) LDFLAGS = @EXTRA_LDFLAGS@ \ @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ -LDFLAGS_LIBTOOL = $(LDFLAGS) -LDFLAGS_NORMAL = $(LDFLAGS) -LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ -LDFLAGS_PROFILE = $(LDFLAGS) -pg -LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@ +LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) +LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) +LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) +LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) +LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) @@ -150,31 +156,31 @@ transform.h : echo "#define PROG_INIT \"$(actual_init)\"" >>$@ install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir) -@MAKE_TERMINFO@ $(LIBTOOL) $(INSTALL_PROGRAM) tic$x $(DESTDIR)$(bindir)/$(actual_tic) -@MAKE_TERMINFO@ $(LIBTOOL) $(INSTALL_PROGRAM) toe$x $(DESTDIR)$(bindir)/$(actual_toe) +@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tic$x $(DESTDIR)$(bindir)/$(actual_tic) +@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) toe$x $(DESTDIR)$(bindir)/$(actual_toe) @MAKE_TERMINFO@ @echo "linking $(actual_infotocap) to $(actual_tic)" @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap)) @MAKE_TERMINFO@ @echo "linking $(actual_captoinfo) to $(actual_tic)" @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) @MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo)) - $(LIBTOOL) $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp) - $(LIBTOOL) $(INSTALL_PROGRAM) clear$x $(DESTDIR)$(bindir)/$(actual_clear) - $(LIBTOOL) $(INSTALL_PROGRAM) tput$x $(DESTDIR)$(bindir)/$(actual_tput) - $(LIBTOOL) $(INSTALL_PROGRAM) tset$x $(DESTDIR)$(bindir)/$(actual_tset) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) clear$x $(DESTDIR)$(bindir)/$(actual_clear) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tput$x $(DESTDIR)$(bindir)/$(actual_tput) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tset$x $(DESTDIR)$(bindir)/$(actual_tset) @echo "linking $(actual_reset) to $(actual_tset)" -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset)) uninstall.progs: -@MAKE_TERMINFO@ -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tic) -@MAKE_TERMINFO@ -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_toe) +@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tic) +@MAKE_TERMINFO@ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_toe) @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo) @MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap) - -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp) - -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_clear) - -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tput) - -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tset) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput) + -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset) -@rm -f $(DESTDIR)$(bindir)/$(actual_reset) $(DESTDIR)$(bindir) : @@ -185,47 +191,47 @@ $(DESTDIR)$(bindir) : # DEPS_TIC = \ - $(MODEL)/tic.o \ - $(MODEL)/dump_entry.o + $(MODEL)/tic$o \ + $(MODEL)/dump_entry$o tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@ DEPS_TOE = \ - $(MODEL)/toe.o \ - $(MODEL)/dump_entry.o + $(MODEL)/toe$o \ + $(MODEL)/dump_entry$o toe$x: $(DEPS_TOE) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@ DEPS_CLEAR = \ - $(MODEL)/clear.o + $(MODEL)/clear$o clear$x: $(DEPS_CLEAR) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@ DEPS_TPUT = \ - $(MODEL)/tput.o + $(MODEL)/tput$o tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@ DEPS_INFOCMP = \ - $(MODEL)/infocmp.o \ - $(MODEL)/dump_entry.o + $(MODEL)/infocmp$o \ + $(MODEL)/dump_entry$o infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@ DEPS_TSET = \ - $(MODEL)/tset.o \ - $(MODEL)/dump_entry.o + $(MODEL)/tset$o \ + $(MODEL)/dump_entry$o tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@ termsort.c: $(srcdir)/MKtermsort.sh - sh -c "$(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@" >$@ + sh $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@ # # Utility productions start here @@ -242,6 +248,7 @@ mostlyclean :: -rm -f $(TESTPROGS) clean :: mostlyclean + -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" -rm -f $(AUTO_SRC) -rm -f $(PROGS) -rm -rf .libs diff --git a/progs/dump_entry.c b/progs/dump_entry.c index b8d82b77..48ef4881 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.64 2002/09/01 17:54:43 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.66 2003/05/24 22:43:59 tom Exp $") #define INDENT 8 #define DISCARD(string) string = ABSENT_STRING @@ -913,15 +913,23 @@ dump_entry(TERMTYPE * tterm, */ char *oldsgr = set_attributes; char *oldacsc = acs_chars; - set_attributes = ABSENT_STRING; - SHOW_WHY("# (sgr removed to fit entry within %d bytes)\n", - critlen); - if ((len = FMT_ENTRY()) > critlen) { - acs_chars = ABSENT_STRING; - SHOW_WHY("# (acsc removed to fit entry within %d bytes)\n", + bool changed = FALSE; + + if (VALID_STRING(set_attributes)) { + set_attributes = ABSENT_STRING; + SHOW_WHY("# (sgr removed to fit entry within %d bytes)\n", critlen); + changed = TRUE; + } + if (!changed || ((len = FMT_ENTRY()) > critlen)) { + if (VALID_STRING(acs_chars)) { + acs_chars = ABSENT_STRING; + SHOW_WHY("# (acsc removed to fit entry within %d bytes)\n", + critlen); + changed = TRUE; + } } - if ((len = FMT_ENTRY()) > critlen) { + if (!changed || ((len = FMT_ENTRY()) > critlen)) { int oldversion = tversion; tversion = V_BSD; diff --git a/progs/infocmp.c b/progs/infocmp.c index 5d80511c..e5751fb4 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: infocmp.c,v 1.68 2002/10/06 01:13:04 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.71 2003/10/18 18:01:54 tom Exp $") #define L_CURL "{" #define R_CURL "}" @@ -120,7 +120,7 @@ canonical_name(char *ptr, char *buf) ***************************************************************************/ static int -capcmp(int idx, const char *s, const char *t) +capcmp(unsigned idx, const char *s, const char *t) /* capability comparison function */ { if (!VALID_STRING(s) && !VALID_STRING(t)) @@ -248,7 +248,7 @@ static bool entryeq(TERMTYPE * t1, TERMTYPE * t2) /* are two entries equivalent? */ { - int i; + unsigned i; for (i = 0; i < NUM_BOOLEANS(t1); i++) if (t1->Booleans[i] != t2->Booleans[i]) @@ -268,7 +268,7 @@ entryeq(TERMTYPE * t1, TERMTYPE * t2) #define TIC_EXPAND(result) _nc_tic_expand(result, outform==F_TERMINFO, numbers) static void -print_uses(ENTRY * ep, FILE * fp) +print_uses(ENTRY * ep, FILE *fp) /* print an entry's use references */ { int i; @@ -739,7 +739,7 @@ file_comparison(int argc, char *argv[]) (void) fputc('\n', stderr); } } - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } heads[filecount] = _nc_head; @@ -936,7 +936,7 @@ usage(void) else fprintf(stderr, "%s\n", tbl[n]); } - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } static char * @@ -975,7 +975,7 @@ string_variable(const char *type) static void dump_initializers(TERMTYPE * term) { - int n; + unsigned n; int size; const char *str = 0; @@ -1145,11 +1145,24 @@ optarg_to_number(void) if (temp == 0 || temp == optarg || *temp != 0) { fprintf(stderr, "Expected a number, not \"%s\"\n", optarg); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } return (int) value; } +static char * +terminal_env(void) +{ + char *terminal; + + if ((terminal = getenv("TERM")) == 0) { + (void) fprintf(stderr, + "infocmp: environment variable TERM not set\n"); + exit(EXIT_FAILURE); + } + return terminal; +} + /*************************************************************************** * * Main sequence @@ -1159,7 +1172,7 @@ optarg_to_number(void) int main(int argc, char *argv[]) { - char *terminal, *firstdir, *restdir; + char *firstdir, *restdir; /* Avoid "local data >32k" error with mwcc */ /* Also avoid overflowing smaller stacks on systems like AmigaOS */ path *tfile = (path *) malloc(sizeof(path) * MAXTERMS); @@ -1170,12 +1183,6 @@ main(int argc, char *argv[]) bool init_analyze = FALSE; bool suppress_untranslatable = FALSE; - if ((terminal = getenv("TERM")) == 0) { - (void) fprintf(stderr, - "infocmp: environment variable TERM not set\n"); - return EXIT_FAILURE; - } - /* where is the terminfo database location going to default to? */ restdir = firstdir = 0; @@ -1342,11 +1349,11 @@ main(int argc, char *argv[]) /* make sure we have at least one terminal name to work with */ if (optind >= argc) - argv[argc++] = terminal; + argv[argc++] = terminal_env(); /* if user is after a comparison, make sure we have two entries */ if (compare != C_DEFAULT && optind >= argc - 1) - argv[argc++] = terminal; + argv[argc++] = terminal_env(); /* exactly two terminal names with no options means do -d */ if (argc - optind == 2 && compare == C_DEFAULT) diff --git a/progs/tic.c b/progs/tic.c index 594474de..6312b5c6 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -45,7 +45,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.102 2002/10/05 19:59:41 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.109 2003/12/06 17:36:57 tom Exp $") const char *_nc_progname = "tic"; @@ -58,7 +58,7 @@ static int tparm_errs; static void (*save_check_termtype) (TERMTYPE *); static void check_termtype(TERMTYPE * tt); -static const char usage_string[] = "[-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n"; +static const char usage_string[] = "[-V] [-v[n]] [-e names] [-o dir] [-R name] [-CILNTcfrswx1] source-file\n"; static void cleanup(void) @@ -79,7 +79,7 @@ failed(const char *msg) { perror(msg); cleanup(); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } static void @@ -126,7 +126,7 @@ usage(void) fputs(tbl[j], stderr); putc('\n', stderr); } - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } #define L_BRACE '{' @@ -300,7 +300,7 @@ stripped(char *src) while (isspace(UChar(*src))) src++; if (*src != '\0') { - char *dst = strcpy(malloc(strlen(src) + 1), src); + char *dst = strcpy((char *) malloc(strlen(src) + 1), src); size_t len = strlen(dst); while (--len != 0 && isspace(UChar(dst[len]))) dst[len] = '\0'; @@ -317,12 +317,12 @@ open_input(const char *filename) if (fp == 0) { fprintf(stderr, "%s: Can't open %s\n", _nc_progname, filename); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } if (fstat(fileno(fp), &sb) < 0 || (sb.st_mode & S_IFMT) != S_IFREG) { fprintf(stderr, "%s: %s is not a file\n", _nc_progname, filename); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } return fp; } @@ -768,6 +768,216 @@ TERMINAL *cur_term; /* tweak to avoid linking lib_cur_term.c */ #undef CUR #define CUR tp-> +/* + * Check if the alternate character-set capabilities are consistent. + */ +static void +check_acs(TERMTYPE * tp) +{ + if (VALID_STRING(acs_chars)) { + const char *boxes = "lmkjtuvwqxn"; + char mapped[256]; + char missing[256]; + const char *p; + char *q; + + memset(mapped, 0, sizeof(mapped)); + for (p = acs_chars; *p != '\0'; p += 2) { + if (p[1] == '\0') { + _nc_warning("acsc has odd number of characters"); + break; + } + mapped[UChar(p[0])] = p[1]; + } + if (mapped[UChar('I')] && !mapped[UChar('i')]) { + _nc_warning("acsc refers to 'I', which is probably an error"); + } + for (p = boxes, q = missing; *p != '\0'; ++p) { + if (!mapped[UChar(p[0])]) { + *q++ = p[0]; + } + *q = '\0'; + } + if (*missing != '\0' && strcmp(missing, boxes)) { + _nc_warning("acsc is missing some line-drawing mapping: %s", missing); + } + } +} + +/* + * Check if the color capabilities are consistent + */ +static void +check_colors(TERMTYPE * tp) +{ + if ((max_colors > 0) != (max_pairs > 0) + || ((max_colors > max_pairs) && (initialize_pair == 0))) + _nc_warning("inconsistent values for max_colors (%d) and max_pairs (%d)", + max_colors, max_pairs); + + PAIRED(set_foreground, set_background); + PAIRED(set_a_foreground, set_a_background); + PAIRED(set_color_pair, initialize_pair); + + if (VALID_STRING(set_foreground) + && VALID_STRING(set_a_foreground) + && !strcmp(set_foreground, set_a_foreground)) + _nc_warning("expected setf/setaf to be different"); + + if (VALID_STRING(set_background) + && VALID_STRING(set_a_background) + && !strcmp(set_background, set_a_background)) + _nc_warning("expected setb/setab to be different"); + + /* see: has_colors() */ + if (VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs) + && (((set_foreground != NULL) + && (set_background != NULL)) + || ((set_a_foreground != NULL) + && (set_a_background != NULL)) + || set_color_pair)) { + if (!VALID_STRING(orig_pair) && !VALID_STRING(orig_colors)) + _nc_warning("expected either op/oc string for resetting colors"); + } +} + +static int +keypad_final(const char *string) +{ + int result = '\0'; + + if (VALID_STRING(string) + && *string++ == '\033' + && *string++ == 'O' + && strlen(string) == 1) { + result = *string; + } + + return result; +} + +static int +keypad_index(const char *string) +{ + char *test; + const char *list = "PQRSwxymtuvlqrsPpn"; /* app-keypad except "Enter" */ + int ch; + int result = -1; + + if ((ch = keypad_final(string)) != '\0') { + test = strchr(list, ch); + if (test != 0) + result = (test - list); + } + return result; +} + +/* + * Do a quick sanity-check for vt100-style keypads to see if the 5-key keypad + * is mapped inconsistently. + */ +static void +check_keypad(TERMTYPE * tp) +{ + char show[80]; + + if (VALID_STRING(key_a1) && + VALID_STRING(key_a3) && + VALID_STRING(key_b2) && + VALID_STRING(key_c1) && + VALID_STRING(key_c3)) { + char final[6]; + int list[5]; + int increase = 0; + int j, k, kk; + int last; + int test; + + final[0] = keypad_final(key_a1); + final[1] = keypad_final(key_a3); + final[2] = keypad_final(key_b2); + final[3] = keypad_final(key_c1); + final[4] = keypad_final(key_c3); + final[5] = '\0'; + + /* special case: legacy coding using 1,2,3,0,. on the bottom */ + if (!strcmp(final, "qsrpn")) + return; + + list[0] = keypad_index(key_a1); + list[1] = keypad_index(key_a3); + list[2] = keypad_index(key_b2); + list[3] = keypad_index(key_c1); + list[4] = keypad_index(key_c3); + + /* check that they're all vt100 keys */ + for (j = 0; j < 5; ++j) { + if (list[j] < 0) { + return; + } + } + + /* check if they're all in increasing order */ + for (j = 1; j < 5; ++j) { + if (list[j] > list[j - 1]) { + ++increase; + } + } + if (increase != 4) { + show[0] = '\0'; + + for (j = 0, last = -1; j < 5; ++j) { + for (k = 0, kk = -1, test = 100; k < 5; ++k) { + if (list[k] > last && + list[k] < test) { + test = list[k]; + kk = k; + } + } + last = test; + switch (kk) { + case 0: + strcat(show, " ka1"); + break; + case 1: + strcat(show, " ka3"); + break; + case 2: + strcat(show, " kb2"); + break; + case 3: + strcat(show, " kc1"); + break; + case 4: + strcat(show, " kc3"); + break; + } + } + + _nc_warning("vt100 keypad order inconsistent: %s", show); + } + + } else if (VALID_STRING(key_a1) || + VALID_STRING(key_a3) || + VALID_STRING(key_b2) || + VALID_STRING(key_c1) || + VALID_STRING(key_c3)) { + show[0] = '\0'; + if (keypad_index(key_a1) >= 0) + strcat(show, " ka1"); + if (keypad_index(key_a3) >= 0) + strcat(show, " ka3"); + if (keypad_index(key_b2) >= 0) + strcat(show, " kb2"); + if (keypad_index(key_c1) >= 0) + strcat(show, " kc1"); + if (keypad_index(key_c3) >= 0) + strcat(show, " kc3"); + if (*show != '\0') + _nc_warning("vt100 keypad map incomplete:%s", show); + } +} + /* * Returns the expected number of parameters for the given capability. */ @@ -1076,17 +1286,9 @@ check_termtype(TERMTYPE * tp) check_params(tp, ExtStrname(tp, j, strnames), a); } - /* - * Quick check for color. We could also check if the ANSI versus - * non-ANSI strings are misused. - */ - if ((max_colors > 0) != (max_pairs > 0) - || ((max_colors > max_pairs) && (initialize_pair == 0))) - _nc_warning("inconsistent values for max_colors (%d) and max_pairs (%d)", - max_colors, max_pairs); - - PAIRED(set_foreground, set_background); - PAIRED(set_a_foreground, set_a_background); + check_acs(tp); + check_colors(tp); + check_keypad(tp); /* * These may be mismatched because the terminal description relies on diff --git a/progs/tput.c b/progs/tput.c index 3e09eab2..70b762f7 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. * + * 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 * @@ -45,7 +45,7 @@ #endif #include -MODULE_ID("$Id: tput.c,v 1.31 2002/07/20 19:09:47 tom Exp $") +MODULE_ID("$Id: tput.c,v 1.34 2004/01/16 23:23:11 Daniel.Jacobowitz Exp $") #define PUTS(s) fputs(s, stdout) #define PUTCHAR(c) putchar(c) @@ -67,17 +67,18 @@ quit(int status, const char *fmt,...) va_list argp; va_start(argp, fmt); + fprintf(stderr, "%s: ", prg_name); vfprintf(stderr, fmt, argp); fprintf(stderr, "\n"); va_end(argp); - exit(status); + ExitProgram(status); } static void usage(void) { fprintf(stderr, "usage: %s [-V] [-S] [-T term] capname\n", prg_name); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); } static void @@ -292,13 +293,15 @@ tput(int argc, char *argv[]) (void) printf("%d\n", status); return exit_code(NUMBER, 0); } else if ((s = tigetstr(name)) == CANCELLED_STRING) { - quit(4, "%s: unknown terminfo capability '%s'", prg_name, name); + quit(4, "unknown terminfo capability '%s'", name); } else if (s != ABSENT_STRING) { token = STRING; if (argc > 1) { int k; - int numbers[10]; - char *strings[10]; + int popcount; + long numbers[1 + NUM_PARM]; + char *strings[1 + NUM_PARM]; + char *p_is_s[NUM_PARM]; /* Nasty hack time. The tparm function needs to see numeric * parameters as numbers, not as pointers to their string @@ -312,7 +315,7 @@ tput(int argc, char *argv[]) if (tmp == 0 || *tmp != 0) numbers[k] = 0; } - for (k = argc; k <= 9; k++) { + for (k = argc; k <= NUM_PARM; k++) { numbers[k] = 0; strings[k] = 0; } @@ -325,10 +328,18 @@ tput(int argc, char *argv[]) s = tparm(s, numbers[1], strings[2], strings[3]); break; default: + (void) _nc_tparm_analyze(s, p_is_s, &popcount); +#define myParam(n) (p_is_s[n - 1] != 0 ? ((long) strings[n]) : numbers[n]) s = tparm(s, - numbers[1], numbers[2], numbers[3], - numbers[4], numbers[5], numbers[6], - numbers[7], numbers[8], numbers[9]); + myParam(1), + myParam(2), + myParam(3), + myParam(4), + myParam(5), + myParam(6), + myParam(7), + myParam(8), + myParam(9)); break; } } diff --git a/progs/tset.c b/progs/tset.c index 03c8ffde..f67931f0 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -103,7 +103,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 0.53 2002/08/24 23:18:16 tom Exp $") +MODULE_ID("$Id: tset.c,v 0.56 2003/12/06 17:21:01 tom Exp $") extern char **environ; @@ -142,7 +142,7 @@ exit_error(void) SET_TTY(STDERR_FILENO, &original); (void) fprintf(stderr, "\n"); fflush(stderr); - exit(EXIT_FAILURE); + ExitProgram(EXIT_FAILURE); /* NOTREACHED */ } @@ -350,7 +350,7 @@ add_mapping(const char *port, char *arg) char *base = 0; copy = strdup(arg); - mapp = malloc(sizeof(MAP)); + mapp = (MAP *) malloc(sizeof(MAP)); if (copy == 0 || mapp == 0) failed("malloc"); mapp->next = 0; @@ -627,8 +627,10 @@ get_termcap_entry(char *userarg) **************************************************************************/ /* some BSD systems have these built in, some systems are missing - * one or more definitions. The safest solution is to override. + * one or more definitions. The safest solution is to override unless the + * commonly-altered ones are defined. */ +#if !(defined(CERASE) && defined(CINTR) && defined(CKILL) && defined(CQUIT)) #undef CEOF #undef CERASE #undef CINTR @@ -639,18 +641,39 @@ get_termcap_entry(char *userarg) #undef CSTART #undef CSTOP #undef CSUSP +#endif /* control-character defaults */ +#ifndef CEOF #define CEOF CTRL('D') +#endif +#ifndef CERASE #define CERASE CTRL('H') +#endif +#ifndef CINTR #define CINTR 127 /* ^? */ +#endif +#ifndef CKILL #define CKILL CTRL('U') +#endif +#ifndef CLNEXT #define CLNEXT CTRL('v') +#endif +#ifndef CRPRNT #define CRPRNT CTRL('r') +#endif +#ifndef CQUIT #define CQUIT CTRL('\\') +#endif +#ifndef CSTART #define CSTART CTRL('Q') +#endif +#ifndef CSTOP #define CSTOP CTRL('S') +#endif +#ifndef CSUSP #define CSUSP CTRL('Z') +#endif #define CHK(val, dft) ((int)val <= 0 ? dft : val) @@ -1183,8 +1206,8 @@ main(int argc, char **argv) #ifdef TERMIOS if (!quiet) { report("Erase", VERASE, CERASE); - report("Kill", VKILL, CINTR); - report("Interrupt", VINTR, CKILL); + report("Kill", VKILL, CKILL); + report("Interrupt", VINTR, CINTR); } #endif } @@ -1193,12 +1216,14 @@ main(int argc, char **argv) err("The -S option is not supported under terminfo."); if (sflag) { + int len; /* * Figure out what shell we're using. A hack, we look for an * environmental variable SHELL ending in "csh". */ if ((p = getenv("SHELL")) != 0 - && !strcmp(p + strlen(p) - 3, "csh")) + && (len = strlen(p)) >= 3 + && !strcmp(p + len - 3, "csh")) p = "set noglob;\nsetenv TERM %s;\nunset noglob;\n"; else p = "TERM=%s;\n"; @@ -1207,5 +1232,3 @@ main(int argc, char **argv) return EXIT_SUCCESS; } - -/* tset.c ends here */ diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile deleted file mode 100644 index 9489c19f..00000000 --- a/sysdeps/unix/sysv/linux/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -ifeq ($(subdir),ncurses) - -CPPFLAGS += -DNDEBUG -DHAVE_CONFIG_H - -edit_man-sed = sysdeps/unix/sysv/linux/edit_man.sed -edit_man-sh = sysdeps/unix/sysv/linux/edit_man.sh - -run_tic-sh = sysdeps/unix/sysv/linux/run_tic.sh - -endif diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure deleted file mode 100755 index 6fa25190..00000000 --- a/sysdeps/unix/sysv/linux/alpha/configure +++ /dev/null @@ -1,2 +0,0 @@ -# Alpha uses long as bool. -nc_cv_type_of_bool=long diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure deleted file mode 100755 index e83e0806..00000000 --- a/sysdeps/unix/sysv/linux/configure +++ /dev/null @@ -1,407 +0,0 @@ -# Local configure fragment for ncurses/sysdeps/unix/sysv/linux. - -nc_given_srcdir=${srcdir}/ncurses - -NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $nc_given_srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" -NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $nc_given_srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" -NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $nc_given_srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" -cf_cv_abi_version=${NCURSES_MAJOR} -cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} - -# Default to char -if [ x${cf_cv_type_of_bool} = x ] -then - cf_cv_type_of_bool=char -fi - -rm -f ncurses/MKterm.h.awk \ - ncurses/codes.c \ - ncurses/comp_captab.c \ - ncurses/confdefs.h \ - ncurses/config.log \ - ncurses/curses.h \ - ncurses/expanded.c \ - ncurses/fallback.c \ - ncurses/hashsize.h \ - ncurses/init_keytry.h \ - ncurses/lib_gen.c \ - ncurses/lib_keyname.c \ - ncurses/names.c \ - ncurses/ncurses_cfg.h \ - ncurses/nomacros.h \ - ncurses/parametrized.h \ - ncurses/term.h \ - ncurses/termcap.h \ - ncurses/terminfo.5 \ - ncurses/termsort.c \ - ncurses/unctrl.c \ - ncurses/unctrl.h - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <%g -s%@cf_cv_rel_version@%$cf_cv_rel_version%g -s%@cf_cv_abi_version@%$cf_cv_abi_version%g -s%@cf_cv_builtin_bool@%1%g -s%@cf_cv_type_of_bool@%$cf_cv_type_of_bool%g -s%@cf_cv_shift_limit@%32%g -s%@cf_cv_widec_shift@%8%g -s%@cf_cv_typeof_chtype@%long%g -s%@cf_cv_1UL@%1UL%g -s%@cf_cv_cc_bool_type@%0%g - -EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -nc_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -nc_file=1 # Number of current file. -nc_beg=1 # First line for current file. -nc_end=$nc_max_sed_cmds # Line after last line for current file. -nc_more_lines=: -nc_sed_cmds="" -while $nc_more_lines; do - if test $nc_beg -gt 1; then - sed "1,${nc_beg}d; ${nc_end}q" conftest.subs > conftest.s$nc_file - else - sed "${nc_end}q" conftest.subs > conftest.s$nc_file - fi - if test ! -s conftest.s$nc_file; then - nc_more_lines=false - rm -f conftest.s$nc_file - else - if test -z "$nc_sed_cmds"; then - nc_sed_cmds="sed -f conftest.s$nc_file" - else - nc_sed_cmds="$nc_sed_cmds | sed -f conftest.s$nc_file" - fi - nc_file=`expr $nc_file + 1` - nc_beg=$nc_end - nc_end=`expr $nc_end + $nc_max_sed_cmds` - fi -done -if test -z "$nc_sed_cmds"; then - nc_sed_cmds=cat -fi - -NC_CONFIG_FILES=${NC_CONFIG_FILES-"ncurses/MKterm.h.awk ncurses/curses.h ncurses/termcap.h ncurses/unctrl.h"} -for nc_file in .. $NC_CONFIG_FILES; do if test "x$nc_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$nc_file" in - *:*) nc_file_in=`echo "$nc_file"|sed 's%[^:]*:%%'` - nc_file=`echo "$nc_file"|sed 's%:.*%%'` ;; - *) nc_file_in=`echo "${nc_file}" | sed 's%ncurses%include%'`.in ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - nc_dir=`echo $nc_file|sed 's%/[^/][^/]*$%%'` - if test "$nc_dir" != "$nc_file" && test "$nc_dir" != .; then - # The file is in a subdirectory. - test ! -d "$nc_dir" && mkdir "$nc_dir" - nc_dir_suffix="/`echo $nc_dir|sed 's%^\./%%'`" - # A "../" for each directory in $nc_dir_suffix. - nc_dots=`echo $nc_dir_suffix|sed 's%/[^/]*%../%g'` - else - nc_dir_suffix= nc_dots= - fi - - case "$nc_given_srcdir" in - .) nc_srcdir=. - if test -z "$nc_dots"; then nc_top_srcdir=. - else nc_top_srcdir=`echo $nc_dots|sed 's%/$%%'`; fi ;; - /*) nc_srcdir="$nc_given_srcdir$nc_dir_suffix"; nc_top_srcdir="$nc_given_srcdir" ;; - *) # Relative path. - nc_srcdir="$nc_dots$nc_given_srcdir$nc_dir_suffix" - nc_top_srcdir="$nc_dots$nc_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) NC_INSTALL="$ac_given_INSTALL" ;; - *) NC_INSTALL="$nc_dots$ac_given_INSTALL" ;; - esac - - echo creating "$nc_file" - rm -f "$nc_file" - configure_input="Generated automatically from `echo $nc_file_in|sed 's%.*/%%'` by configure." - case "$nc_file" in - *Makefile*) nc_comsub="1i\\ -# $configure_input" ;; - *) nc_comsub= ;; - esac - - nc_file_inputs=`echo $nc_file_in|sed -e "s%^%$nc_given_srcdir/%" -e "s%:% $nc_given_srcdir/%g"` - sed -e "$nc_comsub -s%@configure_input@%$configure_input%g -s%@nc_srcdir@%$nc_srcdir%g -s%@nc_top_srcdir@%$nc_top_srcdir%g -s%@INSTALL@%$NC_INSTALL%g -" $nc_file_inputs | (eval "$nc_sed_cmds") > $nc_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# nc_d sets the value in "#define NAME VALUE" lines. -nc_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -nc_dB='\([ ][ ]*\)[^ ]*%\1#\2' -nc_dC='\3' -nc_dD='%g' -# nc_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -nc_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -nc_uB='\([ ]\)%\1#\2define\3' -nc_uC=' ' -nc_uD='\4%g' -# nc_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -nc_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -nc_eB='$%\1#\2define\3' -nc_eC=' ' -nc_eD='%g' - -NC_CONFIG_HEADERS="ncurses/ncurses_cfg.h:include/ncurses_cfg.hin" -for nc_file in .. $NC_CONFIG_HEADERS; do if test "x$nc_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$nc_file" in - *:*) nc_file_in=`echo "$nc_file"|sed 's%[^:]*:%%'` - nc_file=`echo "$nc_file"|sed 's%:.*%%'` ;; - *) nc_file_in="${nc_file}.in" ;; - esac - - echo creating $nc_file - - rm -f conftest.frag conftest.in conftest.out - nc_file_inputs=`echo $nc_file_in|sed -e "s%^%$nc_given_srcdir/%" -e "s%:% $nc_given_srcdir/%g"` - cat $nc_file_inputs > conftest.in - - rm -f conftest.frag - cat >> conftest.frag <> conftest.frag <> conftest.frag <> conftest.frag <> conftest.frag <> conftest.frag <> conftest.edit < conftest.out -rm -f conftest.in -mv conftest.out conftest.in -rm -f conftest.edit conftest.frag - - rm -f conftest.frag conftest.h - echo "/* $nc_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $nc_file conftest.h 2>/dev/null; then - echo "$nc_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - nc_dir=`echo $nc_file|sed 's%/[^/][^/]*$%%'` - if test "$nc_dir" != "$nc_file" && test "$nc_dir" != .; then - # The file is in a subdirectory. - test ! -d "$nc_dir" && mkdir "$nc_dir" - fi - rm -f $nc_file - mv conftest.h $nc_file - fi -fi; done - - -SYS_NAME=`uname -a` -if test -z "$SYS_NAME"; then SYS_NAME=unknown;fi - -NC_AWK=awk -BUILD_CC=${BUILD_CC-gcc} -NC_CC="${BUILD_CC} -I${nc_given_srcdir}/ncurses -Incurses -I${nc_given_srcdir}/include" -NC_CPP="${NC_CC} -E" -CF_LIST_MODELS="normal" -#WITH_ECHO="yes" -#WITH_OVERWRITE="yes" -nc_cxx_library="yes" -cf_cv_systype="Linux" -cf_cv_rel_version="4.2" -cf_cv_abi_version="4" -cf_cv_do_symlinks="yes" -cf_cv_rm_so_locs="no" - - -rm -f headers.sed headers.sh - -echo creating headers.sh -cat >headers.sh </<\$END\/\$NAME>/" >> ../headers.sed - done - fi - rm -f \$TMP - sed -f ../headers.sed \$SRC > \$TMP - eval \$PRG \$TMP \$DST - rm -f \$TMP - ;; -*) - eval \$PRG \$SRC \$DST - ;; -esac -NC_EOF - -chmod 0755 headers.sh - -echo creating ncurses/term.h -${NC_AWK} -f ncurses/MKterm.h.awk ${nc_given_srcdir}/include/Caps > ncurses/term.h -sh ${nc_given_srcdir}/include/edit_cfg.sh ncurses/ncurses_cfg.h ncurses/term.h - -echo creating ncurses/hashsize.h -sh ${nc_given_srcdir}/include/MKhashsize.sh ${nc_given_srcdir}/include/Caps > ncurses/hashsize.h - -echo creating ncurses/parametrized.h -sh ${nc_given_srcdir}/include/MKparametrized.sh ${nc_given_srcdir}/include/Caps > ncurses/parametrized.h - -echo creating ncurses/termsort.c -sh ${nc_given_srcdir}/progs/MKtermsort.sh "${NC_AWK}" ${nc_given_srcdir}/include/Caps > ncurses/termsort.c - -echo creating ncurses/fallback.c -sh ${nc_given_srcdir}/ncurses/tinfo/MKfallback.sh > ncurses/fallback.c - -echo creating ncurses/lib_gen.c -sh ${nc_given_srcdir}/ncurses/base/MKlib_gen.sh "${NC_CPP}" "${NC_AWK}" < ncurses/curses.h > ncurses/lib_gen.c - -echo creating ncurses/nomacros.h -sh ${nc_given_srcdir}/ncurses/base/MKlib_gen.sh "${NC_CPP}" "${NC_AWK}" < ncurses/curses.h | fgrep undef > ncurses/nomacros.h - -echo creating ncurses/expanded.c -sh ${nc_given_srcdir}/ncurses/tty/MKexpanded.sh "${NC_CPP}" >ncurses/expanded.c - -echo creating ncurses/comp_captab.c -${NC_CC} -o make_hash -DMAIN_PROGRAM ${nc_given_srcdir}/ncurses/tinfo/comp_hash.c -sh ${nc_given_srcdir}/ncurses/tinfo/MKcaptab.awk "${NC_AWK}" ${nc_given_srcdir}/include/Caps > ncurses/comp_captab.c -rm -f make_hash - -echo creating ncurses/lib_keyname.c -${NC_AWK} -f ${nc_given_srcdir}/ncurses/base/MKkeyname.awk ${nc_given_srcdir}/ncurses/tinfo/keys.list > ncurses/lib_keyname.c - -echo creating ncurses/names.c and ncurses/codes.c -${NC_AWK} -f ${nc_given_srcdir}/ncurses/tinfo/MKnames.awk ${nc_given_srcdir}/include/Caps -cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >ncurses/names.c -cat namehdr boolcodes numcodes strcodes codeftr > ncurses/codes.c -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes - -echo creating ncurses/init_keytry.h -${NC_CC} -o make_key ${nc_given_srcdir}/ncurses/tinfo/make_keys.c -./make_key ${nc_given_srcdir}/ncurses/keys.list > ncurses/init_keytry.h -rm -f make_key - -echo creating ncurses/unctrl.c -echo | ${NC_AWK} -f ${nc_given_srcdir}/ncurses/base/MKunctrl.awk > ncurses/unctrl.c -echo creating ncurses/terminfo.5 -sh ${nc_given_srcdir}/man/MKterminfo.sh ${nc_given_srcdir}/man/terminfo.head ${nc_given_srcdir}/include/Caps ${nc_given_srcdir}/man/terminfo.tail > ncurses/terminfo.5 diff --git a/sysdeps/unix/sysv/linux/edit_man.sed b/sysdeps/unix/sysv/linux/edit_man.sed deleted file mode 100644 index 163eb7b2..00000000 --- a/sysdeps/unix/sysv/linux/edit_man.sed +++ /dev/null @@ -1,100 +0,0 @@ -s/captoinfo\.1m/captoinfo.1m/g -s/clear\.1/clear.1m/g -s/curs_addch\.3x/addch.3ncurses/g -s/curs_addchstr\.3x/addchstr.3ncurses/g -s/curs_addstr\.3x/addstr.3ncurses/g -s/curs_attr\.3x/attr.3ncurses/g -s/curs_beep\.3x/beep.3ncurses/g -s/curs_bkgd\.3x/bkgd.3ncurses/g -s/curs_border\.3x/border.3ncurses/g -s/curs_clear\.3x/clear.3ncurses/g -s/curs_color\.3x/color.3ncurses/g -s/curs_delch\.3x/delch.3ncurses/g -s/curs_deleteln\.3x/deleteln.3ncurses/g -s/curs_getch\.3x/getch.3ncurses/g -s/curs_getstr\.3x/getstr.3ncurses/g -s/curs_getyx\.3x/getyx.3ncurses/g -s/curs_inch\.3x/inch.3ncurses/g -s/curs_inchstr\.3x/inchstr.3ncurses/g -s/curs_initscr\.3x/initscr.3ncurses/g -s/curs_inopts\.3x/inopts.3ncurses/g -s/curs_insch\.3x/insch.3ncurses/g -s/curs_insstr\.3x/insstr.3ncurses/g -s/curs_instr\.3x/instr.3ncurses/g -s/curs_kernel\.3x/kernel.3ncurses/g -s/curs_mouse\.3x/mouse.3ncurses/g -s/curs_move\.3x/move.3ncurses/g -s/curs_outopts\.3x/outopts.3ncurses/g -s/curs_overlay\.3x/overlay.3ncurses/g -s/curs_pad\.3x/pad.3ncurses/g -s/curs_print\.3x/print.3ncurses/g -s/curs_printw\.3x/printw.3ncurses/g -s/curs_refresh\.3x/refresh.3ncurses/g -s/curs_scanw\.3x/scanw.3ncurses/g -s/curs_scr_dmp\.3x/scr_dmp.3ncurses/g -s/curs_scroll\.3x/scroll.3ncurses/g -s/curs_slk\.3x/slk.3ncurses/g -s/curs_termattrs\.3x/termattrs.3ncurses/g -s/curs_termcap\.3x/termcap.3ncurses/g -s/curs_terminfo\.3x/terminfo.3ncurses/g -s/curs_touch\.3x/touch.3ncurses/g -s/curs_util\.3x/util.3ncurses/g -s/curs_window\.3x/window.3ncurses/g -s/form\.3x/form.3form/g -s/form_cursor\.3x/cursor.3form/g -s/form_data\.3x/data.3form/g -s/form_driver\.3x/driver.3form/g -s/form_field\.3x/field.3form/g -s/form_field_attributes\.3x/field_attributes.3form/g -s/form_field_buffer\.3x/field_buffer.3form/g -s/form_field_info\.3x/field_info.3form/g -s/form_field_just\.3x/field_just.3form/g -s/form_field_new\.3x/field_new.3form/g -s/form_field_opts\.3x/field_opts.3form/g -s/form_field_userptr\.3x/field_userptr.3form/g -s/form_field_validation\.3x/field_validation.3form/g -s/form_fieldtype\.3x/fieldtype.3form/g -s/form_hook\.3x/hook.3form/g -s/form_new\.3x/new.3form/g -s/form_new_page\.3x/new_page.3form/g -s/form_opts\.3x/opts.3form/g -s/form_page\.3x/page.3form/g -s/form_post\.3x/post.3form/g -s/form_requestname\.3x/requestname.3form/g -s/form_userptr\.3x/userptr.3form/g -s/form_win\.3x/win.3form/g -s/infocmp\.1m/infocmp.1m/g -s/menu\.3x/menu.3menu/g -s/menu_attribs\.3x/attribs.3menu/g -s/menu_cursor\.3x/cursor.3menu/g -s/menu_driver\.3x/driver.3menu/g -s/menu_format\.3x/format.3menu/g -s/menu_hook\.3x/hook.3menu/g -s/menu_items\.3x/items.3menu/g -s/menu_mark\.3x/mark.3menu/g -s/menu_new\.3x/new.3menu/g -s/menu_opts\.3x/opts.3menu/g -s/menu_pattern\.3x/pattern.3menu/g -s/menu_post\.3x/post.3menu/g -s/menu_requestname\.3x/requestname.3menu/g -s/menu_spacing\.3x/spacing.3menu/g -s/menu_userptr\.3x/userptr.3menu/g -s/menu_win\.3x/win.3menu/g -s/mitem_current\.3x/menu_current.3menu/g -s/mitem_name\.3x/menu_name.3menu/g -s/mitem_new\.3x/menu_new.3menu/g -s/mitem_opts\.3x/menu_opts.3menu/g -s/mitem_userptr\.3x/menu_userptr.3menu/g -s/mitem_value\.3x/menu_value.3menu/g -s/mitem_visible\.3x/menu_visible.3menu/g -s/ncurses\.3x/ncurses.3ncurses/g -s/panel\.3x/panel.3curses/g -s/resizeterm\.3x/resizeterm.3ncurses/g -s/term\.5/term.5/g -s/term\.7/term.7/g -s/terminfo\.5/terminfo.5/g -s/tic\.1m/tic.1m/g -s/toe\.1m/toe.1m/g -s/tput\.1/tput.1/g -s/tset\.1/tset.1/g -s/wresize\.3x/wresize.3ncurses/g diff --git a/sysdeps/unix/sysv/linux/edit_man.sh b/sysdeps/unix/sysv/linux/edit_man.sh deleted file mode 100755 index 558fff88..00000000 --- a/sysdeps/unix/sysv/linux/edit_man.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# this script is generated by the configure-script -prefix=$1 -shift -mandir=$1 -shift -edit_man_sed=$1 -shift - -datadir="${prefix}/share" -MKDIRS="mkinstalldirs" -INSTALL="/usr/bin/install -c" -INSTALL_DATA="${INSTALL} -m 644" -TMP=${TMPDIR-/tmp}/man$$ -trap "rm -f $TMP" 0 1 2 5 15 - -for i in $* -do -case $i in -*.[0-9]*) - section=`expr "$i" : '.*\.\([0-9]\)[xm]*'`; - if [ ! -d $mandir/man${section} ]; then - $MKDIRS $mandir/man$section - fi - source=`basename $i` - target=`grep "^$source" man/man_db.renames | awk '{print $2}'` - if test -z "$target" ; then - echo '? missing rename for '$source - target="$source" - fi - target="$mandir/man$section/$target" - sed -e 's,@DATADIR@,$datadir,' < $i | sed -f ${edit_man_sed} >$TMP - echo installing $target - $INSTALL_DATA $TMP $target - ;; -esac -done diff --git a/sysdeps/unix/sysv/linux/run_tic.sh b/sysdeps/unix/sysv/linux/run_tic.sh deleted file mode 100755 index 2dccd56b..00000000 --- a/sysdeps/unix/sysv/linux/run_tic.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/sh -############################################################################## -# 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. # -############################################################################## -# -# Author: Thomas E. Dickey 1996 -# -# $Id: run_tic.sh,v 1.9 1998/02/11 12:14:03 tom Exp $ -# This script is used to install terminfo.src using tic. We use a script -# because the path checking is too awkward to do in a makefile. -# -# Parameters: -# $1 = the common object directory. -# $2 = source-directory, i.e., $(srcdir) -# $3 = destination-directory path, i.e., $(ticdir) -# $4 = install-prefix, if any -# -# Assumes: -# The leaf directory names (bin, lib, shared, tabset, terminfo) -# -echo '** Building terminfo database, please wait...' -# -# Parameter parsing is primarily for debugging. The script is designed to -# be run from the misc/Makefile as -# make install.data - -prefix=/usr -if test $# != 0 ; then - common_objpfx=$1 - shift -fi - -if test $# != 0 ; then - srcdir=$1 - shift -else - srcdir=. -fi - -if test $# != 0 ; then - ticdir=$1 - shift -else - ticdir=$prefix/share/terminfo -fi - -if test $# != 0 ; then - IP=$1 - shift -else - IP="" -fi - -TERMINFO=$IP$ticdir ; export TERMINFO -umask 022 - -# Construct the name of the old (obsolete) pathname, e.g., /usr/lib/terminfo. -TICDIR=`echo $TERMINFO | sed -e 's/\/share\//\/lib\//'` - -# Remove the old terminfo stuff; we don't care if it existed before, and it -# would generate a lot of confusing error messages if we tried to overwrite it. -# We explicitly remove its contents rather than the directory itself, in case -# the directory is actually a symbolic link. -( rm -fr $TERMINFO/[0-9A-Za-z] 2>/dev/null ) - -# If we're not installing into /usr/share/, we'll have to adjust the location -# of the tabset files in terminfo.src (which are in a parallel directory). -TABSET=`echo $ticdir | sed -e 's/\/terminfo$/\/tabset/'` -SRC=$srcdir/terminfo.src -if test "x$TABSET" != "x/usr/share/tabset" ; then - echo '** adjusting tabset paths' - TMP=${TMPDIR-/tmp}/$$ - sed -e s:/usr/share/tabset:$TABSET:g $SRC >$TMP - trap "rm -f $TMP" 0 1 2 5 15 - SRC=$TMP -fi - -LD_LIBRARY_PATH=$common_objpfx:$common_objpfx/nss:$common_objpfx/ncurses \ - $common_objpfx/elf/ld.so \ - $common_objpfx/ncurses/tic -s $SRC -if [ $? = 0 ] -then - echo '** built new '$TERMINFO -else - echo '? tic could not build '$TERMINFO - exit 1 -fi - -# Make a symbolic link to provide compatibility with applications that expect -# to find terminfo under /usr/lib. That is, we'll _try_ to do that. Not -# all systems support symbolic links, and those that do provide a variety -# of options for 'test'. -if test "$TICDIR" != "$TERMINFO" ; then - ( rm -f $TICDIR 2>/dev/null ) - if ( cd $TICDIR 2>/dev/null ) - then - cd $TICDIR - TICDIR=`pwd` - if test $TICDIR != $TERMINFO ; then - # Well, we tried. Some systems lie to us, so the - # installer will have to double-check. - echo "Verify if $TICDIR and $TERMINFO are the same." - echo "The new terminfo is in $TERMINFO; the other should be a link to it." - echo "Otherwise, remove $TICDIR and link it to $TERMINFO." - fi - else - cd $IP$prefix - # Construct a symbolic link that only assumes $ticdir has the - # same $prefix as the other installed directories. - RELATIVE=`echo $ticdir|sed -e 's:^'$prefix'/::'` - if test "$RELATIVE" != "$ticdir" ; then - RELATIVE=../`echo $ticdir|sed -e 's:^'$prefix'/::' -e 's:^/::'` - fi - if ( ln -s $RELATIVE $TICDIR ) - then - echo '** linked '$TICDIR' for compatibility' - fi - fi -fi diff --git a/tack/HISTORY b/tack/HISTORY index 3fe2cab0..a8211058 100644 --- a/tack/HISTORY +++ b/tack/HISTORY @@ -1,6 +1,9 @@ Current history: +2003/10/18 1.01 Fix some logic in pad.c, improve bce test. +2003/09/20 Modified to allow running from compiled-in terminfo. +2001/10/20 Make menu titles agree with descriptions. 2000/03/04 Fix a few spelling errors 1999/09/04 Minor fix to build/link on BeOS 1999/05/16 Minor fix to build/link on CLIX diff --git a/tack/Makefile.in b/tack/Makefile.in index 732da7f9..dd7b8b2e 100644 --- a/tack/Makefile.in +++ b/tack/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.27 2001/12/08 18:48:01 tom Exp $ +# $Id: Makefile.in,v 1.31 2003/11/01 22:46:24 tom Exp $ # Makefile for tack # # The variable 'srcdir' refers to the source-distribution, and can be set with @@ -15,7 +15,9 @@ THIS = Makefile CF_MFLAGS = @cf_cv_makeflags@ @SET_MAKE@ -x = @PROG_EXT@ + +x = @EXEEXT@ +o = .@OBJEXT@ MODEL = ../@DFT_OBJ_SUBDIR@ DESTDIR = @DESTDIR@ @@ -29,6 +31,11 @@ includedir = @includedir@ datadir = @datadir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ +LIBTOOL_INSTALL = @LIB_INSTALL@ +LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -55,15 +62,15 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) LD = @LD@ -LINK = @LINK_PROGS@ $(LIBTOOL) $(CC) +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC) LDFLAGS = @EXTRA_LDFLAGS@ \ @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ -LDFLAGS_LIBTOOL = $(LDFLAGS) -LDFLAGS_NORMAL = $(LDFLAGS) -LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ -LDFLAGS_PROFILE = $(LDFLAGS) -pg -LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@ +LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) +LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) +LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) +LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) +LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) @@ -92,11 +99,11 @@ uninstall.libs: install.tack: $(PROGS) \ $(DESTDIR)$(bindir) \ $(DESTDIR)$(mandir) - $(LIBTOOL) $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x $(INSTALL_DATA) $(srcdir)/tack.1 $(DESTDIR)$(mandir)/tack.1 uninstall.tack: - -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/tack$x + -@$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(bindir)/tack$x -@rm -f $(DESTDIR)$(mandir)/tack.1 $(DESTDIR)$(bindir) \ @@ -108,22 +115,22 @@ $(DESTDIR)$(mandir) : # DEPS_TACK = \ - $(MODEL)/ansi.o \ - $(MODEL)/charset.o \ - $(MODEL)/color.o \ - $(MODEL)/control.o \ - $(MODEL)/crum.o \ - $(MODEL)/edit.o \ - $(MODEL)/fun.o \ - $(MODEL)/init.o \ - $(MODEL)/menu.o \ - $(MODEL)/modes.o \ - $(MODEL)/output.o \ - $(MODEL)/pad.o \ - $(MODEL)/scan.o \ - $(MODEL)/sync.o \ - $(MODEL)/sysdep.o \ - $(MODEL)/tack.o + $(MODEL)/ansi$o \ + $(MODEL)/charset$o \ + $(MODEL)/color$o \ + $(MODEL)/control$o \ + $(MODEL)/crum$o \ + $(MODEL)/edit$o \ + $(MODEL)/fun$o \ + $(MODEL)/init$o \ + $(MODEL)/menu$o \ + $(MODEL)/modes$o \ + $(MODEL)/output$o \ + $(MODEL)/pad$o \ + $(MODEL)/scan$o \ + $(MODEL)/sync$o \ + $(MODEL)/sysdep$o \ + $(MODEL)/tack$o tack$x: $(DEPS_TACK) $(DEPS_CURSES) @ECHO_LINK@ $(LINK) $(DEPS_TACK) $(LDFLAGS_DEFAULT) -o $@ @@ -142,6 +149,7 @@ mostlyclean :: -rm -f core tags TAGS *~ *.bak *.i *.atac trace clean :: mostlyclean + -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" -rm -f $(PROGS) -rm -rf .libs diff --git a/tack/color.c b/tack/color.c index 479081c9..17f71f0b 100644 --- a/tack/color.c +++ b/tack/color.c @@ -1,18 +1,18 @@ /* ** Copyright (C) 1991, 1997 Free Software Foundation, Inc. -** +** ** This file is part of TACK. -** +** ** TACK is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2, or (at your option) ** any later version. -** +** ** TACK is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. -** +** ** You should have received a copy of the GNU General Public License ** along with TACK; see the file COPYING. If not, write to ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: color.c,v 1.2 2000/03/04 21:05:54 tom Exp $") +MODULE_ID("$Id: color.c,v 1.5 2004/01/16 23:14:25 Jochen.Voss Exp $") /* * Color terminal tests. Has only one entry point: test_color(). @@ -84,6 +84,12 @@ static int a_bright_color, bright_value; static int cookie_monster, color_step, colors_per_line; static int R, G, B; +static void reset_colors(void) +{ + tc_putp(orig_colors); + tc_putp(tparm(orig_pair)); +} + static int color_trans(int c) { /* translate or load the color */ @@ -405,6 +411,7 @@ ncv_display(int m) put_str(alt_modes[m].name); eat_cookie(); set_attr(0); + reset_colors(); put_crlf(); } @@ -517,10 +524,7 @@ color_setf( } /* initialize the color palette */ pairs_used = max_colors >= 8 ? 8 : max_colors; - if (can_change) { - tc_putp(orig_colors); - } - tc_putp(tparm(orig_pair)); + reset_colors(); new_color(COLOR_WHITE, COLOR_BLACK, FALSE); ptextln("(setf) (setb) (scp) The following colors are predefined:"); @@ -528,8 +532,8 @@ color_setf( put_crlf(); j = max_colors > 8 ? 8 : max_colors; /* - the black on white test is the same as the white on black test. - */ + * the black on white test is the same as the white on black test. + */ for (i = 1; i < j; i++) { putchp('0' + def_colors[i].index); putchp(' '); @@ -547,6 +551,7 @@ color_setf( new_color(COLOR_WHITE, COLOR_BLACK, FALSE); put_crlf(); } + reset_colors(); put_crlf(); generic_done_message(t, state, ch); } @@ -589,10 +594,10 @@ color_matrix( } for (j = 0; j < matrix_area; j++) { if (j % matrix_size == 0) { - tc_putp(tparm(orig_pair)); + reset_colors(); put_crlf(); if (brightness) { - tc_putp(exit_standout_mode); + tc_putp(exit_attribute_mode); } (void) sprintf(temp, "%-8s", def_colors[j / matrix_size].name); put_str(temp); @@ -605,9 +610,9 @@ color_matrix( FALSE); put_str(" Hello "); } - tc_putp(tparm(orig_pair)); + reset_colors(); if (brightness) { - tc_putp(exit_standout_mode); + tc_putp(exit_attribute_mode); } put_crlf(); } @@ -649,7 +654,7 @@ color_ncv( } } } - tc_putp(orig_pair); + reset_colors(); put_crlf(); generic_done_message(t, state, ch); } @@ -665,11 +670,11 @@ color_bce( int *state, int *ch) { - new_color(COLOR_BLACK, COLOR_WHITE, FALSE); + new_color(COLOR_CYAN, COLOR_BLUE, FALSE); put_clear(); put_newlines(2); - new_color(COLOR_WHITE, COLOR_BLACK, FALSE); - ptextln("If the two lines above are black then back_color_erase (bce) should be false."); + reset_colors(); + ptextln("If the two lines above are blue then back_color_erase (bce) should be true."); sprintf(temp, "(bce) is %s in the data base.", back_color_erase ? "true" : "false"); ptextln(temp); generic_done_message(t, state, ch); @@ -693,7 +698,7 @@ color_ccc( generic_done_message(t, state, ch); return; } - tc_putp(orig_colors); + reset_colors(); pairs_used = 0; new_color(COLOR_WHITE, COLOR_BLACK, FALSE); sprintf(temp, "Reloading colors (init%c) using %s method", @@ -721,8 +726,7 @@ color_ccc( } generic_done_message(t, state, ch); if (*ch != 0 && *ch != 'n') { - tc_putp(orig_colors); - tc_putp(tparm(orig_pair)); + reset_colors(); return; } @@ -756,12 +760,10 @@ color_ccc( } generic_done_message(t, state, ch); if (*ch != 0 && *ch != 'n') { - tc_putp(orig_colors); - tc_putp(tparm(orig_pair)); + reset_colors(); return; } dump_colors(); - tc_putp(orig_colors); - tc_putp(tparm(orig_pair)); + reset_colors(); generic_done_message(t, state, ch); } diff --git a/tack/init.c b/tack/init.c index 8a2e44fa..ee9d7013 100644 --- a/tack/init.c +++ b/tack/init.c @@ -22,7 +22,7 @@ #include -MODULE_ID("$Id: init.c,v 1.3 2001/06/16 17:54:19 tom Exp $") +MODULE_ID("$Id: init.c,v 1.4 2003/09/20 19:40:57 tom Exp $") #if NCURSES_VERSION_MAJOR >= 5 || NCURSES_VERSION_PATCH >= 981219 #define _nc_get_curterm(p) _nc_get_tty_mode(p) @@ -196,9 +196,17 @@ curses_setup( ncurses starts scanning the termcap file. **/ if ((status = _nc_read_entry(tty_basename, tty_filename, &term)) == 0) { - fprintf(stderr, "Terminal not found: TERM=%s\n", tty_basename); - show_usage(exec_name); - exit(1); + const TERMTYPE *fallback = _nc_fallback(tty_basename); + + if (fallback) { + term = *fallback; + sprintf(tty_filename, "(fallback)%s", tty_basename); + status = 1; + } else { + fprintf(stderr, "Terminal not found: TERM=%s\n", tty_basename); + show_usage(exec_name); + exit(1); + } } if (status == -1) { fprintf(stderr, "Terminfo database is inaccessible\n"); diff --git a/tack/output.c b/tack/output.c index 5825bea8..208210a2 100644 --- a/tack/output.c +++ b/tack/output.c @@ -23,7 +23,7 @@ #include #include -MODULE_ID("$Id: output.c,v 1.7 2001/06/18 18:44:40 tom Exp $") +MODULE_ID("$Id: output.c,v 1.8 2003/10/25 20:43:43 tom Exp $") /* globals */ long char_sent; /* number of characters sent */ @@ -186,9 +186,9 @@ tt_putp(const char *string) } /* -** tt_putparm(string, reps, arg1, arg2, ...) +** tt_putparm(string, reps, arg1, arg2) ** -** Send tt_tputs(tparm(string, args...), reps) +** Send tt_tputs(tparm(string, args1, arg2), reps) ** Use this function inside timing tests. */ void diff --git a/tack/pad.c b/tack/pad.c index 980258c4..30ecf4b4 100644 --- a/tack/pad.c +++ b/tack/pad.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: pad.c,v 1.2 2000/03/04 21:04:58 tom Exp $") +MODULE_ID("$Id: pad.c,v 1.3 2003/10/18 22:11:29 tom Exp $") /* test the pad counts on the terminal */ @@ -1274,7 +1274,7 @@ pad_rin( do { sprintf(temp, "%d\r", test_complete); put_str(temp); - if (scroll_reverse && augment == 1) { + if (scroll_reverse && repeats == 1) { tt_putp(scroll_reverse); } else { tt_putparm(parm_rindex, repeats, repeats, 0); @@ -1345,7 +1345,7 @@ pad_il( } } while(still_testing()); put_str("This line should be on the bottom.\r"); - if (scroll_reverse && augment == 1) { + if (insert_line && augment == 1) { for (i = 1; i < lines; i++) { tt_putp(insert_line); } @@ -1386,8 +1386,13 @@ pad_indn( start_message = "(indn) Scroll-forward-n-lines start testing"; } else { /* ind */ - if (!scroll_forward && over_strike) { + if (!scroll_forward) { CAP_NOT_FOUND; + ptext("(ind) Scroll-forward not present. "); + pad_done_message(t, state, ch); + return; + } + if (over_strike) { ptext("(ind) Scroll-forward not tested on overstrike terminals. "); pad_done_message(t, state, ch); return; @@ -1404,14 +1409,14 @@ pad_indn( do { sprintf(temp, "%d\r", test_complete); put_str(temp); - if (augment > 1) { - tt_putparm(parm_index, repeats, repeats, 0); - } else { + if (scroll_forward && repeats == 1) { put_ind(); + } else { + tt_putparm(parm_index, repeats, repeats, 0); } } while(still_testing()); put_str("This line should be on the top.\r"); - if (augment == 1) { + if (scroll_forward && augment == 1) { for (i = 1; i < lines; i++) { put_ind(); } @@ -1466,26 +1471,26 @@ pad_dl( pad_test_startup(1); do { sprintf(temp, "%d\r", test_complete); - if ((i & 0x7f) == 0 && augment < lines - 1) { + if (augment < lines - 1) { go_home(); putln(temp); } put_str(temp); - if (repeats || !delete_line) { - tt_putparm(parm_delete_line, repeats, repeats, 0); - } else { + if (delete_line && repeats == 1) { tt_putp(delete_line); + } else { + tt_putparm(parm_delete_line, repeats, repeats, 0); } } while(still_testing()); home_down(); put_str("This line should be on the top."); go_home(); - if (repeats || !delete_line) { - tt_putparm(parm_delete_line, lines - 1, lines - 1, 0); - } else { + if (delete_line && augment == 1) { for (i = 1; i < lines; i++) { tt_putp(delete_line); } + } else { + tt_putparm(parm_delete_line, lines - 1, lines - 1, 0); } sprintf(temp, "\nDelete %d line%s. ", augment, augment == 1 ? "" : "s"); diff --git a/tack/tack.h b/tack/tack.h index daca1e12..f8b244ce 100644 --- a/tack/tack.h +++ b/tack/tack.h @@ -19,7 +19,7 @@ ** Boston, MA 02111-1307, USA. */ -/* $Id: tack.h,v 1.9 2001/06/18 18:44:49 tom Exp $ */ +/* $Id: tack.h,v 1.10 2003/10/18 22:26:59 tom Exp $ */ #ifndef NCURSES_TACK_H_incl #define NCURSES_TACK_H_incl 1 @@ -27,7 +27,7 @@ /* terminfo action checker include file */ #define MAJOR_VERSION 1 -#define MINOR_VERSION 0 +#define MINOR_VERSION 1 #ifdef HAVE_CONFIG_H #include diff --git a/tar-copy.sh b/tar-copy.sh index 4e45bc34..3df1bc11 100755 --- a/tar-copy.sh +++ b/tar-copy.sh @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: tar-copy.sh,v 1.3 1998/02/11 12:14:03 tom Exp $ +# $Id: tar-copy.sh,v 1.5 2003/10/25 14:40:07 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# 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"), # @@ -28,7 +28,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997,1998 +# Author: Thomas E. Dickey # # Copy a collection of files using 'tar', so that their dates and links are # preserved @@ -55,16 +55,23 @@ fi WD=`pwd` TMP=$WD/copy$$ -trap "rm -f $TMP" 0 1 2 5 15 cd $2 -if ( tar cf $TMP $1 ) +TEST=`ls -d $1 2>/dev/null` +if test -z "$TEST" then - cd $3 - LIST=`tar tf $TMP 2>&1` - $DOIT rm -rf $LIST 2>/dev/null - $DOIT tar xvf $TMP + echo "... no match for \"$1\" in $2" else - echo "Cannot create tar of $1 files" - exit 1 + echo "... installing files matching \"$1\" in $2" + trap "rm -f $TMP" 0 1 2 5 15 + if ( tar cf $TMP $1 ) + then + cd $3 + LIST=`tar tf $TMP 2>&1` + $DOIT rm -rf $LIST 2>/dev/null + $DOIT tar xvf $TMP + else + echo "Cannot create tar of $1 files" + exit 1 + fi fi diff --git a/test/Makefile.in b/test/Makefile.in index 833b57f7..e5cb7481 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.63 2002/02/03 00:54:10 china Exp $ +# $Id: Makefile.in,v 1.77 2003/12/07 01:36:16 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. # +# 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"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997,1998 +# Author: Thomas E. Dickey 1996-2002 # # Makefile for ncurses tests. @@ -36,7 +36,10 @@ SHELL = /bin/sh -x = @PROG_EXT@ +@SET_MAKE@ + +x = @EXEEXT@ +o = .@OBJEXT@ MODEL = ../@DFT_OBJ_SUBDIR@ srcdir = @srcdir@ @@ -46,12 +49,15 @@ libdir = @libdir@ includedir = @includedir@ LIBTOOL = @LIBTOOL@ +LIBTOOL_CLEAN = @LIB_CLEAN@ +LIBTOOL_COMPILE = @LIB_COMPILE@ +LIBTOOL_LINK = @LIB_LINK@ CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ -CPPFLAGS = -I../test -I$(srcdir) @CPPFLAGS@ -DHAVE_CONFIG_H +CPPFLAGS = -I../test -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -69,15 +75,15 @@ LOCAL_LIBS = @TEST_DEPS@ MATH_LIB = @MATH_LIB@ LD = @LD@ -LINK = @LINK_TESTS@ $(LIBTOOL) $(CC) $(CFLAGS) +LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS) LDFLAGS = @LD_MODEL@ @TEST_ARGS@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@ -LDFLAGS_LIBTOOL = $(LDFLAGS) -LDFLAGS_NORMAL = $(LDFLAGS) -LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ -LDFLAGS_PROFILE = $(LDFLAGS) -pg -LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@ +LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) +LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) +LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) +LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) +LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) @@ -86,9 +92,16 @@ LINT_OPTS = @LINT_OPTS@ LINT_LIBS = -lform -lmenu -lpanel -lncurses @LIBS@ TESTS = \ + background$x \ blue$x \ bs$x \ cardfile$x \ + color_set$x \ + demo_defkey$x \ + demo_forms$x \ + demo_keyok$x \ + demo_menus$x \ + demo_panels$x \ ditto$x \ dots$x \ filter$x \ @@ -97,13 +110,15 @@ TESTS = \ gdc$x \ hanoi$x \ hashtest$x \ + ins_wide$x \ + inserts$x \ keynames$x \ knight$x \ lrtest$x \ ncurses$x \ newdemo$x \ - rain$x \ railroad$x \ + rain$x \ tclock$x \ testaddch$x \ testcurs$x \ @@ -116,80 +131,107 @@ all: $(TESTS) sources: -blue$x: $(MODEL)/blue.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/blue.o $(LDFLAGS_DEFAULT) +background$x: $(MODEL)/background$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/background$o $(LDFLAGS_DEFAULT) + +blue$x: $(MODEL)/blue$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/blue$o $(LDFLAGS_DEFAULT) + +bs$x: $(MODEL)/bs$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/bs$o $(LDFLAGS_DEFAULT) + +cardfile$x: $(MODEL)/cardfile$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/cardfile$o $(LDFLAGS_DEFAULT) + +color_set$x: $(MODEL)/color_set$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/color_set$o $(LDFLAGS_DEFAULT) -bs$x: $(MODEL)/bs.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/bs.o $(LDFLAGS_DEFAULT) +demo_defkey$x: $(MODEL)/demo_defkey$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_defkey$o $(LDFLAGS_DEFAULT) -cardfile$x: $(MODEL)/cardfile.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/cardfile.o $(LDFLAGS_DEFAULT) +demo_forms$x: $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LDFLAGS_DEFAULT) -ditto$x: $(MODEL)/ditto.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ditto.o $(LDFLAGS_DEFAULT) +demo_keyok$x: $(MODEL)/demo_keyok$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_keyok$o $(LDFLAGS_DEFAULT) -dots$x: $(MODEL)/dots.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/dots.o $(LDFLAGS_DEFAULT) +demo_menus$x: $(MODEL)/demo_menus$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_menus$o $(LDFLAGS_DEFAULT) -filter$x: $(MODEL)/filter.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/filter.o $(LDFLAGS_DEFAULT) +demo_panels$x: $(MODEL)/demo_panels$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_panels$o $(LDFLAGS_DEFAULT) -firework$x: $(MODEL)/firework.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firework.o $(LDFLAGS_DEFAULT) +ditto$x: $(MODEL)/ditto$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ditto$o $(LDFLAGS_DEFAULT) -firstlast$x: $(MODEL)/firstlast.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firstlast.o $(LDFLAGS_DEFAULT) +dots$x: $(MODEL)/dots$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/dots$o $(LDFLAGS_DEFAULT) -gdc$x: $(MODEL)/gdc.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/gdc.o $(LDFLAGS_DEFAULT) +filter$x: $(MODEL)/filter$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/filter$o $(LDFLAGS_DEFAULT) -hanoi$x: $(MODEL)/hanoi.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hanoi.o $(LDFLAGS_DEFAULT) +firework$x: $(MODEL)/firework$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firework$o $(LDFLAGS_DEFAULT) -hashtest$x: $(MODEL)/hashtest.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hashtest.o $(LDFLAGS_DEFAULT) +firstlast$x: $(MODEL)/firstlast$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/firstlast$o $(LDFLAGS_DEFAULT) -keynames$x: $(MODEL)/keynames.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/keynames.o $(LDFLAGS_DEFAULT) +gdc$x: $(MODEL)/gdc$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/gdc$o $(LDFLAGS_DEFAULT) -knight$x: $(MODEL)/knight.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/knight.o $(LDFLAGS_DEFAULT) +hanoi$x: $(MODEL)/hanoi$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hanoi$o $(LDFLAGS_DEFAULT) -lrtest$x: $(MODEL)/lrtest.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/lrtest.o $(LDFLAGS_DEFAULT) +hashtest$x: $(MODEL)/hashtest$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/hashtest$o $(LDFLAGS_DEFAULT) -ncurses$x: $(MODEL)/ncurses.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ncurses.o $(LDFLAGS_DEFAULT) +inserts$x: $(MODEL)/inserts$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/inserts$o $(LDFLAGS_DEFAULT) -newdemo$x: $(MODEL)/newdemo.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/newdemo.o $(LDFLAGS_DEFAULT) +ins_wide$x: $(MODEL)/ins_wide$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ins_wide$o $(LDFLAGS_DEFAULT) -rain$x: $(MODEL)/rain.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain.o $(LDFLAGS_DEFAULT) +keynames$x: $(MODEL)/keynames$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/keynames$o $(LDFLAGS_DEFAULT) -railroad$x: $(MODEL)/railroad.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad.o $(LDFLAGS_DEFAULT) +knight$x: $(MODEL)/knight$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/knight$o $(LDFLAGS_DEFAULT) -tclock$x: $(MODEL)/tclock.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock.o $(LDFLAGS_DEFAULT) $(MATH_LIB) +lrtest$x: $(MODEL)/lrtest$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/lrtest$o $(LDFLAGS_DEFAULT) -testaddch$x: $(MODEL)/testaddch.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testaddch.o $(LDFLAGS_DEFAULT) +ncurses$x: $(MODEL)/ncurses$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/ncurses$o $(LDFLAGS_DEFAULT) -testcurs$x: $(MODEL)/testcurs.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testcurs.o $(LDFLAGS_DEFAULT) +newdemo$x: $(MODEL)/newdemo$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/newdemo$o $(LDFLAGS_DEFAULT) -testscanw$x: $(MODEL)/testscanw.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testscanw.o $(LDFLAGS_DEFAULT) +rain$x: $(MODEL)/rain$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain$o $(LDFLAGS_DEFAULT) -view$x: $(MODEL)/view.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/view.o $(LDFLAGS_DEFAULT) +railroad$x: $(MODEL)/railroad$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad$o $(LDFLAGS_DEFAULT) -worm$x: $(MODEL)/worm.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/worm.o $(LDFLAGS_DEFAULT) +tclock$x: $(MODEL)/tclock$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock$o $(LDFLAGS_DEFAULT) $(MATH_LIB) -xmas$x: $(MODEL)/xmas.o $(LOCAL_LIBS) - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas.o $(LDFLAGS_DEFAULT) +testaddch$x: $(MODEL)/testaddch$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testaddch$o $(LDFLAGS_DEFAULT) + +testcurs$x: $(MODEL)/testcurs$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testcurs$o $(LDFLAGS_DEFAULT) + +testscanw$x: $(MODEL)/testscanw$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/testscanw$o $(LDFLAGS_DEFAULT) + +view$x: $(MODEL)/view$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/view$o $(LDFLAGS_DEFAULT) + +worm$x: $(MODEL)/worm$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/worm$o $(LDFLAGS_DEFAULT) + +xmas$x: $(MODEL)/xmas$o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas$o $(LDFLAGS_DEFAULT) libs \ install \ @@ -204,7 +246,8 @@ mostlyclean :: -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace clean :: mostlyclean - -rm -rf *.o screendump *.lis $(TESTS) .libs + -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" + -rm -rf *$o screendump *.lis $(TESTS) .libs distclean :: clean -rm -f Makefile ncurses_cfg.h config.* @@ -213,9 +256,3 @@ realclean :: distclean lint: sh -c 'for N in $(TESTS); do echo LINT:$$N; $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/$$N.c $(LINT_LIBS); done' - -# Use this to get a list of test-programs for the standalone configure script. -echo_tests : - @echo "$(TESTS)" -echo_suffix : - @echo "$x" diff --git a/test/README b/test/README index cd1767a1..6c730e0c 100644 --- a/test/README +++ b/test/README @@ -1,3 +1,6 @@ +-- $Id: README,v 1.15 2003/07/05 19:17:49 tom Exp $ +------------------------------------------------------------------------------- + The programs in this directory are designed to test your newest toy :-) Check the sources for any further details. @@ -20,3 +23,601 @@ The bs and knight games demonstrate processing of mouse events under xterm. This directory also contains: tracemunch - Perl script to crunch trace scripts to make them easier to read + +------------------------------------------------------------------------------- +------------------------------------------------------------------------------- + +These programs provide examples of use, but do not comprise a complete set of +tests. Here is a list of library externals, noting those that are used: + +libform: +------- +TYPE_ALNUM test: demo_forms +TYPE_ALPHA test: demo_forms ncurses +TYPE_ENUM test: demo_forms +TYPE_INTEGER test: demo_forms +TYPE_IPV4 - +TYPE_NUMERIC test: demo_forms +TYPE_REGEXP test: demo_forms +current_field test: demo_forms edit_field ncurses +data_ahead - +data_behind - +dup_field - +dynamic_field_info - +field_arg - +field_back - +field_buffer test: cardfile demo_forms edit_field ncurses +field_count - +field_fore - +field_index test: demo_forms +field_info test: ncurses +field_init - +field_just - +field_opts test: demo_forms ncurses +field_opts_off test: cardfile +field_opts_on - +field_pad - +field_status - +field_term - +field_type test: demo_forms +field_userptr test: ncurses +form_driver test: cardfile demo_forms edit_field ncurses +form_fields test: cardfile +form_init - +form_opts - +form_opts_off - +form_opts_on - +form_page - +form_request_by_name - +form_request_name test: edit_field +form_sub test: cardfile demo_forms ncurses +form_term - +form_userptr - +form_win test: cardfile demo_forms edit_field ncurses +free_field test: cardfile demo_forms ncurses +free_fieldtype - +free_form test: cardfile demo_forms ncurses +link_field - +link_fieldtype - +move_field - +new_field test: cardfile demo_forms ncurses +new_fieldtype test: ncurses +new_form test: cardfile demo_forms ncurses +new_page - +pos_form_cursor - +post_form test: cardfile demo_forms ncurses +scale_form test: demo_forms ncurses +set_current_field - +set_field_back test: cardfile demo_forms edit_field ncurses +set_field_buffer test: cardfile demo_forms edit_field ncurses +set_field_fore - +set_field_init - +set_field_just test: cardfile +set_field_opts test: demo_forms ncurses +set_field_pad - +set_field_status - +set_field_term - +set_field_type test: demo_forms ncurses +set_field_userptr test: demo_forms ncurses +set_fieldtype_arg - +set_fieldtype_choice - +set_form_fields - +set_form_init - +set_form_opts - +set_form_page - +set_form_sub test: cardfile demo_forms ncurses +set_form_term - +set_form_userptr - +set_form_win test: cardfile demo_forms ncurses +set_max_field - +set_new_page test: demo_forms +unpost_form test: cardfile demo_forms ncurses + +libmenu: +------- +current_item test: ncurses +free_item test: ncurses +free_menu test: ncurses +item_count - +item_description - +item_index test: ncurses +item_init - +item_name test: ncurses +item_opts - +item_opts_off - +item_opts_on - +item_term - +item_userptr - +item_value test: ncurses +item_visible - +menu_back - +menu_driver test: ncurses +menu_fore - +menu_format - +menu_grey - +menu_init - +menu_items test: ncurses +menu_mark - +menu_opts - +menu_opts_off test: ncurses +menu_opts_on - +menu_pad - +menu_pattern - +menu_request_by_name - +menu_request_name - +menu_spacing - +menu_sub - +menu_term - +menu_userptr - +menu_win test: ncurses +new_item test: ncurses +new_menu test: ncurses +pos_menu_cursor lib: menu +post_menu test: ncurses +scale_menu test: ncurses +set_current_item - +set_item_init - +set_item_opts - +set_item_term - +set_item_userptr - +set_item_value test: ncurses +set_menu_back - +set_menu_fore - +set_menu_format test: ncurses +set_menu_grey - +set_menu_init - +set_menu_items - +set_menu_mark - +set_menu_opts - +set_menu_pad - +set_menu_pattern - +set_menu_spacing - +set_menu_sub test: ncurses +set_menu_term - +set_menu_userptr - +set_menu_win test: ncurses +set_top_row - +top_row - +unpost_menu test: ncurses + +libncurses: +---------- +BC - +COLORS test: ncurses xmas +COLOR_PAIR test: blue bs demo_forms filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas +COLOR_PAIRS test: ncurses newdemo +COLS test: cardfile demo_defkey demo_forms demo_keyok edit_field firework hashtest ins_wide inserts lrtest ncurses newdemo rain tclock testcurs view worm +ESCDELAY lib: ncurses +LINES test: cardfile demo_defkey demo_keyok edit_field firework hanoi hashtest ins_wide inserts lrtest ncurses newdemo rain tclock testcurs view worm xmas +PAIR_NUMBER lib: ncurses +PC lib: ncurses +SP lib: ncurses +TABSIZE lib: menu +UP - +acs_map test: gdc ins_wide inserts knight ncurses newdemo testcurs +add_wch - +add_wchnstr test: ncurses +add_wchstr test: view +addch test: blue bs ditto hashtest ncurses testaddch view worm +addchnstr - +addchstr - +addnstr - +addnwstr - +addstr test: blue bs cardfile gdc hanoi lrtest ncurses +addwstr - +assume_default_colors test: ncurses +attr_get - +attr_off test: ncurses +attr_on test: ncurses +attr_set - +attroff test: filter gdc ncurses tclock +attron test: bs filter gdc ncurses +attrset test: bs firework gdc hanoi ncurses rain tclock testaddch testcurs +baudrate lib: ncurses +beep test: blue bs cardfile demo_forms edit_field hanoi ins_wide inserts knight ncurses tclock testcurs view xmas +bkgd test: demo_forms ncurses tclock view +bkgdset test: ncurses testaddch +bkgrnd - +bkgrndset - +boolcodes progs: dump_entry +boolfnames progs: dump_entry +boolnames progs: dump_entry infocmp +border - +border_set - +box test: cardfile demo_forms edit_field ins_wide inserts lrtest ncurses newdemo testcurs +box_set test: ncurses +can_change_color test: ncurses +cbreak test: blue bs cardfile demo_defkey demo_forms demo_keyok ditto filter firework gdc hanoi hashtest ins_wide inserts knight lrtest ncurses newdemo tclock testcurs view worm xmas +chgat - +clear test: blue bs gdc ncurses testcurs xmas +clearok test: bs knight +clrtobot test: ncurses +clrtoeol test: blue bs hanoi hashtest ncurses view +color_content test: ncurses +color_set - +copywin test: testcurs +cur_term test: dots lrtest progs: clear tic tput tset +curs_set test: firework gdc hanoi lrtest newdemo rain tclock testcurs worm xmas +curscr test: edit_field knight lrtest ncurses tclock view +curses_version test: ncurses progs: infocmp tic toe tput tset +def_prog_mode test: bs ncurses +def_shell_mode lib: ncurses +define_key test: demo_defkey +del_curterm lib: ncurses +delay_output - +delch - +deleteln - +delscreen - +delwin test: cardfile demo_forms edit_field ncurses newdemo testcurs +derwin test: cardfile demo_forms ncurses +doupdate test: cardfile edit_field ins_wide inserts knight ncurses +dupwin test: edit_field +echo test: bs hanoi ncurses testcurs testscanw +echo_wchar test: ncurses +echochar test: ncurses +endwin test: blue bs cardfile demo_defkey demo_forms demo_keyok ditto filter firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest ncurses newdemo rain tclock testaddch testcurs testscanw view worm xmas +erase test: cardfile filter firework firstlast hanoi lrtest ncurses tclock testcurs +erasechar lib: ncurses +erasewchar - +filter test: filter +flash test: cardfile lrtest ncurses tclock testcurs +flushinp test: ncurses newdemo testcurs +get_wch - +get_wstr - +getbkgd test: ncurses +getbkgrnd - +getcchar test: view +getch test: blue bs ditto firework firstlast hanoi hashtest lrtest rain tclock testaddch testcurs view worm xmas +getmouse test: bs knight ncurses +getn_wstr - +getnstr test: filter ncurses +getstr - +getwin test: ncurses +halfdelay test: view +has_colors test: bs demo_forms filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testcurs view worm xmas +has_ic test: lrtest +has_il lib: ncurses +has_key lib: ncurses +hline test: gdc ncurses +hline_set - +idcok - +idlok test: ncurses testscanw view +immedok - +in_wch - +in_wchnstr - +in_wchstr - +inch - +inchnstr - +inchstr - +init_color test: ncurses +init_pair test: blue bs demo_forms filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas +initscr test: blue bs cardfile demo_defkey demo_forms demo_keyok firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest ncurses newdemo rain tclock testaddch testcurs testscanw view worm xmas +innstr - +innwstr - +ins_nwstr - +ins_wch - +ins_wstr - +insch - +insdelln - +insertln - +insnstr - +insstr - +instr - +intrflush test: demo_forms +inwstr - +is_linetouched lib: form +is_term_resized - +is_wintouched lib: ncurses +isendwin - +key_defined test: demo_defkey +key_name test: ncurses +keybound test: demo_defkey +keyname test: demo_defkey demo_keyok edit_field keynames ncurses testcurs view progs: tic +keyok test: demo_keyok +keypad test: bs cardfile demo_defkey demo_forms demo_keyok edit_field filter firework hashtest ins_wide inserts knight lrtest ncurses tclock testcurs testscanw view +killchar lib: ncurses +killwchar - +leaveok test: hanoi +longname test: testcurs progs: tput +mcprint - +meta test: ncurses +mouse_trafo - +mouseinterval - +mousemask test: bs knight ncurses +move test: blue bs cardfile gdc hanoi hashtest knight lrtest ncurses testscanw view worm xmas +mvadd_wch test: ncurses +mvadd_wchnstr - +mvadd_wchstr - +mvaddch test: bs gdc hanoi lrtest ncurses rain tclock xmas +mvaddchnstr test: gdc +mvaddchstr - +mvaddnstr - +mvaddnwstr - +mvaddstr test: bs demo_forms gdc hanoi knight ncurses rain tclock testcurs xmas +mvaddwstr - +mvchgat - +mvcur lib: ncurses +mvdelch - +mvderwin lib: menu +mvget_wch - +mvget_wstr - +mvgetch - +mvgetn_wstr - +mvgetnstr - +mvgetstr - +mvhline test: ncurses +mvhline_set test: ncurses +mvin_wch - +mvin_wchnstr - +mvin_wchstr - +mvinch - +mvinchnstr test: gdc +mvinchstr - +mvinnstr - +mvinnwstr - +mvins_nwstr - +mvins_wch - +mvins_wstr - +mvinsch - +mvinsnstr - +mvinsstr - +mvinstr - +mvinwstr - +mvprintw test: bs firework hanoi ncurses tclock view +mvscanw - +mvvline test: ncurses +mvvline_set test: ncurses +mvwadd_wch - +mvwadd_wchnstr - +mvwadd_wchstr - +mvwaddch test: newdemo testcurs xmas +mvwaddchnstr - +mvwaddchstr - +mvwaddnstr test: newdemo testcurs +mvwaddnwstr - +mvwaddstr test: firstlast ins_wide inserts knight ncurses newdemo testcurs xmas +mvwaddwstr - +mvwchgat - +mvwdelch test: ncurses +mvwget_wch - +mvwget_wstr - +mvwgetch - +mvwgetn_wstr - +mvwgetnstr - +mvwgetstr - +mvwhline lib: ncurses +mvwhline_set - +mvwin test: cardfile testcurs xmas +mvwin_wch - +mvwin_wchnstr - +mvwin_wchstr - +mvwinch test: newdemo testcurs +mvwinchnstr - +mvwinchstr - +mvwinnstr test: testcurs +mvwinnwstr - +mvwins_nwstr - +mvwins_wch test: ins_wide +mvwins_wstr test: ins_wide +mvwinsch test: ins_wide inserts +mvwinsnstr - +mvwinsstr test: inserts testcurs +mvwinstr - +mvwinwstr - +mvwprintw test: ncurses testcurs +mvwscanw test: testcurs +mvwvline test: ins_wide inserts +mvwvline_set - +napms test: firework gdc hanoi lrtest ncurses newdemo railroad rain tclock testcurs view worm xmas progs: tset +newpad test: edit_field ncurses testcurs +newscr lib: ncurses +newterm test: ditto filter gdc +newwin test: cardfile demo_defkey demo_forms demo_keyok edit_field firstlast ins_wide inserts knight ncurses newdemo testcurs xmas +nl test: demo_forms ncurses rain testcurs +nocbreak test: testcurs +nodelay test: firework gdc lrtest ncurses newdemo rain tclock view xmas +noecho test: bs cardfile demo_defkey demo_forms demo_keyok ditto firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest ncurses rain tclock testcurs view worm xmas +nonl test: bs demo_forms hashtest ncurses view worm xmas +noqiflush - +noraw test: demo_forms ncurses testcurs +notimeout - +numcodes progs: dump_entry +numfnames progs: dump_entry +numnames progs: dump_entry infocmp +ospeed progs: tset +overlay test: testcurs xmas +overwrite test: ncurses +pair_content lib: ncurses +pechochar - +pnoutrefresh test: edit_field ncurses +prefresh test: testcurs +printw test: blue bs demo_defkey demo_keyok filter ncurses testcurs testscanw view +putp progs: tput +putwin test: ncurses +qiflush - +raw test: demo_forms ncurses testcurs +redrawwin - +refresh test: blue bs demo_defkey demo_forms demo_keyok ditto filter firstlast gdc hanoi hashtest lrtest ncurses tclock testcurs view worm xmas +reset_prog_mode test: filter ncurses +reset_shell_mode test: bs filter +resetty - +resize_term test: view +resizeterm lib: ncurses +restartterm - +ripoffline test: ncurses +savetty - +scanw test: testcurs testscanw +scr_dump - +scr_init - +scr_restore - +scr_set - +scrl - +scroll test: testcurs +scrollok test: demo_defkey demo_keyok ditto hashtest knight ncurses testcurs testscanw view +set_curterm lib: ncurses +set_term test: ditto +setcchar test: ins_wide ncurses view +setscrreg test: view +setupterm test: dots progs: clear tput tset +slk_attr - +slk_attr_off - +slk_attr_on - +slk_attr_set - +slk_attroff lib: ncurses +slk_attron lib: ncurses +slk_attrset - +slk_clear test: ncurses +slk_color test: ncurses +slk_init test: ncurses +slk_label test: ncurses +slk_noutrefresh test: ncurses +slk_refresh test: ncurses +slk_restore test: ncurses +slk_set test: ncurses +slk_touch test: ncurses +slk_wset test: ncurses +standend test: blue gdc ncurses worm +standout test: blue ncurses +start_color test: blue bs demo_forms filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas +stdscr test: bs demo_forms ditto filter firework gdc hanoi hashtest ins_wide inserts knight lrtest ncurses rain tclock testcurs testscanw view xmas +strcodes progs: dump_entry +strfnames progs: dump_entry +strnames progs: dump_entry infocmp tic +subpad test: testcurs +subwin test: ncurses newdemo testcurs +syncok - +term_attrs - +termattrs test: ncurses testcurs +termname test: testcurs +tgetent test: railroad +tgetflag - +tgetnum test: railroad +tgetstr test: railroad +tgoto test: railroad +tigetflag progs: tput +tigetnum test: ncurses progs: tput +tigetstr test: blue demo_defkey testcurs progs: tput +timeout test: rain +touchline lib: ncurses +touchwin test: edit_field filter firstlast ncurses xmas +tparm test: dots progs: tic tput +tputs test: dots railroad progs: clear tset +trace test: hanoi hashtest lrtest ncurses testcurs view worm +ttytype lib: ncurses +typeahead test: testcurs +unctrl test: ncurses testcurs +unget_wch - +ungetch test: bs knight +ungetmouse - +untouchwin - +use_default_colors test: filter firework gdc hanoi knight ncurses rain tclock worm xmas +use_env progs: tput +use_extended_names progs: infocmp tic +vid_attr - +vid_puts - +vidattr lib: ncurses +vidputs lib: ncurses +vline test: gdc ncurses +vline_set - +vw_printw - +vw_scanw - +vwprintw lib: ncurses +vwscanw lib: ncurses +wadd_wch lib: ncurses +wadd_wchnstr lib: ncurses +wadd_wchstr - +waddch test: firstlast knight ncurses +waddchnstr lib: ncurses +waddchstr - +waddnstr lib: form +waddnwstr test: ncurses +waddstr test: demo_forms edit_field firstlast ins_wide knight ncurses testcurs +waddwstr test: ins_wide +wattr_get - +wattr_off lib: menu +wattr_on lib: menu +wattr_set - +wattroff test: demo_forms ncurses testcurs xmas +wattron test: testcurs xmas +wattrset test: demo_forms ncurses newdemo testcurs xmas +wbkgd test: demo_forms ncurses newdemo testcurs +wbkgdset test: ins_wide inserts ncurses +wbkgrnd lib: ncurses +wbkgrndset lib: ncurses +wborder lib: ncurses +wborder_set lib: ncurses +wchgat test: view +wclear test: ncurses testcurs +wclrtobot test: firstlast ncurses testcurs +wclrtoeol test: demo_defkey demo_keyok firstlast ins_wide inserts knight ncurses testcurs +wcolor_set lib: ncurses +wcursyncup lib: form +wdelch test: ncurses testcurs +wdeleteln test: testcurs +wecho_wchar lib: ncurses +wechochar lib: ncurses +wenclose lib: menu +werase test: cardfile demo_forms edit_field firstlast knight ncurses newdemo testcurs xmas +wget_wch test: ins_wide ncurses +wget_wstr - +wgetch test: cardfile demo_defkey demo_keyok edit_field gdc inserts knight ncurses newdemo testcurs +wgetn_wstr test: ncurses +wgetnstr test: ncurses +wgetstr - +whline test: testcurs +whline_set lib: ncurses +win_wch lib: ncurses +win_wchnstr lib: ncurses +win_wchstr - +winch test: knight testcurs +winchnstr lib: ncurses +winchstr - +winnstr test: demo_defkey +winnwstr lib: ncurses +wins_nwstr lib: ncurses +wins_wch lib: ncurses +wins_wstr - +winsch test: testcurs +winsdelln lib: form +winsertln test: testcurs +winsnstr lib: form +winsstr - +winstr - +winwstr lib: ncurses +wmouse_trafo lib: menu +wmove test: demo_defkey demo_keyok firstlast ins_wide inserts knight ncurses newdemo testcurs +wnoutrefresh test: edit_field ins_wide inserts knight ncurses +wprintw test: demo_defkey demo_forms demo_keyok edit_field ins_wide inserts knight ncurses testcurs +wredrawln lib: ncurses +wrefresh test: demo_forms demo_keyok edit_field firstlast knight lrtest ncurses newdemo tclock testcurs view xmas +wresize test: cardfile ncurses +wscanw test: testcurs +wscrl test: ncurses testcurs view +wsetscrreg test: ncurses testcurs +wstandend test: xmas +wstandout test: xmas +wsyncdown lib: ncurses +wsyncup lib: form +wtimeout test: ncurses +wtouchln lib: form +wunctrl - +wvline test: testcurs +wvline_set lib: ncurses + +libpanel: +-------- +bottom_panel test: ncurses +del_panel test: ncurses +hide_panel test: ncurses +move_panel test: ncurses +new_panel test: cardfile ncurses +panel_above - +panel_below - +panel_hidden - +panel_userptr test: ncurses +panel_window test: cardfile ncurses +replace_panel - +set_panel_userptr test: ncurses +show_panel test: ncurses +top_panel test: cardfile ncurses +update_panels test: cardfile ncurses diff --git a/test/aclocal.m4 b/test/aclocal.m4 new file mode 100644 index 00000000..47928a05 --- /dev/null +++ b/test/aclocal.m4 @@ -0,0 +1,875 @@ +dnl $Id: aclocal.m4,v 1.6 2003/10/19 00:09:23 tom Exp $ +dnl --------------------------------------------------------------------------- +dnl --------------------------------------------------------------------------- +dnl CF_ADD_INCDIR version: 4 updated: 2002/12/21 14:25:52 +dnl ------------- +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's +dnl redundant. We don't normally need to add -I/usr/local/include for gcc, +dnl but old versions (and some misinstalled ones) need that. To make things +dnl worse, gcc 3.x gives error messages if -I/usr/local/include is added to +dnl the include-path). +AC_DEFUN([CF_ADD_INCDIR], +[ +for cf_add_incdir in $1 +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + /usr/local/include) # (vi + if test "$GCC" = yes + then + cf_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + AC_TRY_COMPILE([#include ], + [printf("Hello")], + [], + [CPPFLAGS="$cf_save_CPPFLAGS"]) + fi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CHECK_CACHE version: 7 updated: 2001/12/19 00:50:10 +dnl -------------- +dnl Check if we're accidentally using a cache from a different machine. +dnl Derive the system name, as a check for reusing the autoconf cache. +dnl +dnl If we've packaged config.guess and config.sub, run that (since it does a +dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow +dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM +dnl which is useful in cross-compiles. +AC_DEFUN([CF_CHECK_CACHE], +[ +if test -f $srcdir/config.guess ; then + ifelse([$1],,[AC_CANONICAL_HOST],[$1]) + system_name="$host_os" +else + system_name="`(uname -s -r) 2>/dev/null`" + if test -z "$system_name" ; then + system_name="`(hostname) 2>/dev/null`" + fi +fi +test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") +AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) + +test -z "$system_name" && system_name="$cf_cv_system_name" +test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) + +if test ".$system_name" != ".$cf_cv_system_name" ; then + AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) + AC_ERROR("Please remove config.cache and try again.") +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_ACS_MAP version: 3 updated: 2003/05/17 22:19:02 +dnl ----------------- +dnl Check for likely values of acs_map[]: +AC_DEFUN([CF_CURSES_ACS_MAP], +[ +AC_CACHE_CHECK(for alternate character set array, cf_cv_curses_acs_map,[ +cf_cv_curses_acs_map=unknown +for name in acs_map _acs_map __acs_map _nc_acs_map +do +AC_TRY_LINK([ +#include <${cf_cv_ncurses_header-curses.h}> +],[ +$name['k'] = ACS_PLUS +],[cf_cv_curses_acs_map=$name; break]) +done +]) + +test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map) +]) +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_CHECK_TYPE version: 2 updated: 2003/03/01 23:40:33 +dnl -------------------- +dnl Check if curses.h defines the given type +AC_DEFUN([CF_CURSES_CHECK_TYPE], +[ +AC_MSG_CHECKING(for type $1 in ${cf_cv_ncurses_header-curses.h}) +AC_TRY_COMPILE([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header-curses.h}>],[ +$1 foo +],cf_result=yes,cf_result=no) +AC_MSG_RESULT($cf_result) +if test $cf_result = yes ; then + CF_UPPER(cf_result,have_type_$1) + AC_DEFINE_UNQUOTED($cf_result) +else + AC_DEFINE_UNQUOTED($1,$2) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_CPPFLAGS version: 7 updated: 2003/06/06 00:48:41 +dnl ------------------ +dnl Look for the curses headers. +AC_DEFUN([CF_CURSES_CPPFLAGS],[ + +AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[ +cf_cv_curses_incdir=no +case $host_os in #(vi +hpux10.*|hpux11.*) #(vi + test -d /usr/include/curses_colr && \ + cf_cv_curses_incdir="-I/usr/include/curses_colr" + ;; +sunos3*|sunos4*) + test -d /usr/5lib && \ + test -d /usr/5include && \ + cf_cv_curses_incdir="-I/usr/5include" + ;; +esac +]) +test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS" + +AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ +cf_cv_ncurses_header=none +for cf_header in \ + curses.h \ + ncurses.h \ + ncurses/curses.h \ + ncurses/ncurses.h +do +AC_TRY_COMPILE([#include <${cf_header}>], + [initscr(); tgoto("?", 0,0)], + [cf_cv_ncurses_header=$cf_header; break],[]) +done +]) + +if test "$cf_cv_ncurses_header" = none ; then + AC_MSG_ERROR(No curses header-files found) +fi + +# cheat, to get the right #define's for HAVE_NCURSES_H, etc. +AC_CHECK_HEADERS($cf_cv_ncurses_header) + +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_LIBS version: 22 updated: 2002/10/27 18:21:42 +dnl -------------- +dnl Look for the curses libraries. Older curses implementations may require +dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. +AC_DEFUN([CF_CURSES_LIBS],[ + +AC_MSG_CHECKING(if we have identified curses libraries) +AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + [initscr(); tgoto("?", 0,0)], + cf_result=yes, + cf_result=no) +AC_MSG_RESULT($cf_result) + +if test "$cf_result" = no ; then +case $host_os in #(vi +freebsd*) #(vi + AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) + ;; +hpux10.*|hpux11.*) #(vi + AC_CHECK_LIB(cur_colr,initscr,[ + LIBS="-lcur_colr $LIBS" + ac_cv_func_initscr=yes + ],[ + AC_CHECK_LIB(Hcurses,initscr,[ + # HP's header uses __HP_CURSES, but user claims _HP_CURSES. + LIBS="-lHcurses $LIBS" + CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS" + ac_cv_func_initscr=yes + ])]) + ;; +linux*) # Suse Linux does not follow /usr/lib convention + LIBS="$LIBS -L/lib" + ;; +sunos3*|sunos4*) + test -d /usr/5lib && \ + LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap" + ac_cv_func_initscr=yes + ;; +esac + +if test ".$ac_cv_func_initscr" != .yes ; then + cf_save_LIBS="$LIBS" + cf_term_lib="" + cf_curs_lib="" + + if test ".${cf_cv_ncurses_version-no}" != .no + then + cf_check_list="ncurses curses cursesX" + else + cf_check_list="cursesX curses ncurses" + fi + + # Check for library containing tgoto. Do this before curses library + # because it may be needed to link the test-case for initscr. + AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ + for cf_term_lib in $cf_check_list termcap termlib unknown + do + AC_CHECK_LIB($cf_term_lib,tgoto,[break]) + done + ]) + + # Check for library containing initscr + test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" + for cf_curs_lib in $cf_check_list xcurses jcurses unknown + do + AC_CHECK_LIB($cf_curs_lib,initscr,[break]) + done + test $cf_curs_lib = unknown && AC_ERROR(no curses library found) + + LIBS="-l$cf_curs_lib $cf_save_LIBS" + if test "$cf_term_lib" = unknown ; then + AC_MSG_CHECKING(if we can link with $cf_curs_lib library) + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + [initscr()], + [cf_result=yes], + [cf_result=no]) + AC_MSG_RESULT($cf_result) + test $cf_result = no && AC_ERROR(Cannot link curses library) + elif test "$cf_curs_lib" = "$cf_term_lib" ; then + : + elif test "$cf_term_lib" != predefined ; then + AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + [initscr(); tgoto((char *)0, 0, 0);], + [cf_result=no], + [ + LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + [initscr()], + [cf_result=yes], + [cf_result=error]) + ]) + AC_MSG_RESULT($cf_result) + fi +fi +fi + +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_MAP version: 3 updated: 2003/05/17 22:19:02 +dnl ------------------ +dnl Check for likely values of wacs_map[]: +AC_DEFUN([CF_CURSES_WACS_MAP], +[ +AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ + cf_cv_curses_wacs_map=unknown + for name in wacs_map _wacs_map __wacs_map _nc_wacs + do + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header-curses.h}>], + [$name['k'] = *WACS_PLUS], + [cf_cv_curses_wacs_map=$name + break]) + done]) +]) +dnl --------------------------------------------------------------------------- +dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 +dnl ---------- +dnl "dirname" is not portable, so we fake it with a shell script. +AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FIND_LIBRARY version: 7 updated: 2000/04/13 21:38:04 +dnl --------------- +dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We +dnl prefer a standard location, and use -L options only if we do not find the +dnl library in the standard library location(s). +dnl $1 = library name +dnl $2 = library class, usually the same as library name +dnl $3 = includes +dnl $4 = code fragment to compile/link +dnl $5 = corresponding function-name +dnl $6 = flag, nonnull if failure causes an error-exit +dnl +dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had +dnl to use a -L option. +AC_DEFUN([CF_FIND_LIBRARY], +[ + eval 'cf_cv_have_lib_'$1'=no' + cf_libdir="" + AC_CHECK_FUNC($5, + eval 'cf_cv_have_lib_'$1'=yes',[ + cf_save_LIBS="$LIBS" + AC_MSG_CHECKING(for $5 in -l$1) + LIBS="-l$1 $LIBS" + AC_TRY_LINK([$3],[$4], + [AC_MSG_RESULT(yes) + eval 'cf_cv_have_lib_'$1'=yes' + ], + [AC_MSG_RESULT(no) + CF_LIBRARY_PATH(cf_search,$2) + for cf_libdir in $cf_search + do + AC_MSG_CHECKING(for -l$1 in $cf_libdir) + LIBS="-L$cf_libdir -l$1 $cf_save_LIBS" + AC_TRY_LINK([$3],[$4], + [AC_MSG_RESULT(yes) + eval 'cf_cv_have_lib_'$1'=yes' + break], + [AC_MSG_RESULT(no) + LIBS="$cf_save_LIBS"]) + done + ]) + ]) +eval 'cf_found_library=[$]cf_cv_have_lib_'$1 +ifelse($6,,[ +if test $cf_found_library = no ; then + AC_ERROR(Cannot link $1 library) +fi +]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FUNC_CURSES_VERSION version: 3 updated: 2003/05/17 22:19:02 +dnl ---------------------- +dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS. +dnl It's a character string "SVR4", not documented. +AC_DEFUN([CF_FUNC_CURSES_VERSION], +[ +AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[ +AC_TRY_RUN([ +#include <${cf_cv_ncurses_header-curses.h}> +int main() +{ + char temp[1024]; + sprintf(temp, "%s\n", curses_version()); + exit(0); +}] +,[cf_cv_func_curses_version=yes] +,[cf_cv_func_curses_version=no] +,[cf_cv_func_curses_version=unknown]) +rm -f core]) +test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION) +]) +dnl --------------------------------------------------------------------------- +dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53 +dnl ------------- +dnl Check if we must define _GNU_SOURCE to get a reasonable value for +dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect +dnl (or misfeature) of glibc2, which breaks portability of many applications, +dnl since it is interwoven with GNU extensions. +dnl +dnl Well, yes we could work around it... +AC_DEFUN([CF_GNU_SOURCE], +[ +AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ +AC_TRY_COMPILE([#include ],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_gnu_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + AC_TRY_COMPILE([#include ],[ +#ifdef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_gnu_source=no], + [cf_cv_gnu_source=yes]) + CPPFLAGS="$cf_save" + ]) +]) +test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59 +dnl -------------- +dnl Construct a search-list for a nonstandard header-file +AC_DEFUN([CF_HEADER_PATH], +[CF_SUBDIR_PATH($1,$2,include) +test "$includedir" != NONE && \ +test "$includedir" != "/usr/include" && \ +test -d "$includedir" && { + test -d $includedir && $1="[$]$1 $includedir" + test -d $includedir/$2 && $1="[$]$1 $includedir/$2" +} + +test "$oldincludedir" != NONE && \ +test "$oldincludedir" != "/usr/include" && \ +test -d "$oldincludedir" && { + test -d $oldincludedir && $1="[$]$1 $oldincludedir" + test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2" +} + +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INHERIT_SCRIPT version: 2 updated: 2003/03/01 23:50:42 +dnl ----------------- +dnl If we do not have a given script, look for it in the parent directory. +AC_DEFUN([CF_INHERIT_SCRIPT], +[ +test -f $1 || ( test -f ../$1 && cp ../$1 ./ ) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59 +dnl --------------- +dnl Construct a search-list for a nonstandard library-file +AC_DEFUN([CF_LIBRARY_PATH], +[CF_SUBDIR_PATH($1,$2,lib)])dnl +dnl --------------------------------------------------------------------------- +dnl CF_NCURSES_CC_CHECK version: 3 updated: 2003/01/12 18:59:28 +dnl ------------------- +dnl Check if we can compile with ncurses' header file +dnl $1 is the cache variable to set +dnl $2 is the header-file to include +dnl $3 is the root name (ncurses or ncursesw) +AC_DEFUN([CF_NCURSES_CC_CHECK],[ + AC_TRY_COMPILE([ +]ifelse($3,ncursesw,[ +#define _XOPEN_SOURCE_EXTENDED +#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */ +#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */ +])[ +#include <$2>],[ +#ifdef NCURSES_VERSION +]ifelse($3,ncursesw,[ +#ifndef WACS_BSSB + make an error +#endif +])[ +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else + make an error +#endif +#endif + ] + ,[$1=$cf_header] + ,[$1=no]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_NCURSES_CPPFLAGS version: 16 updated: 2002/12/29 18:30:46 +dnl ------------------- +dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting +dnl the CPPFLAGS variable so we can include its header. +dnl +dnl The header files may be installed as either curses.h, or ncurses.h (would +dnl be obsolete, except that some packagers prefer this name to distinguish it +dnl from a "native" curses implementation). If not installed for overwrite, +dnl the curses.h file would be in an ncurses subdirectory (e.g., +dnl /usr/include/ncurses), but someone may have installed overwriting the +dnl vendor's curses. Only very old versions (pre-1.9.2d, the first autoconf'd +dnl version) of ncurses don't define either __NCURSES_H or NCURSES_VERSION in +dnl the header. +dnl +dnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses header +dnl is already in the include-path, don't even bother with this, since we cannot +dnl easily determine which file it is. In this case, it has to be . +dnl +dnl The optional parameter gives the root name of the library, in case it is +dnl not installed as the default curses library. That is how the +dnl wide-character version of ncurses is installed. +AC_DEFUN([CF_NCURSES_CPPFLAGS], +[AC_REQUIRE([CF_WITH_CURSES_DIR]) + +cf_ncuhdr_root=ifelse($1,,ncurses,$1) + +test -n "$cf_cv_curses_dir" && \ +test "$cf_cv_curses_dir" != "no" && \ +CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS" + +AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h" + for cf_header in $cf_header_list + do + CF_NCURSES_CC_CHECK(cf_cv_ncurses_h,$cf_header,$1) + test "$cf_cv_ncurses_h" != no && break + done +]) + +if test "$cf_cv_ncurses_h" != no ; then + cf_cv_ncurses_header=$cf_cv_ncurses_h +else +AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[ + test -n "$verbose" && echo + CF_HEADER_PATH(cf_search,$cf_ncuhdr_root) + test -n "$verbose" && echo search path $cf_search + cf_save2_CPPFLAGS="$CPPFLAGS" + for cf_incdir in $cf_search + do + CF_ADD_INCDIR($cf_incdir) + for cf_header in \ + ncurses.h \ + curses.h + do + CF_NCURSES_CC_CHECK(cf_cv_ncurses_h2,$cf_header,$1) + if test "$cf_cv_ncurses_h2" != no ; then + cf_cv_ncurses_h2=$cf_incdir/$cf_header + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&AC_FD_MSG + break + fi + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG + done + CPPFLAGS="$cf_save2_CPPFLAGS" + test "$cf_cv_ncurses_h2" != no && break + done + test "$cf_cv_ncurses_h2" = no && AC_ERROR(not found) + ]) + + CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2) + cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header + fi + CF_ADD_INCDIR($cf_1st_incdir) + +fi + +AC_DEFINE(NCURSES) + +case $cf_cv_ncurses_header in # (vi +*ncurses.h) + AC_DEFINE(HAVE_NCURSES_H) + ;; +esac + +case $cf_cv_ncurses_header in # (vi +ncurses/curses.h|ncurses/ncurses.h) + AC_DEFINE(HAVE_NCURSES_NCURSES_H) + ;; +ncursesw/curses.h|ncursesw/ncurses.h) + AC_DEFINE(HAVE_NCURSESW_NCURSES_H) + ;; +esac + +CF_NCURSES_VERSION +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_NCURSES_LIBS version: 11 updated: 2002/12/22 14:22:25 +dnl --------------- +dnl Look for the ncurses library. This is a little complicated on Linux, +dnl because it may be linked with the gpm (general purpose mouse) library. +dnl Some distributions have gpm linked with (bsd) curses, which makes it +dnl unusable with ncurses. However, we don't want to link with gpm unless +dnl ncurses has a dependency, since gpm is normally set up as a shared library, +dnl and the linker will record a dependency. +dnl +dnl The optional parameter gives the root name of the library, in case it is +dnl not installed as the default curses library. That is how the +dnl wide-character version of ncurses is installed. +AC_DEFUN([CF_NCURSES_LIBS], +[AC_REQUIRE([CF_NCURSES_CPPFLAGS]) + +cf_nculib_root=ifelse($1,,ncurses,$1) + # This works, except for the special case where we find gpm, but + # ncurses is in a nonstandard location via $LIBS, and we really want + # to link gpm. +cf_ncurses_LIBS="" +cf_ncurses_SAVE="$LIBS" +AC_CHECK_LIB(gpm,Gpm_Open, + [AC_CHECK_LIB(gpm,initscr, + [LIBS="$cf_ncurses_SAVE"], + [cf_ncurses_LIBS="-lgpm"])]) + +case $host_os in #(vi +freebsd*) + # This is only necessary if you are linking against an obsolete + # version of ncurses (but it should do no harm, since it's static). + AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"]) + ;; +esac + +LIBS="$cf_ncurses_LIBS $LIBS" + +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) +then + LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS" +else + CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, + [#include <${cf_cv_ncurses_header-curses.h}>], + [initscr()], + initscr) +fi + +if test -n "$cf_ncurses_LIBS" ; then + AC_MSG_CHECKING(if we can link $cf_nculib_root without $cf_ncurses_LIBS) + cf_ncurses_SAVE="$LIBS" + for p in $cf_ncurses_LIBS ; do + q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"` + if test "$q" != "$LIBS" ; then + LIBS="$q" + fi + done + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + LIBS="$cf_ncurses_SAVE"]) +fi + +CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root) +AC_DEFINE_UNQUOTED($cf_nculib_ROOT) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_NCURSES_VERSION version: 10 updated: 2002/10/27 18:21:42 +dnl ------------------ +dnl Check for the version of ncurses, to aid in reporting bugs, etc. +dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use +dnl AC_REQUIRE since that does not work with the shell's if/then/else/fi. +AC_DEFUN([CF_NCURSES_VERSION], +[ +AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + AC_TRY_RUN([ +#include <${cf_cv_ncurses_header-curses.h}> +#include +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +}],[ + cf_cv_ncurses_version=`cat $cf_tempfile`],,[ + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext < +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&AC_FD_CC | grep '^Autoconf ' >conftest.out" + AC_TRY_EVAL(cf_try) + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[[^"]]*"%%' -e 's%".*%%'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi +]) + rm -f $cf_tempfile +]) +test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_PATH_SYNTAX version: 9 updated: 2002/09/17 23:03:38 +dnl -------------- +dnl Check the argument to see that it looks like a pathname. Rewrite it if it +dnl begins with one of the prefix/exec_prefix variables, and then again if the +dnl result begins with 'NONE'. This is necessary to work around autoconf's +dnl delayed evaluation of those symbols. +AC_DEFUN([CF_PATH_SYNTAX],[ +case ".[$]$1" in #(vi +.\[$]\(*\)*|.\'*\'*) #(vi + ;; +..|./*|.\\*) #(vi + ;; +.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX + ;; +.\[$]{*prefix}*) #(vi + eval $1="[$]$1" + case ".[$]$1" in #(vi + .NONE/*) + $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%` + ;; + esac + ;; #(vi +.NONE/*) + $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%` + ;; +*) + ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2) + ;; +esac +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56 +dnl ------------ +dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles. +dnl +dnl $1 = symbol to test +dnl $2 = value (if any) to use for a predefinition +AC_DEFUN([CF_PREDEFINE], +[ +AC_MSG_CHECKING(if we must define $1) +AC_TRY_COMPILE([#include +],[ +#ifndef $1 +make an error +#endif],[cf_result=no],[cf_result=yes]) +AC_MSG_RESULT($cf_result) + +if test "$cf_result" = yes ; then + CPPFLAGS="$CPPFLAGS ifelse($2,,-D$1,[-D$1=$2])" +elif test "x$2" != "x" ; then + AC_MSG_CHECKING(checking for compatible value versus $2) + AC_TRY_COMPILE([#include +],[ +#if $1-$2 < 0 +make an error +#endif],[cf_result=yes],[cf_result=no]) + AC_MSG_RESULT($cf_result) + if test "$cf_result" = no ; then + # perhaps we can override it - try... + CPPFLAGS="$CPPFLAGS -D$1=$2" + fi +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_SUBDIR_PATH version: 3 updated: 2002/12/29 18:30:46 +dnl -------------- +dnl Construct a search-list for a nonstandard header/lib-file +dnl $1 = the variable to return as result +dnl $2 = the package name +dnl $3 = the subdirectory, e.g., bin, include or lib +AC_DEFUN([CF_SUBDIR_PATH], +[$1="" + +test -d [$]HOME && { + test -n "$verbose" && echo " ... testing $3-directories under [$]HOME" + test -d [$]HOME/$3 && $1="[$]$1 [$]HOME/$3" + test -d [$]HOME/$3/$2 && $1="[$]$1 [$]HOME/$3/$2" + test -d [$]HOME/$3/$2/$3 && $1="[$]$1 [$]HOME/$3/$2/$3" +} + +# For other stuff under the home directory, it should be sufficient to put +# a symbolic link for $HOME/$2 to the actual package location: +test -d [$]HOME/$2 && { + test -n "$verbose" && echo " ... testing $3-directories under [$]HOME/$2" + test -d [$]HOME/$2/$3 && $1="[$]$1 [$]HOME/$2/$3" + test -d [$]HOME/$2/$3/$2 && $1="[$]$1 [$]HOME/$2/$3/$2" +} + +test "$prefix" != /usr/local && \ +test -d /usr/local && { + test -n "$verbose" && echo " ... testing $3-directories under /usr/local" + test -d /usr/local/$3 && $1="[$]$1 /usr/local/$3" + test -d /usr/local/$3/$2 && $1="[$]$1 /usr/local/$3/$2" + test -d /usr/local/$3/$2/$3 && $1="[$]$1 /usr/local/$3/$2/$3" + test -d /usr/local/$2/$3 && $1="[$]$1 /usr/local/$2/$3" + test -d /usr/local/$2/$3/$2 && $1="[$]$1 /usr/local/$2/$3/$2" +} + +test "$prefix" != NONE && \ +test -d $prefix && { + test -n "$verbose" && echo " ... testing $3-directories under $prefix" + test -d $prefix/$3 && $1="[$]$1 $prefix/$3" + test -d $prefix/$3/$2 && $1="[$]$1 $prefix/$3/$2" + test -d $prefix/$3/$2/$3 && $1="[$]$1 $prefix/$3/$2/$3" + test -d $prefix/$2/$3 && $1="[$]$1 $prefix/$2/$3" + test -d $prefix/$2/$3/$2 && $1="[$]$1 $prefix/$2/$3/$2" +} + +test "$prefix" != /opt && \ +test -d /opt && { + test -n "$verbose" && echo " ... testing $3-directories under /opt" + test -d /opt/$3 && $1="[$]$1 /opt/$3" + test -d /opt/$3/$2 && $1="[$]$1 /opt/$3/$2" + test -d /opt/$3/$2/$3 && $1="[$]$1 /opt/$3/$2/$3" + test -d /opt/$2/$3 && $1="[$]$1 /opt/$2/$3" + test -d /opt/$2/$3/$2 && $1="[$]$1 /opt/$2/$3/$2" +} + +test "$prefix" != /usr && \ +test -d /usr && { + test -n "$verbose" && echo " ... testing $3-directories under /usr" + test -d /usr/$3 && $1="[$]$1 /usr/$3" + test -d /usr/$3/$2 && $1="[$]$1 /usr/$3/$2" + test -d /usr/$3/$2/$3 && $1="[$]$1 /usr/$3/$2/$3" + test -d /usr/$2/$3 && $1="[$]$1 /usr/$2/$3" +} +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40 +dnl ------------------ +dnl Check if we can include with ; this breaks on +dnl older SCO configurations. +AC_DEFUN([CF_SYS_TIME_SELECT], +[ +AC_MSG_CHECKING(if sys/time.h works with sys/select.h) +AC_CACHE_VAL(cf_cv_sys_time_select,[ +AC_TRY_COMPILE([ +#include +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +],[],[cf_cv_sys_time_select=yes], + [cf_cv_sys_time_select=no]) + ]) +AC_MSG_RESULT($cf_cv_sys_time_select) +test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59 +dnl -------- +dnl Make an uppercase version of a variable +dnl $1=uppercase($2) +AC_DEFUN([CF_UPPER], +[ +$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_UTF8_LIB version: 4 updated: 2003/03/01 18:36:42 +dnl ----------- +dnl Check for multibyte support, and if not found, utf8 compatibility library +AC_DEFUN([CF_UTF8_LIB], +[ +AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ + cf_save_LIBS="$LIBS" + AC_TRY_LINK([ +#include ],[putwc(0,0);], + [cf_cv_utf8_lib=yes], + [LIBS="-lutf8 $LIBS" + AC_TRY_LINK([ +#include ],[putwc(0,0);], + [cf_cv_utf8_lib=add-on], + [cf_cv_utf8_lib=no]) + LIBS="$cf_save_LIBS" +])]) + +# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between +# ncurses/ncursesw: +if test "$cf_cv_utf8_lib" = "add-on" ; then + AC_DEFINE(HAVE_LIBUTF8_H) + LIBS="-lutf8 $LIBS" +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_WITH_CURSES_DIR version: 2 updated: 2002/11/10 14:46:59 +dnl ------------------ +dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses +dnl libraries. +AC_DEFUN([CF_WITH_CURSES_DIR],[ +AC_ARG_WITH(curses-dir, + [ --with-curses-dir=DIR directory in which (n)curses is installed], + [CF_PATH_SYNTAX(withval) + cf_cv_curses_dir=$withval], + [cf_cv_curses_dir=no]) +])dnl diff --git a/test/background.c b/test/background.c new file mode 100644 index 00000000..7b1d2274 --- /dev/null +++ b/test/background.c @@ -0,0 +1,68 @@ +/* + * $Id: background.c,v 1.1 2003/12/07 00:06:33 tom Exp $ + */ + +#include + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + short f, b; + + initscr(); + cbreak(); + noecho(); + + if (has_colors()) { + start_color(); + + pair_content(0, &f, &b); + printw("pair 0 contains (%d,%d)\n", f, b); + getch(); + + printw("Initializing pair 1 to red/black\n"); + init_pair(1, COLOR_RED, COLOR_BLACK); + bkgdset(' ' | COLOR_PAIR(1)); + printw("RED/BLACK\n"); + getch(); + + printw("Initializing pair 2 to white/blue\n"); + init_pair(2, COLOR_WHITE, COLOR_BLUE); + bkgdset(' ' | COLOR_PAIR(2)); + printw("WHITE/BLUE\n"); + getch(); + + printw("Resetting colors to pair 0\n"); + bkgdset(' ' | COLOR_PAIR(0)); + printw("Default Colors\n"); + getch(); + + printw("Resetting colors to pair 1\n"); + bkgdset(' ' | COLOR_PAIR(1)); + printw("RED/BLACK\n"); + getch(); + + printw("Setting screen to pair 0\n"); + bkgd(' ' | COLOR_PAIR(0)); + getch(); + + printw("Setting screen to pair 1\n"); + bkgd(' ' | COLOR_PAIR(1)); + getch(); + + printw("Setting screen to pair 2\n"); + bkgd(' ' | COLOR_PAIR(2)); + getch(); + + printw("Setting screen to pair 0\n"); + bkgd(' ' | COLOR_PAIR(0)); + getch(); + + } else { + printw("This demo requires a color terminal"); + getch(); + } + endwin(); + + ExitProgram(EXIT_SUCCESS); +} diff --git a/test/bs.c b/test/bs.c index 518308a0..749faf01 100644 --- a/test/bs.c +++ b/test/bs.c @@ -7,11 +7,9 @@ * v2.0 featuring strict ANSI/POSIX conformance, November 1993. * v2.1 with ncurses mouse support, September 1995 * - * $Id: bs.c,v 1.36 2002/06/29 23:32:18 tom Exp $ + * $Id: bs.c,v 1.39 2003/12/06 18:10:13 tom Exp $ */ -#include -#include #include #include @@ -251,7 +249,7 @@ intro(void) /* VARARGS1 */ static void -prompt(int n, NCURSES_CONST char *f, const char *s) +prompt(int n, const char *f, const char *s) /* print a message at the prompt line */ { (void) move(PROMPTLINE + n, 0); diff --git a/test/cardfile.c b/test/cardfile.c index 09a98239..08d33ed4 100644 --- a/test/cardfile.c +++ b/test/cardfile.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,26 +29,28 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: cardfile.c,v 1.19 2002/09/01 17:59:48 tom Exp $ + * $Id: cardfile.c,v 1.23 2003/04/26 16:43:56 tom Exp $ * - * File format: text beginning in column 1 is a title; other text forms the content. + * File format: text beginning in column 1 is a title; other text is content. */ #include -#if HAVE_FORM_H && HAVE_PANEL_H && HAVE_LIBFORM && HAVE_LIBPANEL +#if USE_LIBFORM && USE_LIBPANEL #include #include -#include - #define VISIBLE_CARDS 10 #define OFFSET_CARD 2 -#ifndef CTRL -#define CTRL(x) ((x) & 0x1f) -#endif +enum { + MY_CTRL_x = MAX_FORM_COMMAND + ,MY_CTRL_N + ,MY_CTRL_P + ,MY_CTRL_Q + ,MY_CTRL_W +}; typedef struct _card { struct _card *link; @@ -273,14 +275,14 @@ form_virtualize(WINDOW *w) switch (c) { case CTRL('W'): - return (MAX_FORM_COMMAND + 4); + return (MY_CTRL_W); case CTRL('N'): - return (MAX_FORM_COMMAND + 3); + return (MY_CTRL_N); case CTRL('P'): - return (MAX_FORM_COMMAND + 2); + return (MY_CTRL_P); case CTRL('Q'): case 033: - return (MAX_FORM_COMMAND + 1); + return (MY_CTRL_Q); case KEY_BACKSPACE: return (REQ_DEL_PREV); @@ -311,10 +313,12 @@ make_fields(CARD * p, int form_high, int form_wide) f[0] = new_field(1, form_wide, 0, 0, 0, 0); set_field_back(f[0], A_REVERSE); set_field_buffer(f[0], 0, p->title); + field_opts_off(f[0], O_BLANK); f[1] = new_field(form_high - 1, form_wide, 1, 0, 0, 0); set_field_buffer(f[1], 0, p->content); set_field_just(f[1], JUSTIFY_LEFT); + field_opts_off(f[1], O_BLANK); f[2] = 0; return f; @@ -394,18 +398,19 @@ cardfile(char *fname) break; case E_UNKNOWN_COMMAND: switch (ch) { - case MAX_FORM_COMMAND + 1: + case MY_CTRL_Q: finished = TRUE; break; - case MAX_FORM_COMMAND + 2: + case MY_CTRL_P: top_card = prev_card(top_card); order_cards(top_card, visible_cards); break; - case MAX_FORM_COMMAND + 3: + case MY_CTRL_N: top_card = next_card(top_card); order_cards(top_card, visible_cards); break; - case MAX_FORM_COMMAND + 4: + case MY_CTRL_W: + form_driver(top_card->form, REQ_VALIDATION); write_data(fname); break; #if defined(KEY_RESIZE) && HAVE_WRESIZE diff --git a/test/color_set.c b/test/color_set.c new file mode 100644 index 00000000..ed061486 --- /dev/null +++ b/test/color_set.c @@ -0,0 +1,55 @@ +/* + * $Id: color_set.c,v 1.2 2003/12/07 00:08:47 tom Exp $ + */ + +#include + +#define SHOW(n) ((n) == ERR ? "ERR" : "OK") + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + short f, b; + int i; + + initscr(); + cbreak(); + noecho(); + + if (has_colors()) { + start_color(); + + pair_content(0, &f, &b); + printw("pair 0 contains (%d,%d)\n", f, b); + getch(); + + printw("Initializing pair 1 to red/black\n"); + init_pair(1, COLOR_RED, COLOR_BLACK); + i = color_set(1, NULL); + printw("RED/BLACK (%s)\n", SHOW(i)); + getch(); + + printw("Initializing pair 2 to white/blue\n"); + init_pair(2, COLOR_WHITE, COLOR_BLUE); + i = color_set(2, NULL); + printw("WHITE/BLUE (%s)\n", SHOW(i)); + getch(); + + printw("Resetting colors to pair 0\n"); + i = color_set(0, NULL); + printw("Default Colors (%s)\n", SHOW(i)); + getch(); + + printw("Resetting colors to pair 1\n"); + i = color_set(1, NULL); + printw("RED/BLACK (%s)\n", SHOW(i)); + getch(); + + } else { + printw("This demo requires a color terminal"); + getch(); + } + endwin(); + + ExitProgram(EXIT_SUCCESS); +} diff --git a/test/configure b/test/configure index 8d44c2bb..9f513733 100755 --- a/test/configure +++ b/test/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13.20000819 +# Generated automatically using autoconf version 2.13.20030927 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -181,8 +181,9 @@ Features and packages: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF -cat <&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +if test -f $srcdir/config.guess ; then + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:565: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + + system_name="$host_os" +else + system_name="`(uname -s -r) 2>/dev/null`" + if test -z "$system_name" ; then + system_name="`(hostname) 2>/dev/null`" + fi +fi +test -n "$system_name" && cat >> confdefs.h <&6 +else + cf_cv_system_name="$system_name" +fi + + +test -z "$system_name" && system_name="$cf_cv_system_name" +test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6 + +if test ".$system_name" != ".$cf_cv_system_name" ; then + echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6 + { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; } +fi + + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:613: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:533: checking for $ac_word" >&5 +echo "configure:642: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -559,7 +668,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:563: checking for $ac_word" >&5 +echo "configure:672: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -610,7 +719,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:614: checking for $ac_word" >&5 +echo "configure:723: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -642,7 +751,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -653,12 +762,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 657 "configure" +#line 766 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -684,12 +793,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:693: checking whether we are using GNU C" >&5 +echo "configure:802: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -698,7 +807,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -717,7 +826,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:721: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:830: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -748,6 +857,86 @@ else fi fi +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:862: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + CC_G_OPT="-g" CC_SHARED_OPTS=unknown @@ -762,6 +951,9 @@ LDFLAGS_SHARED="" LD_MODEL="" LD_SHARED_OPTS="" LIBTOOL="" +LIB_CLEAN="" +LIB_COMPILE="" +LIB_LINK="" LIB_NAME=curses LIB_PREFIX="-l" LINK_TESTS="" @@ -769,297 +961,2216 @@ LINT=lint LINT_OPTS="" LOCAL_LDFLAGS="" MATH_LIB="-lm" -PROG_EXT="" TEST_ARGS="" TEST_DEPS="" cf_cv_abi_version="" cf_cv_rel_version="" +cf_cv_screen=curses +cf_cv_libtype= -# Check whether --with-5lib or --without-5lib was given. -if test "${with_5lib+set}" = set; then - withval="$with_5lib" - LIBS="-L/usr/5lib $LIBS" - CPPFLAGS="$CPPFLAGS -I/usr/5include" -fi - - - - -# Check whether --with-ncursesw or --without-ncursesw was given. -if test "${with_ncursesw+set}" = set; then - withval="$with_ncursesw" - - cat >> confdefs.h <<\EOF -#define _GNU_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _XOPEN_SOURCE_EXTENDED 1 -EOF - - echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:803: checking for initscr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:974: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr(); int main() { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_initscr) || defined (__stub___initscr) -choke me -#else -initscr(); +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ #endif - +return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_initscr=yes" + ac_cv_cygwin=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_initscr=no" + ac_cv_cygwin=no fi rm -f conftest* +rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:850: checking for Gpm_Open in -lgpm" >&5 -ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1007: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lgpm $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_mingw32=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_mingw32=no fi rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest* +fi +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1038: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +ac_exeext=$EXEEXT +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:1069: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* fi - LIB_NAME=ncursesw - echo $ac_n "checking for putwc""... $ac_c" 1>&6 -echo "configure:898: checking for putwc" >&5 -if eval "test \"`echo '$''{'ac_cv_func_putwc'+set}'`\" = set"; then +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + +echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6 +echo "configure:1094: checking if we must define _GNU_SOURCE" >&5 +if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char putwc(); - +#include int main() { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_putwc) || defined (__stub___putwc) -choke me -#else -putwc(); +#ifndef _XOPEN_SOURCE +make an error #endif - ; return 0; } EOF -if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_putwc=yes" + cf_cv_gnu_source=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_putwc=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'putwc`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for putwc in libutf8""... $ac_c" 1>&6 -echo "configure:945: checking for putwc in libutf8" >&5 -if eval "test \"`echo '$''{'cf_cv_libutf8'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cf_save_LIBS="$LIBS" - LIBS="-lutf8 $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -putwc(0,0); + +#ifdef _XOPEN_SOURCE +make an error +#endif ; return 0; } EOF -if { (eval echo configure:961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cf_cv_libutf8=yes + cf_cv_gnu_source=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cf_cv_libutf8=no + cf_cv_gnu_source=yes +fi +rm -f conftest* + CPPFLAGS="$cf_save" + fi rm -f conftest* - LIBS="$cf_save_LIBS" fi -echo "$ac_t""$cf_cv_libutf8" 1>&6 +echo "$ac_t""$cf_cv_gnu_source" 1>&6 +test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" -if test "$cf_cv_libutf8" = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_LIBUTF8_H 1 -EOF - LIBS="-lutf8 $LIBS" -fi +# Check whether --with-curses-dir or --without-curses-dir was given. +if test "${with_curses_dir+set}" = set; then + withval="$with_curses_dir" + +case ".$withval" in #(vi +.\$\(*\)*|.\'*\'*) #(vi + ;; +..|./*|.\\*) #(vi + ;; +.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX + ;; +.\${*prefix}*) #(vi + eval withval="$withval" + case ".$withval" in #(vi + .NONE/*) + withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` + ;; + esac + ;; #(vi +.NONE/*) + withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` + ;; +*) + { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; } + ;; +esac + + cf_cv_curses_dir=$withval +else + cf_cv_curses_dir=no fi - for p in $HOME /usr/local /usr - do - if test -f $p/include/ncursesw/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include/ncursesw" - test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include" - test $p != /usr && LIBS="-L$p/lib $LIBS" - break - elif test $p != /usr - then - if test -f $p/include/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include" - LIBS="-L$p/lib $LIBS" - break - fi - fi - done - -fi + + +# Check whether --with-5lib or --without-5lib was given. +if test "${with_5lib+set}" = set; then + withval="$with_5lib" + LIBS="-L/usr/5lib $LIBS" + CPPFLAGS="$CPPFLAGS -I/usr/5include" fi -# Check whether --with-ncurses or --without-ncurses was given. -if test "${with_ncurses+set}" = set; then +# Check whether --with-ncursesw or --without-ncursesw was given. +if test "${with_ncursesw+set}" = set; then + withval="$with_ncursesw" + cf_cv_screen=ncursesw +fi + + + +# Check whether --with-ncurses or --without-ncurses was given. +if test "${with_ncurses+set}" = set; then withval="$with_ncurses" - echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:1016: checking for initscr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then + cf_cv_screen=ncurses +fi + + +case $cf_cv_screen in +curses) + + +echo $ac_n "checking for extra include directories""... $ac_c" 1>&6 +echo "configure:1216: checking for extra include directories" >&5 +if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cf_cv_curses_incdir=no +case $host_os in #(vi +hpux10.*|hpux11.*) #(vi + test -d /usr/include/curses_colr && \ + cf_cv_curses_incdir="-I/usr/include/curses_colr" + ;; +sunos3*|sunos4*) + test -d /usr/5lib && \ + test -d /usr/5include && \ + cf_cv_curses_incdir="-I/usr/5include" + ;; +esac + +fi + +echo "$ac_t""$cf_cv_curses_incdir" 1>&6 +test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS" + +echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6 +echo "configure:1240: checking if we have identified curses headers" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cf_cv_ncurses_header=none +for cf_header in \ + curses.h \ + ncurses.h \ + ncurses/curses.h \ + ncurses/ncurses.h +do +cat > conftest.$ac_ext < +int main() { +initscr(); tgoto("?", 0,0) +; return 0; } +EOF +if { (eval echo configure:1260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_ncurses_header=$cf_header; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$cf_cv_ncurses_header" 1>&6 + +if test "$cf_cv_ncurses_header" = none ; then + { echo "configure: error: No curses header-files found" 1>&2; exit 1; } +fi + +# cheat, to get the right #define's for HAVE_NCURSES_H, etc. +for ac_hdr in $cf_cv_ncurses_header +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1283: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + + +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:1323: checking for ncurses version" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext < +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:1349: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext < +#include +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + rm -f $cf_tempfile + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 +test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + + + +echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6 +echo "configure:1406: checking if we have identified curses libraries" >&5 +cat > conftest.$ac_ext < +int main() { +initscr(); tgoto("?", 0,0) +; return 0; } +EOF +if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=no +fi +rm -f conftest* +echo "$ac_t""$cf_result" 1>&6 + +if test "$cf_result" = no ; then +case $host_os in #(vi +freebsd*) #(vi + echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 +echo "configure:1431: checking for tgoto in -lmytinfo" >&5 +ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmytinfo $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lmytinfo $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +hpux10.*|hpux11.*) #(vi + echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6 +echo "configure:1473: checking for initscr in -lcur_colr" >&5 +ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcur_colr $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LIBS="-lcur_colr $LIBS" + ac_cv_func_initscr=yes + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 +echo "configure:1515: checking for initscr in -lHcurses" >&5 +ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lHcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + # HP's header uses __HP_CURSES, but user claims _HP_CURSES. + LIBS="-lHcurses $LIBS" + CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS" + ac_cv_func_initscr=yes + +else + echo "$ac_t""no" 1>&6 +fi + +fi + + ;; +linux*) # Suse Linux does not follow /usr/lib convention + LIBS="$LIBS -L/lib" + ;; +sunos3*|sunos4*) + test -d /usr/5lib && \ + LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap" + ac_cv_func_initscr=yes + ;; +esac + +if test ".$ac_cv_func_initscr" != .yes ; then + cf_save_LIBS="$LIBS" + cf_term_lib="" + cf_curs_lib="" + + if test ".${cf_cv_ncurses_version-no}" != .no + then + cf_check_list="ncurses curses cursesX" + else + cf_check_list="cursesX curses ncurses" + fi + + # Check for library containing tgoto. Do this before curses library + # because it may be needed to link the test-case for initscr. + echo $ac_n "checking for tgoto""... $ac_c" 1>&6 +echo "configure:1587: checking for tgoto" >&5 +if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgoto(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_tgoto) || defined (__stub___tgoto) +choke me +#else +tgoto(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_tgoto=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_tgoto=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cf_term_lib=predefined +else + echo "$ac_t""no" 1>&6 + + for cf_term_lib in $cf_check_list termcap termlib unknown + do + echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6 +echo "configure:1636: checking for tgoto in -l$cf_term_lib" >&5 +ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$cf_term_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + break +else + echo "$ac_t""no" 1>&6 +fi + + done + +fi + + + # Check for library containing initscr + test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" + for cf_curs_lib in $cf_check_list xcurses jcurses unknown + do + echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6 +echo "configure:1685: checking for initscr in -l$cf_curs_lib" >&5 +ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$cf_curs_lib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + break +else + echo "$ac_t""no" 1>&6 +fi + + done + test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; } + + LIBS="-l$cf_curs_lib $cf_save_LIBS" + if test "$cf_term_lib" = unknown ; then + echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6 +echo "configure:1730: checking if we can link with $cf_curs_lib library" >&5 + cat > conftest.$ac_ext < +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=no +fi +rm -f conftest* + echo "$ac_t""$cf_result" 1>&6 + test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; } + elif test "$cf_curs_lib" = "$cf_term_lib" ; then + : + elif test "$cf_term_lib" != predefined ; then + echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6 +echo "configure:1755: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 + cat > conftest.$ac_ext < +int main() { +initscr(); tgoto((char *)0, 0, 0); +; return 0; } +EOF +if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_result=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" + cat > conftest.$ac_ext < +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=error +fi +rm -f conftest* + +fi +rm -f conftest* + echo "$ac_t""$cf_result" 1>&6 + fi +fi +fi + + + ;; +ncurses) + + +cf_ncuhdr_root=ncurses + +test -n "$cf_cv_curses_dir" && \ +test "$cf_cv_curses_dir" != "no" && \ +CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS" + +echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6 +echo "configure:1811: checking for $cf_ncuhdr_root header in include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h" + for cf_header in $cf_header_list + do + + cat > conftest.$ac_ext < +int main() { + +#ifdef NCURSES_VERSION + +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else + make an error +#endif +#endif + + +; return 0; } +EOF +if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_ncurses_h=$cf_header + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_ncurses_h=no +fi +rm -f conftest* + + test "$cf_cv_ncurses_h" != no && break + done + +fi + +echo "$ac_t""$cf_cv_ncurses_h" 1>&6 + +if test "$cf_cv_ncurses_h" != no ; then + cf_cv_ncurses_header=$cf_cv_ncurses_h +else +echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6 +echo "configure:1866: checking for $cf_ncuhdr_root include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + test -n "$verbose" && echo + cf_search="" + +test -d $HOME && { + test -n "$verbose" && echo " ... testing include-directories under $HOME" + test -d $HOME/include && cf_search="$cf_search $HOME/include" + test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root" + test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include" +} + +# For other stuff under the home directory, it should be sufficient to put +# a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location: +test -d $HOME/$cf_ncuhdr_root && { + test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root" + test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include" + test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /usr/local && \ +test -d /usr/local && { + test -n "$verbose" && echo " ... testing include-directories under /usr/local" + test -d /usr/local/include && cf_search="$cf_search /usr/local/include" + test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root" + test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include" + test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include" + test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != NONE && \ +test -d $prefix && { + test -n "$verbose" && echo " ... testing include-directories under $prefix" + test -d $prefix/include && cf_search="$cf_search $prefix/include" + test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root" + test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include" + test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include" + test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /opt && \ +test -d /opt && { + test -n "$verbose" && echo " ... testing include-directories under /opt" + test -d /opt/include && cf_search="$cf_search /opt/include" + test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root" + test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include" + test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include" + test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /usr && \ +test -d /usr && { + test -n "$verbose" && echo " ... testing include-directories under /usr" + test -d /usr/include && cf_search="$cf_search /usr/include" + test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root" + test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include" + test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include" +} + +test "$includedir" != NONE && \ +test "$includedir" != "/usr/include" && \ +test -d "$includedir" && { + test -d $includedir && cf_search="$cf_search $includedir" + test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root" +} + +test "$oldincludedir" != NONE && \ +test "$oldincludedir" != "/usr/include" && \ +test -d "$oldincludedir" && { + test -d $oldincludedir && cf_search="$cf_search $oldincludedir" + test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root" +} + + + test -n "$verbose" && echo search path $cf_search + cf_save2_CPPFLAGS="$CPPFLAGS" + for cf_incdir in $cf_search + do + +for cf_add_incdir in $cf_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + /usr/local/include) # (vi + if test "$GCC" = yes + then + cf_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + cat > conftest.$ac_ext < +int main() { +printf("Hello") +; return 0; } +EOF +if { (eval echo configure:1968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPPFLAGS="$cf_save_CPPFLAGS" +fi +rm -f conftest* + fi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + for cf_header in \ + ncurses.h \ + curses.h + do + + cat > conftest.$ac_ext < +int main() { + +#ifdef NCURSES_VERSION + +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else + make an error +#endif +#endif + + +; return 0; } +EOF +if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_ncurses_h2=$cf_header + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_ncurses_h2=no +fi +rm -f conftest* + + if test "$cf_cv_ncurses_h2" != no ; then + cf_cv_ncurses_h2=$cf_incdir/$cf_header + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6 + break + fi + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 + done + CPPFLAGS="$cf_save2_CPPFLAGS" + test "$cf_cv_ncurses_h2" != no && break + done + test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; } + +fi + +echo "$ac_t""$cf_cv_ncurses_h2" 1>&6 + + cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` + cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header + fi + +for cf_add_incdir in $cf_1st_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + /usr/local/include) # (vi + if test "$GCC" = yes + then + cf_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + cat > conftest.$ac_ext < +int main() { +printf("Hello") +; return 0; } +EOF +if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPPFLAGS="$cf_save_CPPFLAGS" +fi +rm -f conftest* + fi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + +fi + +cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + +case $cf_cv_ncurses_header in # (vi +*ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_H 1 +EOF + + ;; +esac + +case $cf_cv_ncurses_header in # (vi +ncurses/curses.h|ncurses/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_NCURSES_H 1 +EOF + + ;; +ncursesw/curses.h|ncursesw/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSESW_NCURSES_H 1 +EOF + + ;; +esac + + +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:2125: checking for ncurses version" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext < +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:2151: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext < +#include +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + rm -f $cf_tempfile + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 +test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + + + + +cf_nculib_root=ncurses + # This works, except for the special case where we find gpm, but + # ncurses is in a nonstandard location via $LIBS, and we really want + # to link gpm. +cf_ncurses_LIBS="" +cf_ncurses_SAVE="$LIBS" +echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 +echo "configure:2215: checking for Gpm_Open in -lgpm" >&5 +ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6 +echo "configure:2250: checking for initscr in -lgpm" >&5 +ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$cf_ncurses_SAVE" +else + echo "$ac_t""no" 1>&6 +cf_ncurses_LIBS="-lgpm" +fi + +else + echo "$ac_t""no" 1>&6 +fi + + +case $host_os in #(vi +freebsd*) + # This is only necessary if you are linking against an obsolete + # version of ncurses (but it should do no harm, since it's static). + echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 +echo "configure:2300: checking for tgoto in -lmytinfo" >&5 +ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmytinfo $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +esac + +LIBS="$cf_ncurses_LIBS $LIBS" + +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) +then + LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS" +else + + eval 'cf_cv_have_lib_'$cf_nculib_root'=no' + cf_libdir="" + echo $ac_n "checking for initscr""... $ac_c" 1>&6 +echo "configure:2352: checking for initscr" >&5 +if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char initscr(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_initscr) || defined (__stub___initscr) +choke me +#else +initscr(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_initscr=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_initscr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' +else + echo "$ac_t""no" 1>&6 + + cf_save_LIBS="$LIBS" + echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 +echo "configure:2400: checking for initscr in -l$cf_nculib_root" >&5 + LIBS="-l$cf_nculib_root $LIBS" + cat > conftest.$ac_ext < +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + cf_search="" + +test -d $HOME && { + test -n "$verbose" && echo " ... testing lib-directories under $HOME" + test -d $HOME/lib && cf_search="$cf_search $HOME/lib" + test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root" + test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib" +} + +# For other stuff under the home directory, it should be sufficient to put +# a symbolic link for $HOME/$cf_nculib_root to the actual package location: +test -d $HOME/$cf_nculib_root && { + test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root" + test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib" + test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /usr/local && \ +test -d /usr/local && { + test -n "$verbose" && echo " ... testing lib-directories under /usr/local" + test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib" + test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root" + test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib" + test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib" + test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != NONE && \ +test -d $prefix && { + test -n "$verbose" && echo " ... testing lib-directories under $prefix" + test -d $prefix/lib && cf_search="$cf_search $prefix/lib" + test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root" + test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib" + test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib" + test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /opt && \ +test -d /opt && { + test -n "$verbose" && echo " ... testing lib-directories under /opt" + test -d /opt/lib && cf_search="$cf_search /opt/lib" + test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root" + test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib" + test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib" + test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /usr && \ +test -d /usr && { + test -n "$verbose" && echo " ... testing lib-directories under /usr" + test -d /usr/lib && cf_search="$cf_search /usr/lib" + test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root" + test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib" + test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib" +} + + for cf_libdir in $cf_search + do + echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6 +echo "configure:2479: checking for -l$cf_nculib_root in $cf_libdir" >&5 + LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" + cat > conftest.$ac_ext < +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LIBS="$cf_save_LIBS" +fi +rm -f conftest* + done + +fi +rm -f conftest* + +fi + +eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root + +if test $cf_found_library = no ; then + { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; } +fi + + +fi + +if test -n "$cf_ncurses_LIBS" ; then + echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6 +echo "configure:2520: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + cf_ncurses_SAVE="$LIBS" + for p in $cf_ncurses_LIBS ; do + q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"` + if test "$q" != "$LIBS" ; then + LIBS="$q" + fi + done + cat > conftest.$ac_ext < +int main() { +initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); +; return 0; } +EOF +if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LIBS="$cf_ncurses_SAVE" +fi +rm -f conftest* +fi + + +cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + +cat >> confdefs.h <&6 +echo "configure:2563: checking for multibyte character support" >&5 +if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_save_LIBS="$LIBS" + cat > conftest.$ac_ext < +int main() { +putwc(0,0); +; return 0; } +EOF +if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_utf8_lib=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="-lutf8 $LIBS" + cat > conftest.$ac_ext < +int main() { +putwc(0,0); +; return 0; } +EOF +if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_utf8_lib=add-on +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_utf8_lib=no +fi +rm -f conftest* + LIBS="$cf_save_LIBS" + +fi +rm -f conftest* +fi + +echo "$ac_t""$cf_cv_utf8_lib" 1>&6 + +# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between +# ncurses/ncursesw: +if test "$cf_cv_utf8_lib" = "add-on" ; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBUTF8_H 1 +EOF + + LIBS="-lutf8 $LIBS" +fi + + +echo $ac_n "checking if we must define _XOPEN_SOURCE""... $ac_c" 1>&6 +echo "configure:2625: checking if we must define _XOPEN_SOURCE" >&5 +cat > conftest.$ac_ext < + +int main() { + +#ifndef _XOPEN_SOURCE +make an error +#endif +; return 0; } +EOF +if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_result=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=yes +fi +rm -f conftest* +echo "$ac_t""$cf_result" 1>&6 + +if test "$cf_result" = yes ; then + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" +elif test "x500" != "x" ; then + echo $ac_n "checking checking for compatible value versus 500""... $ac_c" 1>&6 +echo "configure:2654: checking checking for compatible value versus 500" >&5 + cat > conftest.$ac_ext < + +int main() { + +#if _XOPEN_SOURCE-500 < 0 +make an error +#endif +; return 0; } +EOF +if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=no +fi +rm -f conftest* + echo "$ac_t""$cf_result" 1>&6 + if test "$cf_result" = no ; then + # perhaps we can override it - try... + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" + fi +fi + + +echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6 +echo "configure:2686: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 +cat > conftest.$ac_ext < + +int main() { + +#ifndef _XOPEN_SOURCE_EXTENDED +make an error +#endif +; return 0; } +EOF +if { (eval echo configure:2699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_result=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=yes +fi +rm -f conftest* +echo "$ac_t""$cf_result" 1>&6 + +if test "$cf_result" = yes ; then + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" +elif test "x" != "x" ; then + echo $ac_n "checking checking for compatible value versus ""... $ac_c" 1>&6 +echo "configure:2715: checking checking for compatible value versus " >&5 + cat > conftest.$ac_ext < + +int main() { + +#if _XOPEN_SOURCE_EXTENDED- < 0 +make an error +#endif +; return 0; } +EOF +if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_result=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_result=no +fi +rm -f conftest* + echo "$ac_t""$cf_result" 1>&6 + if test "$cf_result" = no ; then + # perhaps we can override it - try... + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=" + fi +fi + + + +cf_ncuhdr_root=ncursesw + +test -n "$cf_cv_curses_dir" && \ +test "$cf_cv_curses_dir" != "no" && \ +CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS" + +echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6 +echo "configure:2754: checking for $cf_ncuhdr_root header in include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h" + for cf_header in $cf_header_list + do + + cat > conftest.$ac_ext < +int main() { + +#ifdef NCURSES_VERSION + +#ifndef WACS_BSSB + make an error +#endif + +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else + make an error +#endif +#endif + + +; return 0; } +EOF +if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_ncurses_h=$cf_header + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_ncurses_h=no +fi +rm -f conftest* + + test "$cf_cv_ncurses_h" != no && break + done + +fi + +echo "$ac_t""$cf_cv_ncurses_h" 1>&6 + +if test "$cf_cv_ncurses_h" != no ; then + cf_cv_ncurses_header=$cf_cv_ncurses_h +else +echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6 +echo "configure:2817: checking for $cf_ncuhdr_root include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + test -n "$verbose" && echo + cf_search="" + +test -d $HOME && { + test -n "$verbose" && echo " ... testing include-directories under $HOME" + test -d $HOME/include && cf_search="$cf_search $HOME/include" + test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root" + test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include" +} + +# For other stuff under the home directory, it should be sufficient to put +# a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location: +test -d $HOME/$cf_ncuhdr_root && { + test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root" + test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include" + test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /usr/local && \ +test -d /usr/local && { + test -n "$verbose" && echo " ... testing include-directories under /usr/local" + test -d /usr/local/include && cf_search="$cf_search /usr/local/include" + test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root" + test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include" + test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include" + test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != NONE && \ +test -d $prefix && { + test -n "$verbose" && echo " ... testing include-directories under $prefix" + test -d $prefix/include && cf_search="$cf_search $prefix/include" + test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root" + test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include" + test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include" + test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /opt && \ +test -d /opt && { + test -n "$verbose" && echo " ... testing include-directories under /opt" + test -d /opt/include && cf_search="$cf_search /opt/include" + test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root" + test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include" + test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include" + test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root" +} + +test "$prefix" != /usr && \ +test -d /usr && { + test -n "$verbose" && echo " ... testing include-directories under /usr" + test -d /usr/include && cf_search="$cf_search /usr/include" + test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root" + test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include" + test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include" +} + +test "$includedir" != NONE && \ +test "$includedir" != "/usr/include" && \ +test -d "$includedir" && { + test -d $includedir && cf_search="$cf_search $includedir" + test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root" +} + +test "$oldincludedir" != NONE && \ +test "$oldincludedir" != "/usr/include" && \ +test -d "$oldincludedir" && { + test -d $oldincludedir && cf_search="$cf_search $oldincludedir" + test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root" +} + + + test -n "$verbose" && echo search path $cf_search + cf_save2_CPPFLAGS="$CPPFLAGS" + for cf_incdir in $cf_search + do + +for cf_add_incdir in $cf_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + /usr/local/include) # (vi + if test "$GCC" = yes + then + cf_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + cat > conftest.$ac_ext < +int main() { +printf("Hello") +; return 0; } +EOF +if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPPFLAGS="$cf_save_CPPFLAGS" +fi +rm -f conftest* + fi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + for cf_header in \ + ncurses.h \ + curses.h + do + + cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr(); + +#define _XOPEN_SOURCE_EXTENDED +#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */ +#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */ + +#include <$cf_header> int main() { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_initscr) || defined (__stub___initscr) -choke me -#else -initscr(); +#ifdef NCURSES_VERSION + +#ifndef WACS_BSSB + make an error #endif +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else + make an error +#endif +#endif + + ; return 0; } EOF -if { (eval echo configure:1044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_initscr=yes" + cf_cv_ncurses_h2=$cf_header + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_initscr=no" + cf_cv_ncurses_h2=no fi rm -f conftest* + + if test "$cf_cv_ncurses_h2" != no ; then + cf_cv_ncurses_h2=$cf_incdir/$cf_header + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6 + break + fi + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 + done + CPPFLAGS="$cf_save2_CPPFLAGS" + test "$cf_cv_ncurses_h2" != no && break + done + test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; } + fi -if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$ac_t""$cf_cv_ncurses_h2" 1>&6 + + cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` + cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header + fi + +for cf_add_incdir in $cf_1st_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + /usr/local/include) # (vi + if test "$GCC" = yes + then + cf_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + cat > conftest.$ac_ext < +int main() { +printf("Hello") +; return 0; } +EOF +if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPPFLAGS="$cf_save_CPPFLAGS" +fi +rm -f conftest* + fi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + +fi + +cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + +case $cf_cv_ncurses_header in # (vi +*ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_H 1 +EOF + + ;; +esac + +case $cf_cv_ncurses_header in # (vi +ncurses/curses.h|ncurses/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_NCURSES_H 1 +EOF + + ;; +ncursesw/curses.h|ncursesw/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSESW_NCURSES_H 1 +EOF + + ;; +esac + + +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:3084: checking for ncurses version" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext < +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:3110: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext < +#include +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + rm -f $cf_tempfile + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 +test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF - echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:1063: checking for Gpm_Open in -lgpm" >&5 + + + + +cf_nculib_root=ncursesw + # This works, except for the special case where we find gpm, but + # ncurses is in a nonstandard location via $LIBS, and we really want + # to link gpm. +cf_ncurses_LIBS="" +cf_ncurses_SAVE="$LIBS" +echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 +echo "configure:3174: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1067,7 +3178,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1093,52 +3204,115 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +echo "configure:3209: checking for initscr in -lgpm" >&5 +ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$cf_ncurses_SAVE" else echo "$ac_t""no" 1>&6 +cf_ncurses_LIBS="-lgpm" fi - LIB_NAME=ncurses - for p in $HOME /usr/local /usr - do - if test -f $p/include/ncurses/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include/ncurses" - test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include" - test $p != /usr && LIBS="-L$p/lib $LIBS" - break - elif test $p != /usr - then - if test -f $p/include/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include" - LIBS="-L$p/lib $LIBS" - break - fi - fi - done - +else + echo "$ac_t""no" 1>&6 fi + +case $host_os in #(vi +freebsd*) + # This is only necessary if you are linking against an obsolete + # version of ncurses (but it should do no harm, since it's static). + echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 +echo "configure:3259: checking for tgoto in -lmytinfo" >&5 +ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmytinfo $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + ;; +esac +LIBS="$cf_ncurses_LIBS $LIBS" -echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:1137: checking for initscr" >&5 +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) +then + LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS" +else + + eval 'cf_cv_have_lib_'$cf_nculib_root'=no' + cf_libdir="" + echo $ac_n "checking for initscr""... $ac_c" 1>&6 +echo "configure:3311: checking for initscr" >&5 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_initscr=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_initscr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' +else + echo "$ac_t""no" 1>&6 + + cf_save_LIBS="$LIBS" + echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 +echo "configure:3359: checking for initscr in -l$cf_nculib_root" >&5 + LIBS="-l$cf_nculib_root $LIBS" + cat > conftest.$ac_ext < +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + cf_search="" + +test -d $HOME && { + test -n "$verbose" && echo " ... testing lib-directories under $HOME" + test -d $HOME/lib && cf_search="$cf_search $HOME/lib" + test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root" + test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib" +} + +# For other stuff under the home directory, it should be sufficient to put +# a symbolic link for $HOME/$cf_nculib_root to the actual package location: +test -d $HOME/$cf_nculib_root && { + test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root" + test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib" + test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /usr/local && \ +test -d /usr/local && { + test -n "$verbose" && echo " ... testing lib-directories under /usr/local" + test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib" + test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root" + test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib" + test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib" + test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root" +} -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_initscr) || defined (__stub___initscr) -choke me -#else -initscr(); -#endif +test "$prefix" != NONE && \ +test -d $prefix && { + test -n "$verbose" && echo " ... testing lib-directories under $prefix" + test -d $prefix/lib && cf_search="$cf_search $prefix/lib" + test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root" + test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib" + test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib" + test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /opt && \ +test -d /opt && { + test -n "$verbose" && echo " ... testing lib-directories under /opt" + test -d /opt/lib && cf_search="$cf_search /opt/lib" + test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root" + test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib" + test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib" + test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root" +} + +test "$prefix" != /usr && \ +test -d /usr && { + test -n "$verbose" && echo " ... testing lib-directories under /usr" + test -d /usr/lib && cf_search="$cf_search /usr/lib" + test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root" + test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib" + test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib" +} + for cf_libdir in $cf_search + do + echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6 +echo "configure:3438: checking for -l$cf_nculib_root in $cf_libdir" >&5 + LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" + cat > conftest.$ac_ext < +int main() { +initscr() ; return 0; } EOF -if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_initscr=yes" + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_initscr=no" + echo "$ac_t""no" 1>&6 + LIBS="$cf_save_LIBS" +fi +rm -f conftest* + done + fi rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root -echo $ac_n "checking for initscr in -l$LIB_NAME""... $ac_c" 1>&6 -echo "configure:1184: checking for initscr in -l$LIB_NAME" >&5 -ac_lib_var=`echo $LIB_NAME'_'initscr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-l$LIB_NAME $LIBS" -cat > conftest.$ac_ext <&2; exit 1; } +fi + + +fi +if test -n "$cf_ncurses_LIBS" ; then + echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6 +echo "configure:3479: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + cf_ncurses_SAVE="$LIBS" + for p in $cf_ncurses_LIBS ; do + q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"` + if test "$q" != "$LIBS" ; then + LIBS="$q" + fi + done + cat > conftest.$ac_ext < int main() { -initscr() +initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$ac_t""no" 1>&6 + LIBS="$cf_ncurses_SAVE" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo $LIB_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <> confdefs.h <&6 -fi + LIB_NAME=ncursesw + ;; +esac -fi -echo $ac_n "checking for form_driver in -lform""... $ac_c" 1>&6 -echo "configure:1233: checking for form_driver in -lform" >&5 -ac_lib_var=`echo form'_'form_driver | sed 'y%./+-%__p_%'` + +echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6 +echo "configure:3523: checking for form_driver in -lform$cf_cv_libtype" >&5 +ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lform $LIBS" +LIBS="-lform$cf_cv_libtype $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1263,28 +3553,28 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo form | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi -echo $ac_n "checking for menu_driver in -lmenu""... $ac_c" 1>&6 -echo "configure:1280: checking for menu_driver in -lmenu" >&5 -ac_lib_var=`echo menu'_'menu_driver | sed 'y%./+-%__p_%'` +echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6 +echo "configure:3570: checking for menu_driver in -lmenu$cf_cv_libtype" >&5 +ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lmenu $LIBS" +LIBS="-lmenu$cf_cv_libtype $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1310,28 +3600,28 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo menu | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi -echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6 -echo "configure:1327: checking for new_panel in -lpanel" >&5 -ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'` +echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6 +echo "configure:3617: checking for new_panel in -lpanel$cf_cv_libtype" >&5 +ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpanel $LIBS" +LIBS="-lpanel$cf_cv_libtype $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1357,13 +3647,13 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo panel | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 @@ -1371,12 +3661,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1375: checking return type of signal handlers" >&5 +echo "configure:3665: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1393,7 +3683,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1412,93 +3702,13 @@ EOF -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1417: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1497: checking for ANSI C header files" >&5 +echo "configure:3707: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1506,7 +3716,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1523,7 +3733,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1541,7 +3751,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1562,7 +3772,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1573,7 +3783,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1597,12 +3807,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1601: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3811: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1611,7 +3821,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1648,17 +3858,17 @@ unistd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1652: checking for $ac_hdr" >&5 +echo "configure:3862: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1686,24 +3896,27 @@ done for ac_func in \ +color_set \ getnstr \ gettimeofday \ napms \ resize_term \ resizeterm \ +slk_color \ strdup \ use_default_colors \ vsscanf \ +wchgat \ wresize \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1702: checking for $ac_func" >&5 +echo "configure:3915: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1751,8 +3964,85 @@ fi done +cat > conftest.$ac_ext < +int main() { + + (void) assume_default_colors (0, 0); + (void) curses_version (); + (void) define_key (0, 0); + (void) is_term_resized (0, 0); + (void) key_defined (0); + (void) keybound (0, 0); + (void) keyok (0, 0); + (void) resize_term (0, 0); + (void) resizeterm (0, 0); + (void) use_default_colors (); + (void) use_extended_names (0); + (void) wresize (0, 0, 0); + +; return 0; } +EOF +if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define NCURSES_EXT_FUNCS 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + + +echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6 +echo "configure:4004: checking if sys/time.h works with sys/select.h" >&5 +if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_sys_time_select=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_sys_time_select=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$cf_cv_sys_time_select" 1>&6 +test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF +#define HAVE_SYS_TIME_SELECT 1 +EOF + + + echo $ac_n "checking for function curses_version""... $ac_c" 1>&6 -echo "configure:1756: checking for function curses_version" >&5 +echo "configure:4046: checking for function curses_version" >&5 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1761,10 +4051,10 @@ if test "$cross_compiling" = yes; then cf_cv_func_curses_version=unknown else cat > conftest.$ac_ext < +#include <${cf_cv_ncurses_header-curses.h}> int main() { char temp[1024]; @@ -1773,7 +4063,7 @@ int main() } EOF -if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_func_curses_version=yes @@ -1796,8 +4086,9 @@ test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF EOF + echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6 -echo "configure:1801: checking for alternate character set array" >&5 +echo "configure:4092: checking for alternate character set array" >&5 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1806,10 +4097,10 @@ cf_cv_curses_acs_map=unknown for name in acs_map _acs_map __acs_map _nc_acs_map do cat > conftest.$ac_ext < +#include <${cf_cv_ncurses_header-curses.h}> int main() { @@ -1817,7 +4108,7 @@ $name['k'] = ACS_PLUS ; return 0; } EOF -if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_curses_acs_map=$name; break else @@ -1836,69 +4127,60 @@ test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <&6 -echo "configure:1841: checking for wide alternate character set array" >&5 +echo "configure:4133: checking for wide alternate character set array" >&5 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else -cf_cv_curses_wacs_map=unknown -for name in wacs_map _wacs_map __wacs_map _nc_wacs -do -cat > conftest.$ac_ext < conftest.$ac_ext < - +#include <${cf_cv_ncurses_header-curses.h}> int main() { - -$name['k'] = *WACS_PLUS - +$name['k'] = *WACS_PLUS ; return 0; } EOF -if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - cf_cv_curses_wacs_map=$name; break + cf_cv_curses_wacs_map=$name + break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* -done - + done fi echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6 -test "$cf_cv_curses_wacs_map" != unknown && cat >> confdefs.h <&6 -echo "configure:1887: checking for type attr_t in curses.h" >&5 +echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6 +echo "configure:4169: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5 cat > conftest.$ac_ext < +#include <${cf_cv_ncurses_header-curses.h}> int main() { attr_t foo ; return 0; } EOF -if { (eval echo configure:1902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -1910,7 +4192,7 @@ fi rm -f conftest* echo "$ac_t""$cf_result" 1>&6 if test $cf_result = yes ; then - + cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <&6 -echo "configure:1930: checking for type mbstate_t in curses.h" >&5 +echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6 +echo "configure:4212: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5 cat > conftest.$ac_ext < +#include <${cf_cv_ncurses_header-curses.h}> int main() { mbstate_t foo ; return 0; } EOF -if { (eval echo configure:1945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -1953,7 +4235,7 @@ fi rm -f conftest* echo "$ac_t""$cf_result" 1>&6 if test $cf_result = yes ; then - + cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <&6 -echo "configure:1974: checking if sys/time.h works with sys/select.h" >&5 -if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat > conftest.$ac_ext < -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -int main() { - -; return 0; } -EOF -if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cf_cv_sys_time_select=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cf_cv_sys_time_select=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$cf_cv_sys_time_select" 1>&6 -test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF -#define HAVE_SYS_TIME_SELECT 1 -EOF - - - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -2101,7 +4341,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13.20000819" + echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2143,7 +4383,14 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g +s%@CPP@%$CPP%g s%@CC_G_OPT@%$CC_G_OPT%g s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g @@ -2156,6 +4403,9 @@ s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g s%@LD_MODEL@%$LD_MODEL%g s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g s%@LIBTOOL@%$LIBTOOL%g +s%@LIB_CLEAN@%$LIB_CLEAN%g +s%@LIB_COMPILE@%$LIB_COMPILE%g +s%@LIB_LINK@%$LIB_LINK%g s%@LIB_NAME@%$LIB_NAME%g s%@LIB_PREFIX@%$LIB_PREFIX%g s%@LINK_TESTS@%$LINK_TESTS%g @@ -2163,12 +4413,12 @@ s%@LINT@%$LINT%g s%@LINT_OPTS@%$LINT_OPTS%g s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g s%@MATH_LIB@%$MATH_LIB%g -s%@PROG_EXT@%$PROG_EXT%g s%@TEST_ARGS@%$TEST_ARGS%g s%@TEST_DEPS@%$TEST_DEPS%g s%@cf_cv_abi_version@%$cf_cv_abi_version%g s%@cf_cv_rel_version@%$cf_cv_rel_version%g -s%@CPP@%$CPP%g +s%@EXEEXT@%$EXEEXT%g +s%@OBJEXT@%$OBJEXT%g CEOF EOF @@ -2379,11 +4629,9 @@ cat >> $CONFIG_STATUS <<\EOF # work consistently for different make-programs (the '\$(MODEL)/' confuses # some, and the '\$x' confuses others). TEST_EOF -LIST=`make echo_tests` -LAST=`make echo_suffix` -for n in $LIST +LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules` +for N in $LIST do - N=`echo $n | sed -e s/${LAST}\$//` cat >>Makefile <],[putwc(0,0);], - [cf_cv_libutf8=yes], - [cf_cv_libutf8=no]) - LIBS="$cf_save_LIBS" -]) - -if test "$cf_cv_libutf8" = yes ; then - AC_DEFINE(HAVE_LIBUTF8_H) - LIBS="-lutf8 $LIBS" -fi -])dnl - dnl --------------------------------------------------------------------------- dnl NcursesW, installed in conventional location AC_ARG_WITH(ncursesw, [ --with-ncursesw use wide ncurses-libraries (installed)], - [ - AC_DEFINE(_GNU_SOURCE) - AC_DEFINE(_XOPEN_SOURCE_EXTENDED) - AC_CHECK_FUNC(initscr,,[ - AC_CHECK_LIB(gpm,Gpm_Open) - LIB_NAME=ncursesw - AC_CHECK_FUNC(putwc,,[CF_LIBUTF8]) - for p in $HOME /usr/local /usr - do - if test -f $p/include/ncursesw/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include/ncursesw" - test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include" - test $p != /usr && LIBS="-L$p/lib $LIBS" - break - elif test $p != /usr - then - if test -f $p/include/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include" - LIBS="-L$p/lib $LIBS" - break - fi - fi - done - ],[test -d /usr/ccs/lib && LIBS="-L/usr/ccs/lib $LIBS"])]) + [cf_cv_screen=ncursesw]) dnl Ncurses, installed in conventional location AC_ARG_WITH(ncurses, [ --with-ncurses use ncurses-libraries (installed)], - [AC_CHECK_FUNC(initscr,,[ - AC_CHECK_LIB(gpm,Gpm_Open) - LIB_NAME=ncurses - for p in $HOME /usr/local /usr - do - if test -f $p/include/ncurses/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include/ncurses" - test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include" - test $p != /usr && LIBS="-L$p/lib $LIBS" - break - elif test $p != /usr - then - if test -f $p/include/curses.h - then - CPPFLAGS="$CPPFLAGS -I$p/include" - LIBS="-L$p/lib $LIBS" - break - fi - fi - done - ],[test -d /usr/ccs/lib && LIBS="-L/usr/ccs/lib $LIBS"])]) + [cf_cv_screen=ncurses]) + +case $cf_cv_screen in +curses) + CF_CURSES_CPPFLAGS + CF_NCURSES_VERSION + CF_CURSES_LIBS + ;; +ncurses) + CF_NCURSES_CPPFLAGS + CF_NCURSES_LIBS + LIB_NAME=ncurses + ;; +ncursesw) + cf_cv_libtype=w + CF_UTF8_LIB + CF_PREDEFINE(_XOPEN_SOURCE,500) + CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED) + CF_NCURSES_CPPFLAGS(ncursesw) + CF_NCURSES_LIBS(ncursesw) + LIB_NAME=ncursesw + ;; +esac dnl If we've not specified a library, assume we're using sysvr4 libraries dnl installed conventionally (e.g., SunOS 5.x - solaris). dnl Autoconf builds up the $LIBS in reverse order -AC_CHECK_FUNC(initscr,,[ -AC_CHECK_LIB($LIB_NAME,initscr)]) -AC_CHECK_LIB(form,form_driver) -AC_CHECK_LIB(menu,menu_driver) -AC_CHECK_LIB(panel,new_panel) +AC_CHECK_LIB(form$cf_cv_libtype,form_driver) +AC_CHECK_LIB(menu$cf_cv_libtype,menu_driver) +AC_CHECK_LIB(panel$cf_cv_libtype,new_panel) AC_TYPE_SIGNAL @@ -185,122 +155,43 @@ unistd.h \ ) AC_CHECK_FUNCS( \ +color_set \ getnstr \ gettimeofday \ napms \ resize_term \ resizeterm \ +slk_color \ strdup \ use_default_colors \ vsscanf \ +wchgat \ wresize \ ) -dnl --------------------------------------------------------------------------- -dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS. -dnl It's a character string "SVR4", not documented. -AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[ -AC_TRY_RUN([ -#include -int main() -{ - char temp[1024]; - sprintf(temp, "%s\n", curses_version()); - exit(0); -}] -,[cf_cv_func_curses_version=yes] -,[cf_cv_func_curses_version=no] -,[cf_cv_func_curses_version=unknown]) -rm -f core]) -test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION) - -dnl --------------------------------------------------------------------------- -dnl Check for likely values of acs_map[]: -AC_CACHE_CHECK(for alternate character set array, cf_cv_curses_acs_map,[ -cf_cv_curses_acs_map=unknown -for name in acs_map _acs_map __acs_map _nc_acs_map -do AC_TRY_LINK([ -#include -],[ -$name['k'] = ACS_PLUS -],[cf_cv_curses_acs_map=$name; break]) -done -]) - -test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map) - -dnl --------------------------------------------------------------------------- -dnl Check for likely values of wacs_map[]: -AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ -cf_cv_curses_wacs_map=unknown -for name in wacs_map _wacs_map __wacs_map _nc_wacs -do -AC_TRY_LINK([ -#ifndef _XOPEN_SOURCE_EXTENDED -#define _XOPEN_SOURCE_EXTENDED -#endif -#include -],[ -$name['k'] = *WACS_PLUS -],[cf_cv_curses_wacs_map=$name; break]) -done -]) - -test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) - -dnl --------------------------------------------------------------------------- -dnl Make an uppercase version of a variable -dnl $1=uppercase($2) -AC_DEFUN([CF_UPPER], -[ -$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` -])dnl - -dnl --------------------------------------------------------------------------- -dnl Check if curses.h defines the given type -AC_DEFUN([CF_CURSES_TYPE], +#include <${cf_cv_ncurses_header-curses.h}>], [ -AC_MSG_CHECKING(for type $1 in curses.h) -AC_TRY_COMPILE([ -#ifndef _XOPEN_SOURCE_EXTENDED -#define _XOPEN_SOURCE_EXTENDED -#endif -#include ],[ -$1 foo -],cf_result=yes,cf_result=no) -AC_MSG_RESULT($cf_result) -if test $cf_result = yes ; then - CF_UPPER(cf_result,have_type_$1) - AC_DEFINE_UNQUOTED($cf_result) -else - AC_DEFINE_UNQUOTED($1,$2) -fi -])dnl - -CF_CURSES_TYPE(attr_t,long) -CF_CURSES_TYPE(mbstate_t,long) - -dnl --------------------------------------------------------------------------- -dnl Check if we can include with ; this breaks on -dnl older SCO configurations. -dnl [CF_SYS_TIME_SELECT] - -AC_MSG_CHECKING(if sys/time.h works with sys/select.h) -AC_CACHE_VAL(cf_cv_sys_time_select,[ -AC_TRY_COMPILE([ -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -],[],[cf_cv_sys_time_select=yes], - [cf_cv_sys_time_select=no]) - ]) -AC_MSG_RESULT($cf_cv_sys_time_select) -test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT) + (void) assume_default_colors (0, 0); + (void) curses_version (); + (void) define_key (0, 0); + (void) is_term_resized (0, 0); + (void) key_defined (0); + (void) keybound (0, 0); + (void) keyok (0, 0); + (void) resize_term (0, 0); + (void) resizeterm (0, 0); + (void) use_default_colors (); + (void) use_extended_names (0); + (void) wresize (0, 0, 0); + ],[AC_DEFINE(NCURSES_EXT_FUNCS)]) + +CF_SYS_TIME_SELECT +CF_FUNC_CURSES_VERSION +CF_CURSES_ACS_MAP +CF_CURSES_WACS_MAP +CF_CURSES_CHECK_TYPE(attr_t,long) +CF_CURSES_CHECK_TYPE(mbstate_t,long) dnl --------------------------------------------------------------------------- @@ -311,11 +202,9 @@ AC_OUTPUT(Makefile,[ # work consistently for different make-programs (the '\$(MODEL)/' confuses # some, and the '\$x' confuses others). TEST_EOF -LIST=`make echo_tests` -LAST=`make echo_suffix` -for n in $LIST +LIST=`sed -e 's/[[ ]].*//' -e '/^[[#@]]/d' $srcdir/modules` +for N in $LIST do - N=`echo $n | sed -e s/${LAST}\$//` cat >>Makefile < + +#if defined(NCURSES_VERSION) && NCURSES_EXT_FUNCS + +#include + +#define MY_LOGFILE "demo_defkey.log" + +/* + * Log the most recently-written line to our logfile + */ +static void +log_last_line(WINDOW *win) +{ + FILE *fp; + int y, x, n; + char temp[256]; + + if ((fp = fopen(MY_LOGFILE, "a")) != 0) { + getyx(win, y, x); + wmove(win, y - 1, 0); + n = winnstr(win, temp, sizeof(temp)); + while (n-- > 0) { + if (isspace(UChar(temp[n]))) + temp[n] = '\0'; + else + break; + } + wmove(win, y, x); + fprintf(fp, "%s\n", temp); + fclose(fp); + } +} + +/* + * Convert a character to visible form. + */ +static char * +visichar(int ch) +{ + static char temp[10]; + + ch = UChar(ch); + if (ch == '\\') { + strcpy(temp, "\\\\"); + } else if (ch == '\033') { + strcpy(temp, "\\E"); + } else if (ch < ' ') { + sprintf(temp, "\\%03o", ch); + } else if (ch >= 127) { + sprintf(temp, "\\%03o", ch); + } else { + sprintf(temp, "%c", ch); + } + return temp; +} + +/* + * Convert a string to visible form. + */ +static char * +visible(const char *string) +{ + char *result = 0; + unsigned need = 1; + int pass; + int n; + + if (string != 0 && *string != '\0') { + for (pass = 0; pass < 2; ++pass) { + for (n = 0; string[n] != '\0'; ++n) { + char temp[80]; + strcpy(temp, visichar(string[n])); + if (pass) + strcat(result, temp); + else + need += strlen(temp); + } + if (!pass) + result = (char *) calloc(need, 1); + } + } else { + result = (char *) calloc(1, 1); + } + return result; +} + +static void +really_define_key(WINDOW *win, const char *new_string, int code) +{ + int rc; + const char *code_name = keyname(code); + char *old_string; + char *vis_string = 0; + char temp[80]; + + if (code_name == 0) { + sprintf(temp, "Keycode %d", code); + code_name = temp; + } + + if ((old_string = keybound(code, 0)) != 0) { + wprintw(win, "%s is %s\n", + code_name, + vis_string = visible(old_string)); + } else { + wprintw(win, "%s is not bound\n", + code_name); + } + log_last_line(win); + if (vis_string != 0) { + free(vis_string); + vis_string = 0; + } + + vis_string = visible(new_string); + if ((rc = key_defined(new_string)) > 0) { + wprintw(win, "%s was bound to %s\n", vis_string, keyname(rc)); + log_last_line(win); + } else if (new_string != 0 && rc < 0) { + wprintw(win, "%s conflicts with longer strings\n", vis_string); + log_last_line(win); + } + rc = define_key(new_string, code); + if (rc == ERR) { + wprintw(win, "%s unchanged\n", code_name); + log_last_line(win); + } else if (new_string != 0) { + wprintw(win, "%s is now bound to %s\n", + vis_string, + code_name); + log_last_line(win); + } else if (old_string != 0) { + wprintw(win, "%s deleted\n", code_name); + log_last_line(win); + } + if (vis_string != 0 && *vis_string != 0) + free(vis_string); + if (old_string != 0) + free(old_string); +} + +static void +duplicate(WINDOW *win, NCURSES_CONST char *name, int code) +{ + char *value = tigetstr(name); + + if (value != 0) { + const char *prefix = 0; + char temp[BUFSIZ]; + + if (!strncmp(value, "\033[", 2)) { + prefix = "\033O"; + } else if (!strncmp(value, "\033O", 2)) { + prefix = "\033["; + } + if (prefix != 0) { + sprintf(temp, "%s%s", prefix, value + 2); + really_define_key(win, temp, code); + } + } +} + +static void +redefine(WINDOW *win, char *string, int code) +{ + really_define_key(win, string, code); +} + +static void +remove_definition(WINDOW *win, int code) +{ + really_define_key(win, 0, code); +} + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + char *fkeys[12]; + int n; + int ch; + WINDOW *win; + + unlink(MY_LOGFILE); + + initscr(); + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + + printw("This demo is best on xterm: it reverses the definitions for f1-f12,\n"); + printw("adds duplicate definitions for cursor application and normal modes,\n"); + printw("and removes any definitions for the mini keypad. Type any of those:\n"); + refresh(); + + win = newwin(LINES - 3, COLS, 3, 0); + scrollok(win, TRUE); + keypad(win, TRUE); + wmove(win, 0, 0); + + /* we do the define_key() calls after keypad(), since the first call to + * keypad() initializes the corresponding data. + */ + for (n = 0; n < 12; ++n) { + char name[10]; + sprintf(name, "kf%d", n + 1); + fkeys[n] = tigetstr(name); + } + for (n = 0; n < 12; ++n) { + redefine(win, fkeys[11 - n], KEY_F(n + 1)); + } + + duplicate(win, "kcub1", KEY_LEFT); + duplicate(win, "kcuu1", KEY_UP); + duplicate(win, "kcud1", KEY_DOWN); + duplicate(win, "kcuf1", KEY_RIGHT); + + remove_definition(win, KEY_A1); + remove_definition(win, KEY_A3); + remove_definition(win, KEY_B2); + remove_definition(win, KEY_C1); + remove_definition(win, KEY_C3); + + really_define_key(win, "\033O", 1023); + + while ((ch = wgetch(win)) != ERR) { + const char *name = keyname(ch); + wprintw(win, "Keycode %d, name %s\n", + ch, + name != 0 ? name : ""); + log_last_line(win); + wclrtoeol(win); + } + endwin(); + return EXIT_SUCCESS; +} +#else +int +main(void) +{ + printf("This program requires the ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/demo_forms.c b/test/demo_forms.c new file mode 100644 index 00000000..03965aaf --- /dev/null +++ b/test/demo_forms.c @@ -0,0 +1,295 @@ +/* + * $Id: demo_forms.c,v 1.3 2003/05/03 22:08:20 tom Exp $ + * + * Demonstrate a variety of functions from the form library. + * Thomas Dickey - 2003/4/26 + */ +/* +TYPE_ALNUM - +TYPE_ENUM - +TYPE_INTEGER - +TYPE_IPV4 - +TYPE_NUMERIC - +TYPE_REGEXP - +data_ahead - +data_behind - +dup_field - +dynamic_field_info - +field_arg - +field_back - +field_count - +field_fore - +field_init - +field_just - +field_opts_on - +field_pad - +field_status - +field_term - +field_type - +form_init - +form_opts - +form_opts_off - +form_opts_on - +form_page - +form_request_by_name - +form_term - +form_userptr - +free_fieldtype - +link_field - +link_fieldtype - +move_field - +new_page - +pos_form_cursor - +set_current_field - +set_field_fore - +set_field_init - +set_field_pad - +set_field_status - +set_field_term - +set_fieldtype_arg - +set_fieldtype_choice - +set_form_fields - +set_form_init - +set_form_opts - +set_form_page - +set_form_term - +set_form_userptr - +set_max_field - +*/ + +#include + +#if USE_LIBFORM + +#include + +static FIELD * +make_label(int frow, int fcol, NCURSES_CONST char *label) +{ + FIELD *f = new_field(1, strlen(label), frow, fcol, 0, 0); + + if (f) { + set_field_buffer(f, 0, label); + set_field_opts(f, field_opts(f) & ~O_ACTIVE); + } + return (f); +} + +/* + * Define each field with an extra one, for reflecting "actual" text. + */ +static FIELD * +make_field(int frow, int fcol, int rows, int cols) +{ + FIELD *f = new_field(rows, cols, frow, fcol, 0, 1); + + if (f) { + set_field_back(f, A_UNDERLINE); + set_field_userptr(f, (void *) 0); + } + return (f); +} + +static void +display_form(FORM * f) +{ + WINDOW *w; + int rows, cols; + + scale_form(f, &rows, &cols); + + /* + * Put the form at the upper-left corner of the display, with just a box + * around it. + */ + if ((w = newwin(rows + 2, cols + 4, 0, 0)) != (WINDOW *) 0) { + set_form_win(f, w); + set_form_sub(f, derwin(w, rows, cols, 1, 2)); + box(w, 0, 0); + keypad(w, TRUE); + } + + if (post_form(f) != E_OK) + wrefresh(w); +} + +static void +erase_form(FORM * f) +{ + WINDOW *w = form_win(f); + WINDOW *s = form_sub(f); + + unpost_form(f); + werase(w); + wrefresh(w); + delwin(s); + delwin(w); +} + +static int +my_form_driver(FORM * form, int c) +{ + switch (c) { + case EDIT_FIELD('q'): + if (form_driver(form, REQ_VALIDATION) == E_OK) + return (TRUE); + break; + case EDIT_FIELD('h'): + help_edit_field(); + break; + default: + beep(); + break; + } + return (FALSE); +} + +static void +show_current_field(WINDOW *win, FORM * form) +{ + FIELD *field; + FIELDTYPE *type; + char *buffer; + int nbuf; + + if (has_colors()) { + wbkgd(win, COLOR_PAIR(1)); + } + werase(win); + wprintw(win, "Cursor: %d,%d\n", form->currow, form->curcol); + if ((field = current_field(form)) != 0) { + wprintw(win, "Field %d:", field_index(field)); + if ((type = field_type(field)) != 0) { + if (type == TYPE_ALNUM) + waddstr(win, "ALNUM"); + else if (type == TYPE_ALPHA) + waddstr(win, "ALPHA"); + else if (type == TYPE_ENUM) + waddstr(win, "ENUM"); + else if (type == TYPE_INTEGER) + waddstr(win, "INTEGER"); + else if (type == TYPE_NUMERIC) + waddstr(win, "NUMERIC"); + else if (type == TYPE_REGEXP) + waddstr(win, "REGEXP"); + else + waddstr(win, "other"); + } + waddstr(win, "\n"); + for (nbuf = 0; nbuf <= 2; ++nbuf) { + if ((buffer = field_buffer(field, nbuf)) != 0) { + wprintw(win, "buffer %d:", nbuf); + wattrset(win, A_REVERSE); + waddstr(win, buffer); + wattroff(win, A_REVERSE); + waddstr(win, "\n"); + } + } + } + wrefresh(win); +} + +static void +demo_forms(void) +{ + WINDOW *w; + FORM *form; + FIELD *f[100]; + int finished = 0, c; + unsigned n = 0; + int pg; + WINDOW *also; + + help_edit_field(); + + mvaddstr(4, 57, "Forms Entry Test"); + + refresh(); + + /* describe the form */ + for (pg = 0; pg < 3; ++pg) { + char label[80]; + sprintf(label, "Sample Form Page %d", pg + 1); + f[n++] = make_label(0, 15, label); + set_new_page(f[n - 1], TRUE); + + f[n++] = make_label(2, 0, "Last Name"); + f[n++] = make_field(3, 0, 1, 18); + set_field_type(f[n - 1], TYPE_ALPHA, 1); + + f[n++] = make_label(2, 20, "First Name"); + f[n++] = make_field(3, 20, 1, 12); + set_field_type(f[n - 1], TYPE_ALPHA, 1); + + f[n++] = make_label(2, 34, "Middle Name"); + f[n++] = make_field(3, 34, 1, 12); + set_field_type(f[n - 1], TYPE_ALPHA, 1); + + f[n++] = make_label(5, 0, "Comments"); + f[n++] = make_field(6, 0, 4, 46); + } + + f[n++] = (FIELD *) 0; + + form = new_form(f); + + display_form(form); + + w = form_win(form); + also = newwin(getmaxy(stdscr) - getmaxy(w), COLS, getmaxy(w), 0); + show_current_field(also, form); + + while (!finished) { + switch (edit_field(form, &c)) { + case E_OK: + break; + case E_UNKNOWN_COMMAND: + finished = my_form_driver(form, c); + break; + default: + beep(); + break; + } + show_current_field(also, form); + } + + erase_form(form); + + free_form(form); + for (c = 0; f[c] != 0; c++) + free_field(f[c]); + noraw(); + nl(); +} + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + initscr(); + cbreak(); + noecho(); + raw(); + nonl(); /* lets us read ^M's */ + intrflush(stdscr, FALSE); + keypad(stdscr, TRUE); + + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + bkgd(COLOR_PAIR(1)); + refresh(); + } + + demo_forms(); + + endwin(); + return EXIT_SUCCESS; +} +#else +int +main(void) +{ + printf("This program requires the curses form library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/demo_keyok.c b/test/demo_keyok.c new file mode 100644 index 00000000..670bd54f --- /dev/null +++ b/test/demo_keyok.c @@ -0,0 +1,55 @@ +/* + * $Id: demo_keyok.c,v 1.3 2003/05/17 23:18:34 tom Exp $ + * + * Demonstrate the keyok() function. + * Thomas Dickey - 2002/11/23 + */ + +#include + +#if defined(NCURSES_VERSION) && NCURSES_EXT_FUNCS +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + int lastch = ERR; + int ch; + WINDOW *win; + + initscr(); + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + + printw("Typing any function key will disable it, but typing it twice in\n"); + printw("a row will turn it back on (just for a demo)."); + refresh(); + + win = newwin(LINES - 2, COLS, 2, 0); + scrollok(win, TRUE); + keypad(win, TRUE); + wmove(win, 0, 0); + + while ((ch = wgetch(win)) != ERR) { + const char *name = keyname(ch); + wprintw(win, "Keycode %d, name %s\n", + ch, + name != 0 ? name : ""); + wclrtoeol(win); + wrefresh(win); + if (ch >= KEY_MIN) { + keyok(ch, FALSE); + lastch = ch; + } else if (lastch >= KEY_MIN) { + keyok(lastch, TRUE); + } + } + endwin(); + return EXIT_SUCCESS; +} +#else +int +main(void) +{ + printf("This program requires the ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/demo_menus.c b/test/demo_menus.c new file mode 100644 index 00000000..ad2cefe4 --- /dev/null +++ b/test/demo_menus.c @@ -0,0 +1,73 @@ +/* + * $Id: demo_menus.c,v 1.1 2003/04/26 22:10:43 tom Exp $ + * + * Demonstrate a variety of functions from the menu library. + * Thomas Dickey - 2003/4/26 + */ +/* +item_count - +item_description - +item_init - +item_opts - +item_opts_off - +item_opts_on - +item_term - +item_userptr - +item_visible - +menu_back - +menu_fore - +menu_format - +menu_grey - +menu_init - +menu_mark - +menu_opts - +menu_opts_on - +menu_pad - +menu_pattern - +menu_request_by_name - +menu_request_name - +menu_spacing - +menu_sub - +menu_term - +menu_userptr - +set_current_item - +set_item_init - +set_item_opts - +set_item_term - +set_item_userptr - +set_menu_back - +set_menu_fore - +set_menu_grey - +set_menu_init - +set_menu_items - +set_menu_mark - +set_menu_opts - +set_menu_pad - +set_menu_pattern - +set_menu_spacing - +set_menu_term - +set_menu_userptr - +set_top_row - +top_row - +*/ + +#include + +#if USE_LIBMENU + +#include + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + printf("Not implemented - demo for menu library\n"); + return EXIT_SUCCESS; +} +#else +int +main(void) +{ + printf("This program requires the curses menu library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/demo_panels.c b/test/demo_panels.c new file mode 100644 index 00000000..20fd029c --- /dev/null +++ b/test/demo_panels.c @@ -0,0 +1,33 @@ +/* + * $Id: demo_panels.c,v 1.1 2003/04/26 22:11:23 tom Exp $ + * + * Demonstrate a variety of functions from the panel library. + * Thomas Dickey - 2003/4/26 + */ +/* +panel_above - +panel_below - +panel_hidden - +replace_panel - +*/ + +#include + +#if USE_LIBPANEL + +#include + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + printf("Not implemented - demo for panel library\n"); + return EXIT_SUCCESS; +} +#else +int +main(void) +{ + printf("This program requires the curses panel library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/edit_field.c b/test/edit_field.c new file mode 100644 index 00000000..780bdab8 --- /dev/null +++ b/test/edit_field.c @@ -0,0 +1,402 @@ +/* + * $Id: edit_field.c,v 1.7 2003/05/17 23:16:13 tom Exp $ + * + * A wrapper for form_driver() which keeps track of the user's editing changes + * for each field, and makes the result available as a null-terminated string + * in field_buffer(field,1). + * + * Thomas Dickey - 2003/4/26. + */ + +#include + +#if USE_LIBFORM + +#include + +#define MY_QUIT EDIT_FIELD('q') +#define MY_INS_MODE EDIT_FIELD('t') + +static struct { + int code; + int result; + const char *help; +} commands[] = { + + { + CTRL('A'), REQ_NEXT_CHOICE, "" + }, + { + CTRL('B'), REQ_PREV_WORD, "go to previous word" + }, + { + CTRL('C'), REQ_CLR_EOL, "clear to end of line" + }, + { + CTRL('D'), REQ_DOWN_FIELD, "move downward to field" + }, + { + CTRL('E'), REQ_END_FIELD, "go to end of field" + }, + { + CTRL('F'), REQ_NEXT_PAGE, "go to next page" + }, + { + CTRL('G'), REQ_DEL_WORD, "delete current word" + }, + { + CTRL('H'), REQ_DEL_PREV, "delete previous character" + }, + { + CTRL('I'), REQ_INS_CHAR, "insert character" + }, + { + CTRL('K'), REQ_CLR_EOF, "clear to end of field" + }, + { + CTRL('L'), REQ_LEFT_FIELD, "go to field to left" + }, + { + CTRL('M'), REQ_NEW_LINE, "insert/overlay new line" + }, + { + CTRL('N'), REQ_NEXT_FIELD, "go to next field" + }, + { + CTRL('O'), REQ_INS_LINE, "insert blank line at cursor" + }, + { + CTRL('P'), REQ_PREV_FIELD, "go to previous field" + }, + { + CTRL('Q'), MY_QUIT, "exit form" + }, + { + CTRL('R'), REQ_RIGHT_FIELD, "go to field to right" + }, + { + CTRL('S'), REQ_BEG_FIELD, "go to beginning of field" + }, + { + CTRL('U'), REQ_UP_FIELD, "move upward to field" + }, + { + CTRL('V'), REQ_DEL_CHAR, "delete character" + }, + { + CTRL('W'), REQ_NEXT_WORD, "go to next word" + }, + { + CTRL('X'), REQ_CLR_FIELD, "clear field" + }, + { + CTRL('Y'), REQ_DEL_LINE, "delete line" + }, + { + CTRL('Z'), REQ_PREV_CHOICE, "" + }, + { + CTRL('['), MY_QUIT, "exit form" + }, + { + CTRL(']'), MY_INS_MODE, "toggle REQ_INS_MODE/REQ_OVL_MODE", + }, + { + KEY_F(1), EDIT_FIELD('h'), "show this screen", + }, + { + KEY_BACKSPACE, REQ_DEL_PREV, "delete previous character" + }, + { + KEY_DOWN, REQ_DOWN_CHAR, "move down 1 character" + }, + { + KEY_END, REQ_LAST_FIELD, "go to last field" + }, + { + KEY_HOME, REQ_FIRST_FIELD, "go to first field" + }, + { + KEY_LEFT, REQ_LEFT_CHAR, "move left 1 character" + }, + { + KEY_LL, REQ_LAST_FIELD, "go to last field" + }, + { + KEY_NEXT, REQ_NEXT_FIELD, "go to next field" + }, + { + KEY_NPAGE, REQ_NEXT_PAGE, "go to next page" + }, + { + KEY_PPAGE, REQ_PREV_PAGE, "go to previous page" + }, + { + KEY_PREVIOUS, REQ_PREV_FIELD, "go to previous field" + }, + { + KEY_RIGHT, REQ_RIGHT_CHAR, "move right 1 character" + }, + { + KEY_UP, REQ_UP_CHAR, "move up 1 character" + } +}; + +static WINDOW *old_window; + +static void +begin_popup(void) +{ + doupdate(); + old_window = dupwin(curscr); +} + +static void +end_popup(void) +{ + touchwin(old_window); + wnoutrefresh(old_window); + doupdate(); + delwin(old_window); +} + +/* + * Display a temporary window listing the keystroke-commands we recognize. + */ +void +help_edit_field(void) +{ + int x0 = 4; + int y0 = 2; + int y1 = 0; + int y2 = 0; + int wide = COLS - ((x0 + 1) * 2); + int high = LINES - ((y0 + 1) * 2); + WINDOW *help = newwin(high, wide, y0, x0); + WINDOW *data = newpad(2 + SIZEOF(commands), wide - 4); + unsigned n; + int ch = ERR; + + begin_popup(); + + keypad(help, TRUE); + keypad(data, TRUE); + waddstr(data, "Defined form-traversal keys:\n"); + for (n = 0; n < SIZEOF(commands); ++n) { + const char *name; +#ifdef NCURSES_VERSION + if ((name = form_request_name(commands[n].result)) == 0) +#endif + name = commands[n].help; + wprintw(data, "%s -- %s\n", + keyname(commands[n].code), + name != 0 ? name : commands[n].help); + } + waddstr(data, "Arrow keys move within a field as you would expect."); + y2 = getcury(data); + + do { + switch (ch) { + case CTRL('P'): + case KEY_UP: + if (y1 > 0) + --y1; + else + beep(); + break; + case CTRL('N'): + case KEY_DOWN: + if (y1 < y2) + ++y1; + else + beep(); + break; + default: + beep(); + break; + case ERR: + break; + } + werase(help); + box(help, 0, 0); + wnoutrefresh(help); + pnoutrefresh(data, y1, 0, y0 + 1, x0 + 1, high, wide); + doupdate(); + } while ((ch = wgetch(data)) != ERR && ch != QUIT && ch != ESCAPE); + werase(help); + wrefresh(help); + delwin(help); + delwin(data); + + end_popup(); +} + +static int +offset_in_field(FORM * form) +{ + FIELD *field = current_field(form); + return form->curcol + form->currow * field->dcols; +} + +int +edit_field(FORM * form, int *result) +{ + int ch = wgetch(form_win(form)); + int status; + FIELD *before; + FIELD *after; + unsigned n; + char lengths[80]; + int length; + char *buffer; + int before_row = form->currow; + int before_col = form->curcol; + int before_off = offset_in_field(form); + + before = current_field(form); + set_field_back(before, A_NORMAL); + if (ch <= KEY_MAX) { + set_field_back(before, A_REVERSE); + } else if (ch <= MAX_FORM_COMMAND) { + set_field_back(before, A_UNDERLINE); + } + + *result = ch; + for (n = 0; n < SIZEOF(commands); ++n) { + if (commands[n].code == ch) { + *result = commands[n].result; + break; + } + } + + status = form_driver(form, *result); + + if (status == E_OK) { + bool modified = TRUE; + + length = 0; + if ((buffer = field_buffer(before, 1)) != 0) + length = atoi(buffer); + if (length < before_off) + length = before_off; + switch (*result) { + case REQ_CLR_EOF: + length = before_off; + break; + case REQ_CLR_EOL: + if (before_row + 1 == before->rows) + length = before_off; + break; + case REQ_CLR_FIELD: + length = 0; + break; + case REQ_DEL_CHAR: + if (length > before_off) + --length; + break; + case REQ_DEL_PREV: + if (length > 0) { + if (before_col > 0) { + --length; + } else if (before_row > 0) { + length -= before->cols + before_col; + } + } + break; + case REQ_NEW_LINE: + length += before->cols; + break; +#if 0 + /* FIXME: finish these */ + case REQ_DEL_LINE: /* delete line */ + case REQ_DEL_WORD: /* delete word at cursor */ + case REQ_INS_CHAR: /* insert blank char at cursor */ + case REQ_INS_LINE: /* insert blank line at cursor */ + case REQ_INS_MODE: /* begin insert mode */ + case REQ_OVL_MODE: /* begin overlay mode */ +#endif + /* ignore all of the motion commands */ + case REQ_SCR_BCHAR: /* FALLTHRU */ + case REQ_SCR_BHPAGE: /* FALLTHRU */ + case REQ_SCR_BLINE: /* FALLTHRU */ + case REQ_SCR_BPAGE: /* FALLTHRU */ + case REQ_SCR_FCHAR: /* FALLTHRU */ + case REQ_SCR_FHPAGE: /* FALLTHRU */ + case REQ_SCR_FLINE: /* FALLTHRU */ + case REQ_SCR_FPAGE: /* FALLTHRU */ + case REQ_SCR_HBHALF: /* FALLTHRU */ + case REQ_SCR_HBLINE: /* FALLTHRU */ + case REQ_SCR_HFHALF: /* FALLTHRU */ + case REQ_SCR_HFLINE: /* FALLTHRU */ + case REQ_BEG_FIELD: /* FALLTHRU */ + case REQ_BEG_LINE: /* FALLTHRU */ + case REQ_DOWN_CHAR: /* FALLTHRU */ + case REQ_DOWN_FIELD: /* FALLTHRU */ + case REQ_END_FIELD: /* FALLTHRU */ + case REQ_END_LINE: /* FALLTHRU */ + case REQ_FIRST_FIELD: /* FALLTHRU */ + case REQ_FIRST_PAGE: /* FALLTHRU */ + case REQ_LAST_FIELD: /* FALLTHRU */ + case REQ_LAST_PAGE: /* FALLTHRU */ + case REQ_LEFT_CHAR: /* FALLTHRU */ + case REQ_LEFT_FIELD: /* FALLTHRU */ + case REQ_NEXT_CHAR: /* FALLTHRU */ + case REQ_NEXT_CHOICE: /* FALLTHRU */ + case REQ_NEXT_FIELD: /* FALLTHRU */ + case REQ_NEXT_LINE: /* FALLTHRU */ + case REQ_NEXT_PAGE: /* FALLTHRU */ + case REQ_NEXT_WORD: /* FALLTHRU */ + case REQ_PREV_CHAR: /* FALLTHRU */ + case REQ_PREV_CHOICE: /* FALLTHRU */ + case REQ_PREV_FIELD: /* FALLTHRU */ + case REQ_PREV_LINE: /* FALLTHRU */ + case REQ_PREV_PAGE: /* FALLTHRU */ + case REQ_PREV_WORD: /* FALLTHRU */ + case REQ_RIGHT_CHAR: /* FALLTHRU */ + case REQ_RIGHT_FIELD: /* FALLTHRU */ + case REQ_SFIRST_FIELD: /* FALLTHRU */ + case REQ_SLAST_FIELD: /* FALLTHRU */ + case REQ_SNEXT_FIELD: /* FALLTHRU */ + case REQ_SPREV_FIELD: /* FALLTHRU */ + case REQ_UP_CHAR: /* FALLTHRU */ + case REQ_UP_FIELD: /* FALLTHRU */ + case REQ_VALIDATION: /* FALLTHRU */ + modified = FALSE; + break; + + default: + modified = FALSE; + if (ch >= MIN_FORM_COMMAND) { + beep(); + } else if (isprint(ch)) { + modified = TRUE; + } + break; + } + + /* + * If we do not force a re-validation, then field_buffer 0 will + * be lagging by one character. + */ + if (modified && form_driver(form, REQ_VALIDATION) == E_OK && *result + < MIN_FORM_COMMAND) + ++length; + + sprintf(lengths, "%d", length); + set_field_buffer(before, 1, lengths); + } + + if ((after = current_field(form)) != before) + set_field_back(before, A_UNDERLINE); + return status; +} +#else + +extern void no_edit_field(void); + +void +no_edit_field(void) +{ +} + +#endif diff --git a/test/edit_field.h b/test/edit_field.h new file mode 100644 index 00000000..89198383 --- /dev/null +++ b/test/edit_field.h @@ -0,0 +1,17 @@ +/* + * $Id: edit_field.h,v 1.1 2003/04/26 22:54:50 tom Exp $ + * + * Interface of edit_field.c + */ + +#ifndef EDIT_FORM_H_incl +#define EDIT_FORM_H_incl 1 + +#include + +#define EDIT_FIELD(c) (MAX_FORM_COMMAND + c) + +extern void help_edit_field(void); +extern int edit_field(FORM * form, int *result); + +#endif /* EDIT_FORM_H_incl */ diff --git a/test/gdc.6 b/test/gdc.6 index 7fa60de9..ad381aa4 100644 --- a/test/gdc.6 +++ b/test/gdc.6 @@ -1,3 +1,4 @@ +.\" $Id: gdc.6,v 1.2 2003/03/15 20:50:03 tom Exp $ .TH GDC 6 .SH NAME gdc \- grand digital clock (curses) @@ -16,7 +17,7 @@ it stops after seconds (default never). The optional .B -s -flag makes digits scroll as they change. In this curses mode implementation, +flag makes digits scroll as they change. In some curses mode implementations, the scrolling option has trouble keeping up. .SH AUTHOR Amos Shapir, modified for curses by John Lupien. diff --git a/test/hashtest.c b/test/hashtest.c index 06f29098..46a4f423 100644 --- a/test/hashtest.c +++ b/test/hashtest.c @@ -3,7 +3,7 @@ * * Generate timing statistics for vertical-motion optimization. * - * $Id: hashtest.c,v 1.22 2002/06/29 23:32:18 tom Exp $ + * $Id: hashtest.c,v 1.23 2002/10/19 22:11:24 tom Exp $ */ #ifdef TRACE @@ -14,8 +14,6 @@ #define USE_TRACE 0 #endif -#include - #include #define LO_CHAR ' ' diff --git a/test/ins_wide.c b/test/ins_wide.c new file mode 100644 index 00000000..6f3573f4 --- /dev/null +++ b/test/ins_wide.c @@ -0,0 +1,218 @@ +/* + * $Id: ins_wide.c,v 1.3 2003/08/09 22:07:23 tom Exp $ + * + * Demonstrate the wins_wstr() and wins_wch functions. + * Thomas Dickey - 2002/11/23 + * + * Note: to provide inputs for *ins_wch(), we use setcchar(). A quirk of the + * X/Open definition for that function is that the string contains no + * characters with negative width. Any control character (such as tab) falls + * into that category. So it follows that *ins_wch() cannot render a tab + * character because there is no legal way to construct a cchar_t containing + * one. X/Open does not document this, and it would be logical to assume that + * *ins_wstr() has the same limitation, but it uses a wchar_t string directly, + * and does not document how tabs are handled. + */ + +#include + +#define TABSIZE 8 + +#if USE_WIDEC_SUPPORT +static int margin = (2 * TABSIZE) - 1; + +static void +legend(WINDOW *win, wchar_t * buffer, int length) +{ + wmove(win, 0, 0); + wprintw(win, + "The Strings/Chars displays should match. Enter any characters.\n"); + wprintw(win, + "Use down-arrow or ^N to repeat on the next line, 'q' to exit.\n"); + wclrtoeol(win); + wprintw(win, "Inserted %d characters <", length); + waddwstr(win, buffer); + waddstr(win, ">"); +} + +static int +ColOf(wchar_t * buffer, int length) +{ + int n; + int result; + + for (n = 0, result = margin + 1; n < length; ++n) { + int ch = buffer[n]; + switch (ch) { + case '\n': + /* actually newline should clear the remainder of the line + * and move to the next line - but that seems a little awkward + * in this example. + */ + case '\r': + result = 0; + break; + case '\b': + if (result > 0) + --result; + break; + case '\t': + result += (TABSIZE - (result % TABSIZE)); + break; + case '\177': + result += 2; + break; + default: + ++result; + if (ch < 32) + ++result; + break; + } + } + return result; +} + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + cchar_t tmp_cchar; + wchar_t tmp_wchar[2]; + wint_t ch; + int code; + int limit; + int row = 1; + int col; + int length; + wchar_t buffer[BUFSIZ]; + WINDOW *work; + WINDOW *show; + + putenv("TABSIZE=8"); + initscr(); + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + keypad(stdscr, TRUE); + + limit = LINES - 5; + work = newwin(limit, COLS, 0, 0); + show = newwin(4, COLS, limit + 1, 0); + keypad(work, TRUE); + + for (col = margin + 1; col < COLS; col += TABSIZE) + mvwvline(work, row, col, '.', limit - 2); + + box(work, 0, 0); + mvwvline(work, row, margin, ACS_VLINE, limit - 2); + mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + limit /= 2; + + mvwaddstr(work, 1, 2, "String"); + mvwaddstr(work, limit + 1, 2, "Chars"); + wnoutrefresh(work); + + buffer[length = 0] = '\0'; + legend(show, buffer, length); + wnoutrefresh(show); + + doupdate(); + + /* + * Show the characters inserted in color, to distinguish from those that + * are shifted. + */ + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + wbkgdset(work, COLOR_PAIR(1) | ' '); + } + + while ((code = wget_wch(work, &ch)) != ERR) { + + switch (code) { + case KEY_CODE_YES: + switch (ch) { + case KEY_DOWN: + ch = CTRL('N'); + break; + case KEY_BACKSPACE: + ch = '\b'; + break; + default: + beep(); + continue; + } + break; + } + if (ch == 'q') + break; + + wmove(work, row, margin + 1); + if (ch == CTRL('N')) { + if (row < limit) { + ++row; + /* put the whole string in, all at once */ + mvwins_wstr(work, row, margin + 1, buffer); + + /* do the corresponding single-character insertion */ + for (col = 0; col < length; ++col) { + memset(&tmp_cchar, 0, sizeof(tmp_cchar)); + if (setcchar(&tmp_cchar, + &(buffer[col]), + A_NORMAL, + 0, + (void *) 0) != ERR) { + mvwins_wch(work, limit + row, ColOf(buffer, col), &tmp_cchar); + } else { + beep(); /* even for tabs! */ + mvwinsch(work, + limit + row, + ColOf(buffer, col), buffer[col]); + } + } + } else { + beep(); + } + } else { + buffer[length++] = ch; + buffer[length] = '\0'; + /* put the string in, one character at a time */ + mvwins_wstr(work, + row, + ColOf(buffer, length - 1), buffer + length - 1); + + /* do the corresponding single-character insertion */ + tmp_wchar[0] = ch; + tmp_wchar[1] = 0; + if (setcchar(&tmp_cchar, + tmp_wchar, + A_NORMAL, + 0, + (void *) 0) != ERR) { + mvwins_wch(work, + limit + row, + ColOf(buffer, length - 1), &tmp_cchar); + } else { + beep(); /* even for tabs! */ + mvwinsch(work, + limit + row, + ColOf(buffer, length - 1), ch); + } + wnoutrefresh(work); + + legend(show, buffer, length); + wnoutrefresh(show); + + doupdate(); + } + } + endwin(); + ExitProgram(EXIT_SUCCESS); +} +#else +int +main(void) +{ + printf("This program requires the wide-ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif diff --git a/test/inserts.c b/test/inserts.c new file mode 100644 index 00000000..990da1d4 --- /dev/null +++ b/test/inserts.c @@ -0,0 +1,162 @@ +/* + * $Id: inserts.c,v 1.5 2003/08/09 22:07:06 tom Exp $ + * + * Demonstrate the winsstr() and winsch functions. + * Thomas Dickey - 2002/10/19 + */ + +#include + +#define TABSIZE 8 + +static int margin = (2 * TABSIZE) - 1; + +static void +legend(WINDOW *win, char *buffer, int length) +{ + wmove(win, 0, 0); + wprintw(win, + "The Strings/Chars displays should match. Enter any characters.\n"); + wprintw(win, + "Use down-arrow or ^N to repeat on the next line, 'q' to exit.\n"); + wclrtoeol(win); + wprintw(win, "Inserted %d characters <%s>", length, buffer); +} + +static int +ColOf(char *buffer, int length) +{ + int n; + int result; + + for (n = 0, result = margin + 1; n < length; ++n) { + int ch = UChar(buffer[n]); + switch (ch) { + case '\n': + /* actually newline should clear the remainder of the line + * and move to the next line - but that seems a little awkward + * in this example. + */ + case '\r': + result = 0; + break; + case '\b': + if (result > 0) + --result; + break; + case '\t': + result += (TABSIZE - (result % TABSIZE)); + break; + case '\177': + result += 2; + break; + default: + ++result; + if (ch < 32) + ++result; + break; + } + } + return result; +} + +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) +{ + int ch; + int limit; + int row = 1; + int col; + int length; + char buffer[BUFSIZ]; + WINDOW *work; + WINDOW *show; + + putenv("TABSIZE=8"); + initscr(); + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + keypad(stdscr, TRUE); + + limit = LINES - 5; + work = newwin(limit, COLS, 0, 0); + show = newwin(4, COLS, limit + 1, 0); + keypad(work, TRUE); + + for (col = margin + 1; col < COLS; col += TABSIZE) + mvwvline(work, row, col, '.', limit - 2); + + box(work, 0, 0); + mvwvline(work, row, margin, ACS_VLINE, limit - 2); + mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + limit /= 2; + + mvwaddstr(work, 1, 2, "String"); + mvwaddstr(work, limit + 1, 2, "Chars"); + wnoutrefresh(work); + + buffer[length = 0] = '\0'; + legend(show, buffer, length); + wnoutrefresh(show); + + doupdate(); + + /* + * Show the characters inserted in color, to distinguish from those that + * are shifted. + */ + if (has_colors()) { + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLUE); + wbkgdset(work, COLOR_PAIR(1) | ' '); + } + + while ((ch = wgetch(work)) != 'q') { + wmove(work, row, margin + 1); + switch (ch) { + case CTRL('N'): + case KEY_DOWN: + if (row < limit) { + ++row; + /* put the whole string in, all at once */ + mvwinsstr(work, row, margin + 1, buffer); + + /* do the corresponding single-character insertion */ + for (col = 0; col < length; ++col) { + mvwinsch(work, limit + row, ColOf(buffer, col), buffer[col]); + } + } else { + beep(); + } + break; + case KEY_BACKSPACE: + ch = '\b'; + /* FALLTHRU */ + default: + if (ch <= 0 || ch > 255) { + beep(); + break; + } + buffer[length++] = ch; + buffer[length] = '\0'; + /* put the string in, one character at a time */ + mvwinsstr(work, + row, + ColOf(buffer, length - 1), buffer + length - 1); + + /* do the corresponding single-character insertion */ + mvwinsch(work, + limit + row, + ColOf(buffer, length - 1), ch); + wnoutrefresh(work); + + legend(show, buffer, length); + wnoutrefresh(show); + + doupdate(); + break; + } + } + endwin(); + ExitProgram(EXIT_SUCCESS); +} diff --git a/test/keynames.c b/test/keynames.c index ee8fac89..a61646c2 100644 --- a/test/keynames.c +++ b/test/keynames.c @@ -1,5 +1,5 @@ /* - * $Id: keynames.c,v 1.4 2002/09/01 19:42:42 tom Exp $ + * $Id: keynames.c,v 1.5 2003/05/17 23:18:49 tom Exp $ */ #include @@ -9,7 +9,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { int n; for (n = -1; n < 512; n++) { - char *result = keyname(n); + const char *result = keyname(n); if (result != 0) printf("%d(%5o):%s\n", n, n, result); } diff --git a/test/knight.c b/test/knight.c index 0e091f46..44537d41 100644 --- a/test/knight.c +++ b/test/knight.c @@ -6,11 +6,9 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.25 2002/06/29 23:32:18 tom Exp $ + * $Id: knight.c,v 1.26 2002/10/19 22:11:24 tom Exp $ */ -#include - #include /* board size */ diff --git a/test/listused.sh b/test/listused.sh new file mode 100755 index 00000000..70352faa --- /dev/null +++ b/test/listused.sh @@ -0,0 +1,155 @@ +#!/bin/sh +# $Id: listused.sh,v 1.5 2003/07/05 19:02:41 tom Exp $ +# A very simple script to list entrypoints that are used by either a test +# program, or within the libraries. This relies on the output format of 'nm', +# and assumes that the libraries are configured with TRACE defined, and using +# these options: +# --disable-macros +# --enable-widec +# Static libraries are used, to provide some filtering based on internal usage +# of the different symbols. + +# keep the sorting independent of locale: +if test "${LANGUAGE+set}" = set; then LANGUAGE=C; export LANGUAGE; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi + +NM_OPTS= + +if test ! -d ../objects ; then + echo "? need objects to run this script" + exit 1 +elif test ! -d ../lib ; then + echo "? need libraries to run this script" + exit 1 +fi + +PROGS= +for name in `(echo "test:";sort modules; echo "progs:";sort ../progs/modules) |sed -e 's/[ ].*//' -e '/^[#@]/d'` +do + case $name in + *:) + PROGS="$PROGS $name" + ;; + *) + NAME=../objects/${name}.o + if test -f $NAME + then + PROGS="$PROGS $NAME" + fi + ;; + esac +done + +# For each library - +for lib in ../lib/*.a +do + LIB=`basename $lib .a` + case $LIB in + *_*|*+*) + continue + ;; + esac + + tmp=`echo $LIB|sed -e 's/w$//'` + echo + echo "${tmp}:" + echo $tmp |sed -e 's/./-/g' + # Construct a list of public externals provided by the library. + WANT=`nm $NM_OPTS $lib |\ + sed -e 's/^[^ ]*//' \ + -e 's/^ *//' \ + -e '/^[ a-z] /d' \ + -e '/:$/d' \ + -e '/^$/d' \ + -e '/^U /d' \ + -e 's/^[A-Z] //' \ + -e '/^_/d' |\ + sort -u` + # List programs which use that external. + for name in $WANT + do + HAVE= + tags= + last= + for prog in $PROGS + do + case $prog in + *:) + tags=$prog + ;; + *) + TEST=`nm $NM_OPTS $prog |\ + sed -e 's/^[^ ]*//' \ + -e 's/^ *//' \ + -e '/^[ a-z] /d' \ + -e '/:$/d' \ + -e '/^$/d' \ + -e 's/^[A-Z] //' \ + -e '/^_/d' \ + -e 's/^'${name}'$/_/' \ + -e '/^[^_]/d'` + if test -n "$TEST" + then + have=`basename $prog .o` + if test -n "$HAVE" + then + if test "$last" = "$tags" + then + HAVE="$HAVE $have" + else + HAVE="$HAVE $tags $have" + fi + else + HAVE="$tags $have" + fi + last="$tags" + fi + ;; + esac + done + # if we did not find a program using it directly, see if it + # is used within a library. + if test -z "$HAVE" + then + for tmp in ../lib/*.a + do + case $tmp in + *_*|*+*) + continue + ;; + esac + TEST=`nm $NM_OPTS $tmp |\ + sed -e 's/^[^ ]*//' \ + -e 's/^ *//' \ + -e '/^[ a-z] /d' \ + -e '/:$/d' \ + -e '/^$/d' \ + -e '/^[A-TV-Z] /d' \ + -e 's/^[A-Z] //' \ + -e '/^_/d' \ + -e 's/^'${name}'$/_/' \ + -e '/^[^_]/d'` + if test -n "$TEST" + then + tmp=`basename $tmp .a |sed -e 's/w$//'` + HAVE=`echo $tmp | sed -e 's/lib/lib: /'` + break + fi + done + fi + test -z "$HAVE" && HAVE="-" + lenn=`expr 39 - length $name` + lenn=`expr $lenn / 8` + tabs= + while test $lenn != 0 + do + tabs="${tabs} " + lenn=`expr $lenn - 1` + done + echo "${name}${tabs}${HAVE}" + done +done diff --git a/test/modules b/test/modules index 583f8c76..4de65f16 100644 --- a/test/modules +++ b/test/modules @@ -1,7 +1,7 @@ # Test-Program modules -# $Id: modules,v 1.13 2000/02/13 01:05:13 tom Exp $ +# $Id: modules,v 1.20 2003/12/07 00:01:23 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. # +# 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"), # @@ -28,28 +28,38 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1997 +# Author: Thomas E. Dickey 1997-2003 # @ base +background progs $(srcdir) blue progs $(srcdir) ../include/term.h bs progs $(srcdir) -cardfile progs $(srcdir) ../include/panel.h ../include/menu.h ../include/form.h +cardfile progs $(srcdir) ../include/panel.h ../include/form.h +color_set progs $(srcdir) +demo_defkey progs $(srcdir) +demo_keyok progs $(srcdir) +demo_forms progs $(srcdir) ../include/form.h +demo_menus progs $(srcdir) ../include/menu.h +demo_panels progs $(srcdir) ../include/panel.h ditto progs $(srcdir) dots progs $(srcdir) ../include/term.h -filter progs $(srcdir) +edit_field progs $(srcdir) +filter progs $(srcdir) ../include/form.h firework progs $(srcdir) ../include/term.h firstlast progs $(srcdir) gdc progs $(srcdir) hanoi progs $(srcdir) hashtest progs $(srcdir) +ins_wide progs $(srcdir) +inserts progs $(srcdir) keynames progs $(srcdir) knight progs $(srcdir) lrtest progs $(srcdir) ncurses progs $(srcdir) ../include/panel.h ../include/menu.h ../include/form.h newdemo progs $(srcdir) -rain progs $(srcdir) ../include/term.h railroad progs $(srcdir) ../include/termcap.h +rain progs $(srcdir) ../include/term.h tclock progs $(srcdir) testaddch progs $(srcdir) testcurs progs $(srcdir) diff --git a/test/ncurses.c b/test/ncurses.c index b4bac67f..791c3a41 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -40,14 +40,10 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.180 2002/09/15 00:39:33 tom Exp $ +$Id: ncurses.c,v 1.202 2004/02/07 20:24:08 tom Exp $ ***************************************************************************/ -#include -#include -#include - #include #if HAVE_GETTIMEOFDAY @@ -59,25 +55,16 @@ $Id: ncurses.c,v 1.180 2002/09/15 00:39:33 tom Exp $ #endif #endif -#if HAVE_PANEL_H && HAVE_LIBPANEL -#define USE_LIBPANEL 1 +#if USE_LIBPANEL #include -#else -#define USE_LIBPANEL 0 #endif -#if HAVE_MENU_H && HAVE_LIBMENU -#define USE_LIBMENU 1 +#if USE_LIBMENU #include -#else -#define USE_LIBMENU 0 #endif -#if HAVE_FORM_H && HAVE_LIBFORM -#define USE_LIBFORM 1 +#if USE_LIBFORM #include -#else -#define USE_LIBFORM 0 #endif #ifdef NCURSES_VERSION @@ -122,13 +109,7 @@ extern int _nc_tracing; #endif #define P(string) printw("%s\n", string) -#ifdef CTRL -#undef CTRL -#endif -#define CTRL(x) ((x) & 0x1f) -#define QUIT CTRL('Q') -#define ESCAPE CTRL('[') #define BLANK ' ' /* this is the background character */ #undef max_colors @@ -181,6 +162,74 @@ wGetchar(WINDOW *win) } #define Getchar() wGetchar(stdscr) +/* replaces wgetnstr(), since we want to be able to edit values */ +static void +wGetstring(WINDOW *win, char *buffer, int limit) +{ + int y0, x0, x, ch; + bool done = FALSE; + + echo(); + getyx(win, y0, x0); + wattrset(win, A_REVERSE); + + x = strlen(buffer); + while (!done) { + if (x > (int) strlen(buffer)) + x = (int) strlen(buffer); + wmove(win, y0, x0); + wprintw(win, "%-*s", limit, buffer); + wmove(win, y0, x0 + x); + switch (ch = wGetchar(win)) { + case '\n': + case KEY_ENTER: + done = TRUE; + break; + case CTRL('U'): + *buffer = '\0'; + break; + case '\b': + case KEY_BACKSPACE: + case KEY_DC: + if (x > 0) { + int j; + for (j = --x; (buffer[j] = buffer[j + 1]) != '\0'; ++j) { + ; + } + } else { + beep(); + } + break; + case KEY_LEFT: + if (x > 0) { + --x; + } else { + flash(); + } + break; + case KEY_RIGHT: + ++x; + break; + default: + if (!isprint(ch) || ch >= KEY_MIN) { + beep(); + } else if ((int) strlen(buffer) < limit) { + int j; + for (j = strlen(buffer) + 1; j > x; --j) { + buffer[j] = buffer[j - 1]; + } + buffer[x++] = ch; + } else { + flash(); + } + } + } + + wattroff(win, A_REVERSE); + wmove(win, y0, x0); + noecho(); +} + #if USE_WIDEC_SUPPORT static int wGet_wchar(WINDOW *win, wint_t * result) @@ -206,6 +255,98 @@ wGet_wchar(WINDOW *win, wint_t * result) } #define Get_wchar(result) wGet_wchar(stdscr, result) +/* replaces wgetn_wstr(), since we want to be able to edit values */ +static void +wGet_wstring(WINDOW *win, wchar_t * buffer, int limit) +{ + int y0, x0, x; + wint_t ch; + bool done = FALSE; + + echo(); + getyx(win, y0, x0); + wattrset(win, A_REVERSE); + + x = wcslen(buffer); + while (!done) { + if (x > (int) wcslen(buffer)) + x = (int) wcslen(buffer); + wmove(win, y0, x0); + waddnwstr(win, buffer, limit); + if (x < limit) + wprintw(win, "%*s", limit - x, " "); + wmove(win, y0, x0 + x); + switch (wGet_wchar(win, &ch)) { + case KEY_CODE_YES: + switch (ch) { + case KEY_ENTER: + ch = '\n'; + break; + case KEY_BACKSPACE: + case KEY_DC: + ch = '\b'; + break; + case KEY_LEFT: + case KEY_RIGHT: + break; + default: + ch = (wint_t) - 1; + break; + } + case OK: + break; + default: + ch = (wint_t) - 1; + break; + } + + switch (ch) { + case '\n': + done = TRUE; + break; + case CTRL('U'): + *buffer = '\0'; + break; + case '\b': + if (x > 0) { + int j; + for (j = --x; (buffer[j] = buffer[j + 1]) != '\0'; ++j) { + ; + } + } else { + beep(); + } + break; + case KEY_LEFT: + if (x > 0) { + --x; + } else { + flash(); + } + break; + case KEY_RIGHT: + ++x; + break; + default: + if (!isprint(ch) || ch >= KEY_MIN) { + beep(); + } else if ((int) wcslen(buffer) < limit) { + int j; + for (j = wcslen(buffer) + 1; j > x; --j) { + buffer[j] = buffer[j - 1]; + } + buffer[x++] = ch; + } else { + flash(); + } + } + } + + wattroff(win, A_REVERSE); + wmove(win, y0, x0); + noecho(); +} + #endif static void @@ -370,10 +511,10 @@ remember_boxes(unsigned level, WINDOW *txt_win, WINDOW *box_win) if (winstack == 0) { len_winstack = 20; - winstack = malloc(len_winstack * sizeof(WINSTACK)); + winstack = (WINSTACK *) malloc(len_winstack * sizeof(WINSTACK)); } else if (need >= len_winstack) { len_winstack = need; - winstack = realloc(winstack, len_winstack * sizeof(WINSTACK)); + winstack = (WINSTACK *) realloc(winstack, len_winstack * sizeof(WINSTACK)); } winstack[level].text = txt_win; winstack[level].frame = box_win; @@ -433,7 +574,7 @@ wgetch_test(int level, WINDOW *win, int delay) int y, x; memset(flags, FALSE, sizeof(flags)); - flags['k'] = (win == stdscr); + flags[UChar('k')] = (win == stdscr); setup_getch(win, flags); wtimeout(win, delay); @@ -460,7 +601,7 @@ wgetch_test(int level, WINDOW *win, int delay) } else if (c == 'x' || c == 'q') { break; } else if (c == 'e') { - flags['e'] = !flags['e']; + flags[UChar('e')] = !flags[UChar('e')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 'g') { @@ -472,11 +613,11 @@ wgetch_test(int level, WINDOW *win, int delay) wclrtoeol(win); wgetch_wrap(win, first_y); } else if (c == 'k') { - flags['k'] = !flags['k']; + flags[UChar('k')] = !flags[UChar('k')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 'm') { - flags['m'] = !flags['m']; + flags[UChar('m')] = !flags[UChar('m')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 's') { @@ -606,6 +747,7 @@ getch_test(void) * For wgetch_test(), we create pairs of windows - one for a box, one for text. * Resize both and paint the box in the parent. */ +#ifdef KEY_RESIZE static void resize_wide_boxes(int level, WINDOW *win) { @@ -640,20 +782,42 @@ resize_wide_boxes(int level, WINDOW *win) } doupdate(); } +#endif /* KEY_RESIZE */ + +static char * +wcstos(const wchar_t * src) +{ + int need; + mbstate_t state; + char *result = 0; + const wchar_t *tmp = src; + + memset(&state, 0, sizeof(state)); + if ((need = wcsrtombs(0, &tmp, 0, &state)) > 0) { + result = (char *) calloc(need + 1, 1); + tmp = src; + if (wcsrtombs(result, &tmp, need, &state) != (size_t) need) { + free(result); + result = 0; + } + } + return result; +} static void wget_wch_test(int level, WINDOW *win, int delay) { - char buf[BUFSIZ]; + wchar_t buf[BUFSIZ]; int first_y, first_x; wint_t c; int incount = 0; bool flags[256]; bool blocking = (delay < 0); int y, x, code; + char *temp; memset(flags, FALSE, sizeof(flags)); - flags['k'] = (win == stdscr); + flags[UChar('k')] = (win == stdscr); setup_getch(win, flags); wtimeout(win, delay); @@ -680,23 +844,28 @@ wget_wch_test(int level, WINDOW *win, int delay) } else if (c == 'x' || c == 'q') { break; } else if (c == 'e') { - flags['e'] = !flags['e']; + flags[UChar('e')] = !flags[UChar('e')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 'g') { waddstr(win, "getstr test: "); echo(); - wgetnstr(win, buf, sizeof(buf) - 1); + wgetn_wstr(win, (wint_t *) buf, sizeof(buf) - 1); noecho(); - wprintw(win, "I saw %d characters:\n\t`%s'.", strlen(buf), buf); + if ((temp = wcstos(buf)) != 0) { + wprintw(win, "I saw %d characters:\n\t`%s'.", wcslen(buf), temp); + free(temp); + } else { + wprintw(win, "I saw %d characters (cannot convert).", wcslen(buf)); + } wclrtoeol(win); wgetch_wrap(win, first_y); } else if (c == 'k') { - flags['k'] = !flags['k']; + flags[UChar('k')] = !flags[UChar('k')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 'm') { - flags['m'] = !flags['m']; + flags[UChar('m')] = !flags[UChar('m')]; setup_getch(win, flags); wgetch_help(win, flags); } else if (c == 's') { @@ -782,11 +951,40 @@ get_wch_test(void) * ****************************************************************************/ +#define MAX_ATTRSTRING 31 +#define LEN_ATTRSTRING 26 + +static char attr_test_string[] = "abcde fghij klmno pqrst uvwxy z"; + +static void +adjust_attr_string(int adjust) +{ + int first = ((int) UChar(attr_test_string[0])) + adjust; + int last = first + LEN_ATTRSTRING; + + if (first >= ' ' && last <= '~') { /* 32..126 */ + int j, k; + for (j = 0, k = first; k <= last; ++j, ++k) { + attr_test_string[j] = k; + if (((k + 1 - first) % 5) == 0) { + ++j; + if (j < MAX_ATTRSTRING) + attr_test_string[j] = ' '; + } + } + while (j < MAX_ATTRSTRING) + attr_test_string[j++] = ' '; + attr_test_string[j] = '\0'; + } else { + beep(); + } +} + static int show_attr(int row, int skip, chtype attr, const char *name) { - static const char *string = "abcde fghij klmno pqrst uvwxy z"; int ncv = tigetnum("ncv"); + chtype test = attr & ~A_ALTCHARSET; mvprintw(row, 8, "%s mode:", name); mvprintw(row, 24, "|"); @@ -804,29 +1002,24 @@ show_attr(int row, int skip, chtype attr, const char *name) * is possible to turn off the A_ALTCHARSET flag for the characters which * are added, and it would be an unexpected result to have the mapped * characters visible on the screen. - * - * This example works because the indices into acs_map[] are mostly from - * the lowercase characters. */ if (attr & A_ALTCHARSET) { - const char *s = string; - while (*s) { - int ch = *s++; -#ifdef CURSES_ACS_ARRAY - if ((ch = CURSES_ACS_ARRAY[ch]) == 0) - ch = ' '; -#endif + const char *s; + int ch; + + for (s = attr_test_string; *s != '\0'; ++s) { + ch = UChar(*s); addch(ch); } } else { - addstr(string); + addstr(attr_test_string); } attroff(attr); if (skip) printw("%*s", skip, " "); printw("|"); - if (attr != A_NORMAL) { - if (!(termattrs() & attr)) { + if (test != A_NORMAL) { + if (!(termattrs() & test)) { printw(" (N/A)"); } else if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) { static const chtype table[] = @@ -867,7 +1060,8 @@ attr_getc(int *skip, int *fg, int *bg, int *ac) } else if (ch == CTRL('L')) { touchwin(stdscr); touchwin(curscr); - } else if (has_colors()) { + wrefresh(curscr); + } else { switch (ch) { case 'a': *ac = 0; @@ -875,39 +1069,40 @@ attr_getc(int *skip, int *fg, int *bg, int *ac) case 'A': *ac = A_ALTCHARSET; break; - case 'f': - *fg = (*fg + 1); + case '<': + adjust_attr_string(-1); break; - case 'F': - *fg = (*fg - 1); - break; - case 'b': - *bg = (*bg + 1); - break; - case 'B': - *bg = (*bg - 1); + case '>': + adjust_attr_string(1); break; default: - return FALSE; - } - if (*fg >= max_colors) - *fg = 0; - if (*fg < 0) - *fg = max_colors - 1; - if (*bg >= max_colors) - *bg = 0; - if (*bg < 0) - *bg = max_colors - 1; - } else { - switch (ch) { - case 'a': - *ac = 0; - break; - case 'A': - *ac = A_ALTCHARSET; + if (has_colors()) { + switch (ch) { + case 'f': + *fg = (*fg + 1); + break; + case 'F': + *fg = (*fg - 1); + break; + case 'b': + *bg = (*bg + 1); + break; + case 'B': + *bg = (*bg - 1); + break; + default: + return FALSE; + } + if (*fg >= max_colors) + *fg = 0; + if (*fg < 0) + *fg = max_colors - 1; + if (*bg >= max_colors) + *bg = 0; + if (*bg < 0) + *bg = max_colors - 1; + } break; - default: - return FALSE; } } return TRUE; @@ -965,12 +1160,12 @@ attr_test(void) mvprintw(row + 1, 8, "Enter a digit to set gaps on each side of displayed attributes"); mvprintw(row + 2, 8, - "^L = repaint"); + "^L repaints, shifts, "); if (has_colors()) - printw(". f/F/b/F toggle colors (now %d/%d), a/A altcharset (%d)", + printw("f/F/b/F toggle color (now %d/%d), a/A ACS (%d)", fg, bg, ac != 0); else - printw(". a/A altcharset (%d)", ac != 0); + printw("a/A ACS (%d)", ac != 0); refresh(); } while (attr_getc(&n, &fg, &bg, &ac)); @@ -1022,7 +1217,7 @@ color_test(void) { int i; int base, top, width; - NCURSES_CONST char *hello; + const char *hello; refresh(); (void) printw("There are %d color pairs\n", COLOR_PAIRS); @@ -1241,15 +1436,73 @@ color_edit(void) * ****************************************************************************/ +#define SLK_HELP 17 +#define SLK_WORK (SLK_HELP + 3) + +static void +slk_help(void) +{ + static const char *table[] = + { + "Available commands are:" + ,"" + ,"^L -- repaint this message and activate soft keys" + ,"a/d -- activate/disable soft keys" + ,"c -- set centered format for labels" + ,"l -- set left-justified format for labels" + ,"r -- set right-justified format for labels" + ,"[12345678] -- set label; labels are numbered 1 through 8" + ,"e -- erase stdscr (should not erase labels)" + ,"s -- test scrolling of shortened screen" +#if HAVE_SLK_COLOR + ,"F/B -- cycle through foreground/background colors" +#endif + ,"x, q -- return to main menu" + ,"" + ,"Note: if activating the soft keys causes your terminal to scroll up" + ,"one line, your terminal auto-scrolls when anything is written to the" + ,"last screen position. The ncurses code does not yet handle this" + ,"gracefully." + }; + unsigned j; + + move(2, 0); + for (j = 0; j < SIZEOF(table); ++j) { + P(table[j]); + } + refresh(); +} + static void slk_test(void) /* exercise the soft keys */ { int c, fmt = 1; char buf[9]; + char *s; +#if HAVE_SLK_COLOR + short fg = COLOR_BLACK; + short bg = COLOR_WHITE; + bool new_color = FALSE; +#endif c = CTRL('l'); +#if HAVE_SLK_COLOR + if (has_colors()) { + new_color = TRUE; + } +#endif + do { +#if HAVE_SLK_COLOR + if (new_color) { + init_pair(1, bg, fg); + slk_color(1); + new_color = FALSE; + mvprintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg); + refresh(); + } +#endif move(0, 0); switch (c) { case CTRL('l'): @@ -1258,25 +1511,7 @@ slk_test(void) mvaddstr(0, 20, "Soft Key Exerciser"); attroff(A_BOLD); - move(2, 0); - P("Available commands are:"); - P(""); - P("^L -- refresh screen"); - P("a -- activate or restore soft keys"); - P("d -- disable soft keys"); - P("c -- set centered format for labels"); - P("l -- set left-justified format for labels"); - P("r -- set right-justified format for labels"); - P("[12345678] -- set label; labels are numbered 1 through 8"); - P("e -- erase stdscr (should not erase labels)"); - P("s -- test scrolling of shortened screen"); - P("x, q -- return to main menu"); - P(""); - P("Note: if activating the soft keys causes your terminal to"); - P("scroll up one line, your terminal auto-scrolls when anything"); - P("is written to the last screen position. The ncurses code"); - P("does not yet handle this gracefully."); - refresh(); + slk_help(); /* fall through */ case 'a': @@ -1288,7 +1523,7 @@ slk_test(void) break; case 's': - mvprintw(20, 0, "Press Q to stop the scrolling-test: "); + mvprintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); while ((c = Getchar()) != 'Q' && (c != ERR)) addch((chtype) c); break; @@ -1317,20 +1552,155 @@ slk_test(void) case '6': case '7': case '8': - (void) mvaddstr(20, 0, "Please enter the label value: "); - echo(); - wgetnstr(stdscr, buf, 8); - noecho(); + (void) mvaddstr(SLK_WORK, 0, "Please enter the label value: "); + strcpy(buf, ""); + if ((s = slk_label(c - '0')) != 0) { + strncpy(buf, s, 8); + } + wGetstring(stdscr, buf, 8); slk_set((c - '0'), buf, fmt); slk_refresh(); - move(20, 0); - clrtoeol(); + move(SLK_WORK, 0); + clrtobot(); + break; + + case 'x': + case 'q': + goto done; + +#if HAVE_SLK_COLOR + case 'F': + if (has_colors()) { + fg = (fg + 1) % max_colors; + new_color = TRUE; + } + break; + case 'B': + if (has_colors()) { + bg = (bg + 1) % max_colors; + new_color = TRUE; + } + break; +#endif + + default: + beep(); + } + } while + ((c = Getchar()) != EOF); + + done: + erase(); + endwin(); +} + +#if USE_WIDEC_SUPPORT +static void +wide_slk_test(void) +/* exercise the soft keys */ +{ + int c, fmt = 1; + wchar_t buf[9]; + char *s; + short fg = COLOR_BLACK; + short bg = COLOR_WHITE; + bool new_color = FALSE; + + c = CTRL('l'); + if (has_colors()) { + new_color = TRUE; + } + do { + if (new_color) { + init_pair(1, bg, fg); + slk_color(1); + new_color = FALSE; + mvprintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg); + refresh(); + } + move(0, 0); + switch (c) { + case CTRL('l'): + erase(); + attr_on(WA_BOLD, NULL); + mvaddstr(0, 20, "Soft Key Exerciser"); + attr_off(WA_BOLD, NULL); + + slk_help(); + /* fall through */ + + case 'a': + slk_restore(); + break; + + case 'e': + wclear(stdscr); + break; + + case 's': + mvprintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); + while ((c = Getchar()) != 'Q' && (c != ERR)) + addch((chtype) c); + break; + + case 'd': + slk_clear(); + break; + + case 'l': + fmt = 0; + break; + + case 'c': + fmt = 1; + break; + + case 'r': + fmt = 2; + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + (void) mvaddstr(SLK_WORK, 0, "Please enter the label value: "); + *buf = 0; + if ((s = slk_label(c - '0')) != 0) { + int j; + for (j = 0; j < 8; ++j) { + if ((buf[j] = UChar(s[j])) == 0) + break; + } + buf[j] = 0; + } + wGet_wstring(stdscr, buf, 8); + slk_wset((c - '0'), buf, fmt); + slk_refresh(); + move(SLK_WORK, 0); + clrtobot(); break; case 'x': case 'q': goto done; + case 'F': + if (has_colors()) { + fg = (fg + 1) % max_colors; + new_color = TRUE; + } + break; + case 'B': + if (has_colors()) { + bg = (bg + 1) % max_colors; + new_color = TRUE; + } + break; + default: beep(); } @@ -1341,6 +1711,7 @@ slk_test(void) erase(); endwin(); } +#endif /**************************************************************************** * @@ -1506,7 +1877,7 @@ acs_display(void) #if USE_WIDEC_SUPPORT static void -show_upper_widechars(int first) +show_upper_widechars(int first, int repeat) { cchar_t temp; wchar_t code; @@ -1516,7 +1887,6 @@ show_upper_widechars(int first) attron(A_BOLD); mvprintw(0, 20, "Display of Character Codes %d to %d", first, last); attroff(A_BOLD); - refresh(); for (code = first; code <= last; code++) { int row = 4 + ((code - first) % 16); @@ -1524,13 +1894,22 @@ show_upper_widechars(int first) wchar_t codes[10]; attr_t attrs = A_NORMAL; char tmp[80]; + int count = repeat; memset(&codes, 0, sizeof(codes)); codes[0] = code; - sprintf(tmp, "%3ld (0x%lx)", code, code); + sprintf(tmp, "%3ld (0x%lx)", (long) code, (long) code); mvprintw(row, col, "%*s: ", COLS / 4, tmp); setcchar(&temp, codes, attrs, 0, 0); - echo_wchar(&temp); + do { + /* + * This could use add_wch(), but is done for comparison with the + * normal 'f' test (and to make a test-case for echo_wchar()). + * The screen will flicker because the erase() at the top of the + * function is met by the builtin refresh() in echo_wchar(). + */ + echo_wchar(&temp); + } while (--count > 0); } } @@ -1624,13 +2003,15 @@ show_wbox_chars(void) } static int -show_2_wacs(int n, const char *name, char *code) +show_2_wacs(int n, const char *name, const char *code) { const int height = 16; int row = 4 + (n % height); int col = (n / height) * COLS / 2; + char temp[80]; + mvprintw(row, col, "%*s : ", COLS / 4, name); - addstr(code); + addstr(strcpy(temp, code)); return n + 1; } @@ -1683,13 +2064,16 @@ show_utf8_chars(void) n = show_2_wacs(n, "WACS_S3", "\342\216\273"); n = show_2_wacs(n, "WACS_S7", "\342\216\274"); n = show_2_wacs(n, "WACS_S9", "\342\216\275"); - /* *INDENT-OFF* */ + /* *INDENT-ON* */ + } static void wide_acs_display(void) { int c = 'a'; + int digit = 0; + int repeat = 0; do { switch (c) { @@ -1704,11 +2088,24 @@ wide_acs_display(void) break; default: if (isdigit(c)) - show_upper_widechars((c - '0') * 32 + 128); + digit = (c - '0'); + else if (c == '+') + ++digit; + else if (c == '-' && digit > 0) + --digit; + else if (c == '>') + ++repeat; + else if (c == '<' && repeat > 0) + --repeat; + else { + beep(); + break; + } + show_upper_widechars(digit * 32 + 128, repeat); break; } mvprintw(LINES - 2, 0, - "Select: a WACS, b box, u UTF-8, 0-9 non-ASCII characters, q=quit"); + "Select: a WACS, b box, u UTF-8, 0-9,+/- non-ASCII, repeat, q=quit"); refresh(); } while ((c = Getchar()) != 'x' && c != 'q'); @@ -2478,35 +2875,35 @@ demo_panels(void) COLS / 8 + 1, 0, 0); - set_panel_userptr(p1, "p1"); + set_panel_userptr(p1, (NCURSES_CONST void *) "p1"); p2 = mkpanel(COLOR_GREEN, LINES / 2 + 1, COLS / 7, LINES / 4, COLS / 10); - set_panel_userptr(p2, "p2"); + set_panel_userptr(p2, (NCURSES_CONST void *) "p2"); p3 = mkpanel(COLOR_YELLOW, LINES / 4, COLS / 10, LINES / 2, COLS / 9); - set_panel_userptr(p3, "p3"); + set_panel_userptr(p3, (NCURSES_CONST void *) "p3"); p4 = mkpanel(COLOR_BLUE, LINES / 2 - 2, COLS / 8, LINES / 2 - 2, COLS / 3); - set_panel_userptr(p4, "p4"); + set_panel_userptr(p4, (NCURSES_CONST void *) "p4"); p5 = mkpanel(COLOR_MAGENTA, LINES / 2 - 2, COLS / 8, LINES / 2, COLS / 2 - 2); - set_panel_userptr(p5, "p5"); + set_panel_userptr(p5, (NCURSES_CONST void *) "p5"); fill_panel(p1); fill_panel(p2); @@ -3747,12 +4144,80 @@ my_form_driver(FORM * form, int c) } } +/* + * Allow a middle initial, optionally with a '.' to end it. + */ +static bool +mi_field_check(FIELD * fld, const void *data GCC_UNUSED) +{ + char *s = field_buffer(fld, 0); + int state = 0; + int n; + + for (n = 0; s[n] != '\0'; ++n) { + switch (state) { + case 0: + if (s[n] == '.') { + if (n != 1) + return FALSE; + state = 2; + } else if (isspace(UChar(s[n]))) { + state = 2; + } + break; + case 2: + if (!isspace(UChar(s[n]))) + return FALSE; + break; + } + } + + /* force the form to display a leading capital */ + if (islower(UChar(s[0]))) { + s[0] = toupper(UChar(s[0])); + set_field_buffer(fld, 0, s); + } + return TRUE; +} + +static bool +mi_char_check(int ch, const void *data GCC_UNUSED) +{ + return ((isalpha(ch) || ch == '.') ? TRUE : FALSE); +} + +/* + * Passwords should be at least 6 characters. + */ +static bool +pw_field_check(FIELD * fld, const void *data GCC_UNUSED) +{ + char *s = field_buffer(fld, 0); + int n; + + for (n = 0; s[n] != '\0'; ++n) { + if (isspace(UChar(s[n]))) { + if (n < 6) + return FALSE; + } + } + return TRUE; +} + +static bool +pw_char_check(int ch, const void *data GCC_UNUSED) +{ + return (isgraph(ch) ? TRUE : FALSE); +} + static void demo_forms(void) { WINDOW *w; FORM *form; FIELD *f[12], *secure; + FIELDTYPE *fty_middle = new_fieldtype(mi_field_check, mi_char_check); + FIELDTYPE *fty_passwd = new_fieldtype(pw_field_check, pw_char_check); int finished = 0, c; unsigned n = 0; @@ -3775,17 +4240,26 @@ demo_forms(void) /* describe the form */ f[n++] = make_label(0, 15, "Sample Form"); + f[n++] = make_label(2, 0, "Last Name"); f[n++] = make_field(3, 0, 1, 18, FALSE); + set_field_type(f[n - 1], TYPE_ALPHA, 1); + f[n++] = make_label(2, 20, "First Name"); f[n++] = make_field(3, 20, 1, 12, FALSE); + set_field_type(f[n - 1], TYPE_ALPHA, 1); + f[n++] = make_label(2, 34, "Middle Name"); f[n++] = make_field(3, 34, 1, 12, FALSE); + set_field_type(f[n - 1], fty_middle); + f[n++] = make_label(5, 0, "Comments"); f[n++] = make_field(6, 0, 4, 46, FALSE); + f[n++] = make_label(5, 20, "Password:"); secure = f[n++] = make_field(5, 30, 1, 9, TRUE); + set_field_type(f[n - 1], fty_passwd); f[n++] = (FIELD *) 0; form = new_form(f); @@ -3982,6 +4456,11 @@ do_single_test(const char c) slk_test(); break; +#if USE_WIDEC_SUPPORT + case 'E': + wide_slk_test(); + break; +#endif case 'f': acs_display(); break; @@ -4252,6 +4731,9 @@ main(int argc, char *argv[]) (void) puts("c = color test pattern"); (void) puts("d = edit RGB color values"); (void) puts("e = exercise soft keys"); +#if USE_WIDEC_SUPPORT + (void) puts("E = exercise soft keys using wide-characters"); +#endif (void) puts("f = display ACS characters"); #if USE_WIDEC_SUPPORT (void) puts("F = display Wide-ACS characters"); diff --git a/test/railroad.c b/test/railroad.c index fd773c8c..91117b91 100644 --- a/test/railroad.c +++ b/test/railroad.c @@ -29,14 +29,12 @@ /* * Author: Thomas E. Dickey 2000 * - * $Id: railroad.c,v 1.10 2002/04/06 20:45:22 tom Exp $ + * $Id: railroad.c,v 1.11 2002/10/19 22:11:24 tom Exp $ * * A simple demo of the termcap interface. */ #include -#include - static char *wipeit; static char *moveit; static int length; diff --git a/test/tclock.c b/test/tclock.c index d1cc0fa1..c3cce6d3 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,6 +1,6 @@ -/* $Id: tclock.c,v 1.22 2002/06/29 23:34:13 tom Exp $ */ +/* $Id: tclock.c,v 1.24 2002/12/29 01:40:30 tom Exp $ */ -#include "test.priv.h" +#include #include @@ -125,9 +125,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) int sdx, sdy; int ch; int lastbeep = -1; + bool odd = FALSE; time_t tim; struct tm *t; char szChar[10]; + char *text; int my_bg = COLOR_BLACK; #if HAVE_GETTIMEOFDAY struct timeval current; @@ -151,6 +153,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) init_pair(1, COLOR_RED, my_bg); init_pair(2, COLOR_MAGENTA, my_bg); init_pair(3, COLOR_GREEN, my_bg); + init_pair(4, COLOR_WHITE, COLOR_BLUE); } #ifdef KEY_RESIZE keypad(stdscr, TRUE); @@ -218,11 +221,16 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) if (has_colors()) attrset(COLOR_PAIR(0)); - mvaddstr(LINES - 2, 0, ctime(&tim)); + text = ctime(&tim); + mvprintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); refresh(); if ((t->tm_sec % 5) == 0 && t->tm_sec != lastbeep) { lastbeep = t->tm_sec; + if (has_colors()) { + odd = !odd; + bkgd(odd ? COLOR_PAIR(4) : COLOR_PAIR(0)); + } beep(); } diff --git a/test/test.priv.h b/test/test.priv.h index 18c1eb5c..a6df135a 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * 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 * @@ -29,17 +29,32 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996 * ****************************************************************************/ -/* $Id: test.priv.h,v 1.35 2002/06/29 23:36:12 tom Exp $ */ +/* $Id: test.priv.h,v 1.46 2003/10/19 00:04:24 tom Exp $ */ + +#ifndef __TEST_PRIV_H +#define __TEST_PRIV_H 1 -#if HAVE_CONFIG_H #include -#else -#define HAVE_CURSES_VERSION 0 -#define HAVE_RESIZETERM 0 -#define HAVE_USE_DEFAULT_COLORS 0 -#define HAVE_WRESIZE 0 + +/* + * Fix ifdef's that look for the form/menu/panel libraries, if we are building + * with wide-character ncurses. + */ +#ifdef HAVE_LIBFORMW +#define HAVE_LIBFORM 1 +#endif + +#ifdef HAVE_LIBMENUW +#define HAVE_LIBMENU 1 +#endif + +#ifdef HAVE_LIBPANELW +#define HAVE_LIBPANEL 1 #endif +/* + * Fallback definitions to accommodate broken compilers + */ #ifndef HAVE_CURSES_VERSION #define HAVE_CURSES_VERSION 0 #endif @@ -80,10 +95,18 @@ #define HAVE_PANEL_H 0 #endif +#ifndef HAVE_SLK_COLOR +#define HAVE_SLK_COLOR 0 +#endif + #ifndef HAVE_WRESIZE #define HAVE_WRESIZE 0 #endif +#ifndef NCURSES_EXT_FUNCS +#define NCURSES_EXT_FUNCS 0 +#endif + #ifndef NCURSES_NOMACROS #define NCURSES_NOMACROS 0 #endif @@ -102,8 +125,16 @@ #include /* include before curses.h to work around glibc bug */ +#if defined(HAVE_NCURSESW_NCURSES_H) +#include +#include +#elif defined(HAVE_NCURSES_NCURSES_H) +#include +#include +#else #include #include +#endif #if NCURSES_NOMACROS #include @@ -125,6 +156,9 @@ extern int optind; #define setlocale(name,string) /* nothing */ #endif +#include +#include + #ifndef GCC_NORETURN #define GCC_NORETURN /* nothing */ #endif @@ -144,24 +178,48 @@ extern int optind; #endif #endif +#if HAVE_PANEL_H && HAVE_LIBPANEL +#define USE_LIBPANEL 1 +#else +#define USE_LIBPANEL 0 +#endif + +#if HAVE_MENU_H && HAVE_LIBMENU +#define USE_LIBMENU 1 +#else +#define USE_LIBMENU 0 +#endif + +#if HAVE_FORM_H && HAVE_LIBFORM +#define USE_LIBFORM 1 +#else +#define USE_LIBFORM 0 +#endif + #ifndef HAVE_TYPE_ATTR_T #if !USE_WIDEC_SUPPORT #define attr_t long #endif #endif -#ifndef NCURSES_CH_T +#undef NCURSES_CH_T #if !USE_WIDEC_SUPPORT #define NCURSES_CH_T chtype #else #define NCURSES_CH_T cchar_t #endif -#endif #ifndef CCHARW_MAX #define CCHARW_MAX 5 #endif +#ifndef CTRL +#define CTRL(x) ((x) & 0x1f) +#endif + +#define QUIT CTRL('Q') +#define ESCAPE CTRL('[') + #ifndef KEY_MIN #define KEY_MIN 256 /* not defined in Solaris 8 */ #endif @@ -216,3 +274,21 @@ extern int optind; #ifndef NCURSES_CONST #define NCURSES_CONST /* nothing */ #endif + +/* out-of-band values for representing absent capabilities */ +#define ABSENT_BOOLEAN (-1) /* 255 */ +#define ABSENT_NUMERIC (-1) +#define ABSENT_STRING (char *)0 + +/* out-of-band values for representing cancels */ +#define CANCELLED_BOOLEAN (char)(-2) /* 254 */ +#define CANCELLED_NUMERIC (-2) +#define CANCELLED_STRING (char *)(-1) + +#define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */ +#define VALID_NUMERIC(s) ((s) >= 0) +#define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING) + +#define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~" + +#endif /* __TEST_PRIV_H */ diff --git a/test/testcurs.c b/test/testcurs.c index fd189a94..e8aa918e 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -7,11 +7,10 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.31 2002/09/14 22:45:15 tom Exp $ + * $Id: testcurs.c,v 1.32 2002/10/19 22:11:24 tom Exp $ */ #include -#include #if defined(XCURSES) char *XCursesProgramName = "testcurs"; diff --git a/test/testscanw.c b/test/testscanw.c index 7bce567b..8fc3908f 100644 --- a/test/testscanw.c +++ b/test/testscanw.c @@ -2,10 +2,9 @@ * Date: 1997/03/17 * From: bayern@morpheus.cis.yale.edu * - * $Id: testscanw.c,v 1.9 2002/06/29 23:32:18 tom Exp $ + * $Id: testscanw.c,v 1.10 2002/10/19 22:11:24 tom Exp $ */ #include -#include int main(int argc, char *argv[]) diff --git a/test/view.c b/test/view.c index a6303c1d..ce9b9b87 100644 --- a/test/view.c +++ b/test/view.c @@ -23,10 +23,9 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.53 2002/06/29 23:28:27 tom Exp $ + * $Id: view.c,v 1.57 2003/05/17 21:58:43 tom Exp $ */ -#include #include #include @@ -54,7 +53,7 @@ static RETSIGTYPE finish(int sig) GCC_NORETURN; static void show_all(const char *tag); -#if defined(SIGWINCH) && defined(TIOCGWINSZ) && HAVE_RESIZETERM +#if defined(SIGWINCH) && defined(TIOCGWINSZ) && HAVE_RESIZE_TERM #define CAN_RESIZE 1 #else #define CAN_RESIZE 0 @@ -496,14 +495,17 @@ show_all(const char *tag) clrtoeol(); if ((s = lptr[i - 1]) != 0) { int len = ch_len(s); - if (len > shift) + if (len > shift) { #if USE_WIDEC_SUPPORT add_wchstr(s + shift); #else addchstr(s + shift); #endif + } +#if defined(NCURSES_VERSION) || defined(HAVE_WCHGAT) if (try_color) wchgat(stdscr, -1, A_NORMAL, my_pair, NULL); +#endif } } setscrreg(1, LINES - 1); -- 2.44.0