From b1f61d9f3aa244512045a6b02e759825d7049d34 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 8 Jul 2000 22:46:08 -0400 Subject: [PATCH] ncurses 5.1 --- ANNOUNCE | 347 +- Ada95/Makefile.in | 3 +- Ada95/gen/Makefile.in | 77 +- Ada95/gen/gen.c | 38 +- Ada95/gen/html.m4 | 11 + Ada95/gen/table.m4 | 6 + .../terminal_interface-curses-panels.ads.m4 | 4 +- Ada95/gen/terminal_interface-curses.ads.m4 | 18 +- Ada95/html/ada/files.htm | 5 - Ada95/html/ada/files/T.htm | 36 - Ada95/html/ada/funcs.htm | 19 - Ada95/html/ada/funcs/A.htm | 6 - Ada95/html/ada/funcs/C.htm | 6 - Ada95/html/ada/funcs/E.htm | 6 - Ada95/html/ada/funcs/F.htm | 6 - Ada95/html/ada/funcs/G.htm | 6 - Ada95/html/ada/funcs/I.htm | 6 - Ada95/html/ada/funcs/L.htm | 6 - Ada95/html/ada/funcs/M.htm | 6 - Ada95/html/ada/funcs/N.htm | 6 - Ada95/html/ada/funcs/P.htm | 6 - Ada95/html/ada/funcs/R.htm | 6 - Ada95/html/ada/funcs/S.htm | 6 - Ada95/html/ada/funcs/T.htm | 6 - Ada95/html/ada/funcs/U.htm | 6 - Ada95/html/ada/funcs/V.htm | 6 - Ada95/html/ada/index.htm | 33 - Ada95/html/ada/main.htm | 23 - ...nterface-curses-forms-field_types__ads.htm | 245 -- .../terminal_interface-curses-forms__ads.htm | 785 ---- .../terminal_interface-curses-menus__ads.htm | 675 ---- .../ada/terminal_interface-curses__ads.htm | 1743 --------- Ada95/html/man/curs_addch.3x.html | 174 - Ada95/html/man/curs_addchstr.3x.html | 70 - Ada95/html/man/curs_addstr.3x.html | 70 - Ada95/html/man/curs_attr.3x.html | 170 - Ada95/html/man/curs_beep.3x.html | 70 - Ada95/html/man/curs_bkgd.3x.html | 122 - Ada95/html/man/curs_border.3x.html | 120 - Ada95/html/man/curs_clear.3x.html | 122 - Ada95/html/man/curs_color.3x.html | 226 -- Ada95/html/man/curs_delch.3x.html | 70 - Ada95/html/man/curs_deleteln.3x.html | 70 - Ada95/html/man/curs_getch.3x.html | 226 -- Ada95/html/man/curs_getstr.3x.html | 122 - Ada95/html/man/curs_getyx.3x.html | 70 - Ada95/html/man/curs_inch.3x.html | 68 - Ada95/html/man/curs_inchstr.3x.html | 70 - Ada95/html/man/curs_initscr.3x.html | 122 - Ada95/html/man/curs_inopts.3x.html | 226 -- Ada95/html/man/curs_insch.3x.html | 70 - Ada95/html/man/curs_insstr.3x.html | 120 - Ada95/html/man/curs_instr.3x.html | 70 - Ada95/html/man/curs_kernel.3x.html | 172 - Ada95/html/man/curs_mouse.3x.html | 224 -- Ada95/html/man/curs_move.3x.html | 70 - Ada95/html/man/curs_outopts.3x.html | 172 - Ada95/html/man/curs_overlay.3x.html | 70 - Ada95/html/man/curs_pad.3x.html | 122 - Ada95/html/man/curs_printw.3x.html | 68 - Ada95/html/man/curs_refresh.3x.html | 122 - Ada95/html/man/curs_scanw.3x.html | 68 - Ada95/html/man/curs_scr_dmp.3x.html | 122 - Ada95/html/man/curs_scr_dump.3x.html | 122 - Ada95/html/man/curs_scroll.3x.html | 70 - Ada95/html/man/curs_slk.3x.html | 122 - Ada95/html/man/curs_termattrs.3x.html | 122 - Ada95/html/man/curs_termcap.3x.html | 120 - Ada95/html/man/curs_terminfo.3x.html | 226 -- Ada95/html/man/curs_touch.3x.html | 120 - Ada95/html/man/curs_util.3x.html | 122 - Ada95/html/man/curs_window.3x.html | 176 - Ada95/html/man/dft_fgbg.3x.html | 72 - Ada95/html/man/form.3x.html | 176 - Ada95/html/man/form_field.3x.html | 124 - Ada95/html/man/form_field_attributes.3x.html | 124 - Ada95/html/man/form_field_buffer.3x.html | 122 - Ada95/html/man/form_field_just.3x.html | 72 - Ada95/html/man/form_hook.3x.html | 124 - Ada95/html/man/form_new.3x.html | 72 - Ada95/html/man/form_new_page.3x.html | 72 - Ada95/html/man/form_opts.3x.html | 124 - Ada95/html/man/form_page.3x.html | 122 - Ada95/html/man/form_post.3x.html | 122 - Ada95/html/man/menu.3x.html | 176 - Ada95/html/man/menu_attribs.3x.html | 122 - Ada95/html/man/menu_format.3x.html | 124 - Ada95/html/man/menu_hook.3x.html | 124 - Ada95/html/man/menu_items.3x.html | 124 - Ada95/html/man/menu_mark.3x.html | 72 - Ada95/html/man/menu_new.3x.html | 72 - Ada95/html/man/menu_pattern.3x.html | 72 - Ada95/html/man/menu_post.3x.html | 124 - Ada95/html/man/mitem_current.3x.html | 122 - Ada95/html/man/mitem_name.3x.html | 72 - Ada95/html/man/mitem_opts.3x.html | 72 - Ada95/html/man/mitem_value.3x.html | 72 - Ada95/html/man/ncurses.3x.html | 701 ---- Ada95/html/man/panel.3x.html | 180 - Ada95/html/table.html | 325 -- Ada95/samples/Makefile.in | 5 +- Ada95/src/Makefile.in | 10 +- INSTALL | 627 +++- MANIFEST | 365 +- NEWS | 567 ++- README.emx | 16 +- aclocal.m4 | 291 +- announce.html.in | 283 +- c++/Makefile.in | 9 +- c++/cursesapp.cc | 8 +- c++/cursesf.cc | 20 +- c++/cursesf.h | 10 +- c++/cursesm.cc | 6 +- c++/cursesm.h | 14 +- c++/cursesp.cc | 6 +- c++/cursesp.h | 38 +- c++/cursesw.cc | 4 +- c++/edit_cfg.sh | 15 +- config.guess | 632 +++- config.sub | 462 ++- configure | 1481 ++++---- configure.in | 319 +- dist.mk | 82 +- {misc => doc}/hackguide.doc | 5 - Ada95/html/index.html => doc/html/Ada95.html | 17 +- doc/html/ada/files.htm | 5 + doc/html/ada/files/T.htm | 69 + doc/html/ada/funcs.htm | 27 + doc/html/ada/funcs/A.htm | 18 + doc/html/ada/funcs/B.htm | 10 + doc/html/ada/funcs/C.htm | 33 + doc/html/ada/funcs/D.htm | 22 + doc/html/ada/funcs/E.htm | 11 + doc/html/ada/funcs/F.htm | 46 + doc/html/ada/funcs/G.htm | 21 + doc/html/ada/funcs/H.htm | 12 + doc/html/ada/funcs/I.htm | 31 + doc/html/ada/funcs/K.htm | 10 + doc/html/ada/funcs/L.htm | 14 + doc/html/ada/funcs/M.htm | 44 + doc/html/ada/funcs/N.htm | 28 + doc/html/ada/funcs/O.htm | 9 + doc/html/ada/funcs/P.htm | 39 + doc/html/ada/funcs/Q.htm | 7 + doc/html/ada/funcs/R.htm | 20 + doc/html/ada/funcs/S.htm | 93 + doc/html/ada/funcs/T.htm | 19 + doc/html/ada/funcs/U.htm | 11 + doc/html/ada/funcs/V.htm | 7 + doc/html/ada/funcs/W.htm | 51 + doc/html/ada/index.htm | 41 + doc/html/ada/main.htm | 66 + doc/html/ada/table.html | 325 ++ .../terminal_interface-curses-aux__adb.htm | 121 + .../terminal_interface-curses-aux__ads.htm | 130 + ...ce-curses-forms-field_types-alpha__adb.htm | 73 + ...ce-curses-forms-field_types-alpha__ads.htm | 10 +- ...es-forms-field_types-alphanumeric__adb.htm | 73 + ...es-forms-field_types-alphanumeric__ads.htm | 10 +- ...forms-field_types-enumeration-ada__adb.htm | 85 + ...forms-field_types-enumeration-ada__ads.htm | 22 +- ...ses-forms-field_types-enumeration__adb.htm | 124 + ...ses-forms-field_types-enumeration__ads.htm | 58 +- ...curses-forms-field_types-intfield__adb.htm | 77 + ...curses-forms-field_types-intfield__ads.htm | 14 +- ...es-forms-field_types-ipv4_address__adb.htm | 73 + ...es-forms-field_types-ipv4_address__ads.htm | 8 +- ...-curses-forms-field_types-numeric__adb.htm | 79 + ...-curses-forms-field_types-numeric__ads.htm | 14 +- ...e-curses-forms-field_types-regexp__adb.htm | 76 + ...e-curses-forms-field_types-regexp__ads.htm | 10 +- ...ses-forms-field_types-user-choice__adb.htm | 115 + ...ses-forms-field_types-user-choice__ads.htm | 62 +- ...ace-curses-forms-field_types-user__adb.htm | 137 + ...ace-curses-forms-field_types-user__ads.htm | 68 +- ...nterface-curses-forms-field_types__adb.htm | 301 ++ ...nterface-curses-forms-field_types__ads.htm | 245 ++ ...face-curses-forms-field_user_data__adb.htm | 90 + ...face-curses-forms-field_user_data__ads.htm | 32 +- ...rface-curses-forms-form_user_data__adb.htm | 91 + ...rface-curses-forms-form_user_data__ads.htm | 32 +- .../terminal_interface-curses-forms__adb.htm | 1165 ++++++ .../terminal_interface-curses-forms__ads.htm | 784 ++++ ...rface-curses-menus-item_user_data__adb.htm | 82 + ...rface-curses-menus-item_user_data__ads.htm | 40 +- ...rface-curses-menus-menu_user_data__adb.htm | 81 + ...rface-curses-menus-menu_user_data__ads.htm | 32 +- .../terminal_interface-curses-menus__adb.htm | 1026 ++++++ .../terminal_interface-curses-menus__ads.htm | 674 ++++ .../terminal_interface-curses-mouse__adb.htm | 219 ++ .../terminal_interface-curses-mouse__ads.htm | 120 +- ...interface-curses-panels-user_data__adb.htm | 83 + ...interface-curses-panels-user_data__ads.htm | 28 +- .../terminal_interface-curses-panels__adb.htm | 169 + .../terminal_interface-curses-panels__ads.htm | 93 +- ...inal_interface-curses-text_io-aux__adb.htm | 133 + ...inal_interface-curses-text_io-aux__ads.htm | 60 + ...terface-curses-text_io-complex_io__adb.htm | 78 + ...terface-curses-text_io-complex_io__ads.htm | 32 +- ...terface-curses-text_io-decimal_io__adb.htm | 80 + ...terface-curses-text_io-decimal_io__ads.htm | 30 +- ...ace-curses-text_io-enumeration_io__adb.htm | 85 + ...ace-curses-text_io-enumeration_io__ads.htm | 24 +- ...interface-curses-text_io-fixed_io__adb.htm | 80 + ...interface-curses-text_io-fixed_io__ads.htm | 30 +- ...interface-curses-text_io-float_io__adb.htm | 81 + ...interface-curses-text_io-float_io__ads.htm | 30 +- ...terface-curses-text_io-integer_io__adb.htm | 75 + ...terface-curses-text_io-integer_io__ads.htm | 24 +- ...terface-curses-text_io-modular_io__adb.htm | 75 + ...terface-curses-text_io-modular_io__ads.htm | 24 +- ...terminal_interface-curses-text_io__adb.htm | 341 ++ ...terminal_interface-curses-text_io__ads.htm | 120 +- .../ada/terminal_interface-curses__adb.htm | 2419 +++++++++++++ .../ada/terminal_interface-curses__ads.htm | 1744 +++++++++ .../html/ada/terminal_interface__ads.htm | 8 +- announce.html => doc/html/announce.html | 287 +- {misc => doc/html}/hackguide.html | 143 +- doc/html/index.html | 30 + doc/html/man/captoinfo.1m.html | 190 + doc/html/man/clear.1.html | 74 + doc/html/man/curs_addch.3x.html | 189 + doc/html/man/curs_addchstr.3x.html | 80 + doc/html/man/curs_addstr.3x.html | 80 + doc/html/man/curs_attr.3x.html | 186 + doc/html/man/curs_beep.3x.html | 80 + doc/html/man/curs_bkgd.3x.html | 134 + doc/html/man/curs_border.3x.html | 135 + doc/html/man/curs_clear.3x.html | 134 + doc/html/man/curs_color.3x.html | 242 ++ doc/html/man/curs_delch.3x.html | 80 + doc/html/man/curs_deleteln.3x.html | 80 + doc/html/man/curs_extend.3x.html | 78 + doc/html/man/curs_getch.3x.html | 296 ++ doc/html/man/curs_getstr.3x.html | 134 + doc/html/man/curs_getyx.3x.html | 80 + doc/html/man/curs_inch.3x.html | 78 + doc/html/man/curs_inchstr.3x.html | 80 + doc/html/man/curs_initscr.3x.html | 134 + doc/html/man/curs_inopts.3x.html | 242 ++ doc/html/man/curs_insch.3x.html | 80 + doc/html/man/curs_insstr.3x.html | 135 + doc/html/man/curs_instr.3x.html | 80 + doc/html/man/curs_kernel.3x.html | 188 + doc/html/man/curs_mouse.3x.html | 242 ++ doc/html/man/curs_move.3x.html | 80 + doc/html/man/curs_outopts.3x.html | 188 + doc/html/man/curs_overlay.3x.html | 80 + doc/html/man/curs_pad.3x.html | 134 + {Ada95 => doc}/html/man/curs_print.3x.html | 32 +- doc/html/man/curs_printw.3x.html | 78 + doc/html/man/curs_refresh.3x.html | 134 + doc/html/man/curs_scanw.3x.html | 78 + doc/html/man/curs_scr_dump.3x.html | 134 + doc/html/man/curs_scroll.3x.html | 80 + doc/html/man/curs_slk.3x.html | 188 + doc/html/man/curs_termattrs.3x.html | 134 + doc/html/man/curs_termcap.3x.html | 134 + doc/html/man/curs_terminfo.3x.html | 296 ++ doc/html/man/curs_touch.3x.html | 135 + doc/html/man/curs_trace.3x.html | 132 + doc/html/man/curs_util.3x.html | 134 + doc/html/man/curs_window.3x.html | 190 + {Ada95 => doc}/html/man/define_key.3x.html | 18 +- doc/html/man/dft_fgbg.3x.html | 136 + doc/html/man/form.3x.html | 245 ++ {Ada95 => doc}/html/man/form_cursor.3x.html | 34 +- {Ada95 => doc}/html/man/form_data.3x.html | 24 +- {Ada95 => doc}/html/man/form_driver.3x.html | 57 +- doc/html/man/form_field.3x.html | 136 + doc/html/man/form_field_attributes.3x.html | 136 + doc/html/man/form_field_buffer.3x.html | 137 + .../html/man/form_field_info.3x.html | 40 +- doc/html/man/form_field_just.3x.html | 82 + .../html/man/form_field_new.3x.html | 46 +- .../html/man/form_field_opts.3x.html | 40 +- .../html/man/form_field_userptr.3x.html | 30 +- .../html/man/form_field_validation.3x.html | 76 +- .../html/man/form_fieldtype.3x.html | 56 +- doc/html/man/form_hook.3x.html | 136 + doc/html/man/form_new.3x.html | 82 + doc/html/man/form_new_page.3x.html | 82 + doc/html/man/form_opts.3x.html | 136 + doc/html/man/form_page.3x.html | 136 + doc/html/man/form_post.3x.html | 136 + .../html/man/form_requestname.3x.html | 30 +- {Ada95 => doc}/html/man/form_userptr.3x.html | 30 +- {Ada95 => doc}/html/man/form_win.3x.html | 50 +- doc/html/man/infocmp.1m.html | 406 +++ doc/html/man/infotocap.1m.html | 78 + doc/html/man/keybound.3x.html | 80 + {Ada95 => doc}/html/man/keyok.3x.html | 22 +- doc/html/man/menu.3x.html | 244 ++ doc/html/man/menu_attribs.3x.html | 136 + {Ada95 => doc}/html/man/menu_cursor.3x.html | 34 +- {Ada95 => doc}/html/man/menu_driver.3x.html | 60 +- doc/html/man/menu_format.3x.html | 136 + doc/html/man/menu_hook.3x.html | 136 + doc/html/man/menu_items.3x.html | 136 + doc/html/man/menu_mark.3x.html | 82 + doc/html/man/menu_new.3x.html | 82 + {Ada95 => doc}/html/man/menu_opts.3x.html | 38 +- doc/html/man/menu_pattern.3x.html | 82 + doc/html/man/menu_post.3x.html | 136 + .../html/man/menu_requestname.3x.html | 30 +- {Ada95 => doc}/html/man/menu_spacing.3x.html | 36 +- {Ada95 => doc}/html/man/menu_userptr.3x.html | 28 +- {Ada95 => doc}/html/man/menu_win.3x.html | 50 +- doc/html/man/mitem_current.3x.html | 137 + doc/html/man/mitem_name.3x.html | 82 + {Ada95 => doc}/html/man/mitem_new.3x.html | 40 +- doc/html/man/mitem_opts.3x.html | 82 + {Ada95 => doc}/html/man/mitem_userptr.3x.html | 28 +- doc/html/man/mitem_value.3x.html | 82 + {Ada95 => doc}/html/man/mitem_visible.3x.html | 20 +- doc/html/man/ncurses.3x.html | 898 +++++ doc/html/man/panel.3x.html | 194 + {Ada95 => doc}/html/man/resizeterm.3x.html | 32 +- doc/html/man/term.5.html | 184 + doc/html/man/term.7.html | 239 ++ doc/html/man/terminfo.5.html | 2188 ++++++++++++ doc/html/man/tic.1m.html | 296 ++ doc/html/man/toe.1m.html | 76 + doc/html/man/tput.1.html | 246 ++ doc/html/man/tset.1.html | 303 ++ {Ada95 => doc}/html/man/wresize.3x.html | 28 +- {misc => doc/html}/ncurses-intro.html | 270 +- {misc => doc}/ncurses-intro.doc | 62 +- form/Makefile.in | 8 +- form/fty_enum.c | 6 +- include/Caps | 4 +- include/MKterm.h.awk.in | 9 +- include/Makefile.in | 3 +- include/capdefaults.c | 93 +- include/curses.h.in | 56 +- include/nc_alloc.h | 13 +- include/term_entry.h | 12 +- include/tic.h | 21 +- install-sh | 20 +- man/MKterminfo.sh | 10 +- man/Makefile.in | 8 +- man/captoinfo.1m | 5 +- man/curs_addch.3x | 8 +- man/curs_addchstr.3x | 7 +- man/curs_addstr.3x | 15 +- man/curs_attr.3x | 18 +- man/curs_bkgd.3x | 9 +- man/curs_border.3x | 10 +- man/curs_color.3x | 50 +- man/curs_delch.3x | 10 +- man/curs_deleteln.3x | 13 +- man/curs_extend.3x | 89 + man/curs_getch.3x | 15 +- man/curs_getstr.3x | 19 +- man/curs_inchstr.3x | 16 +- man/curs_initscr.3x | 15 +- man/curs_insch.3x | 10 +- man/curs_insstr.3x | 15 +- man/curs_instr.3x | 15 +- man/curs_kernel.3x | 9 +- man/curs_mouse.3x | 13 +- man/curs_outopts.3x | 3 +- man/curs_overlay.3x | 9 +- man/curs_pad.3x | 7 +- man/curs_printw.3x | 14 +- man/curs_refresh.3x | 13 +- man/curs_scanw.3x | 14 +- man/curs_scr_dump.3x | 11 +- man/curs_scroll.3x | 9 +- man/curs_slk.3x | 24 +- man/curs_termattrs.3x | 8 +- man/curs_termcap.3x | 13 +- man/curs_terminfo.3x | 23 +- man/curs_touch.3x | 17 +- man/curs_trace.3x | 147 + man/curs_window.3x | 19 +- man/dft_fgbg.3x | 77 +- man/form_field_info.3x | 8 +- man/infocmp.1m | 31 +- man/infotocap.1m | 74 + man/man_db.renames | 6 +- man/manlinks.sed | 68 + man/ncurses.3x | 30 +- man/terminfo.tail | 29 +- man/tic.1m | 23 +- menu/Makefile.in | 8 +- misc/form.def | 2 +- misc/indent.pro | 35 + misc/menu.def | 2 +- misc/ncurses.def | 153 +- misc/panel.def | 7 +- misc/run_tic.sh | 15 +- misc/shlib | 9 +- misc/terminfo.src | 3173 +++++++++++------ mk-0th.awk | 10 +- mk-1st.awk | 150 +- mk-2nd.awk | 11 +- mkinstalldirs | 10 +- ncurses/Makefile.in | 9 +- ncurses/base/MKunctrl.awk | 4 +- ncurses/base/lib_addch.c | 353 +- ncurses/base/lib_addstr.c | 88 +- ncurses/base/lib_box.c | 137 +- ncurses/base/lib_clrbot.c | 47 +- ncurses/base/lib_clreol.c | 78 +- ncurses/base/lib_color.c | 589 +-- ncurses/base/lib_dft_fgbg.c | 43 +- ncurses/base/lib_freeall.c | 123 +- ncurses/base/lib_getch.c | 565 +-- ncurses/base/lib_hline.c | 51 +- ncurses/base/lib_insstr.c | 56 +- ncurses/base/lib_mouse.c | 484 +-- ncurses/base/lib_move.c | 32 +- ncurses/base/lib_newterm.c | 227 +- ncurses/base/lib_newwin.c | 395 +- ncurses/base/lib_nl.c | 32 +- ncurses/base/lib_pad.c | 408 ++- ncurses/base/lib_refresh.c | 236 +- ncurses/base/lib_scroll.c | 124 +- ncurses/base/lib_scrreg.c | 34 +- ncurses/base/lib_set_term.c | 472 ++- ncurses/base/lib_slk.c | 6 +- ncurses/base/lib_vline.c | 55 +- ncurses/base/version.c | 7 +- ncurses/base/wresize.c | 217 +- ncurses/curses.priv.h | 85 +- ncurses/llib-lncurses | 149 +- ncurses/modules | 10 +- ncurses/tinfo/add_tries.c | 131 +- ncurses/tinfo/alloc_entry.c | 216 +- ncurses/tinfo/alloc_ttype.c | 188 +- ncurses/tinfo/captoinfo.c | 604 ++-- ncurses/tinfo/comp_error.c | 10 +- ncurses/tinfo/comp_parse.c | 423 ++- ncurses/tinfo/comp_scan.c | 908 ++--- ncurses/tinfo/free_ttype.c | 26 +- ncurses/tinfo/init_keytry.c | 6 +- ncurses/tinfo/lib_acs.c | 6 +- ncurses/tinfo/lib_cur_term.c | 6 +- ncurses/tinfo/lib_napms.c | 49 +- ncurses/tinfo/lib_options.c | 286 +- ncurses/tinfo/lib_raw.c | 199 +- ncurses/tinfo/lib_setup.c | 450 ++- ncurses/tinfo/lib_termcap.c | 148 +- ncurses/tinfo/lib_ti.c | 94 +- ncurses/tinfo/lib_tputs.c | 389 +- ncurses/tinfo/make_keys.c | 4 +- ncurses/tinfo/parse_entry.c | 481 ++- ncurses/tinfo/read_entry.c | 387 +- ncurses/tinfo/read_termcap.c | 1424 ++++---- ncurses/tinfo/write_entry.c | 652 ++-- ncurses/trace/lib_trace.c | 258 +- ncurses/trace/lib_tracebits.c | 193 +- ncurses/trace/lib_tracechr.c | 24 +- ncurses/tty/hashmap.c | 4 +- ncurses/tty/lib_mvcur.c | 683 ++-- ncurses/tty/lib_tstp.c | 3 +- ncurses/tty/lib_twait.c | 7 +- ncurses/tty/lib_vidattr.c | 331 +- ncurses/tty/tty_display.h | 9 - ncurses/tty/tty_update.c | 1872 +++++----- panel/Makefile.in | 11 +- panel/llib-lpanel | 24 - panel/p_bottom.c | 63 +- panel/p_delete.c | 11 +- panel/p_hidden.c | 4 +- panel/p_hide.c | 55 +- panel/p_move.c | 14 +- panel/p_new.c | 21 +- panel/p_replace.c | 9 +- panel/p_show.c | 40 +- panel/p_update.c | 7 +- panel/panel.priv.h | 93 +- progs/MKtermsort.sh | 28 +- progs/Makefile.in | 12 +- progs/dump_entry.c | 844 +++-- progs/dump_entry.h | 9 +- progs/infocmp.c | 1682 +++++---- progs/modules | 7 +- progs/progs.priv.h | 16 +- progs/tic.c | 1267 ++++--- progs/toe.c | 220 +- progs/tput.c | 462 +-- progs/tset.c | 1369 ++++--- shlib-versions | 4 - sysdeps/unix/sysv/linux/configure | 1 - tack/HISTORY | 4 +- tack/Makefile.in | 31 +- tack/README | 17 +- tack/ansi.c | 142 +- tack/charset.c | 8 +- tack/color.c | 4 +- tack/control.c | 6 +- tack/crum.c | 4 +- tack/edit.c | 16 +- tack/fun.c | 10 +- tack/init.c | 12 +- tack/menu.c | 8 +- tack/output.c | 6 +- tack/pad.c | 8 +- tack/sync.c | 6 +- tack/sysdep.c | 4 +- tack/tack.h | 6 +- test/Makefile.in | 14 +- test/cardfile.c | 196 +- test/configure | 60 +- test/configure.in | 22 +- test/dots.c | 6 +- test/filter.c | 4 +- test/firework.c | 4 +- test/gdc.c | 435 ++- test/hanoi.c | 6 +- test/knight.c | 4 +- test/modules | 5 +- test/ncurses.c | 2594 ++++++++------ test/railroad.c | 201 ++ test/rain.c | 4 +- test/tclock.c | 2 +- test/test.priv.h | 5 +- test/testcurs.c | 683 ++-- test/view.c | 271 +- test/worm.c | 24 +- test/xmas.c | 4 +- 523 files changed, 49674 insertions(+), 29566 deletions(-) create mode 100644 Ada95/gen/html.m4 create mode 100644 Ada95/gen/table.m4 delete mode 100644 Ada95/html/ada/files.htm delete mode 100644 Ada95/html/ada/files/T.htm delete mode 100644 Ada95/html/ada/funcs.htm delete mode 100644 Ada95/html/ada/funcs/A.htm delete mode 100644 Ada95/html/ada/funcs/C.htm delete mode 100644 Ada95/html/ada/funcs/E.htm delete mode 100644 Ada95/html/ada/funcs/F.htm delete mode 100644 Ada95/html/ada/funcs/G.htm delete mode 100644 Ada95/html/ada/funcs/I.htm delete mode 100644 Ada95/html/ada/funcs/L.htm delete mode 100644 Ada95/html/ada/funcs/M.htm delete mode 100644 Ada95/html/ada/funcs/N.htm delete mode 100644 Ada95/html/ada/funcs/P.htm delete mode 100644 Ada95/html/ada/funcs/R.htm delete mode 100644 Ada95/html/ada/funcs/S.htm delete mode 100644 Ada95/html/ada/funcs/T.htm delete mode 100644 Ada95/html/ada/funcs/U.htm delete mode 100644 Ada95/html/ada/funcs/V.htm delete mode 100644 Ada95/html/ada/index.htm delete mode 100644 Ada95/html/ada/main.htm delete mode 100644 Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm delete mode 100644 Ada95/html/ada/terminal_interface-curses-forms__ads.htm delete mode 100644 Ada95/html/ada/terminal_interface-curses-menus__ads.htm delete mode 100644 Ada95/html/ada/terminal_interface-curses__ads.htm delete mode 100644 Ada95/html/man/curs_addch.3x.html delete mode 100644 Ada95/html/man/curs_addchstr.3x.html delete mode 100644 Ada95/html/man/curs_addstr.3x.html delete mode 100644 Ada95/html/man/curs_attr.3x.html delete mode 100644 Ada95/html/man/curs_beep.3x.html delete mode 100644 Ada95/html/man/curs_bkgd.3x.html delete mode 100644 Ada95/html/man/curs_border.3x.html delete mode 100644 Ada95/html/man/curs_clear.3x.html delete mode 100644 Ada95/html/man/curs_color.3x.html delete mode 100644 Ada95/html/man/curs_delch.3x.html delete mode 100644 Ada95/html/man/curs_deleteln.3x.html delete mode 100644 Ada95/html/man/curs_getch.3x.html delete mode 100644 Ada95/html/man/curs_getstr.3x.html delete mode 100644 Ada95/html/man/curs_getyx.3x.html delete mode 100644 Ada95/html/man/curs_inch.3x.html delete mode 100644 Ada95/html/man/curs_inchstr.3x.html delete mode 100644 Ada95/html/man/curs_initscr.3x.html delete mode 100644 Ada95/html/man/curs_inopts.3x.html delete mode 100644 Ada95/html/man/curs_insch.3x.html delete mode 100644 Ada95/html/man/curs_insstr.3x.html delete mode 100644 Ada95/html/man/curs_instr.3x.html delete mode 100644 Ada95/html/man/curs_kernel.3x.html delete mode 100644 Ada95/html/man/curs_mouse.3x.html delete mode 100644 Ada95/html/man/curs_move.3x.html delete mode 100644 Ada95/html/man/curs_outopts.3x.html delete mode 100644 Ada95/html/man/curs_overlay.3x.html delete mode 100644 Ada95/html/man/curs_pad.3x.html delete mode 100644 Ada95/html/man/curs_printw.3x.html delete mode 100644 Ada95/html/man/curs_refresh.3x.html delete mode 100644 Ada95/html/man/curs_scanw.3x.html delete mode 100644 Ada95/html/man/curs_scr_dmp.3x.html delete mode 100644 Ada95/html/man/curs_scr_dump.3x.html delete mode 100644 Ada95/html/man/curs_scroll.3x.html delete mode 100644 Ada95/html/man/curs_slk.3x.html delete mode 100644 Ada95/html/man/curs_termattrs.3x.html delete mode 100644 Ada95/html/man/curs_termcap.3x.html delete mode 100644 Ada95/html/man/curs_terminfo.3x.html delete mode 100644 Ada95/html/man/curs_touch.3x.html delete mode 100644 Ada95/html/man/curs_util.3x.html delete mode 100644 Ada95/html/man/curs_window.3x.html delete mode 100644 Ada95/html/man/dft_fgbg.3x.html delete mode 100644 Ada95/html/man/form.3x.html delete mode 100644 Ada95/html/man/form_field.3x.html delete mode 100644 Ada95/html/man/form_field_attributes.3x.html delete mode 100644 Ada95/html/man/form_field_buffer.3x.html delete mode 100644 Ada95/html/man/form_field_just.3x.html delete mode 100644 Ada95/html/man/form_hook.3x.html delete mode 100644 Ada95/html/man/form_new.3x.html delete mode 100644 Ada95/html/man/form_new_page.3x.html delete mode 100644 Ada95/html/man/form_opts.3x.html delete mode 100644 Ada95/html/man/form_page.3x.html delete mode 100644 Ada95/html/man/form_post.3x.html delete mode 100644 Ada95/html/man/menu.3x.html delete mode 100644 Ada95/html/man/menu_attribs.3x.html delete mode 100644 Ada95/html/man/menu_format.3x.html delete mode 100644 Ada95/html/man/menu_hook.3x.html delete mode 100644 Ada95/html/man/menu_items.3x.html delete mode 100644 Ada95/html/man/menu_mark.3x.html delete mode 100644 Ada95/html/man/menu_new.3x.html delete mode 100644 Ada95/html/man/menu_pattern.3x.html delete mode 100644 Ada95/html/man/menu_post.3x.html delete mode 100644 Ada95/html/man/mitem_current.3x.html delete mode 100644 Ada95/html/man/mitem_name.3x.html delete mode 100644 Ada95/html/man/mitem_opts.3x.html delete mode 100644 Ada95/html/man/mitem_value.3x.html delete mode 100644 Ada95/html/man/ncurses.3x.html delete mode 100644 Ada95/html/man/panel.3x.html delete mode 100644 Ada95/html/table.html rename {misc => doc}/hackguide.doc (99%) rename Ada95/html/index.html => doc/html/Ada95.html (95%) create mode 100644 doc/html/ada/files.htm create mode 100644 doc/html/ada/files/T.htm create mode 100644 doc/html/ada/funcs.htm create mode 100644 doc/html/ada/funcs/A.htm create mode 100644 doc/html/ada/funcs/B.htm create mode 100644 doc/html/ada/funcs/C.htm create mode 100644 doc/html/ada/funcs/D.htm create mode 100644 doc/html/ada/funcs/E.htm create mode 100644 doc/html/ada/funcs/F.htm create mode 100644 doc/html/ada/funcs/G.htm create mode 100644 doc/html/ada/funcs/H.htm create mode 100644 doc/html/ada/funcs/I.htm create mode 100644 doc/html/ada/funcs/K.htm create mode 100644 doc/html/ada/funcs/L.htm create mode 100644 doc/html/ada/funcs/M.htm create mode 100644 doc/html/ada/funcs/N.htm create mode 100644 doc/html/ada/funcs/O.htm create mode 100644 doc/html/ada/funcs/P.htm create mode 100644 doc/html/ada/funcs/Q.htm create mode 100644 doc/html/ada/funcs/R.htm create mode 100644 doc/html/ada/funcs/S.htm create mode 100644 doc/html/ada/funcs/T.htm create mode 100644 doc/html/ada/funcs/U.htm create mode 100644 doc/html/ada/funcs/V.htm create mode 100644 doc/html/ada/funcs/W.htm create mode 100644 doc/html/ada/index.htm create mode 100644 doc/html/ada/main.htm create mode 100644 doc/html/ada/table.html create mode 100644 doc/html/ada/terminal_interface-curses-aux__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses-aux__ads.htm create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm (90%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm (90%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm (80%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm (69%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm (88%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm (91%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm (88%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm (89%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm (70%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm (68%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm create mode 100644 doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm (75%) create mode 100644 doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm (75%) create mode 100644 doc/html/ada/terminal_interface-curses-forms__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses-forms__ads.htm create mode 100644 doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm (71%) create mode 100644 doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm (75%) create mode 100644 doc/html/ada/terminal_interface-curses-menus__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses-menus__ads.htm create mode 100644 doc/html/ada/terminal_interface-curses-mouse__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-mouse__ads.htm (72%) create mode 100644 doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-panels-user_data__ads.htm (80%) create mode 100644 doc/html/ada/terminal_interface-curses-panels__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-panels__ads.htm (63%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm create mode 100644 doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm (69%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm (66%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm (73%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm (67%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-float_io__ads.htm (67%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm (73%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm (73%) create mode 100644 doc/html/ada/terminal_interface-curses-text_io__adb.htm rename {Ada95 => doc}/html/ada/terminal_interface-curses-text_io__ads.htm (65%) create mode 100644 doc/html/ada/terminal_interface-curses__adb.htm create mode 100644 doc/html/ada/terminal_interface-curses__ads.htm rename {Ada95 => doc}/html/ada/terminal_interface__ads.htm (90%) rename announce.html => doc/html/announce.html (57%) rename {misc => doc/html}/hackguide.html (93%) create mode 100644 doc/html/index.html create mode 100644 doc/html/man/captoinfo.1m.html create mode 100644 doc/html/man/clear.1.html create mode 100644 doc/html/man/curs_addch.3x.html create mode 100644 doc/html/man/curs_addchstr.3x.html create mode 100644 doc/html/man/curs_addstr.3x.html create mode 100644 doc/html/man/curs_attr.3x.html create mode 100644 doc/html/man/curs_beep.3x.html create mode 100644 doc/html/man/curs_bkgd.3x.html create mode 100644 doc/html/man/curs_border.3x.html create mode 100644 doc/html/man/curs_clear.3x.html create mode 100644 doc/html/man/curs_color.3x.html create mode 100644 doc/html/man/curs_delch.3x.html create mode 100644 doc/html/man/curs_deleteln.3x.html create mode 100644 doc/html/man/curs_extend.3x.html create mode 100644 doc/html/man/curs_getch.3x.html create mode 100644 doc/html/man/curs_getstr.3x.html create mode 100644 doc/html/man/curs_getyx.3x.html create mode 100644 doc/html/man/curs_inch.3x.html create mode 100644 doc/html/man/curs_inchstr.3x.html create mode 100644 doc/html/man/curs_initscr.3x.html create mode 100644 doc/html/man/curs_inopts.3x.html create mode 100644 doc/html/man/curs_insch.3x.html create mode 100644 doc/html/man/curs_insstr.3x.html create mode 100644 doc/html/man/curs_instr.3x.html create mode 100644 doc/html/man/curs_kernel.3x.html create mode 100644 doc/html/man/curs_mouse.3x.html create mode 100644 doc/html/man/curs_move.3x.html create mode 100644 doc/html/man/curs_outopts.3x.html create mode 100644 doc/html/man/curs_overlay.3x.html create mode 100644 doc/html/man/curs_pad.3x.html rename {Ada95 => doc}/html/man/curs_print.3x.html (54%) create mode 100644 doc/html/man/curs_printw.3x.html create mode 100644 doc/html/man/curs_refresh.3x.html create mode 100644 doc/html/man/curs_scanw.3x.html create mode 100644 doc/html/man/curs_scr_dump.3x.html create mode 100644 doc/html/man/curs_scroll.3x.html create mode 100644 doc/html/man/curs_slk.3x.html create mode 100644 doc/html/man/curs_termattrs.3x.html create mode 100644 doc/html/man/curs_termcap.3x.html create mode 100644 doc/html/man/curs_terminfo.3x.html create mode 100644 doc/html/man/curs_touch.3x.html create mode 100644 doc/html/man/curs_trace.3x.html create mode 100644 doc/html/man/curs_util.3x.html create mode 100644 doc/html/man/curs_window.3x.html rename {Ada95 => doc}/html/man/define_key.3x.html (72%) create mode 100644 doc/html/man/dft_fgbg.3x.html create mode 100644 doc/html/man/form.3x.html rename {Ada95 => doc}/html/man/form_cursor.3x.html (50%) rename {Ada95 => doc}/html/man/form_data.3x.html (52%) rename {Ada95 => doc}/html/man/form_driver.3x.html (78%) create mode 100644 doc/html/man/form_field.3x.html create mode 100644 doc/html/man/form_field_attributes.3x.html create mode 100644 doc/html/man/form_field_buffer.3x.html rename {Ada95 => doc}/html/man/form_field_info.3x.html (56%) create mode 100644 doc/html/man/form_field_just.3x.html rename {Ada95 => doc}/html/man/form_field_new.3x.html (56%) rename {Ada95 => doc}/html/man/form_field_opts.3x.html (65%) rename {Ada95 => doc}/html/man/form_field_userptr.3x.html (53%) rename {Ada95 => doc}/html/man/form_field_validation.3x.html (54%) rename {Ada95 => doc}/html/man/form_fieldtype.3x.html (61%) create mode 100644 doc/html/man/form_hook.3x.html create mode 100644 doc/html/man/form_new.3x.html create mode 100644 doc/html/man/form_new_page.3x.html create mode 100644 doc/html/man/form_opts.3x.html create mode 100644 doc/html/man/form_page.3x.html create mode 100644 doc/html/man/form_post.3x.html rename {Ada95 => doc}/html/man/form_requestname.3x.html (50%) rename {Ada95 => doc}/html/man/form_userptr.3x.html (54%) rename {Ada95 => doc}/html/man/form_win.3x.html (54%) create mode 100644 doc/html/man/infocmp.1m.html create mode 100644 doc/html/man/infotocap.1m.html create mode 100644 doc/html/man/keybound.3x.html rename {Ada95 => doc}/html/man/keyok.3x.html (61%) create mode 100644 doc/html/man/menu.3x.html create mode 100644 doc/html/man/menu_attribs.3x.html rename {Ada95 => doc}/html/man/menu_cursor.3x.html (50%) rename {Ada95 => doc}/html/man/menu_driver.3x.html (74%) create mode 100644 doc/html/man/menu_format.3x.html create mode 100644 doc/html/man/menu_hook.3x.html create mode 100644 doc/html/man/menu_items.3x.html create mode 100644 doc/html/man/menu_mark.3x.html create mode 100644 doc/html/man/menu_new.3x.html rename {Ada95 => doc}/html/man/menu_opts.3x.html (60%) create mode 100644 doc/html/man/menu_pattern.3x.html create mode 100644 doc/html/man/menu_post.3x.html rename {Ada95 => doc}/html/man/menu_requestname.3x.html (50%) rename {Ada95 => doc}/html/man/menu_spacing.3x.html (58%) rename {Ada95 => doc}/html/man/menu_userptr.3x.html (57%) rename {Ada95 => doc}/html/man/menu_win.3x.html (54%) create mode 100644 doc/html/man/mitem_current.3x.html create mode 100644 doc/html/man/mitem_name.3x.html rename {Ada95 => doc}/html/man/mitem_new.3x.html (52%) create mode 100644 doc/html/man/mitem_opts.3x.html rename {Ada95 => doc}/html/man/mitem_userptr.3x.html (57%) create mode 100644 doc/html/man/mitem_value.3x.html rename {Ada95 => doc}/html/man/mitem_visible.3x.html (59%) create mode 100644 doc/html/man/ncurses.3x.html create mode 100644 doc/html/man/panel.3x.html rename {Ada95 => doc}/html/man/resizeterm.3x.html (62%) create mode 100644 doc/html/man/term.5.html create mode 100644 doc/html/man/term.7.html create mode 100644 doc/html/man/terminfo.5.html create mode 100644 doc/html/man/tic.1m.html create mode 100644 doc/html/man/toe.1m.html create mode 100644 doc/html/man/tput.1.html create mode 100644 doc/html/man/tset.1.html rename {Ada95 => doc}/html/man/wresize.3x.html (52%) rename {misc => doc/html}/ncurses-intro.html (96%) rename {misc => doc}/ncurses-intro.doc (99%) create mode 100644 man/curs_extend.3x create mode 100644 man/curs_trace.3x create mode 100644 man/infotocap.1m create mode 100644 man/manlinks.sed create mode 100644 misc/indent.pro delete mode 100644 shlib-versions create mode 100644 test/railroad.c diff --git a/ANNOUNCE b/ANNOUNCE index 4707838f..5ef8f3c2 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,143 +1,131 @@ - Announcing ncurses 5.0 - + Announcing ncurses 5.1 + The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD curses. - + In mid-June 1995, the maintainer of 4.4BSD curses declared that he considered 4.4BSD curses obsolete, and is encouraging the keepers of Unix releases such as BSD/OS, freeBSD and netBSD to switch over to ncurses. - + The ncurses code was developed under GNU/Linux. It should port easily to any ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp! - + The distribution includes the library and support utilities, including a terminfo compiler tic(1), a decompiler infocmp(1), clear(1), tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full 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://ftp.clark.net/pub/dickey/ncurses. - + distribution site [1]ftp://ftp.gnu.org/pub/gnu/ncurses. + It is also available at [2]ftp://dickey.his.com/ncurses. + Release Notes - - We decided to release ncurses as a new whole number release (5.0) - because it incorporates several interface changes, including some that - would invalidate existing shared libraries. These are the highlights - from the change-log since ncurses 4.2 release. - + + This release is designed to be upward compatible from ncurses 5.0; + very few applications will require recompilation, depending on the + platform. These are the highlights from the change-log since ncurses + 5.0 release. + Interface changes: - * The principal source of changes to the interface comes from the - release of X/Open Curses in 1997. Earlier versions of ncurses (4.0 - and before) were based on a draft version of the specification. - The release version adds parameters to some functions to support - the evolving internationalization of curses. These summarize the - impact: - + modified several prototypes to correspond with 1997 version - of X/Open Curses (affects ABI since developers have used - attr_get). - + corrected prototypes for slk_* functions, using chtype rather - than attr_t. - + the slk_attr_{set,off,on} functions need an additional void* - parameter according to XSI. - + correct macros for wattr_set, wattr_get, separate wattrset - macro from these to preserve behavior that allows attributes - to be combined with color pair numbers. - + reviewed/updated curses.h, term.h against X/Open Curses Issue - 4 Version 2. This includes making some parameters - NCURSES_CONST rather than const, e.g., in termcap.h. - + reviewed/corrected macros in curses.h as per XSI document. - + add set_a_attributes and set_pglen_inch to terminfo - structure, as per XSI and Solaris 2.5. - * The newest version of the X/Open Curses is implemented on Solaris - and other vendor's systems. It adds new features to the terminfo - descriptions: - + implement tparm %l format. - + implement tparm printf-style width and precision for %s, %d, - %x, %o as per XSI. - * We made additional changes to reduce impact by future interface - changes: - + rename key_names[] array to _nc_key_names since it is not - part of the curses interface. - + move macro winch to a function, to hide details of struct - ldat - * modify configure script to embed ABI in shared libraries for HP-UX - 10.x (detailed request by Tim Mooney). - * modify configuration of shared libraries on Digital Unix so that - versioning is embedded in the library, rather than implied by - links (patch by Tim Mooney). - + * made the extended terminal capabilities + (configure --enable-tcap-names) a standard feature (though the + configure script can disable it, it is built by default). + * removed the trace() function and related trace support from the + production library. This is the only interface change that may + cause problems with existing applications linked to shared + libraries, since not all platforms use the minor version number. + * explicitly initialized to zero several data items which were + implicitly initialized, e.g., cur_term. If not explicitly + initialized, their storage type is C (common), and causes problems + linking on some platforms. + * modified curses.h.in, undef'ing some symbols to avoid conflict + with C++ STL. + New features: - * enable sigwinch handler by default. - * turn on hashmap scrolling code by default - * improved support for termcap applications - + modify tput to accept termcap names as an alternative to - terminfo names. - + provide support for termcap PC variable by copying it from - terminfo data and using it as the padding character in tputs. - + provide support for termcap ospeed variable by copying it - from the internal cur_term member, and using ospeed as the - baudrate reference for the delay_output and tputs functions. - + change name-comparisons in lib_termcap to compare no more - than 2 characters. - + add configure option --enable-tcap-names, which essentially - allows users to define new capabilities as in termcap. - * add mouse support to ncurses menus. - * add mouse and dll support for OS/2 EMX - * modify terminfo parsing to accept octal and hexadecimal constants - * add configure option --enable-no-padding, to allow environment - variable $NCURSES_NO_PADDING to eliminate non-mandatory padding, - thereby making terminal emulators (e.g., for vt100) a little more - efficient. - * modify lib_color.c to eliminate dependency on orig_colors and - orig_pair, since SVr4 curses does not require these either, but - uses them when they are available. - * add -f option to infocmp and tic, which formats the terminfo - if/then/else/endif so that they are readable (with newlines and - tabs). - * modify tic to compile into %'char' form in preference to - %{number}, since that is a little more efficient. - + * added a new extension, assume_default_colors() to provide better + control over the use of default colors. This is the principal + visible difference between ncurses 5.1 and preceding versions. The + new extension allows an application to specify what colors pair 0 + uses. + NOTE: Pair 0 defaults to white on black unless you have invoked + use_default_colors() or set it via assume_default_colors(). An + application that calls start_colors() without setting the + background color will consistently have a black background no + matter what color your terminal's background actually is. + * made several fixes to the terminfo-to-termcap conversion, and have + been using the generated termcaps without further hand-tuning. + This builds on the extension use_extended_names() by adding + "obsolete" termcap strings to terminfo.src + + modified tic so that if extended names (i.e., + configure --enable-tcap-names) are active, then tic -x will + also write "obsolete" capabilities that are present in the + terminfo source. + + added screen's AX capability (for ECMA SGR 39 and 49) to + applicable terminfo entries, use presence of this as a check + for a small improvement in setting default colors. + + add -a option to tic and infocmp, which retains commented-out + capabilities during source translation/comparison, e.g., + captoinfo and infotocap. + * implemented limited support for UTF-8, useful with XFree86 xterm: + + if the configure --enable-widec option is given, append 'w' + to names of the generated libraries (e.g., libncursesw.so) to + avoid conflict with existing ncurses libraries. + + add a simple UTF-8 output driver to the experimental + wide-character support. If any of the environment variables + LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this + driver will be used to translate the output to UTF-8. + + modified view.c to make a rudimentary viewer of UTF-8 text. + * modify raw() and noraw() to clear/restore IEXTEN flag which + affects stty lnext on systems such as FreeBSD + * reordered tests during mouse initialization to allow for gpm to + run in xterm, or for xterm to be used under OS/2 EMX. Also dropped + test for $DISPLAY in favor of the terminfo capability kmous=\E[M + or if $TERM environment variable contains "xterm". + * added configure option --with-manpage-symlinks, which provides for + fully indexing manpage entries by making symbolic links for the + aliases. + * changed unctrl() to render C1 characters (128-159) as ~@, ~A, etc. + * add experimental configure option --enable-colorfgbg to check for + $COLORTERM variable as set by rxvt/aterm/Eterm. + * made the infocmp -F option less verbose. + * dropped support for gnat 3.10 (gnat 3.12 is current). + Major bug fixes: - * modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a - problem where ncurses applications which were run via a shell - script would hang when given a ^Z. Also, check if the terminal's - process group is consistent, i.e., a shell has not taken ownership - of it, before deciding to save the current terminal settings in - the SIGTSTP handler. - * suppress sc/rc capabilities from terminal description if they - appear in smcup/rmcup. This affects only scrolling optimization, - to fix a problem reported by several people with xterm's alternate - screen, though the problem is more general. - * modify relative_move and tputs to avoid an interaction with the - BSD-style padding. The relative_move function could produce a - string to replace on the screen which began with a numeric - character, which was then interpreted by tputs as padding. - * modify setupterm so that cancelled strings are treated the same as - absent strings, cancelled and absent booleans false (does not - affect tic, infocmp). - * modify lib_vidattr.c to allow for terminal types (e.g., - xterm-color) which may reset all attributes in the 'op' - capability, so that colors are set before turning on bold and - other attributes, but still after turning attributes off. - * use 'access()' to check if ncurses library should be permitted to - open or modify files with fopen/open/link/unlink/remove calls, in - case the calling application is running in setuid mode. - * correction to doupdate, for case where terminal does not support - insert/delete character. The logic did not check that there was a - difference in alignment of changes to old/new screens before - repainting the whole non-blank portion of the line. Modified to - fall through into logic that reduces by the portion which does not - differ. - + * modified infocmp -e, -E options to ensure that generated + fallback.c type for Booleans agrees with term.h + * documented a special case of incompatiblity between ncurses 4.2 + and 5.0, added a section for this in INSTALL. + * corrected tests for file-descriptors in OS/2 EMX mouse support. A + negative value could be used by FD_SET, causing the select() call + to wait indefinitely. + * made 'tput flash' work properly for xterm by flushing output in + delay_output() when using napms(), and modifying xterm's terminfo + to specify no padding character. Otherwise, xterm's reported baud + rate could mislead ncurses into producing too few padding + characters. + * modified lib_addch.c to allow repeated update to the lower-right + corner, rather than displaying only the first character written + until the cursor is moved. Recent versions of SVr4 curses can + update the lower-right corner, and behave this way. + * modified echo() behavior of getch() to match Solaris curses for + carriage return and backspace (reported by Neil Zanella). + * corrected offsets used for subwindows in wresize() + * modified configure script so AC_MSG_ERROR is temporarily defined + to a warning in AC_PROG_CXX to make it recover from a missing C++ + compiler without requiring user to add --without-cxx option + * corrected logic in lib_twait.c as used by lib_mouse.c for GPM + mouse support when poll() is used rather than select(). + * made several fixes for buffer overflows, unchecked recursion, + improvements in performance, etc. See the NEWS file for details. + Features of Ncurses - + The ncurses package is fully compatible with SVr4 (System V Release 4) curses: * All 257 of the SVr4 calls have been implemented (and are @@ -157,7 +145,7 @@ * The utilities have options to allow you to filter terminfo entries for use with less capable curses/terminfo versions such as the HP/UX and AIX ports. - + The ncurses package also has many useful extensions over SVr4: * The API is 8-bit clean and base-level conformant with the X/OPEN curses specification, XSI curses (that is, it implements all BASE @@ -239,117 +227,138 @@ * An HTML "Introduction to Programming with NCURSES" document provides a narrative introduction to the curses programming interface. - + State of the Package - + Numerous bugs present in earlier versions have been fixed; the library is far more reliable than it used to be. Bounds checking in many `dangerous' entry points has been improved. The code is now type-safe according to gcc -Wall. The library has been checked for malloc leaks and arena corruption by the Purify memory-allocation tester. - + The ncurses code has been tested with a wide variety of applications including (versions starting with those noted): - + cdk - Curses Development Kit [3]Curses Development Kit - [4]ftp://ftp.clark.net/pub/dickey/cdk. - + Curses Development Kit + [3]http://www.vexus.ca/CDK.html + [4]http://dickey.his.com/cdk. + ded - directory-editor [5]ftp://ftp.clark.net/pub/dickey/ded. - + directory-editor + [5]http://dickey.his.com/ded. + dialog the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. - + [6]http://dickey.his.com/dialog. + lynx the character-screen WWW browser - + [7]http://lynx.isc.org/release. + Midnight Commander 4.1 file manager - + [8]www.gnome.org/mc/. + mutt mail utility - + [9]http://www.mutt.org. + ncftp file-transfer utility - + [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/. + tin newsreader, supporting color, MIME - [6]ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff. - + [12]http://www.tin.org. + taper tape archive utility - + [13]http://members.iinet.net.au/~yusuf/taper/. + vh-1.6 Volks-Hypertext browser for the Jargon File - + [14]http://www.bg.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. + vile - vi-like-emacs [7]ftp://ftp.clark.net/pub/dickey/vile. - + vi-like-emacs + [16]http://dickey.his.com/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 [8]Zeyd Ben-Halim and [9]Eric - S. Raymond. Ongoing work is being done by [10]Thomas Dickey and - [11]Jürgen Pfeifer. [12]Thomas Dickey acts as the maintainer for the + 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 Free Software Foundation, which holds the copyright on ncurses. - Contact the current maintainers at [13]bug-ncurses@gnu.org. - + Contact the current maintainers at [22]bug-ncurses@gnu.org. + To join the ncurses mailing list, please write email to bug-ncurses-request@gnu.org containing the line: subscribe @ 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 [14]ftp://ftp.clark.net/pub/dickey/ncurses. - + available at [23]ftp://dickey.his.com/ncurses. + Future Plans * Extended-level XPG4 conformance, with internationalization support. * Ports to more systems, including DOS and Windows. - + We need people to help with these projects. If you are interested in working 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. - [15]http://earthspace.net/~esr/terminfo. - + [24]http://earthspace.net/~esr/terminfo. + You can find lots of information on terminal-related topics not - covered in the terminfo file at [16]Richard Shuford's archive. + covered in the terminfo file at [25]Richard Shuford's archive. References 1. ftp://ftp.gnu.org/pub/gnu/ncurses - 2. ftp://ftp.clark.net/pub/dickey/ncurses + 2. ftp://dickey.his.com/ncurses 3. http://www.vexus.ca/CDK.html - 4. ftp://ftp.clark.net/pub/dickey/cdk - 5. ftp://ftp.clark.net/pub/dickey/ded - 6. ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff - 7. ftp://ftp.clark.net/pub/dickey/vile - 8. mailto:zmbenhal@netcom.com - 9. http://www.ccil.org/~esr/home.html - 10. mailto:dickey@clark.net - 11. mailto:juergen.pfeifer@gmx.net - 12. mailto:dickey@clark.net - 13. mailto:bug-ncurses@gnu.org - 14. ftp://ftp.clark.net/pub/dickey/ncurses - 15. http://earthspace.net/~esr/terminfo - 16. http://www.cs.utk.edu/~shuford/terminal_index.html + 4. http://dickey.his.com/cdk/cdk.html + 5. http://dickey.his.com/ded/ded.html + 6. http://dickey.his.com/dialog/dialog.html + 7. http://lynx.isc.org/release/ + 8. file://localhost/usr/build/ncurses/ncurses-5.1-20000704/doc/html/www.gnome.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://dickey.his.com/vile/vile.html + 17. mailto:zmbenhal@netcom.com + 18. http://www.ccil.org/~esr/home.html + 19. mailto:dickey@herndon4.his.com + 20. mailto:juergen.pfeifer@gmx.net + 21. mailto:dickey@herndon4.his.com + 22. mailto:bug-ncurses@gnu.org + 23. ftp://dickey.his.com/ncurses + 24. http://earthspace.net/~esr/terminfo + 25. http://www.cs.utk.edu/~shuford/terminal_index.html diff --git a/Ada95/Makefile.in b/Ada95/Makefile.in index 5ba9feec..9f38ec4c 100644 --- a/Ada95/Makefile.in +++ b/Ada95/Makefile.in @@ -29,7 +29,7 @@ # Author: Juergen Pfeifer 1996 # # Version Control -# $Revision: 1.12 $ +# $Revision: 1.13 $ # SHELL = /bin/sh THIS = Makefile @@ -40,6 +40,7 @@ CF_MFLAGS = @cf_cv_makeflags@ @SET_MAKE@ all \ +libs \ sources \ install \ install.libs \ diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in index 32c660a3..cd538fa1 100644 --- a/Ada95/gen/Makefile.in +++ b/Ada95/gen/Makefile.in @@ -29,7 +29,7 @@ # Author: Juergen Pfeifer 1996 # # Version Control -# $Revision: 1.27 $ +# $Revision: 1.30 $ # .SUFFIXES: @@ -72,7 +72,7 @@ LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) RANLIB = @RANLIB@ -LIB_CURSES = -L../../lib -lncurses +LIB_CURSES = -L../../lib -lncurses@LIB_SUFFIX@ M4 = m4 M4FLAGS = @@ -80,6 +80,11 @@ M4FLAGS = GENERATE = ./gen '@DFT_ARG_SUFFIX@' DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' +GNATHTML = `type -p gnathtml || type -p gnathtml.pl` +GNATHP = www.gnat.com +MAIL = juergen.pfeifer@gmx.net +HOMEP = home.t-online.de/home/Juergen.Pfeifer + ################################################################################ ALIB = @cf_ada_package@ ABASE = $(ALIB)-curses @@ -144,7 +149,8 @@ GEN_SRC = $(srcdir)/$(ABASE).ads.m4 \ $(srcdir)/$(ABASE)-panels-user_data.ads.m4 -all: $(GEN_TARGETS) +all \ +libs : $(GEN_TARGETS) @ sources: @@ -349,13 +355,76 @@ mostlyclean :: -rm -f $(GEN_FILES5) clean :: mostlyclean - -rm -f $(GEN_TARGETS) + -rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp distclean :: clean rm -f Makefile realclean :: distclean +HTML_DIR = ../../doc/html/ada + +instab.tmp : table.m4 $(GEN_SRC) + @rm -f $@ + @for f in $(GEN_SRC) ; do \ + $(M4) $(M4FLAGS) -DM4MACRO=table.m4 $$f | $(DEL_ADAMODE) >> $@ ;\ + done; + +$(HTML_DIR)/table.html : instab.tmp + @-touch $@ + @-chmod +w $@ + @echo ' $@ + @echo 'PUBLIC "-//IETF//DTD HTML 3.0//EN">' >> $@ + @echo '' >> $@ + @echo '' >> $@ + @echo 'Correspondence between ncurses C and Ada functions' >>$@ + @echo '' >> $@ + @echo '' >> $@ + @echo '

Correspondence between ncurses C and Ada functions

' >>$@ + @echo '

Sorted by C function name

' >>$@ + @echo '' >>$@ + @echo '' >>$@ + @echo '' >>$@ + @sort < instab.tmp >> $@ + @echo '
C nameAda nameman page
' >>$@ + @rm -f instab.tmp + +adahtml: + @rm -rf $(HTML_DIR)/ + @mkdir -p $(HTML_DIR) + cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb] + ln -sf ../src/*.ali . + for f in $(GEN_SRC); do \ + g=`basename $$f .ads.m4` ;\ + $(M4) $(M4FLAGS) -DM4MACRO=html.m4 $$f | $(DEL_ADAMODE) > $$g.ads ;\ + done + @-rm -f $(HTML_DIR)/$(ALIB)*.htm* + $(GNATHTML) -d -f $(ALIB)*.ads + for f in html/$(ALIB)*.htm*; do \ + a=`basename $$f` ; \ + sed -e 's/You may also.*body.*//' <$$f |\ + sed -e 's%GNAT%GNAT%g' |\ + sed -e 's%<A HREF%%g' |\ + sed -e 's/3X/3x/g' |\ + sed -e 's/$$\([A-Za-z0-9_]*:.*\)\$$/@\1@/' |\ + sed -e 's%Juergen Pfeifer%J\ürgen Pfeifer%g' |\ + sed -e 's%$(MAIL)%\<$(MAIL)\>%g' |\ + sed -e 's%</A>%%g' > $$a.tmp ;\ + mv $$a.tmp $$f ;\ + done + @rm -f *.ad[sb] *.ali *.tmp + @for f in funcs.htm main.htm ; do \ + sed -e "\%\[ \]%d" < html/$$f > $$f ;\ + mv $$f html/$$f ;\ + done + @rm -f "html/funcs/ .htm" + @cp -pdrf html/* $(HTML_DIR)/ + @rm -rf html + +html : adahtml $(HTML_DIR)/table.html + @ + ############################################################################### # The remainder of this file is automatically generated during configuration ############################################################################### diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index 0a093cf8..3c1800d3 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,7 +32,7 @@ /* Version Control - $Revision: 1.29 $ + $Revision: 1.31 $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the @@ -218,50 +218,53 @@ static void gen_mrep_rep(const char *name) static void gen_attr_set( const char *name ) { + /* All of the A_xxx symbols are defined in ncurses, but not all are nonzero + * if "configure --enable-widec" is specified. + */ static const name_attribute_pair nap[] = { -#ifdef A_STANDOUT +#if A_STANDOUT {"Stand_Out", A_STANDOUT}, #endif -#ifdef A_UNDERLINE +#if A_UNDERLINE {"Under_Line", A_UNDERLINE}, #endif -#ifdef A_REVERSE +#if A_REVERSE {"Reverse_Video", A_REVERSE}, #endif -#ifdef A_BLINK +#if A_BLINK {"Blink", A_BLINK}, #endif -#ifdef A_DIM +#if A_DIM {"Dim_Character", A_DIM}, #endif -#ifdef A_BOLD +#if A_BOLD {"Bold_Character", A_BOLD}, #endif -#ifdef A_ALTCHARSET +#if A_ALTCHARSET {"Alternate_Character_Set", A_ALTCHARSET}, #endif -#ifdef A_INVIS +#if A_INVIS {"Invisible_Character", A_INVIS}, #endif -#ifdef A_PROTECT +#if A_PROTECT {"Protected_Character", A_PROTECT}, #endif -#ifdef A_HORIZONTAL +#if A_HORIZONTAL {"Horizontal", A_HORIZONTAL}, #endif -#ifdef A_LEFT +#if A_LEFT {"Left", A_LEFT}, #endif -#ifdef A_LOW +#if A_LOW {"Low", A_LOW}, #endif -#ifdef A_RIGHT +#if A_RIGHT {"Right", A_RIGHT}, #endif -#ifdef A_TOP +#if A_TOP {"Top", A_TOP}, #endif -#ifdef A_VERTICAL +#if A_VERTICAL {"Vertical", A_VERTICAL}, #endif {(char *)0, 0} @@ -1048,7 +1051,6 @@ static void gen_color (void) */ static void gen_linkopts (void) { - printf(" pragma Linker_Options (\"-lAdaCurses%s\");\n", model); printf(" pragma Linker_Options (\"-lncurses%s\");\n", model); } diff --git a/Ada95/gen/html.m4 b/Ada95/gen/html.m4 new file mode 100644 index 00000000..0b4254d3 --- /dev/null +++ b/Ada95/gen/html.m4 @@ -0,0 +1,11 @@ +define(`ANCHORIDX',`0')dnl +define(`MANPAGE',`define(`MANPG',$1)dnl +|===================================================================== + -- | Man page MANPG + -- |=====================================================================')dnl +define(`ANCHOR',`define(`ANCHORIDX',incr(ANCHORIDX))dnl +`#'1A NAME="AFU`_'ANCHORIDX"`#'2dnl +define(`CFUNAME',`$1')define(`AFUNAME',`$2')dnl +|') +define(`AKA',``AKA': CFUNAME')dnl +define(`ALIAS',``AKA': $1')dnl diff --git a/Ada95/gen/table.m4 b/Ada95/gen/table.m4 new file mode 100644 index 00000000..48ed6ce3 --- /dev/null +++ b/Ada95/gen/table.m4 @@ -0,0 +1,6 @@ +define(`ANCHORIDX',`0')dnl +define(`MANPAGE',`define(`MANPG',$1)')dnl +divert(-1)dnl +define(`ANCHOR',`divert(0)define(`ANCHORIDX',incr(ANCHORIDX))dnl +$1$2MANPG +divert(-1)') diff --git a/Ada95/gen/terminal_interface-curses-panels.ads.m4 b/Ada95/gen/terminal_interface-curses-panels.ads.m4 index e309404d..04e374fc 100644 --- a/Ada95/gen/terminal_interface-curses-panels.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-panels.ads.m4 @@ -38,7 +38,7 @@ include(M4MACRO)dnl ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer 1996 -- Version Control: --- $Revision: 1.14 $ +-- $Revision: 1.15 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; @@ -139,7 +139,7 @@ include(`Linker_Options') -- AKA pragma Inline (Delete); - private +private type Panel is new System.Storage_Elements.Integer_Address; Null_Panel : constant Panel := 0; diff --git a/Ada95/gen/terminal_interface-curses.ads.m4 b/Ada95/gen/terminal_interface-curses.ads.m4 index 893bd6cb..11930d97 100644 --- a/Ada95/gen/terminal_interface-curses.ads.m4 +++ b/Ada95/gen/terminal_interface-curses.ads.m4 @@ -37,7 +37,7 @@ include(M4MACRO)---------------------------------------------------------------- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer 1996 -- Version Control: --- $Revision: 1.26 $ +-- $Revision: 1.28 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Base_Defs') @@ -116,7 +116,7 @@ include(`Color_Defs') -- the other for the background include(`Character_Attribute_Set_Rep') - -- (n)curses uses all but the lowes 16 Bits for Attributes. + -- (n)curses uses all but the lowest 16 Bits for Attributes. Normal_Video : constant Character_Attribute_Set := (others => False); @@ -191,7 +191,7 @@ include(`AC_Rep') pragma Import (C, ACS_Map, "acs_map"); -- -- - -- Constants for several symbols from the Alternate Character Set + -- Constants for several characters from the Alternate Character Set -- You must use this constants as indices into the ACS_Map array -- to get the corresponding attributed character at runtime. -- @@ -272,7 +272,7 @@ include(`ACS_Map')dnl procedure Add_With_Immediate_Echo (Win : in Window := Standard_Window; Ch : in Character); - -- Add a character and do an immediate resfresh of the screen. + -- Add a character and do an immediate refresh of the screen. pragma Inline (Add_With_Immediate_Echo); -- MANPAGE(`curs_window.3x') @@ -471,7 +471,7 @@ include(`ACS_Map')dnl pragma Inline (Function_Key); function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code; - -- Return the key code for a given functionkey number. + -- Return the key code for a given function-key number. pragma Inline (Function_Key_Code); -- MANPAGE(`curs_attr.3x') @@ -608,7 +608,7 @@ include(`ACS_Map')dnl -- ANCHOR(`wtimeout()',`Set_Timeout_Mode') procedure Set_Timeout_Mode (Win : in Window := Standard_Window; Mode : in Timeout_Mode; - Amount : in Natural); -- in Miliseconds + Amount : in Natural); -- in Milliseconds -- AKA -- Instead of overloading the semantic of the sign of amount, we -- introduce the Timeout_Mode parameter. This should improve @@ -1256,7 +1256,7 @@ include(`ACS_Map')dnl -- MANPAGE(`curs_color.3x') - -- ANCHOR(`start_clolor()',`Start_Color') + -- ANCHOR(`start_color()',`Start_Color') procedure Start_Color; -- AKA pragma Import (C, Start_Color, "start_color"); @@ -1360,7 +1360,7 @@ include(`ACS_Map')dnl pragma Inline (Nap_Milli_Seconds); -- |===================================================================== - -- | Some usefull helpers. + -- | Some useful helpers. -- |===================================================================== type Transform_Direction is (From_Screen, To_Screen); procedure Transform_Coordinates @@ -1369,7 +1369,7 @@ include(`ACS_Map')dnl 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 parmeter. + -- to the window and vice versa, depending on the Dir parameter. -- Screen coordinates are the position informations on the physical device. -- An Curses_Exception will be raised if Line and Column are not in the -- Window or if you pass the Null_Window as argument. diff --git a/Ada95/html/ada/files.htm b/Ada95/html/ada/files.htm deleted file mode 100644 index 047f9ab7..00000000 --- a/Ada95/html/ada/files.htm +++ /dev/null @@ -1,5 +0,0 @@ - - -

Files

-[T] - \ No newline at end of file diff --git a/Ada95/html/ada/files/T.htm b/Ada95/html/ada/files/T.htm deleted file mode 100644 index b6223a0f..00000000 --- a/Ada95/html/ada/files/T.htm +++ /dev/null @@ -1,36 +0,0 @@ -T - -

Files - T

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs.htm b/Ada95/html/ada/funcs.htm deleted file mode 100644 index 77f7b705..00000000 --- a/Ada95/html/ada/funcs.htm +++ /dev/null @@ -1,19 +0,0 @@ - - -

Functions/Procedures

-[A] -[C] -[E] -[F] -[G] -[I] -[L] -[M] -[N] -[P] -[R] -[S] -[T] -[U] -[V] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/A.htm b/Ada95/html/ada/funcs/A.htm deleted file mode 100644 index c276f990..00000000 --- a/Ada95/html/ada/funcs/A.htm +++ /dev/null @@ -1,6 +0,0 @@ -A - -

Functions - A

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/C.htm b/Ada95/html/ada/funcs/C.htm deleted file mode 100644 index 16b475ed..00000000 --- a/Ada95/html/ada/funcs/C.htm +++ /dev/null @@ -1,6 +0,0 @@ -C - -

Functions - C

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/E.htm b/Ada95/html/ada/funcs/E.htm deleted file mode 100644 index 088d54c4..00000000 --- a/Ada95/html/ada/funcs/E.htm +++ /dev/null @@ -1,6 +0,0 @@ -E - -

Functions - E

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/F.htm b/Ada95/html/ada/funcs/F.htm deleted file mode 100644 index bf89dbf3..00000000 --- a/Ada95/html/ada/funcs/F.htm +++ /dev/null @@ -1,6 +0,0 @@ -F - -

Functions - F

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/G.htm b/Ada95/html/ada/funcs/G.htm deleted file mode 100644 index 9fb627ca..00000000 --- a/Ada95/html/ada/funcs/G.htm +++ /dev/null @@ -1,6 +0,0 @@ -G - -

Functions - G

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/I.htm b/Ada95/html/ada/funcs/I.htm deleted file mode 100644 index 4830d584..00000000 --- a/Ada95/html/ada/funcs/I.htm +++ /dev/null @@ -1,6 +0,0 @@ -I - -

Functions - I

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/L.htm b/Ada95/html/ada/funcs/L.htm deleted file mode 100644 index a95c86d5..00000000 --- a/Ada95/html/ada/funcs/L.htm +++ /dev/null @@ -1,6 +0,0 @@ -L - -

Functions - L

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/M.htm b/Ada95/html/ada/funcs/M.htm deleted file mode 100644 index af0cdaea..00000000 --- a/Ada95/html/ada/funcs/M.htm +++ /dev/null @@ -1,6 +0,0 @@ -M - -

Functions - M

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/N.htm b/Ada95/html/ada/funcs/N.htm deleted file mode 100644 index 54eb7892..00000000 --- a/Ada95/html/ada/funcs/N.htm +++ /dev/null @@ -1,6 +0,0 @@ -N - -

Functions - N

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/P.htm b/Ada95/html/ada/funcs/P.htm deleted file mode 100644 index 88cb4472..00000000 --- a/Ada95/html/ada/funcs/P.htm +++ /dev/null @@ -1,6 +0,0 @@ -P - -

Functions - P

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/R.htm b/Ada95/html/ada/funcs/R.htm deleted file mode 100644 index f6e0b21e..00000000 --- a/Ada95/html/ada/funcs/R.htm +++ /dev/null @@ -1,6 +0,0 @@ -R - -

Functions - R

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/S.htm b/Ada95/html/ada/funcs/S.htm deleted file mode 100644 index e77c6d1e..00000000 --- a/Ada95/html/ada/funcs/S.htm +++ /dev/null @@ -1,6 +0,0 @@ -S - -

Functions - S

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/T.htm b/Ada95/html/ada/funcs/T.htm deleted file mode 100644 index 0ee81e0d..00000000 --- a/Ada95/html/ada/funcs/T.htm +++ /dev/null @@ -1,6 +0,0 @@ -T - -

Functions - T

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/U.htm b/Ada95/html/ada/funcs/U.htm deleted file mode 100644 index 20af351a..00000000 --- a/Ada95/html/ada/funcs/U.htm +++ /dev/null @@ -1,6 +0,0 @@ -U - -

Functions - U

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/funcs/V.htm b/Ada95/html/ada/funcs/V.htm deleted file mode 100644 index 7c493c82..00000000 --- a/Ada95/html/ada/funcs/V.htm +++ /dev/null @@ -1,6 +0,0 @@ -V - -

Functions - V

-[index] - \ No newline at end of file diff --git a/Ada95/html/ada/index.htm b/Ada95/html/ada/index.htm deleted file mode 100644 index 80af5f9a..00000000 --- a/Ada95/html/ada/index.htm +++ /dev/null @@ -1,33 +0,0 @@ - -Source Browser - - -

Files

-[T] - -
-

Functions/Procedures

-[A] -[C] -[E] -[F] -[G] -[I] -[L] -[M] -[N] -[P] -[R] -[S] -[T] -[U] -[V] - -
- - - - - - - diff --git a/Ada95/html/ada/main.htm b/Ada95/html/ada/main.htm deleted file mode 100644 index 06a05f0c..00000000 --- a/Ada95/html/ada/main.htm +++ /dev/null @@ -1,23 +0,0 @@ - - -

[No frame version is here]

Files

-[T] - -

Functions/Procedures

-[A] -[C] -[E] -[F] -[G] -[I] -[L] -[M] -[N] -[P] -[R] -[S] -[T] -[U] -[V] - - \ No newline at end of file diff --git a/Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm b/Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm deleted file mode 100644 index 9e086cac..00000000 --- a/Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm +++ /dev/null @@ -1,245 +0,0 @@ -terminal_interface-curses-forms-field_types.ads - -

File : terminal_interface-curses-forms-field_types.ads


-
-
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---                 Terminal_Interface.Curses.Forms.Field_Types              --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
-------------------------------------------------------------------------------
--- 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.                                                           --
-------------------------------------------------------------------------------
---  Jürgen Pfeifer (juergen.pfeifer@gmx.net) 1996                          --
---  Version Control:
---  @Revision: 1.11 @
---  Binding Version 00.93
-------------------------------------------------------------------------------
-with Interfaces.C;
-
-package Terminal_Interface.Curses.Forms.Field_Types is
-   pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
-   use type Interfaces.C.int;
-   subtype C_Int is Interfaces.C.int;
-
-  --  |=====================================================================
-  --  | Man page form_fieldtype.3x
-  --  |=====================================================================
-
-   type Field_Type is abstract tagged null record;
-  --  Abstract base type for all field types. A concrete field type
-  --  is an extension that adds some data elements describing formats or
-  --  boundary values for the type and validation routines.
-  --  For the builtin low-level fieldtypes, the validation routines are
-  --  already defined by the low-level C library.
-  --  The builtin types like Alpha or AlphaNumeric etc. are defined in
-  --  child packages of this package. You may use one of them as example
-  --  how to create you own child packages for low-level field types that
-  --  you may have already written in C.
-
-   type Field_Type_Access is access all Field_Type'Class;
-
-  --  |
-   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
-  --       have to pass a single Field_Type parameter.
-
-  --  ---------------------------------------------------------------------
-
-  --  |=====================================================================
-  --  | Man page form_field_validation.3x
-  --  |=====================================================================
-
-  --  |
-   function Get_Type (Fld : in Field) return Field_Type_Access;
-  --  AKA: field_type()
-  --  AKA: field_arg()
-  --  In Ada95 we can combine these. If you try to retrieve the field type
-  --  that is not defined as extension of the abstract tagged type above,
-  --  you will raise a Form_Exception.
-  --  This is not inlined
-
-  --  +----------------------------------------------------------------------
-  --  | Private Part.
-  --  | Most of this is used by the implementations of the child packages.
-  --  |
-private
-   type Makearg_Function is access
-     function (Args : System.Address) return System.Address;
-   pragma Convention (C, Makearg_Function);
-
-   type Copyarg_Function is access
-     function (Usr : System.Address) return System.Address;
-   pragma Convention (C, Copyarg_Function);
-
-   type Freearg_Function is access
-     procedure (Usr : System.Address);
-   pragma Convention (C, Freearg_Function);
-
-   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;
-   pragma Convention (C, Char_Check_Function);
-
-   type Choice_Function is access
-     function (Fld : Field; Usr : System.Address) return C_Int;
-   pragma Convention (C, Choice_Function);
-
-  --  +----------------------------------------------------------------------
-  --  | This must be in sync with the FIELDTYPE structure in form.h
-  --  |
-   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;
-         Next, Prev :          Choice_Function;
-      end record;
-   pragma Convention (C, Low_Level_Field_Type);
-   type C_Field_Type is access all Low_Level_Field_Type;
-
-   Null_Field_Type   : constant C_Field_Type := null;
-
-  --  +----------------------------------------------------------------------
-  --  | This four low-level fieldtypes are the ones associated with
-  --  | 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_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_Choice_Router  return C_Field_Type;
-
-   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
-  --  conformant Field_Type object.
-  --  The parameter Cft must be C_Builtin_Router for regular low-level
-  --  fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for
-  --  low-level fieldtypes witch choice functions (like TYP_ENUM).
-  --  Any other value will raise a Form_Exception.
-
-   function Make_Arg (Args : System.Address) return System.Address;
-   pragma Convention (C, Make_Arg);
-  --  This is the Makearg_Function for the internal low-level types
-  --  introduced by this binding.
-
-   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.
-
-   procedure Free_Arg (Usr : System.Address);
-   pragma Convention (C, Free_Arg);
-  --  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;
-   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;
-   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;
-   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;
-   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
-  --  type. It routes the call to the corresponding low-level prev_choice
-  --  function.
-
-  --  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
-      Cft : C_Field_Type;       --  the original low-level type
-   end record;
-   type Argument_Access is access all Argument;
-
-  --  +----------------------------------------------------------------------
-  --  |
-  --  | Some Imports of libform routines to deal with low-level fieldtypes.
-  --  |
-   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)
-     return C_Int;
-   pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
-
-   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/Ada95/html/ada/terminal_interface-curses-forms__ads.htm b/Ada95/html/ada/terminal_interface-curses-forms__ads.htm deleted file mode 100644 index 6390aee0..00000000 --- a/Ada95/html/ada/terminal_interface-curses-forms__ads.htm +++ /dev/null @@ -1,785 +0,0 @@ -terminal_interface-curses-forms.ads - -

File : terminal_interface-curses-forms.ads


-
-
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---                      Terminal_Interface.Curses.Form                      --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
-------------------------------------------------------------------------------
--- 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.                                                           --
-------------------------------------------------------------------------------
---  Jürgen Pfeifer (juergen.pfeifer@gmx.net) 1996                          --
---  Version Control:
---  @Revision: 1.20 @
---  Binding Version 00.93
-------------------------------------------------------------------------------
---  form binding.
---  This module is generated. Please don't change it manually!
---  Run the generator instead.
---  |
-with System;
-with Ada.Characters.Latin_1;
-with Interfaces.C;
-
-package Terminal_Interface.Curses.Forms is
-   pragma Preelaborate (Terminal_Interface.Curses.Forms);
-   pragma Linker_Options ("-lform");
-   pragma Linker_Options ("-lAdaCurses");
-   pragma Linker_Options ("-lncurses");
-
-   Space : Character renames Ada.Characters.Latin_1.Space;
-
-   type Field        is private;
-   type Form         is private;
-
-   Null_Field        : constant Field;
-   Null_Form         : constant Form;
-
-   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;
-   pragma Pack (Field_Option_Set);
-   pragma Convention (C, Field_Option_Set);
-
-   for Field_Option_Set use
-      record
-         Visible     at 0 range  0 ..  0;
-         Active      at 0 range  1 ..  1;
-         Public      at 0 range  2 ..  2;
-         Edit        at 0 range  3 ..  3;
-         Wrap        at 0 range  4 ..  4;
-         Blank       at 0 range  5 ..  5;
-         Auto_Skip   at 0 range  6 ..  6;
-         Null_Ok     at 0 range  7 ..  7;
-         Pass_Ok     at 0 range  8 ..  8;
-         Static      at 0 range  9 ..  9;
-      end record;
-   for Field_Option_Set'Size use 32;
-  --  Please note: this rep. clause is generated and may be
-  --               different on your system.Dnl
-
-   pragma Warnings (On);
-
-   function Default_Field_Options return Field_Option_Set;
-  --  The initial defaults for the field options.
-   pragma Inline (Default_Field_Options);
-
-   pragma Warnings (Off);
-   type Form_Option_Set is
-      record
-         NL_Overload : Boolean;
-         BS_Overload : Boolean;
-      end record;
-   pragma Pack (Form_Option_Set);
-   pragma Convention (C, Form_Option_Set);
-
-   for Form_Option_Set use
-      record
-         NL_Overload at 0 range  0 ..  0;
-         BS_Overload at 0 range  1 ..  1;
-      end record;
-   for Form_Option_Set'Size use 32;
-  --  Please note: this rep. clause is generated and may be
-  --               different on your system.Dnl
-
-   pragma Warnings (On);
-
-   function Default_Form_Options return Form_Option_Set;
-  --  The initial defaults for the form options.
-   pragma Inline (Default_Form_Options);
-
-   type Buffer_Number is new Natural;
-
-   type Field_Array is array (Positive range <>) of aliased Field;
-   pragma Convention (C, Field_Array);
-
-   type Field_Array_Access is access Field_Array;
-
-   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
-  --  the array.
-
-   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_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_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_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_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_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_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_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_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_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_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_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_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_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_PREV_CHOICE  : Form_Request_Code renames F_Previous_Choice;
-
-
-   procedure Request_Name (Key  : in Form_Request_Code;
-                           Name : out String);
-
-   function  Request_Name (Key : Form_Request_Code) return String;
-  --  Same as function
-   pragma Inline (Request_Name);
-
-  ------------------
-  --  Exceptions  --
-  ------------------
-   Form_Exception : exception;
-
-  --  |=====================================================================
-  --  | Man page form_field_new.3x
-  --  |=====================================================================
-
-  --  |
-   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.
-
-  --  |
-   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()
-   pragma Inline (New_Field);
-
-  --  |
-   procedure Delete (Fld : in out Field);
-  --  AKA: free_field()
-  --  Reset Fld to Null_Field
-  --  An overloaded Delete is defined later. Pragma Inline appears there.
-
-  --  |
-   function Duplicate (Fld  : Field;
-                       Top  : Line_Position;
-                       Left : Column_Position) return Field;
-  --  AKA: dup_field()
-   pragma Inline (Duplicate);
-
-  --  |
-   function Link (Fld  : Field;
-                  Top  : Line_Position;
-                  Left : Column_Position) return Field;
-  --  AKA: link_field()
-   pragma Inline (Link);
-
-  --  |=====================================================================
-  --  | Man page form_field_just.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Justification (Fld  : in Field;
-                                Just : in Field_Justification := None);
-  --  AKA: set_field_just()
-   pragma Inline (Set_Justification);
-
-  --  |
-   function Get_Justification (Fld : Field) return Field_Justification;
-  --  AKA: field_just()
-   pragma Inline (Get_Justification);
-
-  --  |=====================================================================
-  --  | Man page form_field_buffer.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Buffer
-     (Fld    : in Field;
-      Buffer : in Buffer_Number := Buffer_Number'First;
-      Str    : in String);
-  --  AKA: set_field_buffer()
-  --  Not inlined
-
-  --  |
-   procedure Get_Buffer
-     (Fld    : in Field;
-      Buffer : in Buffer_Number := Buffer_Number'First;
-      Str    : out String);
-  --  AKA: field_buffer()
-
-   function Get_Buffer
-     (Fld    : in Field;
-      Buffer : in Buffer_Number := Buffer_Number'First) return String;
-  --  AKA: field_buffer()
-  --  Same but as function
-   pragma Inline (Get_Buffer);
-
-  --  |
-   procedure Set_Status (Fld    : in Field;
-                         Status : in Boolean := True);
-  --  AKA: set_field_status()
-   pragma Inline (Set_Status);
-
-  --  |
-   function Changed (Fld : Field) return Boolean;
-  --  AKA: field_status()
-   pragma Inline (Changed);
-
-  --  |
-   procedure Set_Maximum_Size (Fld : in Field;
-                               Max : in Natural := 0);
-  --  AKA: set_field_max()
-   pragma Inline (Set_Maximum_Size);
-
-  --  |=====================================================================
-  --  | Man page form_field_opts.3x
-  --  |=====================================================================
-
-  --  |
-   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
-
-  --  |
-   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
-
-  --  |
-   procedure Get_Options (Fld     : in  Field;
-                          Options : out Field_Option_Set);
-  --  AKA: field_opts()
-
-  --  |
-   function Get_Options (Fld : Field := Null_Field)
-                         return Field_Option_Set;
-  --  AKA: field_opts()
-  --  An overloaded version is defined later. Pragma Inline appears there
-
-  --  |=====================================================================
-  --  | Man page form_field_attributes.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Foreground
-     (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);
-
-  --  |
-   procedure Foreground (Fld  : in  Field;
-                         Fore : out Character_Attribute_Set);
-  --  AKA: field_fore()
-
-  --  |
-   procedure Foreground (Fld   : in  Field;
-                         Fore  : out Character_Attribute_Set;
-                         Color : out Color_Pair);
-  --  AKA: field_fore()
-   pragma Inline (Foreground);
-
-  --  |
-   procedure Set_Background
-     (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);
-
-  --  |
-   procedure Background (Fld  : in  Field;
-                         Back : out Character_Attribute_Set);
-  --  AKA: field_back()
-
-  --  |
-   procedure Background (Fld   : in  Field;
-                         Back  : out Character_Attribute_Set;
-                         Color : out Color_Pair);
-  --  AKA: field_back()
-   pragma Inline (Background);
-
-  --  |
-   procedure Set_Pad_Character (Fld : in Field;
-                                Pad : in Character := Space);
-  --  AKA: set_field_pad()
-   pragma Inline (Set_Pad_Character);
-
-  --  |
-   procedure Pad_Character (Fld : in  Field;
-                            Pad : out Character);
-  --  AKA: field_pad()
-   pragma Inline (Pad_Character);
-
-  --  |=====================================================================
-  --  | Man page form_field_info.3x
-  --  |=====================================================================
-
-  --  |
-   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);
-
-  --  |
-   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);
-
-  --  |=====================================================================
-  --  | Man page form_win.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Window (Frm : in Form;
-                         Win : in Window);
-  --  AKA: set_form_win()
-   pragma Inline (Set_Window);
-
-  --  |
-   function Get_Window (Frm : Form) return Window;
-  --  AKA: form_win()
-   pragma Inline (Get_Window);
-
-  --  |
-   procedure Set_Sub_Window (Frm : in Form;
-                             Win : in Window);
-  --  AKA: set_form_sub()
-   pragma Inline (Set_Sub_Window);
-
-  --  |
-   function Get_Sub_Window (Frm : Form) return Window;
-  --  AKA: form_sub()
-   pragma Inline (Get_Sub_Window);
-
-  --  |
-   procedure Scale (Frm     : in Form;
-                    Lines   : out Line_Count;
-                    Columns : out Column_Count);
-  --  AKA: scale_form()
-   pragma Inline (Scale);
-
-  --  |=====================================================================
-  --  | Man page form_hook.3x
-  --  |=====================================================================
-
-   type Form_Hook_Function is access procedure (Frm : in Form);
-   pragma Convention (C, Form_Hook_Function);
-
-  --  |
-   procedure Set_Field_Init_Hook (Frm  : in Form;
-                                  Proc : in Form_Hook_Function);
-  --  AKA: set_field_init()
-   pragma Inline (Set_Field_Init_Hook);
-
-  --  |
-   procedure Set_Field_Term_Hook (Frm  : in Form;
-                                  Proc : in Form_Hook_Function);
-  --  AKA: set_field_term()
-   pragma Inline (Set_Field_Term_Hook);
-
-  --  |
-   procedure Set_Form_Init_Hook (Frm  : in Form;
-                                 Proc : in Form_Hook_Function);
-  --  AKA: set_form_init()
-   pragma Inline (Set_Form_Init_Hook);
-
-  --  |
-   procedure Set_Form_Term_Hook (Frm  : in Form;
-                                 Proc : in Form_Hook_Function);
-  --  AKA: set_form_term()
-   pragma Inline (Set_Form_Term_Hook);
-
-  --  |
-   function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
-  --  AKA: field_init()
-   pragma Import (C, Get_Field_Init_Hook, "field_init");
-
-  --  |
-   function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
-  --  AKA: field_term()
-   pragma Import (C, Get_Field_Term_Hook, "field_term");
-
-  --  |
-   function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
-  --  AKA: form_init()
-   pragma Import (C, Get_Form_Init_Hook, "form_init");
-
-  --  |
-   function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
-  --  AKA: form_term()
-   pragma Import (C, Get_Form_Term_Hook, "form_term");
-
-  --  |=====================================================================
-  --  | Man page form_field.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Redefine (Frm  : in Form;
-                       Flds : in Field_Array_Access);
-  --  AKA: set_form_fields()
-   pragma Inline (Redefine);
-
-  --  |
-   procedure Set_Fields (Frm  : in Form;
-                         Flds : in Field_Array_Access) renames Redefine;
-  --  AKA: set_form_fields()
-   pragma Inline (Set_Fields);
-
-  --  |
-   function Fields (Frm   : Form;
-                    Index : Positive) return Field;
-  --  AKA: form_fields()
-   pragma Inline (Fields);
-
-  --  |
-   function Field_Count (Frm : Form) return Natural;
-  --  AKA: field_count()
-   pragma Inline (Field_Count);
-
-  --  |
-   procedure Move (Fld    : in Field;
-                   Line   : in Line_Position;
-                   Column : in Column_Position);
-  --  AKA: move_field()
-   pragma Inline (Move);
-
-  --  |=====================================================================
-  --  | Man page form_new.3x
-  --  |=====================================================================
-
-  --  |
-   function Create (Fields : Field_Array_Access) return Form;
-  --  AKA: new_form()
-   pragma Inline (Create);
-
-  --  |
-   function New_Form (Fields : Field_Array_Access) return Form
-     renames Create;
-  --  AKA: new_form()
-   pragma Inline (New_Form);
-
-  --  |
-   procedure Delete (Frm : in out Form);
-  --  AKA: free_form()
-  --  Reset Frm to Null_Form
-   pragma Inline (Delete);
-
-  --  |=====================================================================
-  --  | Man page form_opts.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Options (Frm     : in Form;
-                          Options : in Form_Option_Set);
-  --  AKA: set_form_opts()
-   pragma Inline (Set_Options);
-
-  --  |
-   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);
-
-  --  |
-   procedure Get_Options (Frm     : in  Form;
-                          Options : out Form_Option_Set);
-  --  AKA: form_opts()
-
-  --  |
-   function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
-  --  AKA: form_opts()
-   pragma Inline (Get_Options);
-
-  --  |=====================================================================
-  --  | Man page form_post.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Post (Frm  : in Form;
-                   Post : in Boolean := True);
-  --  AKA: post_form()
-  --  AKA: unpost_form()
-   pragma Inline (Post);
-
-  --  |=====================================================================
-  --  | Man page form_cursor.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Position_Cursor (Frm : Form);
-  --  AKA: pos_form_cursor()
-   pragma Inline (Position_Cursor);
-
-  --  |=====================================================================
-  --  | Man page form_data.3x
-  --  |=====================================================================
-
-  --  |
-   function Data_Ahead (Frm : Form) return Boolean;
-  --  AKA: data_ahead()
-   pragma Inline (Data_Ahead);
-
-  --  |
-   function Data_Behind (Frm : Form) return Boolean;
-  --  AKA: data_behind()
-   pragma Inline (Data_Behind);
-
-  --  |=====================================================================
-  --  | Man page form_driver.3x
-  --  |=====================================================================
-
-   type Driver_Result is (Form_Ok,
-                          Request_Denied,
-                          Unknown_Request,
-                          Invalid_Field);
-
-  --  |
-   function Driver (Frm : Form;
-                    Key : Key_Code) return Driver_Result;
-  --  AKA: form_driver()
-  --  Driver not inlined
-
-  --  |=====================================================================
-  --  | Man page form_page.3x
-  --  |=====================================================================
-
-   type Page_Number is new Natural;
-
-  --  |
-   procedure Set_Current (Frm : in Form;
-                          Fld : in Field);
-  --  AKA: set_current_field()
-   pragma Inline (Set_Current);
-
-  --  |
-   function Current (Frm : in Form) return Field;
-  --  AKA: current_field()
-   pragma Inline (Current);
-
-  --  |
-   procedure Set_Page (Frm  : in Form;
-                       Page : in Page_Number := Page_Number'First);
-  --  AKA: set_form_page()
-   pragma Inline (Set_Page);
-
-  --  |
-   function Page (Frm : Form) return Page_Number;
-  --  AKA: form_page()
-   pragma Inline (Page);
-
-  --  |
-   function Get_Index (Fld : Field) return Positive;
-  --  AKA: field_index()
-  --  Please note that in this binding we start the numbering of fields
-  --  with 1. So this is number is one more than you get from the low
-  --  level call.
-   pragma Inline (Get_Index);
-
-  --  |=====================================================================
-  --  | Man page form_new_page.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_New_Page (Fld      : in Field;
-                           New_Page : in Boolean := True);
-  --  AKA: set_new_page()
-   pragma Inline (Set_New_Page);
-
-  --  |
-   function Is_New_Page (Fld : Field) return Boolean;
-  --  AKA: new_page()
-   pragma Inline (Is_New_Page);
-
-------------------------------------------------------------------------------
-private
-   type Field is new System.Storage_Elements.Integer_Address;
-   type Form  is new System.Storage_Elements.Integer_Address;
-
-   Null_Field : constant Field := 0;
-   Null_Form  : constant Form  := 0;
-
-end Terminal_Interface.Curses.Forms;
-
\ No newline at end of file diff --git a/Ada95/html/ada/terminal_interface-curses-menus__ads.htm b/Ada95/html/ada/terminal_interface-curses-menus__ads.htm deleted file mode 100644 index 13256b4f..00000000 --- a/Ada95/html/ada/terminal_interface-curses-menus__ads.htm +++ /dev/null @@ -1,675 +0,0 @@ -terminal_interface-curses-menus.ads - -

File : terminal_interface-curses-menus.ads


-
-
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---                      Terminal_Interface.Curses.Menu                      --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
-------------------------------------------------------------------------------
--- 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.                                                           --
-------------------------------------------------------------------------------
---  Jürgen Pfeifer (juergen.pfeifer@gmx.net) 1996                          --
---  Version Control:
---  @Revision: 1.19 @
---  Binding Version 00.93
-------------------------------------------------------------------------------
---  menu binding.
---  This module is generated. Please don't change it manually!
---  Run the generator instead.
---  |
-with System;
-with Interfaces.C;
-with Ada.Characters.Latin_1;
-
-package Terminal_Interface.Curses.Menus is
-   pragma Preelaborate (Terminal_Interface.Curses.Menus);
-   pragma Linker_Options ("-lmenu");
-   pragma Linker_Options ("-lAdaCurses");
-   pragma Linker_Options ("-lncurses");
-
-   Space : Character renames Ada.Characters.Latin_1.Space;
-
-   type Item is private;
-   type Menu is private;
-
-  ---------------------------
-  --  Interface constants  --
-  ---------------------------
-   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_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_PREV_MATCH    : Menu_Request_Code renames M_Previous_Match;
-
-   procedure Request_Name (Key  : in Menu_Request_Code;
-                           Name : out String);
-
-   function  Request_Name (Key : Menu_Request_Code) return String;
-  --  Same as function
-
-  ------------------
-  --  Exceptions  --
-  ------------------
-
-   Menu_Exception : exception;
-  --
-  --  Menu options
-  --
-   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;
-         Non_Cyclic        : Boolean;
-      end record;
-   pragma Pack (Menu_Option_Set);
-   pragma Convention (C, Menu_Option_Set);
-
-   for Menu_Option_Set use
-      record
-         One_Valued        at 0 range  0 ..  0;
-         Show_Descriptions at 0 range  1 ..  1;
-         Row_Major_Order   at 0 range  2 ..  2;
-         Ignore_Case       at 0 range  3 ..  3;
-         Show_Matches      at 0 range  4 ..  4;
-         Non_Cyclic        at 0 range  5 ..  5;
-      end record;
-   for Menu_Option_Set'Size use 32;
-  --  Please note: this rep. clause is generated and may be
-  --               different on your system.
-   pragma Warnings (On);
-
-   function Default_Menu_Options return Menu_Option_Set;
-  --  Initial default options for a menu.
-   pragma Inline (Default_Menu_Options);
-  --
-  --  Item options
-  --
-   pragma Warnings (Off);
-   type Item_Option_Set is
-      record
-         Selectable  : Boolean;
-      end record;
-   pragma Pack (Item_Option_Set);
-   pragma Convention (C, Item_Option_Set);
-
-   for Item_Option_Set use
-      record
-         Selectable  at 0 range  0 ..  0;
-      end record;
-   for Item_Option_Set'Size use 32;
-  --  Please note: this rep. clause is generated and may be
-  --               different on your system.
-   pragma Warnings (On);
-
-   function Default_Item_Options return Item_Option_Set;
-  --  Initial default options for an item.
-   pragma Inline (Default_Item_Options);
-
-  --
-  --  Item Array
-  --
-   type Item_Array is array (Positive range <>) of aliased Item;
-   pragma Convention (C, Item_Array);
-
-   type Item_Array_Access is access Item_Array;
-
-   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
-  --  the array.
-
-  --  |=====================================================================
-  --  | Man page mitem_new.3x
-  --  |=====================================================================
-
-  --  |
-   function Create (Name        : String;
-                    Description : String := "") return Item;
-  --  AKA: new_item()
-  --  Not inlined.
-
-  --  |
-   function New_Item (Name        : String;
-                      Description : String := "") return Item
-     renames Create;
-  --  AKA: new_item()
-
-  --  |
-   procedure Delete (Itm : in out Item);
-  --  AKA: free_item()
-  --  Resets Itm to Null_Item
-
-  --  |=====================================================================
-  --  | Man page mitem_value.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Value (Itm   : in Item;
-                        Value : in Boolean := True);
-  --  AKA: set_item_value()
-   pragma Inline (Set_Value);
-
-  --  |
-   function Value (Itm : Item) return Boolean;
-  --  AKA: item_value()
-   pragma Inline (Value);
-
-  --  |=====================================================================
-  --  | Man page mitem_visible.3x
-  --  |=====================================================================
-
-  --  |
-   function Visible (Itm : Item) return Boolean;
-  --  AKA: item_visible()
-   pragma Inline (Visible);
-
-  --  |=====================================================================
-  --  | Man page mitem_opts.3x
-  --  |=====================================================================
-
-  --  |
-   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
-
-  --  |
-   procedure Switch_Options (Itm     : in Item;
-                             Options : in Item_Option_Set;
-                             On      : Boolean := True);
-  --  AKA: item_opts_on()
-  --  AKA: item_opts_off()
-  --  An overloaded Switch_Options is defined later.
-  --  Pragma Inline appears there
-
-  --  |
-   procedure Get_Options (Itm     : in  Item;
-                          Options : out Item_Option_Set);
-  --  AKA: item_opts()
-
-  --  |
-   function Get_Options (Itm : Item := Null_Item) return Item_Option_Set;
-  --  AKA: item_opts()
-  --  An overloaded Get_Options is defined later. Pragma Inline appears there
-
-  --  |=====================================================================
-  --  | Man page mitem_name.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Name (Itm  : in Item;
-                   Name : out String);
-  --  AKA: item_name()
-   function  Name (Itm : Item) return String;
-  --  AKA: item_name()
-  --  Implemented as function
-   pragma Inline (Name);
-
-  --  |
-   procedure Description (Itm         : in Item;
-                          Description : out String);
-  --  AKA: item_description();
-
-   function  Description (Itm : Item) return String;
-  --  AKA: item_description();
-  --  Implemented as function
-   pragma Inline (Description);
-
-  --  |=====================================================================
-  --  | Man page mitem_current.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Current (Men : in Menu;
-                          Itm : in Item);
-  --  AKA: set_current_item()
-   pragma Inline (Set_Current);
-
-  --  |
-   function Current (Men : Menu) return Item;
-  --  AKA: current_item()
-   pragma Inline (Current);
-
-  --  |
-   procedure Set_Top_Row (Men  : in Menu;
-                          Line : in Line_Position);
-  --  AKA: set_top_row()
-   pragma Inline (Set_Top_Row);
-
-  --  |
-   function Top_Row (Men : Menu) return Line_Position;
-  --  AKA: top_row()
-   pragma Inline (Top_Row);
-
-  --  |
-   function Get_Index (Itm : Item) return Positive;
-  --  AKA: item_index()
-  --  Please note that in this binding we start the numbering of items
-  --  with 1. So this is number is one more than you get from the low
-  --  level call.
-   pragma Inline (Get_Index);
-
-  --  |=====================================================================
-  --  | Man page menu_post.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Post (Men  : in Menu;
-                   Post : in Boolean := True);
-  --  AKA: post_menu()
-  --  AKA: unpost_menu()
-   pragma Inline (Post);
-
-  --  |=====================================================================
-  --  | Man page menu_opts.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Options (Men     : in Menu;
-                          Options : in Menu_Option_Set);
-  --  AKA: set_menu_opts()
-   pragma Inline (Set_Options);
-
-  --  |
-   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);
-
-  --  |
-   procedure Get_Options (Men     : in  Menu;
-                          Options : out Menu_Option_Set);
-  --  AKA: menu_opts()
-
-  --  |
-   function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set;
-  --  AKA: menu_opts()
-   pragma Inline (Get_Options);
-
-  --  |=====================================================================
-  --  | Man page menu_win.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Window (Men : in Menu;
-                         Win : in Window);
-  --  AKA: set_menu_win()
-   pragma Inline (Set_Window);
-
-  --  |
-   function Get_Window (Men : Menu) return Window;
-  --  AKA: menu_win()
-   pragma Inline (Get_Window);
-
-  --  |
-   procedure Set_Sub_Window (Men : in Menu;
-                             Win : in Window);
-  --  AKA: set_menu_sub()
-   pragma Inline (Set_Sub_Window);
-
-  --  |
-   function Get_Sub_Window (Men : Menu) return Window;
-  --  AKA: menu_sub()
-   pragma Inline (Get_Sub_Window);
-
-  --  |
-   procedure Scale (Men     : in Menu;
-                    Lines   : out Line_Count;
-                    Columns : out Column_Count);
-  --  AKA: scale_menu()
-   pragma Inline (Scale);
-
-  --  |=====================================================================
-  --  | Man page menu_cursor.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Position_Cursor (Men : Menu);
-  --  AKA: pos_menu_cursor()
-   pragma Inline (Position_Cursor);
-
-  --  |=====================================================================
-  --  | Man page menu_mark.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Mark (Men  : in Menu;
-                       Mark : in String);
-  --  AKA: set_menu_mark()
-   pragma Inline (Set_Mark);
-
-  --  |
-   procedure Mark (Men  : in  Menu;
-                   Mark : out String);
-  --  AKA: menu_mark()
-
-   function  Mark (Men : Menu) return String;
-  --  AKA: menu_mark()
-  --  Implemented as function
-   pragma Inline (Mark);
-
-  --  |=====================================================================
-  --  | Man page menu_attribs.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Foreground
-     (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);
-
-  --  |
-   procedure Foreground (Men   : in  Menu;
-                         Fore  : out Character_Attribute_Set);
-  --  AKA: menu_fore()
-
-  --  |
-   procedure Foreground (Men   : in  Menu;
-                         Fore  : out Character_Attribute_Set;
-                         Color : out Color_Pair);
-  --  AKA: menu_fore()
-   pragma Inline (Foreground);
-
-  --  |
-   procedure Set_Background
-     (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);
-
-  --  |
-   procedure Background (Men  : in  Menu;
-                         Back : out Character_Attribute_Set);
-  --  AKA: menu_back()
-  --  |
-
-   procedure Background (Men   : in  Menu;
-                         Back  : out Character_Attribute_Set;
-                         Color : out Color_Pair);
-  --  AKA: menu_back()
-   pragma Inline (Background);
-
-  --  |
-   procedure Set_Grey
-     (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);
-
-  --  |
-   procedure Grey (Men  : in  Menu;
-                   Grey : out Character_Attribute_Set);
-  --  AKA: menu_grey()
-
-  --  |
-   procedure Grey
-     (Men   : in  Menu;
-      Grey  : out Character_Attribute_Set;
-      Color : out Color_Pair);
-  --  AKA: menu_grey()
-   pragma Inline (Grey);
-
-  --  |
-   procedure Set_Pad_Character (Men : in Menu;
-                                Pad : in Character := Space);
-  --  AKA: set_menu_pad()
-   pragma Inline (Set_Pad_Character);
-
-  --  |
-   procedure Pad_Character (Men : in  Menu;
-                            Pad : out Character);
-  --  AKA: menu_pad()
-   pragma Inline (Pad_Character);
-
-  --  |=====================================================================
-  --  | Man page menu_spacing.3x
-  --  |=====================================================================
-
-  --  |
-   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);
-
-  --  |
-   procedure Spacing (Men   : in Menu;
-                      Descr : out Column_Position;
-                      Row   : out Line_Position;
-                      Col   : out Column_Position);
-  --  AKA: menu_spacing()
-   pragma Inline (Spacing);
-
-  --  |=====================================================================
-  --  | Man page menu_pattern.3x
-  --  |=====================================================================
-
-  --  |
-   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);
-
-  --  |
-   procedure Pattern (Men  : in  Menu;
-                      Text : out String);
-  --  AKA: menu_pattern()
-   pragma Inline (Pattern);
-
-  --  |=====================================================================
-  --  | Man page menu_format.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Format (Men     : in Menu;
-                         Lines   : in Line_Count;
-                         Columns : in Column_Count);
-  --  AKA: set_menu_format()
-   pragma Inline (Set_Format);
-
-  --  |
-   procedure Format (Men     : in  Menu;
-                     Lines   : out Line_Count;
-                     Columns : out Column_Count);
-  --  AKA: menu_format()
-   pragma Inline (Format);
-
-  --  |=====================================================================
-  --  | Man page menu_hook.3x
-  --  |=====================================================================
-
-   type Menu_Hook_Function is access procedure (Men : in Menu);
-   pragma Convention (C, Menu_Hook_Function);
-
-  --  |
-   procedure Set_Item_Init_Hook (Men  : in Menu;
-                                 Proc : in Menu_Hook_Function);
-  --  AKA: set_item_init()
-   pragma Inline (Set_Item_Init_Hook);
-
-  --  |
-   procedure Set_Item_Term_Hook (Men  : in Menu;
-                                 Proc : in Menu_Hook_Function);
-  --  AKA: set_item_term()
-   pragma Inline (Set_Item_Term_Hook);
-
-  --  |
-   procedure Set_Menu_Init_Hook (Men  : in Menu;
-                                 Proc : in Menu_Hook_Function);
-  --  AKA: set_menu_init()
-   pragma Inline (Set_Menu_Init_Hook);
-
-  --  |
-   procedure Set_Menu_Term_Hook (Men  : in Menu;
-                                 Proc : in Menu_Hook_Function);
-  --  AKA: set_menu_term()
-   pragma Inline (Set_Menu_Term_Hook);
-
-  --  |
-   function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function;
-  --  AKA: item_init()
-   pragma Inline (Get_Item_Init_Hook);
-
-  --  |
-   function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function;
-  --  AKA: item_term()
-   pragma Inline (Get_Item_Term_Hook);
-
-  --  |
-   function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function;
-  --  AKA: menu_init()
-   pragma Inline (Get_Menu_Init_Hook);
-
-  --  |
-   function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function;
-  --  AKA: menu_term()
-   pragma Inline (Get_Menu_Term_Hook);
-
-  --  |=====================================================================
-  --  | Man page menu_items.3x
-  --  |=====================================================================
-
-  --  |
-   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;
-   pragma Inline (Set_Items);
-
-  --  |
-   function Items (Men   : Menu;
-                   Index : Positive) return Item;
-  --  AKA: menu_items()
-   pragma Inline (Items);
-
-  --  |
-   function Item_Count (Men : Menu) return Natural;
-  --  AKA: item_count()
-   pragma Inline (Item_Count);
-
-  --  |=====================================================================
-  --  | Man page menu_new.3x
-  --  |=====================================================================
-
-  --  |
-   function Create (Items : Item_Array_Access) return Menu;
-  --  AKA: new_menu()
-  --  Not inlined
-
-   function New_Menu (Items : Item_Array_Access) return Menu renames Create;
-
-  --  |
-   procedure Delete (Men : in out Menu);
-  --  AKA: free_menu()
-  --  Reset Men to Null_Menu
-  --  Not inlined
-
-  --  |=====================================================================
-  --  | Man page menu_new.3x
-  --  |=====================================================================
-
-   type Driver_Result is (Menu_Ok,
-                          Request_Denied,
-                          Unknown_Request,
-                          No_Match);
-
-  --  |
-   function Driver (Men : Menu;
-                    Key : Key_Code) return Driver_Result;
-  --  AKA: menu_driver()
-  --  Driver is not inlined
-
--------------------------------------------------------------------------------
-private
-   type Item   is new System.Storage_Elements.Integer_Address;
-   type Menu   is new System.Storage_Elements.Integer_Address;
-
-   Null_Item : constant Item := 0;
-   Null_Menu : constant Menu := 0;
-
-end Terminal_Interface.Curses.Menus;
-
\ No newline at end of file diff --git a/Ada95/html/ada/terminal_interface-curses__ads.htm b/Ada95/html/ada/terminal_interface-curses__ads.htm deleted file mode 100644 index bbdf734e..00000000 --- a/Ada95/html/ada/terminal_interface-curses__ads.htm +++ /dev/null @@ -1,1743 +0,0 @@ -terminal_interface-curses.ads - -

File : terminal_interface-curses.ads


-
-
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---                         Terminal_Interface.Curses                        --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
-------------------------------------------------------------------------------
--- 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.                                                           --
-------------------------------------------------------------------------------
---  Jürgen Pfeifer (juergen.pfeifer@gmx.net) 1996                          --
---  Version Control:
---  @Revision: 1.24 @
---  Binding Version 00.93
-------------------------------------------------------------------------------
---  curses binding.
---  This module is generated. Please don't change it manually!
---  Run the generator instead.
---  |
-with System.Storage_Elements;
-with Interfaces.C;  --  We need this for some assertions.
-
-package Terminal_Interface.Curses is
-   pragma Preelaborate (Terminal_Interface.Curses);
-   pragma Linker_Options ("-lAdaCurses");
-   pragma Linker_Options ("-lncurses");
-
-   NC_Major_Version : constant := 5;--  Major version of the library
-   NC_Minor_Version : constant := 0;--  Minor version of the library
-   NC_Version : constant String := "5.0"; --  Version of library
-
-   type Window is private;
-   Null_Window : constant Window;
-
-   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;
-  --  Type to count lines. We do not allow null windows, so must be positive
-   subtype Column_Count is Column_Position range 1 .. Column_Position'Last;
-  --  Type to count columns. We do not allow null windows, so must be positive
-
-   type Key_Code is new Natural;
-  --  That is anything including real characters, special keys and logical
-  --  request codes.
-
-   subtype Real_Key_Code is Key_Code range 0 .. 8#777#;
-  --  This are the codes that potentially represent a real keystroke.
-  --  Not all codes may be possible on a specific terminal. To check the
-  --  availability of a special key, the Has_Key function is provided.
-
-   subtype Special_Key_Code is Real_Key_Code
-     range 8#400# .. Real_Key_Code'Last;
-  --  Type for a function- or special key number
-
-   subtype Normal_Key_Code is Real_Key_Code range
-     Character'Pos (Character'First) .. Character'Pos (Character'Last);
-  --  This are the codes for regular (incl. non-graphical) characters.
-
-  --  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_Resize                     : constant Special_Key_Code := 8#632#;
-
-   Key_Max                        : constant Special_Key_Code
-     := Special_Key_Code'Last;
-
-   subtype User_Key_Code is Key_Code
-     range (Key_Max + 129) .. Key_Code'Last;
-  --  This is reserved for user defined key codes. The range between Key_Max
-  --  and the first user code is reserved for subsystems like menu and forms.
-
-  --  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_SUNDO        : Special_Key_Code renames Key_Shift_Undo;
-
-------------------------------------------------------------------------------
-
-   type Color_Number is range 0 .. 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.
-
-   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);
-   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;
-   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
-  --  is fixed (Black & White). A color pair is simply a combination of
-  --  two colors described by Color_Numbers, one for the foreground and
-  --  the other for the background
-
-   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;
-         Vertical                : Boolean;
-      end record;
-   pragma Pack (Character_Attribute_Set);
-   pragma Convention (C, Character_Attribute_Set);
-
-   for Character_Attribute_Set use
-      record
-         Stand_Out               at 0 range  0 ..  0;
-         Under_Line              at 0 range  1 ..  1;
-         Reverse_Video           at 0 range  2 ..  2;
-         Blink                   at 0 range  3 ..  3;
-         Dim_Character           at 0 range  4 ..  4;
-         Bold_Character          at 0 range  5 ..  5;
-         Alternate_Character_Set at 0 range  6 ..  6;
-         Invisible_Character     at 0 range  7 ..  7;
-         Protected_Character     at 0 range  8 ..  8;
-         Horizontal              at 0 range  9 ..  9;
-         Left                    at 0 range 10 .. 10;
-         Low                     at 0 range 11 .. 11;
-         Right                   at 0 range 12 .. 12;
-         Top                     at 0 range 13 .. 13;
-         Vertical                at 0 range 14 .. 14;
-      end record;
-   for Character_Attribute_Set'Size use 16;
-  --  Please note: this rep. clause is generated and may be
-  --               different on your system.
-  --  (n)curses uses all but the lowes 16 Bits for Attributes.
-
-   Normal_Video : constant Character_Attribute_Set := (others => False);
-
-   type Attributed_Character is
-      record
-         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.
-
-   for Attributed_Character use
-      record
-         Ch    at 0 range  0 ..  7;
-         Color at 0 range  8 .. 15;
-         Attr  at 0 range 16 .. 31;
-      end record;
-   for Attributed_Character'Size use 32;
-     --  Please note: this rep. clause is generated and may be
-     --               different on your system.
-
-   Default_Character : constant Attributed_Character
-     := (Ch    => Character'First,
-         Color => Color_Pair'First,
-         Attr  => (others => False)); --  preelaboratable Normal_Video
-
-   type Attributed_String is array (Positive range <>) of Attributed_Character;
-   pragma Pack (Attributed_String);
-  --  In this binding we allow strings of attributed characters.
-
-  ------------------
-  --  Exceptions  --
-  ------------------
-   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_Current         : exception;
-
-  --------------------------------------------------------------------------
-  --  External C variables
-  --  Conceptually even in C this are kind of constants, but they are
-  --  initialized and sometimes changed by the library routines at runtime
-  --  depending on the type of terminal. I believe the best way to model
-  --  this is to use functions.
-  --------------------------------------------------------------------------
-
-   function Lines            return Line_Count;
-   pragma Inline (Lines);
-
-   function Columns          return Column_Count;
-   pragma Inline (Columns);
-
-   function Tab_Size         return Natural;
-   pragma Inline (Tab_Size);
-
-   function Number_Of_Colors return Natural;
-   pragma Inline (Number_Of_Colors);
-
-   function Number_Of_Color_Pairs return Natural;
-   pragma Inline (Number_Of_Color_Pairs);
-
-   ACS_Map : array (Character'Val (0) .. Character'Val (127)) of
-     Attributed_Character;
-   pragma Import (C, ACS_Map, "acs_map");
-  --
-  --
-  --  Constants for several symbols from the Alternate Character Set
-  --  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_Sterling             : constant Character := '}';
-
-  --  |=====================================================================
-  --  | Man page curs_initscr.3x
-  --  |=====================================================================
-  --  | Not implemented: newterm, set_term, delscreen
-
-  --  |
-   function Standard_Window return Window;
-  --  AKA: stdscr
-   pragma Inline (Standard_Window);
-
-  --  |
-   procedure Init_Screen;
-
-  --  |
-   procedure Init_Windows renames Init_Screen;
-  --  AKA: initscr()
-   pragma Inline (Init_Screen);
-   pragma Inline (Init_Windows);
-
-  --  |
-   procedure End_Windows;
-  --  AKA: endwin()
-   procedure End_Screen renames End_Windows;
-   pragma Inline (End_Windows);
-   pragma Inline (End_Screen);
-
-  --  |
-   function Is_End_Window return Boolean;
-  --  AKA: isendwin()
-   pragma Inline (Is_End_Window);
-
-  --  |=====================================================================
-  --  | Man page curs_move.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Move_Cursor (Win    : in Window := Standard_Window;
-                          Line   : in Line_Position;
-                          Column : in Column_Position);
-  --  AKA: wmove()
-   pragma Inline (Move_Cursor);
-
-  --  |=====================================================================
-  --  | Man page curs_addch.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Add (Win :  in Window := Standard_Window;
-                  Ch  :  in Attributed_Character);
-  --  AKA: waddch()
-
-   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.
-
-  --  |
-   procedure Add
-     (Win    : in Window := Standard_Window;
-      Line   : in Line_Position;
-      Column : in Column_Position;
-      Ch     : in Attributed_Character);
-  --  AKA: mvwaddch()
-
-   procedure Add
-     (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
-
-  --  |
-   procedure Add_With_Immediate_Echo
-     (Win : in Window := Standard_Window;
-      Ch  : in Attributed_Character);
-  --  AKA: wechochar()
-
-   procedure Add_With_Immediate_Echo
-     (Win : in Window := Standard_Window;
-      Ch  : in Character);
-  --  Add a character and do an immediate resfresh of the screen.
-   pragma Inline (Add_With_Immediate_Echo);
-
-  --  |=====================================================================
-  --  | Man page curs_window.3x
-  --  |=====================================================================
-
-  --  |
-   function Create
-     (Number_Of_Lines       : Line_Count;
-      Number_Of_Columns     : Column_Count;
-      First_Line_Position   : Line_Position;
-      First_Column_Position : Column_Position) return Window;
-  --  AKA: newwin()
-   pragma Inline (Create);
-
-   function New_Window
-     (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);
-
-  --  |
-   procedure Delete (Win : in out Window);
-  --  AKA: delwin()
-  --  Reset Win to Null_Window
-   pragma Inline (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;
-  --  AKA: subwin()
-   pragma Inline (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;
-  --  AKA: derwin()
-   pragma Inline (Derived_Window);
-
-  --  |
-   function Duplicate (Win : Window) return Window;
-  --  AKA: dupwin()
-   pragma Inline (Duplicate);
-
-  --  |
-   procedure Move_Window (Win    : in Window;
-                          Line   : in Line_Position;
-                          Column : in Column_Position);
-  --  AKA: mvwin()
-   pragma Inline (Move_Window);
-
-  --  |
-   procedure Move_Derived_Window (Win    : in Window;
-                                  Line   : in Line_Position;
-                                  Column : in Column_Position);
-  --  AKA: mvderwin()
-   pragma Inline (Move_Derived_Window);
-
-  --  |
-   procedure Synchronize_Upwards (Win : in Window);
-  --  AKA: wsyncup()
-   pragma Import (C, Synchronize_Upwards, "wsyncup");
-
-  --  |
-   procedure Synchronize_Downwards (Win : in Window);
-  --  AKA: wsyncdown()
-   pragma Import (C, Synchronize_Downwards, "wsyncdown");
-
-  --  |
-   procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
-                             Mode : in Boolean := False);
-  --  AKA: syncok()
-   pragma Inline (Set_Synch_Mode);
-
-  --  |=====================================================================
-  --  | Man page curs_addstr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Add (Win : in Window := Standard_Window;
-                  Str : in String;
-                  Len : in Integer := -1);
-  --  AKA: waddnstr()
-  --  AKA: waddstr()
-
-  --  |
-   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()
-
-  --  |=====================================================================
-  --  | Man page curs_addchstr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Add (Win : in Window := Standard_Window;
-                  Str : in Attributed_String;
-                  Len : in Integer := -1);
-  --  AKA: waddchnstr()
-  --  AKA: waddchstr()
-
-  --  |
-   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()
-   pragma Inline (Add);
-
-  --  |=====================================================================
-  --  | Man page curs_border.3x
-  --  |=====================================================================
-
-  --  |
-   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
-     );
-  --  AKA: wborder()
-   pragma Inline (Border);
-
-  --  |
-   procedure Box
-     (Win               : in Window := Standard_Window;
-      Vertical_Symbol   : in Attributed_Character := Default_Character;
-      Horizontal_Symbol : in Attributed_Character := Default_Character);
-  --  AKA: box()
-   pragma Inline (Box);
-
-  --  |
-   procedure Horizontal_Line
-     (Win         : in Window := Standard_Window;
-      Line_Size   : in Natural;
-      Line_Symbol : in Attributed_Character := Default_Character);
-  --  AKA: whline()
-   pragma Inline (Horizontal_Line);
-
-  --  |
-   procedure Vertical_Line
-     (Win         : in Window := Standard_Window;
-      Line_Size   : in Natural;
-      Line_Symbol : in Attributed_Character := Default_Character);
-  --  AKA: wvline()
-   pragma Inline (Vertical_Line);
-
-  --  |=====================================================================
-  --  | Man page curs_getch.3x
-  --  |=====================================================================
-
-  --  |
-   function Get_Keystroke (Win : Window := Standard_Window)
-                           return Real_Key_Code;
-  --  AKA: wgetch()
-  --  Get a character from the keyboard and echo it - if enabled - to the
-  --  window.
-  --  If for any reason (i.e. a timeout) we couldn't get a character the
-  --  returned keycode is Key_None.
-   pragma Inline (Get_Keystroke);
-
-  --  |
-   procedure Undo_Keystroke (Key : in Real_Key_Code);
-  --  AKA: ungetch()
-   pragma Inline (Undo_Keystroke);
-
-  --  |
-   function Has_Key (Key : Special_Key_Code) return Boolean;
-  --  AKA: has_key()
-   pragma Inline (Has_Key);
-
-  --  |
-  --  | Some helper functions
-  --  |
-   function Is_Function_Key (Key : Special_Key_Code) return Boolean;
-  --  Return True if the Key is a function key (i.e. one of F0 .. F63)
-   pragma Inline (Is_Function_Key);
-
-   subtype Function_Key_Number is Integer range 0 .. 63;
-  --  (n)curses allows for 64 function keys.
-
-   function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
-  --  Return the number of the function key. If the code is not a
-  --  function key, a CONSTRAINT_ERROR will be raised.
-   pragma Inline (Function_Key);
-
-   function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
-  --  Return the key code for a given functionkey number.
-   pragma Inline (Function_Key_Code);
-
-  --  |=====================================================================
-  --  | Man page curs_attr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Switch_Character_Attribute
-     (Win  : in Window := Standard_Window;
-      Attr : in Character_Attribute_Set := Normal_Video;
-      On   : in Boolean := True);--  if False we switch Off.
-  --  AKA: wattron()
-  --  AKA: wattroff()
-
-  --  |
-   procedure Set_Character_Attributes
-     (Win   : in Window := Standard_Window;
-      Attr  : in Character_Attribute_Set := Normal_Video;
-      Color : in Color_Pair := Color_Pair'First);
-  --  AKA: wattrset()
-   pragma Inline (Set_Character_Attributes);
-
-  --  |
-   function Get_Character_Attribute
-     (Win : in Window := Standard_Window) return Character_Attribute_Set;
-  --  AKA: wattr_get()
-
-  --  |
-   function Get_Character_Attribute
-     (Win : in Window := Standard_Window) return Color_Pair;
-  --  AKA: wattr_get()
-   pragma Inline (Get_Character_Attribute);
-
-  --  |
-   procedure Set_Color (Win  : in Window := Standard_Window;
-                        Pair : in Color_Pair);
-  --  AKA: wcolor_set()
-   pragma Inline (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);
-  --  AKA: wchgat()
-
-  --  |
-   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);
-  --  AKA: mvwchgat()
-   pragma Inline (Change_Attributes);
-
-  --  |=====================================================================
-  --  | Man page curs_beep.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Beep;
-  --  AKA: beep()
-   pragma Inline (Beep);
-
-  --  |
-   procedure Flash_Screen;
-  --  AKA: flash()
-   pragma Inline (Flash_Screen);
-
-  --  |=====================================================================
-  --  | Man page curs_inopts.3x
-  --  |=====================================================================
-
-  --  | Not implemented : typeahead
-  --
-  --  |
-   procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
-  --  AKA: cbreak()
-  --  AKA: nocbreak()
-   pragma Inline (Set_Cbreak_Mode);
-
-  --  |
-   procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
-  --  AKA: raw()
-  --  AKA: noraw()
-   pragma Inline (Set_Raw_Mode);
-
-  --  |
-   procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
-  --  AKA: echo()
-  --  AKA: noecho()
-   pragma Inline (Set_Echo_Mode);
-
-  --  |
-   procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
-                            SwitchOn : in Boolean := True);
-  --  AKA: meta()
-   pragma Inline (Set_Meta_Mode);
-
-  --  |
-   procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
-                              SwitchOn : in Boolean := True);
-  --  AKA: keypad()
-   pragma Inline (Set_KeyPad_Mode);
-
-   type Half_Delay_Amount is range 1 .. 255;
-
-  --  |
-   procedure Half_Delay (Amount : in Half_Delay_Amount);
-  --  AKA: halfdelay()
-   pragma Inline (Half_Delay);
-
-  --  |
-   procedure Set_Flush_On_Interrupt_Mode
-     (Win  : in Window := Standard_Window;
-      Mode : in Boolean := True);
-  --  AKA: intrflush()
-   pragma Inline (Set_Flush_On_Interrupt_Mode);
-
-  --  |
-   procedure Set_Queue_Interrupt_Mode
-     (Win   : in Window := Standard_Window;
-      Flush : in Boolean := True);
-  --  AKA: qiflush()
-  --  AKA: noqiflush()
-   pragma Inline (Set_Queue_Interrupt_Mode);
-
-  --  |
-   procedure Set_NoDelay_Mode
-     (Win  : in Window := Standard_Window;
-      Mode : in Boolean := False);
-  --  AKA: nodelay()
-   pragma Inline (Set_NoDelay_Mode);
-
-   type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
-
-  --  |
-   procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
-                               Mode   : in Timeout_Mode;
-                               Amount : in Natural);--  in Miliseconds
-  --  AKA: wtimeout()
-  --  Instead of overloading the semantic of the sign of amount, we
-  --  introduce the Timeout_Mode parameter. This should improve
-  --  readability. For Blocking and Non_Blocking, the Amount is not
-  --  evaluated.
-  --  We don't inline this procedure.
-
-  --  |
-   procedure Set_Escape_Timer_Mode
-     (Win       : in Window := Standard_Window;
-      Timer_Off : in Boolean := False);
-  --  AKA: notimeout()
-   pragma Inline (Set_Escape_Timer_Mode);
-
-  --  |=====================================================================
-  --  | Man page curs_outopts.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_NL_Mode (SwitchOn : in Boolean := True);
-  --  AKA: nl()
-  --  AKA: nonl()
-   pragma Inline (Set_NL_Mode);
-
-  --  |
-   procedure Clear_On_Next_Update
-     (Win      : in Window := Standard_Window;
-      Do_Clear : in Boolean := True);
-  --  AKA: clearok()
-   pragma Inline (Clear_On_Next_Update);
-
-  --  |
-   procedure Use_Insert_Delete_Line
-     (Win    : in Window := Standard_Window;
-      Do_Idl : in Boolean := True);
-  --  AKA: idlok()
-   pragma Inline (Use_Insert_Delete_Line);
-
-  --  |
-   procedure Use_Insert_Delete_Character
-     (Win    : in Window := Standard_Window;
-      Do_Idc : in Boolean := True);
-  --  AKA: idcok()
-   pragma Inline (Use_Insert_Delete_Character);
-
-  --  |
-   procedure Leave_Cursor_After_Update
-     (Win      : in Window := Standard_Window;
-      Do_Leave : in Boolean := True);
-  --  AKA: leaveok()
-   pragma Inline (Leave_Cursor_After_Update);
-
-  --  |
-   procedure Immediate_Update_Mode
-     (Win  : in Window := Standard_Window;
-      Mode : in Boolean := False);
-  --  AKA: immedok()
-   pragma Inline (Immediate_Update_Mode);
-
-  --  |
-   procedure Allow_Scrolling
-     (Win  : in Window := Standard_Window;
-      Mode : in Boolean := False);
-  --  AKA: scrollok()
-   pragma Inline (Allow_Scrolling);
-
-   function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
-  --  There is no such function in the C interface.
-   pragma Inline (Scrolling_Allowed);
-
-  --  |
-   procedure Set_Scroll_Region
-     (Win         : in Window := Standard_Window;
-      Top_Line    : in Line_Position;
-      Bottom_Line : in Line_Position);
-  --  AKA: wsetscrreg()
-   pragma Inline (Set_Scroll_Region);
-
-  --  |=====================================================================
-  --  | Man page curs_refresh.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Update_Screen;
-  --  AKA: doupdate()
-   pragma Inline (Update_Screen);
-
-  --  |
-   procedure Refresh (Win : in Window := Standard_Window);
-  --  AKA: wrefresh()
-  --  There is an overloaded Refresh for Pads.
-  --  The Inline pragma appears there
-
-  --  |
-   procedure Refresh_Without_Update
-     (Win : in Window := Standard_Window);
-  --  AKA: wnoutrefresh()
-  --  There is an overloaded Refresh_Without_Update for Pads.
-  --  The Inline pragma appears there
-
-  --  |
-   procedure Redraw (Win : in Window := Standard_Window);
-  --  AKA: redrawwin()
-
-  --  |
-   procedure Redraw (Win        : in Window := Standard_Window;
-                     Begin_Line : in Line_Position;
-                     Line_Count : in Positive);
-  --  AKA: wredrawln()
-   pragma Inline (Redraw);
-
-  --  |=====================================================================
-  --  | Man page curs_clear.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Erase (Win : in Window := Standard_Window);
-  --  AKA: werase()
-   pragma Inline (Erase);
-
-  --  |
-   procedure Clear
-     (Win : in Window := Standard_Window);
-  --  AKA: wclear()
-   pragma Inline (Clear);
-
-  --  |
-   procedure Clear_To_End_Of_Screen
-     (Win : in Window := Standard_Window);
-  --  AKA: wclrtobot()
-   pragma Inline (Clear_To_End_Of_Screen);
-
-  --  |
-   procedure Clear_To_End_Of_Line
-     (Win : in Window := Standard_Window);
-  --  AKA: wclrtoeol()
-   pragma Inline (Clear_To_End_Of_Line);
-
-  --  |=====================================================================
-  --  | Man page curs_bkgd.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Set_Background
-     (Win : in Window := Standard_Window;
-      Ch  : in Attributed_Character);
-  --  AKA: wbkgdset()
-   pragma Inline (Set_Background);
-
-  --  |
-   procedure Change_Background
-     (Win : in Window := Standard_Window;
-      Ch  : in Attributed_Character);
-  --  AKA: wbkgd()
-   pragma Inline (Change_Background);
-
-  --  |
-   function Get_Background (Win : Window := Standard_Window)
-     return Attributed_Character;
-  --  AKA: wbkgdget()
-   pragma Inline (Get_Background);
-
-  --  |=====================================================================
-  --  | Man page curs_touch.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Untouch (Win : in Window := Standard_Window);
-  --  AKA: untouchwin()
-   pragma Inline (Untouch);
-
-  --  |
-   procedure Touch (Win : in Window := Standard_Window);
-  --  AKA: touchwin()
-
-  --  |
-   procedure Touch (Win   : in Window := Standard_Window;
-                    Start : in Line_Position;
-                    Count : in Positive);
-  --  AKA: touchline()
-   pragma Inline (Touch);
-
-  --  |
-   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);
-
-  --  |
-   function Is_Touched (Win  : Window := Standard_Window;
-                        Line : Line_Position) return Boolean;
-  --  AKA: is_linetouched()
-
-  --  |
-   function Is_Touched (Win : Window := Standard_Window) return Boolean;
-  --  AKA: is_wintouched()
-   pragma Inline (Is_Touched);
-
-  --  |=====================================================================
-  --  | Man page curs_overlay.3x
-  --  |=====================================================================
-
-  --  |
-   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);
-  --  AKA: copywin()
-   pragma Inline (Copy);
-
-  --  |
-   procedure Overwrite (Source_Window      : in Window;
-                        Destination_Window : in Window);
-  --  AKA: overwrite()
-   pragma Inline (Overwrite);
-
-  --  |
-   procedure Overlay (Source_Window      : in Window;
-                      Destination_Window : in Window);
-  --  AKA: overlay()
-   pragma Inline (Overlay);
-
-  --  |=====================================================================
-  --  | Man page curs_deleteln.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Insert_Delete_Lines
-     (Win   : in Window  := Standard_Window;
-      Lines : in Integer := 1);--  default is to insert one line above
-  --  AKA: winsdelln()
-   pragma Inline (Insert_Delete_Lines);
-
-  --  |
-   procedure Delete_Line (Win : in Window := Standard_Window);
-  --  AKA: wdeleteln()
-   pragma Inline (Delete_Line);
-
-  --  |
-   procedure Insert_Line (Win : in Window := Standard_Window);
-  --  AKA: winsertln()
-   pragma Inline (Insert_Line);
-
-  --  |=====================================================================
-  --  | Man page curs_getyx.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Get_Size
-     (Win               : in Window := Standard_Window;
-      Number_Of_Lines   : out Line_Count;
-      Number_Of_Columns : out Column_Count);
-  --  AKA: getmaxyx()
-   pragma Inline (Get_Size);
-
-  --  |
-   procedure Get_Window_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);
-
-  --  |
-   procedure Get_Cursor_Position
-     (Win    : in  Window := Standard_Window;
-      Line   : out Line_Position;
-      Column : out Column_Position);
-  --  AKA: getyx()
-   pragma Inline (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);
-  --  AKA: getparyx()
-  --  Instead of placing -1 in the coordinates as return, we use a boolean
-  --  to return the info that the window has no parent.
-   pragma Inline (Get_Origin_Relative_To_Parent);
-
-  --  |=====================================================================
-  --  | Man page curs_pad.3x
-  --  |=====================================================================
-
-  --  |
-   function New_Pad (Lines   : Line_Count;
-                     Columns : Column_Count) return Window;
-  --  AKA: newpad()
-   pragma Inline (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;
-  --  AKA: subpad()
-   pragma Inline (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);
-  --  AKA: prefresh()
-   pragma Inline (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);
-  --  AKA: pnoutrefresh()
-   pragma Inline (Refresh_Without_Update);
-
-  --  |
-   procedure Add_Character_To_Pad_And_Echo_It
-     (Pad : in Window;
-      Ch  : in Attributed_Character);
-  --  AKA: pechochar()
-
-   procedure Add_Character_To_Pad_And_Echo_It
-     (Pad : in Window;
-      Ch  : in Character);
-   pragma Inline (Add_Character_To_Pad_And_Echo_It);
-
-  --  |=====================================================================
-  --  | Man page curs_scroll.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Scroll (Win    : in Window  := Standard_Window;
-                     Amount : in Integer := 1);
-  --  AKA: wscrl()
-   pragma Inline (Scroll);
-
-  --  |=====================================================================
-  --  | Man page curs_delch.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Delete_Character (Win : in Window := Standard_Window);
-  --  AKA: wdelch()
-
-  --  |
-   procedure Delete_Character
-     (Win    : in Window := Standard_Window;
-      Line   : in Line_Position;
-      Column : in Column_Position);
-  --  AKA: mvwdelch()
-   pragma Inline (Delete_Character);
-
-  --  |=====================================================================
-  --  | Man page curs_inch.3x
-  --  |=====================================================================
-
-  --  |
-   function Peek (Win : Window := Standard_Window)
-     return Attributed_Character;
-  --  AKA: winch()
-
-  --  |
-   function Peek
-     (Win    : Window := Standard_Window;
-      Line   : Line_Position;
-      Column : Column_Position) return Attributed_Character;
-  --  AKA: mvwinch()
-  --  More Peek's follow, pragma Inline appears later.
-
-  --  |=====================================================================
-  --  | Man page curs_winch.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Insert (Win : in Window := Standard_Window;
-                     Ch  : in Attributed_Character);
-  --  AKA: winsch()
-
-  --  |
-   procedure Insert (Win    : in Window := Standard_Window;
-                     Line   : in Line_Position;
-                     Column : in Column_Position;
-                     Ch     : in Attributed_Character);
-  --  AKA: mvwinsch()
-
-  --  |=====================================================================
-  --  | Man page curs_winch.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Insert (Win : in Window := Standard_Window;
-                     Str : in String;
-                     Len : in Integer := -1);
-  --  AKA: winsnstr()
-  --  AKA: winsstr()
-
-  --  |
-   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()
-   pragma Inline (Insert);
-
-  --  |=====================================================================
-  --  | Man page curs_instr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Peek (Win : in  Window := Standard_Window;
-                   Str : out String;
-                   Len : in  Integer := -1);
-  --  AKA: winnstr()
-  --  AKA: winstr()
-
-  --  |
-   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()
-
-  --  |=====================================================================
-  --  | Man page curs_inchstr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Peek (Win : in  Window := Standard_Window;
-                   Str : out Attributed_String;
-                   Len : in  Integer := -1);
-  --  AKA: winchnstr()
-  --  AKA: winchstr()
-
-  --  |
-   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()
-  --  We don't inline the Peek procedures
-
-  --  |=====================================================================
-  --  | Man page curs_getstr.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Get (Win : in  Window := Standard_Window;
-                  Str : out String;
-                  Len : in  Integer := -1);
-  --  AKA: wgetnstr()
-  --  AKA: wgetstr()
-
-   procedure Get (Win    : in  Window := Standard_Window;
-                  Line   : in  Line_Position;
-                  Column : in  Column_Position;
-                  Str    : out String;
-                  Len    : in  Integer := -1);
-  --  AKA: wgetnstr()
-  --  not specified in ncurses, should be: mvwgetnstr()
-  --       and mvwgetstr() (which exists)
-  --  Get is not inlined
-
-  --  |=====================================================================
-  --  | Man page curs_slk.3x
-  --  |=====================================================================
-
-   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);
-
-  --  |
-   procedure Init_Soft_Label_Keys
-     (Format : in Soft_Label_Key_Format := Three_Two_Three);
-  --  AKA: slk_init()
-   pragma Inline (Init_Soft_Label_Keys);
-
-  --  |
-   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
-
-  --  |
-   procedure Refresh_Soft_Label_Keys;
-  --  AKA: slk_refresh()
-   pragma Inline (Refresh_Soft_Label_Keys);
-
-  --  |
-   procedure Refresh_Soft_Label_Keys_Without_Update;
-  --  AKA: slk_noutrefresh()
-   pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
-
-  --  |
-   procedure Get_Soft_Label_Key (Label : in Label_Number;
-                                 Text  : out String);
-  --  AKA: slk_label()
-
-  --  |
-   function Get_Soft_Label_Key (Label : in Label_Number) return String;
-  --  AKA: slk_label()
-  --  Same as function
-   pragma Inline (Get_Soft_Label_Key);
-
-  --  |
-   procedure Clear_Soft_Label_Keys;
-  --  AKA: slk_clear()
-   pragma Inline (Clear_Soft_Label_Keys);
-
-  --  |
-   procedure Restore_Soft_Label_Keys;
-  --  AKA: slk_restore()
-   pragma Inline (Restore_Soft_Label_Keys);
-
-  --  |
-   procedure Touch_Soft_Label_Keys;
-  --  AKA: slk_touch()
-   pragma Inline (Touch_Soft_Label_Keys);
-
-  --  |
-   procedure Switch_Soft_Label_Key_Attributes
-     (Attr : in Character_Attribute_Set;
-      On   : in Boolean := True);
-  --  AKA: slk_attron()
-  --  AKA: slk_attroff()
-   pragma Inline (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);
-  --  AKA: slk_attrset()
-   pragma Inline (Set_Soft_Label_Key_Attributes);
-
-  --  |
-   function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
-  --  AKA: slk_attr()
-
-  --  |
-   function Get_Soft_Label_Key_Attributes return Color_Pair;
-  --  AKA: slk_attr()
-   pragma Inline (Get_Soft_Label_Key_Attributes);
-
-  --  |
-   procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
-  --  AKA: slk_color()
-   pragma Inline (Set_Soft_Label_Key_Color);
-
-  --  |=====================================================================
-  --  | Man page keyok.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Enable_Key (Key    : in Special_Key_Code;
-                         Enable : in Boolean := True);
-  --  AKA: keyok()
-   pragma Inline (Enable_Key);
-
-  --  |=====================================================================
-  --  | Man page define_key.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Define_Key (Definition : in String;
-                         Key        : in Special_Key_Code);
-  --  AKA: define_key()
-   pragma Inline (Define_Key);
-
-  --  |=====================================================================
-  --  | Man page curs_util.3x
-  --  |=====================================================================
-
-  --  | Not implemented : filter, use_env, putwin, getwin
-  --
-  --  |
-   procedure Key_Name (Key  : in  Real_Key_Code;
-                       Name : out String);
-  --  AKA: keyname()
-  --  The external name for a real keystroke.
-
-  --  |
-   function Key_Name (Key  : in  Real_Key_Code) return String;
-  --  AKA: keyname()
-  --  Same as function
-  --  We don't inline this routine
-
-  --  |
-   procedure Un_Control (Ch  : in Attributed_Character;
-                         Str : out String);
-  --  AKA: unctrl()
-
-  --  |
-   function Un_Control (Ch  : in Attributed_Character) return String;
-  --  AKA: unctrl()
-  --  Same as function
-   pragma Inline (Un_Control);
-
-  --  |
-   procedure Delay_Output (Msecs : in Natural);
-  --  AKA: delay_output()
-   pragma Inline (Delay_Output);
-
-  --  |
-   procedure Flush_Input;
-  --  AKA: flushinp()
-   pragma Inline (Flush_Input);
-
-  --  |=====================================================================
-  --  | Man page curs_termattrs.3x
-  --  |=====================================================================
-
-  --  |
-   function Baudrate return Natural;
-  --  AKA: baudrate()
-   pragma Inline (Baudrate);
-
-  --  |
-   function Erase_Character return Character;
-  --  AKA: erasechar()
-   pragma Inline (Erase_Character);
-
-  --  |
-   function Kill_Character return Character;
-  --  AKA: killchar()
-   pragma Inline (Kill_Character);
-
-  --  |
-   function Has_Insert_Character return Boolean;
-  --  AKA: has_ic()
-   pragma Inline (Has_Insert_Character);
-
-  --  |
-   function Has_Insert_Line return Boolean;
-  --  AKA: has_il()
-   pragma Inline (Has_Insert_Line);
-
-  --  |
-   function Supported_Attributes return Character_Attribute_Set;
-  --  AKA: termattrs()
-   pragma Inline (Supported_Attributes);
-
-  --  |
-   procedure Long_Name (Name : out String);
-  --  AKA: longname()
-
-  --  |
-   function Long_Name return String;
-  --  AKA: longname()
-  --  Same as function
-   pragma Inline (Long_Name);
-
-  --  |
-   procedure Terminal_Name (Name : out String);
-  --  AKA: termname()
-
-  --  |
-   function Terminal_Name return String;
-  --  AKA: termname()
-  --  Same as function
-   pragma Inline (Terminal_Name);
-
-  --  |=====================================================================
-  --  | Man page curs_color.3x
-  --  |=====================================================================
-
-  --  |
-   procedure Start_Color;
-  --  AKA: start_clolor()
-   pragma Import (C, Start_Color, "start_color");
-
-  --  |
-   procedure Init_Pair (Pair : in Redefinable_Color_Pair;
-                        Fore : in Color_Number;
-                        Back : in Color_Number);
-  --  AKA: init_pair()
-   pragma Inline (Init_Pair);
-
-  --  |
-   procedure Pair_Content (Pair : in Color_Pair;
-                           Fore : out Color_Number;
-                           Back : out Color_Number);
-  --  AKA: pair_content()
-   pragma Inline (Pair_Content);
-
-  --  |
-   function Has_Colors return Boolean;
-  --  AKA: has_colors()
-   pragma Inline (Has_Colors);
-
-  --  |
-   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);
-
-  --  |
-   function Can_Change_Color return Boolean;
-  --  AKA: can_change_color()
-   pragma Inline (Can_Change_Color);
-
-  --  |
-   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);
-
-  --  |=====================================================================
-  --  | Man page curs_kernel.3x
-  --  |=====================================================================
-
-  --  | Not implemented: getsyx, setsyx
-  --
-   type Curses_Mode is (Curses, Shell);
-
-  --  |
-   procedure Save_Curses_Mode (Mode : in Curses_Mode);
-  --  AKA: def_prog_mode()
-  --  AKA: def_shell_mode()
-   pragma Inline (Save_Curses_Mode);
-
-  --  |
-   procedure Reset_Curses_Mode (Mode : in Curses_Mode);
-  --  AKA: reset_prog_mode()
-  --  AKA: reset_shell_mode()
-   pragma Inline (Reset_Curses_Mode);
-
-  --  |
-   procedure Save_Terminal_State;
-  --  AKA: savetty()
-   pragma Inline (Save_Terminal_State);
-
-  --  |
-   procedure Reset_Terminal_State;
-  --  AKA: resetty();
-   pragma Inline (Reset_Terminal_State);
-
-   type Stdscr_Init_Proc is access
-      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.
-
-  --  |
-   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
-  --        ripoffline(), in which the Lines argument absolute value is the
-  --        number of lines to be ripped of. The official ripoffline() only
-  --        uses the sign of Lines to rip of a single line from bottom or top.
-   pragma Inline (Rip_Off_Lines);
-
-   type Cursor_Visibility is (Invisible, Normal, Very_Visible);
-
-  --  |
-   procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
-  --  AKA: curs_set()
-   pragma Inline (Set_Cursor_Visibility);
-
-  --  |
-   procedure Nap_Milli_Seconds (Ms : in Natural);
-  --  AKA: napms()
-   pragma Inline (Nap_Milli_Seconds);
-
-  --  |=====================================================================
-  --  | Some usefull helpers.
-  --  |=====================================================================
-   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;
-      Dir    : in Transform_Direction := From_Screen);
-  --  This procedure transforms screen coordinates into coordinates relative
-  --  to the window and vice versa, depending on the Dir parmeter.
-  --  Screen coordinates are the position informations on the physical device.
-  --  An Curses_Exception will be raised if Line and Column are not in the
-  --  Window or if you pass the Null_Window as argument.
-  --  We don't inline this procedure
-
-private
-   type Window is new System.Storage_Elements.Integer_Address;
-   Null_Window : constant Window := 0;
-
-  --  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_scroll  : constant Natural := 27;--  char
-   Sizeof_bool    : constant Natural :=  1;--  bool
-   Offset_XY      : constant Natural :=  1;--  int
-
-
-end Terminal_Interface.Curses;
-
\ No newline at end of file diff --git a/Ada95/html/man/curs_addch.3x.html b/Ada95/html/man/curs_addch.3x.html deleted file mode 100644 index 1fc72618..00000000 --- a/Ada95/html/man/curs_addch.3x.html +++ /dev/null @@ -1,174 +0,0 @@ - - -
-       addch,  waddch,  mvaddch,  mvwaddch, echochar, wechochar -
-       add a character (with attributes) to a curses window, then
-       advance the cursor
-
-
-
-

SYNOPSIS

-       #include 
-
-       int addch(chtype ch);
-       int waddch(WINDOW *win, chtype ch);
-       int mvaddch(int y, int x, chtype ch);
-       int mvwaddch(WINDOW *win, int y, int x, chtype ch);
-       int echochar(chtype ch);
-       int wechochar(WINDOW *win, chtype ch);
-
-
-
-

DESCRIPTION

-       The  addch,  waddch, mvaddch and mvwaddch routines put the
-       character ch into the given window at its  current  window
-       position,  which  is then advanced.  They are analogous to
-       putchar in stdio(3).  If the advance is at the right  mar-
-       gin,  the  cursor  automatically wraps to the beginning of
-       the next line.  At the bottom  of  the  current  scrolling
-       region,  if  scrollok  is enabled, the scrolling region is
-       scrolled up one line.
-
-       If ch is a tab, newline, or backspace, the cursor is moved
-       appropriately within the window.  Backspace moves the cur-
-       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-
-       sidered to be at every eighth column.
-
-       If ch is any control character other than tab, newline, or
-       backspace,  it  is  drawn  in  ^X notation.  Calling winch
-       after adding a control character does not return the char-
-       acter  itself, but instead returns the ^-representation of
-       the control character.
-
-       Video attributes can be combined with a character argument
-       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-
-       fined video attribute constants that can be usefully OR'ed
-       into characters.
-
-       The echochar and wechochar routines are  equivalent  to  a
-       call  to addch followed by a call to refresh, or a call to
-       waddch followed by a call to wrefresh.  The knowledge that
-       only  a  single character is being output is used and, for
-       non-control characters, a  considerable  performance  gain
-       may  be  seen  by  using  these  routines instead of their
-       The following variables may be used to  add  line  drawing
-       characters  to  the screen with routines of the addch fam-
-       ily.  The default character listed below is  used  if  the
-       acsc   capability   doesn't   define  a  terminal-specific
-       replacement for it (but see the EXTENSIONS section below).
-       The names are taken from VT100 nomenclature.
-
-       l   l   l   _  _  _  l  l  l.   Name Default   Description
-       ACS_BLOCK #    solid square block ACS_BOARD #    board  of
-       squares ACS_BTEE  +    bottom tee ACS_BULLET     o    bul-
-       let    ACS_CKBOARD    :    checker     board     (stipple)
-       ACS_DARROW     v    arrow           pointing          down
-       ACS_DEGREE     '    degree symbol ACS_DIAMOND    +    dia-
-       mond          ACS_GEQUAL     >    greater-than-or-equal-to
-       ACS_HLINE -    horizontal line ACS_LANTERN    #    lantern
-       symbol     ACS_LARROW     <    arrow     pointing     left
-       ACS_LEQUAL     <    less-than-or-equal-to
-       ACS_LLCORNER   +    lower         left-hand         corner
-       ACS_LRCORNER   +    lower        right-hand         corner
-       ACS_LTEE  +    left    tee   ACS_NEQUAL     !    not-equal
-       ACS_PI    *    greek   pi   ACS_PLMINUS    #    plus/minus
-       ACS_PLUS  +    plus   ACS_RARROW     >    arrow   pointing
-       right ACS_RTEE  +    right tee ACS_S1    -    scan line  1
-       ACS_S3    -    scan  line  3  ACS_S7    -    scan  line  7
-       ACS_S9    _    scan line 9 ACS_STERLING   f    pound-ster-
-       ling         symbol         ACS_TTEE  +    top         tee
-       ACS_UARROW     ^    arrow           pointing            up
-       ACS_ULCORNER   +    upper         left-hand         corner
-       ACS_URCORNER   +    upper        right-hand         corner
-       ACS_VLINE |    vertical line
-
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon failure and OK on
-       success (the SVr4 manuals specify only "an  integer  value
-       other than ERR") upon successful completion, unless other-
-       wise noted in the preceding routine descriptions.
-
-
-
-

NOTES

-       Note that addch, mvaddch, mvwaddch, and  echochar  may  be
-       macros.
-
-
-
-

PORTABILITY

-       All  these functions are described in the XSI Curses stan-
-       dard, Issue 4.  The defaults specified  for  forms-drawing
-       characters apply in the POSIX locale.
-
-       Some  ACS symbols (ACS_S3, ACS_S7, ACS_LEQUAL, ACS_GEQUAL,
-       ACS_PI, ACS_NEQUAL, ACS_STERLING) were not  documented  in
-       any  publicly  released  System V.  However, many publicly
-       available terminfos include acsc strings  in  which  their
-       key  characters  (pryz{|}) are embedded, and a second-hand
-       ncurses(3X).
-
-
-
-

SEE ALSO

-       curses(3X), curs_attr(3X), curs_clear(3X),  curs_inch(3X),
-       curs_outopts(3X), curs_refresh(3X), putc(3S).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_addchstr.3x.html b/Ada95/html/man/curs_addchstr.3x.html deleted file mode 100644 index 67f565d4..00000000 --- a/Ada95/html/man/curs_addchstr.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       addchstr,  addchnstr,  waddchstr,  waddchnstr, mvaddchstr,
-       mvaddchnstr, mvwaddchstr, mvwaddchnstr - add a  string  of
-       characters (and attributes) to a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int addchstr(const chtype *chstr);
-       int addchnstr(const chtype *chstr, int n);
-       int waddchstr(WINDOW *win, const chtype *chstr);
-       int waddchnstr(WINDOW *win, const chtype *chstr, int n);
-       int mvaddchstr(int y, int x, const chtype *chstr);
-       int mvaddchnstr(int y, int x, const chtype *chstr, int n);
-       int mvwaddchstr(WINDOW *win, int y, int  x,  const  chtype
-       *chstr);
-       int  mvwaddchnstr(WINDOW  *win, int y, int x, const chtype
-       *chstr, int n);
-
-
-
-

DESCRIPTION

-       These routines copy chstr into the window image  structure
-       at  and  after the current cursor position.  The four rou-
-       tines with n as the last argument copy at most n elements,
-       but  no  more than will fit on the line.  If n=-1 then the
-       whole string is copied, to the maximum number  of  charac-
-       ters that will fit on the line.
-
-       The window cursor is not advanced, and these routines work
-       faster than waddnstr.  On the other hand, they don't  per-
-       form  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.
-
-
-
-
-

RETURN VALUES

-       All routines return the integer ERR upon failure and OK on
-       success  (the  SVr4 manuals specify only "an integer value
-       other than ERR") upon successful completion, unless other-
-       wise noted in the preceding routine descriptions.
-
-
-
-

NOTES

-       Note that all routines except waddchnstr may be macros.
-
-
-
-

PORTABILITY

-       All  these  entry  points  are described in the XSI Curses
-       standard, Issue 4.
-
-
-
-

SEE ALSO

-       curses(3X).
-
-
- - diff --git a/Ada95/html/man/curs_addstr.3x.html b/Ada95/html/man/curs_addstr.3x.html deleted file mode 100644 index 6ca3cc77..00000000 --- a/Ada95/html/man/curs_addstr.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       addstr,  addnstr,  waddstr, waddnstr, mvaddstr, mvaddnstr,
-       mvwaddstr, mvwaddnstr - add a string of  characters  to  a
-       curses window and advance cursor
-
-
-
-

SYNOPSIS

-       #include 
-
-       int addstr(const char *str);
-       int addnstr(const char *str, int n);
-       int waddstr(WINDOW *win, const char *str);
-       int waddnstr(WINDOW *win, const char *str, int n);
-       int mvaddstr(int y, int x, const char *str);
-       int mvaddnstr(int y, int x, const char *str, int n);
-       int mvwaddstr(WINDOW *win, int y, int x, const char *str);
-       int mvwaddnstr(WINDOW *win, int y, int x, const char *str,
-       int n);
-
-
-
-

DESCRIPTION

-       These  routines  write  the characters of the (null-termi-
-       nated) character string str on the given  window.   It  is
-       similar  to  calling waddch once for each character in the
-       string.  The four routines with n  as  the  last  argument
-       write  at  most n characters.  If n is -1, then the entire
-       string will be added.
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon failure and OK on
-       success  (the  SVr4 manuals specify only "an integer value
-       other than ERR") upon successful completion.
-
-
-
-

NOTES

-       Note  that  all  of  these  routines  except  waddstr  and
-       waddnstr may be macros.
-
-
-
-

PORTABILITY

-       All  these  entry  points  are described in the XSI Curses
-       standard, Issue 4.  The XSI errors EILSEQ  and  EOVERFLOW,
-       associated  with  extended-level  conformance, are not yet
-       detected.
-
-
-
-

SEE ALSO

-       curses(3X), curs_addch(3X).
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_attr.3x.html b/Ada95/html/man/curs_attr.3x.html deleted file mode 100644 index 5891268f..00000000 --- a/Ada95/html/man/curs_attr.3x.html +++ /dev/null @@ -1,170 +0,0 @@ - - -
-       attroff,  wattroff,  attron,  wattron,  attrset, wattrset,
-       color_set,  wcolor_set,  standend,  wstandend,   standout,
-       wstandout  - curses character and window attribute control
-       routines
-
-
-
-

SYNOPSIS

-       #include 
-       int attroff(int attrs);
-       int wattroff(WINDOW *win, int attrs);
-       int attron(int attrs);
-       int wattron(WINDOW *win, int attrs);
-       int attrset(int attrs);
-       int wattrset(WINDOW *win, int attrs);
-       int color_set(short color_pair_number, void* opts);
-       int wcolor_set(WINDOW *win, short color_pair_number,
-             void* opts);
-       int standend(void);
-       int wstandend(WINDOW *win);
-       int standout(void);
-       int wstandout(WINDOW *win);
-       int attr_get(attr_t *attrs, short *pair, void *opts);
-       int wattr_get(WINDOW *win, attr_t *attrs, short *pair,
-              void *opts);
-       int attr_off(attr_t attrs, void *opts);
-       int wattr_off(WINDOW *win, attr_t attrs, void *opts);
-       int attr_on(attr_t attrs, void *opts);
-       int wattr_on(WINDOW *win, attr_t attrs, void *opts);
-       int attr_set(attr_t attrs, void *opts);
-       int wattr_set(WINDOW *win, attr_t attrs, void *opts);
-       int chgat(int n, attr_t attr, short color,
-             const void *opts)
-       int wchgat(WINDOW *win, int n, attr_t attr,
-             short color, const void *opts)
-       int mvchgat(int y, int x, int n, attr_t attr,
-             short color, const void *opts)
-       int mvwchgat(WINDOW *win, int y, int x, int n,
-             attr_t attr, short color, const void *opts)
-
-
-
-

DESCRIPTION

-       These routines manipulate the current  attributes  of  the
-       named window.  The current attributes of a window apply to
-       all characters that are written into the window with  wad-
-       dch,  waddstr  and  wprintw.  Attributes are a property of
-       the character, and move with  the  character  through  any
-       scrolling and insert/delete line/character operations.  To
-       the extent possible, they  are  displayed  as  appropriate
-       modifications  to  the graphic rendition of characters put
-       on the screen.
-
-       The routine attrset sets the  current  attributes  of  the
-       given  window to attrs.  The routine attroff turns off the
-       named attributes without turning any other  attributes  on
-       same  as  attron(A_STANDOUT).  The routine standend is the
-       same as attrset(A_NORMAL) or attrset(0), that is, it turns
-       off all attributes.
-
-       The  routine color_set sets the current color of the given
-       window to the foreground/background combination  described
-       by  the  color_pair_number. The parameter opts is reserved
-       for future use, applications must supply a null pointer.
-
-       The routine wattr_get returns the  current  attribute  and
-       color pair for the given window; attr_get returns the cur-
-       rent attribute and color pair for stdscr.   The  remaining
-       attr_*  functions  operate  exactly like the corresponding
-       attr* functions, except that they take arguments  of  type
-       attr_t rather than int.
-
-       The routine chgat changes the attributes of a given number
-       of characters starting at the current cursor  location  of
-       stdscr.   It  does not update the cursor and does not per-
-       form wrapping.  A character count of -1  or  greater  than
-       the  remaining window width means to change attributes all
-       the way to the end of the current line.  The wchgat  func-
-       tion generalizes this to any window; the mvwchgat function
-       does a cursor move before acting.  In these functions, the
-       color  argument  is  a  color-pair  index (as in the first
-       argument of  init_pair,  see  curs_color(3X)).   The  opts
-       argument  is  not  presently used, but is reserved for the
-       future (leave it NULL).
-
-   Attributes
-       The following video attributes, defined in , can
-       be passed to the routines attron, attroff, and attrset, or
-       OR'ed with the characters passed to addch.
-
-       center ; l l .  A_NORMAL  Normal  display  (no  highlight)
-       A_STANDOUT     Best  highlighting  mode  of  the terminal.
-       A_UNDERLINE    Underlining     A_REVERSE Reverse     video
-       A_BLINK   Blinking  A_DIM     Half  bright A_BOLD    Extra
-       bright or bold A_PROTECT Protected mode  A_INVIS   Invisi-
-       ble  or  blank mode A_ALTCHARSET   Alternate character set
-       A_CHARTEXT     Bit-mask    to    extract    a    character
-       COLOR_PAIR(n)  Color-pair number n
-
-       The following macro is the reverse of COLOR_PAIR(n):
-
-       PAIR_NUMBER(attrs) Returns the pair number associated
-                          with the COLOR_PAIR(n) attribute.
-
-       The  return values of many of these routines are not mean-
-       ingful (they are implemented as macro-expanded assignments
-       and  simply  return their argument).  The SVr4 manual page
-       claims (falsely) that these routines always return 1.
-       Note that attroff,  wattroff,  attron,  wattron,  attrset,
-       wattrset, standend and standout may be macros.
-
-
-
-

PORTABILITY

-       All  these functions are supported in the XSI Curses stan-
-       dard, Issue 4.  The standard defined  the  dedicated  type
-       for  highlights,  attr_t,  which  is  not  defined in SVr4
-       curses. The functions taking attr_t arguments are not sup-
-       ported under SVr4.
-
-       The  XSI  Curses  standard  states that whether the tradi-
-       tional  functions  attron/attroff/attrset  can  manipulate
-       attributes  other  than A_BLINK, A_BOLD, A_DIM, A_REVERSE,
-       A_STANDOUT, or A_UNDERLINE is "unspecified".   Under  this
-       implementation  as  well  as  SVr4 curses, these functions
-       correctly manipulate all other  highlights  (specifically,
-       A_ALTCHARSET, A_PROTECT, and A_INVIS).
-
-       XSI  Curses added the new entry points, attr_get, attr_on,
-       attr_off,  attr_set,   wattr_on,   wattr_off,   wattr_get,
-       wattr_set.   These  are intended to work with a new series
-       of highlight macros prefixed with WA_.
-
-       center ; l l .  WA_NORMAL Normal  display  (no  highlight)
-       WA_STANDOUT    Best  highlighting  mode  of  the terminal.
-       WA_UNDERLINE   Underlining  WA_REVERSE     Reverse   video
-       WA_BLINK  Blinking  WA_DIM    Half  bright WA_BOLD   Extra
-       bright or bold WA_ALTCHARSET  Alternate character set
-
-       The XSI curses standard specifies that each pair of corre-
-       sponding  A_  and WA_-using functions operates on the same
-       current-highlight information.
-
-       The XSI standard extended conformance level adds new high-
-       lights A_HORIZONTAL, A_LEFT, A_LOW, A_RIGHT, A_TOP, A_VER-
-       TICAL (and corresponding WA_ macros for each)  which  this
-       curses does not yet support.
-
-
-
-

SEE ALSO

-       curses(3X),        curs_addch(3X),        curs_addstr(3X),
-       curs_printw(3X)
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_beep.3x.html b/Ada95/html/man/curs_beep.3x.html deleted file mode 100644 index 930780ae..00000000 --- a/Ada95/html/man/curs_beep.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       beep, flash - curses bell and screen flash routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       int beep(void);
-       int flash(void);
-
-
-
-

DESCRIPTION

-       The beep and flash routines are used to alert the terminal
-       user.  The routine beep sounds an  audible  alarm  on  the
-       terminal,  if  possible;  otherwise  it flashes the screen
-       (visible bell).  The routine flash 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.
-
-
-
-

RETURN VALUE

-       These routines return OK if they  succeed  in  beeping  or
-       flashing, ERR otherwise.
-
-
-
-

EXTENSIONS

-       SVr4's  beep  and flash routines always returned OK, so it
-       was not possible to tell when the beep or flash failed.
-
-
-
-

PORTABILITY

-       These functions are defined in the  XSI  Curses  standard,
-       Issue  4.  Like SVr4, it specifies that they always return
-       OK.
-
-
-
-

SEE ALSO

-       curses(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_bkgd.3x.html b/Ada95/html/man/curs_bkgd.3x.html deleted file mode 100644 index f84ee449..00000000 --- a/Ada95/html/man/curs_bkgd.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       bkgdset,  wbkgdset, bkgd, wbkgd - curses window background
-       manipulation routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       void bkgdset(const chtype ch);
-       void wbkgdset(WINDOW *win, const chtype ch);
-       int bkgd(const chtype ch);
-       int wbkgd(WINDOW *win, const chtype ch);
-       chtype getbkgd(WINDOW *win);
-
-
-
-

DESCRIPTION

-       The bkgdset and wbkgdset  routines  manipulate  the  back-
-       ground  of  the  named window.  The window background is a
-       chtype consisting of any combination of attributes  (i.e.,
-       rendition)  and  a  character.   The attribute part of the
-       background is combined (OR'ed) with all non-blank  charac-
-       ters  that  are written into the window with waddch.  Both
-       the character and attribute parts of  the  background  are
-       combined   with  the  blank  characters.   The  background
-       becomes a property of the character  and  moves  with  the
-       character   through   any   scrolling   and  insert/delete
-       line/character operations.
-
-       To the extent  possible  on  a  particular  terminal,  the
-       attribute  part  of  the  background  is  displayed as the
-       graphic rendition of the character put on the screen.
-
-       The bkgd and wbkgd functions set the  background  property
-       of  the  current  or  specified window and then apply this
-       setting to every character position in that window:
-
-              The rendition of every character on the  screen  is
-              changed to the new background rendition.
-
-              Wherever  the  former background character appears,
-              it is changed to the new background character.
-
-       The getbkgd function returns the  given  window's  current
-       background character/attribute pair.
-
-
-
-

RETURN VALUE

-       The  routines  bkgd  and wbkgd return the integer OK.  The
-       SVr4.0 manual says "or a non-negative integer  if  immedok
-       is set", but this appears to be an error.
-
-
-
-

NOTES

-       Note that bkgdset and bkgd may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       return ERR, on failure. but gives no failure conditions.
-
-
-
-

SEE ALSO

-       curses(3X), curs_addch(3X), curs_outopts(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_border.3x.html b/Ada95/html/man/curs_border.3x.html deleted file mode 100644 index dd4c0ca6..00000000 --- a/Ada95/html/man/curs_border.3x.html +++ /dev/null @@ -1,120 +0,0 @@ - - -
-       border,  wborder, box, hline, whline, vline, wvline - cre-
-       ate curses borders, horizontal and vertical lines
-
-
-
-

SYNOPSIS

-       #include 
-       int border(chtype ls, chtype rs, chtype ts, chtype bs,
-          chtype tl, chtype tr, chtype bl, chtype br);
-       int wborder(WINDOW *win, chtype ls, chtype rs,
-          chtype ts, chtype bs, chtype tl, chtype tr,
-          chtype bl, chtype br);
-       int box(WINDOW *win, chtype verch, chtype horch);
-       int hline(chtype ch, int n);
-       int whline(WINDOW *win, chtype ch, int n);
-       int vline(chtype ch, int n);
-       int wvline(WINDOW *win, chtype ch, int n);
-       mvhline(int y, int x, chtype ch, int n);
-       mvwhline(WINDOW *, int y, int x, chtype ch, int n);
-       int mvvline(int y, int x, chtype ch, int n);
-       int mvwvline(WINDOW *, int y, int x, chtype ch, int n);
-
-
-
-

DESCRIPTION

-       The border, wborder and box routines draw a box around the
-       edges  of  a  window.   The argument ls is a character and
-       attributes used for the left side  of  the  border,  rs  -
-       right  side,  ts  -  top  side, bs - bottom side, tl - top
-       left-hand corner, tr - top right-hand corner, bl -  bottom
-       left-hand  corner,  and br - bottom right-hand corner.  If
-       any of these arguments is zero, then the following default
-       values  (defined in curses.h) are used instead: ACS_VLINE,
-       ACS_VLINE,     ACS_HLINE,     ACS_HLINE,     ACS_ULCORNER,
-       ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER.
-
-       box(win,  verch,  horch)  is a shorthand for the following
-       call: wborder(win, verch, verch, horch, horch,  0,  0,  0,
-       0).
-
-       The  hline and whline functions draw a horizontal (left to
-       right) line using ch starting at the current cursor  posi-
-       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
-       changed.  The line is at most n  characters  long,  or  as
-       many as fit into the window.
-
-
-
-

RETURN VALUE

-       All  routines  return  the  integer OK.  The SVr4.0 manual
-       says "or a non-negative integer if immedok  is  set",  but
-       this appears to be an error.
-       The  borders  generated by these functions are inside bor-
-       ders (this is also true of SVr4 curses, though the fact is
-       not documented).
-
-       Note that border and box may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  Additional functions mvhline, mvvline, mvwhline,
-       and mvwvline are described there which this implementation
-       does not yet support.  The standard  specifies  that  they
-       return  ERR on failure, but specifies no error conditions.
-
-
-
-

SEE ALSO

-       curses(3X), curs_outopts(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_clear.3x.html b/Ada95/html/man/curs_clear.3x.html deleted file mode 100644 index be7651bd..00000000 --- a/Ada95/html/man/curs_clear.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       erase,  werase,  clear,  wclear, clrtobot, wclrtobot, clr-
-       toeol, wclrtoeol - clear all or part of a curses window
-
-
-
-

SYNOPSIS

-       # include 
-
-       int erase(void);
-       int werase(WINDOW *win);
-       int clear(void);
-       int wclear(WINDOW *win);
-       int clrtobot(void);
-       int wclrtobot(WINDOW *win);
-       int clrtoeol(void);
-       int wclrtoeol(WINDOW *win);
-
-
-
-

DESCRIPTION

-       The erase and werase routines copy blanks to  every  posi-
-       tion in the window, clearing the screen.
-
-       The  clear  and wclear routines are like erase and werase,
-       but they also call clearok, so that the screen is  cleared
-       completely  on  the  next call to wrefresh for that window
-       and repainted from scratch.
-
-       The clrtobot and wclrtobot routines erase from the  cursor
-       to the end of screen.  That is, they erase all lines below
-       the cursor in the window.  Also, the current line  to  the
-       right of the cursor, inclusive, is erased.
-
-       The clrtoeol and wclrtoeol routines erase the current line
-       to the right of the cursor, inclusive, to the end  of  the
-       current line.
-
-       Blanks created by erasure have the current background ren-
-       dition (as set by wbkgdset) merged into them.
-
-
-
-

RETURN VALUE

-       All routines return the integer  OK.   The  SVr4.0  manual
-       says  "or  a  non-negative integer if immedok is set", but
-       this appears to be an error.
-
-
-
-

NOTES

-       Note that erase, werase, clear, wclear, clrtobot, and clr-
-       toeol may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  The standard specifies that they return  ERR  on
-       failure, but specifies no error conditions.
-
-       Some  historic  curses  implementations had, as an undocu-
-       mented feature,  the  ability  to  do  the  equivalent  of
-
-
-
-

SEE ALSO

-       curses(3X), curs_outopts(3X), curs_refresh(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_color.3x.html b/Ada95/html/man/curs_color.3x.html deleted file mode 100644 index a360965e..00000000 --- a/Ada95/html/man/curs_color.3x.html +++ /dev/null @@ -1,226 +0,0 @@ - - -
-       start_color,     init_pair,     init_color,    has_colors,
-       can_change_color,  color_content,  pair_content  -  curses
-       color manipulation routines
-
-
-
-

SYNOPSIS

-       # include 
-       int start_color(void);
-       int init_pair(short pair, short f, short b);
-       int init_color(short color, short r, short g, short b);
-       bool has_colors(void);
-       bool can_change_color(void);
-       int  color_content(short  color, short *r, short *g, short
-       *b);
-       int pair_content(short pair, short *f, short *b);
-
-
-
-

DESCRIPTION

-   Overview
-       curses support color attributes  on  terminals  with  that
-       capability.   To  use  these  routines start_color must be
-       called, usually right after initscr.   Colors  are  always
-       used  in pairs (referred to as color-pairs).  A color-pair
-       consists of a foreground  color  (for  characters)  and  a
-       background color (for the blank field on which the charac-
-       ters are displayed).  A programmer  initializes  a  color-
-       pair  with  the routine init_pair.  After it has been ini-
-       tialized, COLOR_PAIR(n), a macro  defined  in  ,
-       can be used as a new video attribute.
-
-       If  a  terminal  is capable of redefining colors, the pro-
-       grammer can use the routine init_color to change the defi-
-       nition   of   a   color.    The  routines  has_colors  and
-       can_change_color  return  TRUE  or  FALSE,  depending   on
-       whether  the  terminal  has color capabilities and whether
-       the  programmer  can  change  the  colors.   The   routine
-       color_content  allows  a programmer to extract the amounts
-       of red, green,  and  blue  components  in  an  initialized
-       color.   The  routine  pair_content allows a programmer to
-       find out how a given color-pair is currently defined.
-
-   Routine Descriptions
-       The start_color routine requires no arguments.  It must be
-       called  if  the programmer wants to use colors, and before
-       any other color manipulation routine  is  called.   It  is
-       good  practice  to  call this routine right after initscr.
-       start_color initializes eight basic  colors  (black,  red,
-       green,  yellow,  blue,  magenta, cyan, and white), and two
-       global variables,  COLORS  and  COLOR_PAIRS  (respectively
-       defining  the maximum number of colors and color-pairs the
-       terminal can support).  It also restores the colors on the
-       terminal to the values they had when the terminal was just
-       turned on.
-
-       pair to be changed, the foreground color number,  and  the
-       background  color number.  The value of the first argument
-       must be between 1 and COLOR_PAIRS-1.   The  value  of  the
-       second  and  third  arguments must be between 0 and COLORS
-       (the 0 color pair is wired to white on black and cannot be
-       changed).   If  the color-pair was previously initialized,
-       the screen is refreshed and all occurrences of that color-
-       pair is changed to the new definition.
-
-       The  init_color routine changes the definition of a color.
-       It takes four arguments: the number of  the  color  to  be
-       changed  followed  by three RGB values (for the amounts of
-       red, green, and blue components).  The value of the  first
-       argument  must  be between 0 and COLORS.  (See the section
-       Colors for the default color index.)   Each  of  the  last
-       three  arguments must be a value between 0 and 1000.  When
-       init_color is used, all occurrences of that color  on  the
-       screen immediately change to the new definition.
-
-       The  has_colors routine requires no arguments.  It returns
-       TRUE if the terminal can manipulate colors; otherwise,  it
-       returns FALSE.  This routine facilitates writing terminal-
-       independent programs.  For example, a programmer  can  use
-       it  to  decide  whether  to  use color or some other video
-       attribute.
-
-       The can_change_color routine requires  no  arguments.   It
-       returns  TRUE  if  the  terminal  supports  colors and can
-       change their definitions; other, it returns  FALSE.   This
-       routine facilitates writing terminal-independent programs.
-
-       The color_content routine gives programmers a way to  find
-       the intensity of the red, green, and blue (RGB) components
-       in a color.  It requires four arguments: the color number,
-       and  three addresses of shorts for storing the information
-       about the amounts of red, green, and  blue  components  in
-       the  given color.  The value of the first argument must be
-       between 0 and COLORS.  The values that are stored  at  the
-       addresses  pointed  to  by  the  last  three arguments are
-       between 0 (no component) and 1000 (maximum amount of  com-
-       ponent).
-
-       The  pair_content  routine  allows programmers to find out
-       what colors a given color-pair consists of.   It  requires
-       three  arguments: the color-pair number, and two addresses
-       of shorts for storing the foreground  and  the  background
-       color  numbers.   The  value of the first argument must be
-       between 1 and COLOR_PAIRS-1.  The values that  are  stored
-       at  the addresses pointed to by the second and third argu-
-       ments are between 0 and COLORS.
-
-   Colors
-       is the default background color for all terminals.
-
-             COLOR_BLACK
-             COLOR_RED
-             COLOR_GREEN
-             COLOR_YELLOW
-             COLOR_BLUE
-             COLOR_MAGENTA
-             COLOR_CYAN
-             COLOR_WHITE
-
-
-
-

RETURN VALUE

-       The routines can_change_color()  and  has_colors()  return
-       TRUE or FALSE.
-
-       All other routines return the integer ERR upon failure and
-       an OK (SVr4 specifies only "an integer  value  other  than
-       ERR") upon successful completion.
-
-
-
-

NOTES

-       In  the  ncurses implementation, there is a separate color
-       activation flag, color palette,  color  pairs  table,  and
-       associated  COLORS and COLOR_PAIRS counts for each screen;
-       the start_color function only affects the current  screen.
-       The SVr4/XSI interface is not really designed with this in
-       mind, and historical  implementations  may  use  a  single
-       shared color palette.
-
-       Note that setting an implicit background color via a color
-       pair affects only character cells that a  character  write
-       operation  explicitly  touches.   To change the background
-       color used when parts of a window are blanked  by  erasing
-       or scrolling operations, see curs_bkgd(3X).
-
-       Several  caveats  apply  on 386 and 486 machines with VGA-
-       compatible graphics:
-
-       COLOR_YELLOW  is  actually  brown.   To  get  yellow,  use
-       COLOR_YELLOW combined with the A_BOLD attribute.
-
-       The  A_BLINK  attribute  should  in theory cause the back-
-       ground to go bright.  This often fails to work,  and  even
-       some cards for which it mostly works (such as the Paradise
-       and compatibles) do the wrong thing when you try to set  a
-       bright  "yellow"  background  (you  get  a blinking yellow
-       foreground instead).
-
-       Color RGB values are not settable.
-
-
-
-

PORTABILITY

-       This implementation satisfies XSI Curses's  minimum  maxi-
-       mums for COLORS and COLOR_PAIRS.
-       ground   and   background    color    to    support    the
-       use_default_colors extension, but only if that routine has
-       been first invoked.
-
-
-
-

SEE ALSO

-       curses(3X), curs_initscr(3X), curs_attr(3X), dft_fgbg(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_delch.3x.html b/Ada95/html/man/curs_delch.3x.html deleted file mode 100644 index 38b9946c..00000000 --- a/Ada95/html/man/curs_delch.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       delch,  wdelch, mvdelch, mvwdelch - delete character under
-       the cursor in a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int delch(void);
-       int wdelch(WINDOW *win);
-       int mvdelch(int y, int x);
-       int mvwdelch(WINDOW *win, int y, int x);
-
-
-
-

DESCRIPTION

-       These routines delete the character under the cursor;  all
-       characters to the right of the cursor on the same line are
-       moved to the left one position and the last  character  on
-       the line is filled with a blank.  The cursor position does
-       not change (after moving to y, x,  if  specified).   (This
-       does  not  imply use of the hardware delete character fea-
-       ture.)
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon failure and an OK
-       (SVr4  specifies  only  "an integer value other than ERR")
-       upon successful completion.
-
-
-
-

NOTES

-       Note that delch, mvdelch, and mvwdelch may be macros.
-
-
-
-

PORTABILITY

-       These functions are described in the XSI Curses  standard,
-       Issue  4.   The standard specifies that they return ERR on
-       failure, but specifies no error conditions.
-
-
-
-

SEE ALSO

-       curses(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_deleteln.3x.html b/Ada95/html/man/curs_deleteln.3x.html deleted file mode 100644 index f177ee27..00000000 --- a/Ada95/html/man/curs_deleteln.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       deleteln,  wdeleteln,  insdelln, winsdelln, insertln, win-
-       sertln - delete and insert lines in a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int deleteln(void);
-       int wdeleteln(WINDOW *win);
-       int insdelln(int n);
-       int winsdelln(WINDOW *win, int n);
-       int insertln(void);
-       int winsertln(WINDOW *win);
-
-
-
-

DESCRIPTION

-       The deleteln and wdeleteln routines delete the line  under
-       the cursor in the window; all lines below the current line
-       are moved up one line.  The bottom line of the  window  is
-       cleared.  The cursor position does not change.
-
-       The  insdelln  and  winsdelln  routines,  for  positive n,
-       insert n lines into the specified window above the current
-       line.   The  n  bottom  lines  are  lost.  For negative n,
-       delete n lines (starting with the one under  the  cursor),
-       and  move  the remaining lines up.  The bottom n lines are
-       cleared.  The current cursor position remains the same.
-
-       The insertln and insertln routines, insert  a  blank  line
-       above the current line and the bottom line is lost.
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon failure and an OK
-       (SVr4 specifies only "an integer value  other  than  ERR")
-       upon successful completion.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  The standard specifies that they return  ERR  on
-       failure, but specifies no error conditions.
-
-
-
-

NOTES

-       Note that all but winsdelln may be macros.
-
-       These  routines  do  not require a hardware line delete or
-       insert feature in the terminal.  In fact, they  won't  use
-       hardware  line  delete/insert  unless idlok(..., TRUE) has
-       been set on the current window.
-
-
-
-

SEE ALSO

-       curses(3X)
-
-
-
-
- - diff --git a/Ada95/html/man/curs_getch.3x.html b/Ada95/html/man/curs_getch.3x.html deleted file mode 100644 index 376dd599..00000000 --- a/Ada95/html/man/curs_getch.3x.html +++ /dev/null @@ -1,226 +0,0 @@ - - -
-       getch,  wgetch,  mvgetch, mvwgetch, ungetch - get (or push
-       back) characters from curses terminal keyboard
-
-
-
-

SYNOPSIS

-       #include 
-
-       int getch(void);
-       int wgetch(WINDOW *win);
-       int mvgetch(int y, int x);
-       int mvwgetch(WINDOW *win, int y, int x);
-       int ungetch(int ch);
-       int has_key(int ch);
-
-
-
-

DESCRIPTION

-       The getch, wgetch, mvgetch and mvwgetch, routines  read  a
-       character  from the window.  In no-delay mode, if no input
-       is waiting, the value ERR is returned.  In delay mode, the
-       program  waits until the system passes text through to the
-       program.  Depending on the  setting  of  cbreak,  this  is
-       after one character (cbreak mode), or after the first new-
-       line (nocbreak mode).  In  half-delay  mode,  the  program
-       waits  until a character is typed or the specified timeout
-       has been reached.
-
-       If noecho has been set, then the character  will  also  be
-       echoed into the designated window according to the follow-
-       ing rules: If the character is the current  erase  charac-
-       ter,  left  arrow,  or  backspace, the cursor is moved one
-       space to the left and that screen position is erased as if
-       delch  had  been  called.   If  the character value is any
-       other KEY_ define, the user is alerted with a  beep  call.
-       Otherwise the character is simply output to the screen.
-
-       If the window is not a pad, and it has been moved or modi-
-       fied since the last call to  wrefresh,  wrefresh  will  be
-       called before another character is read.
-
-       If  keypad  is  TRUE,  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
-        as macros with  values  outside  the  range  of
-       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.
-
-       When a character that could be the beginning of a function
-       key is received (which,  on  modern  terminals,  means  an
-       escape  character), curses sets a timer.  If the remainder
-       of the sequence does not come  in  within  the  designated
-       time,  the  character  is  passed  through; otherwise, the
-       function key value is returned.   For  this  reason,  many
-       terminals  experience  a  delay  between  the  time a user
-
-       The ungetch routine places ch back onto the input queue to
-       be returned by the next call to wgetch.  Note  that  there
-       is, in effect, just one input queue for all windows.
-
-
-   Function Keys
-       The  following function keys, defined in , might
-       be returned by getch if keypad  has  been  enabled.   Note
-       that  not  all  of  these are necessarily supported on any
-       particular terminal.
-
-       center tab(/) ; l l l l .  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/T{  Function  keys;
-       space  for 64 keys is reserved.  T} KEY_F(n)/T{ For 0 <= n
-       <=   63   T}   KEY_DL/Delete   line   KEY_IL/Insert   line
-       KEY_DC/Delete character KEY_IC/Insert char or enter insert
-       mode KEY_EIC/Exit insert char mode KEY_CLEAR/Clear  screen
-       KEY_EOS/Clear  to  end  of  screen KEY_EOL/Clear to end of
-       line KEY_SF/Scroll 1 line  forward  KEY_SR/Scroll  1  line
-       backward  (reverse) KEY_NPAGE/Next page KEY_PPAGE/Previous
-       page KEY_STAB/Set tab KEY_CTAB/Clear  tab  KEY_CATAB/Clear
-       all tabs KEY_ENTER/Enter or send KEY_SRESET/Soft (partial)
-       reset KEY_RESET/Reset or  hard  reset  KEY_PRINT/Print  or
-       copy    KEY_LL/Home   down   or   bottom   (lower   left).
-       KEY_A1/Upper left of keypad KEY_A3/Upper right  of  keypad
-       KEY_B2/Center   of  keypad  KEY_C1/Lower  left  of  keypad
-       KEY_C3/Lower  right  of  keypad  KEY_BTAB/Back   tab   key
-       KEY_BEG/Beg(inning)      key     KEY_CANCEL/Cancel     key
-       KEY_CLOSE/Close   key   KEY_COMMAND/Cmd   (command)    key
-       KEY_COPY/Copy  key  KEY_CREATE/Create  key KEY_END/End key
-       KEY_EXIT/Exit  key  KEY_FIND/Find  key  KEY_HELP/Help  key
-       KEY_MARK/Mark  key KEY_MESSAGE/Message key KEY_MOUSE/Mouse
-       event read  KEY_MOVE/Move  key  KEY_NEXT/Next  object  key
-       KEY_OPEN/Open   key   KEY_OPTIONS/Options  key  KEY_PREVI-
-       OUS/Previous  object  key  KEY_REDO/Redo  key   KEY_REFER-
-       ENCE/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_SCAN-
-       CEL/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 mes-
-       sage key KEY_SMOVE/Shifted move key KEY_SNEXT/Shifted next
-       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  sus-
-       pend  key  KEY_SUNDO/Shifted  undo key KEY_SUSPEND/Suspend
-       key KEY_UNDO/Undo key
-
-       Keypad is arranged like this:
-
-       center allbox tab(/) ; c c  c  .   A1/up/A3  left/B2/right
-       C1/down/C3
-
-       The has_key routine takes a key value from the above list,
-       and returns TRUE or FALSE according as the current  termi-
-       nal type recognizes a key with that value.
-
-
-
-
-

RETURN VALUE

-       All  routines  return  the integer ERR upon failure and an
-       integer value other than ERR (OK in the case of ungetch())
-       upon successful completion.
-
-
-
-

NOTES

-       Use of the escape key by a programmer for a single charac-
-       ter function is discouraged, as it will cause a  delay  of
-       up to one second while the keypad code looks for a follow-
-       ing function-key sequence.
-
-       When using getch, wgetch, mvgetch, or  mvwgetch,  nocbreak
-       mode (nocbreak) and echo mode (echo) 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.
-
-       Note that getch, mvgetch, and mvwgetch may be macros.
-
-       Historically, the set of keypad macros was largely defined
-       by  the  extremely  function-key-rich keyboard of the AT&T
-       7300, aka 3B1, aka Safari 4.   Modern  personal  computers
-       usually  have  only a small subset of these.  IBM PC-style
-       consoles  typically  support  little  more  than   KEY_UP,
-       KEY_DOWN,    KEY_LEFT,   KEY_RIGHT,   KEY_HOME,   KEY_END,
-       KEY_NPAGE, KEY_PPAGE, and function keys 1 through 12.  The
-       Ins key is usually mapped to KEY_IC.
-
-
-
-

PORTABILITY

-       The  *get* functions are described in the XSI Curses stan-
-       dard, Issue 4.  They  read  single-byte  characters  only.
-       The  standard  specifies  that they return ERR on failure,
-       but specifies no error conditions.
-
-       The echo behavior of these functions on input of  KEY_  or
-       backspace  characters  was not specified in the SVr4 docu-
-
-       The  behavior of getch and friends in the presence of han-
-       dled 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
-       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.
-
-       Programmers concerned about portability should be prepared
-       for  either  of  two  cases:  (a)  signal receipt does not
-       interrupt getch; (b) signal receipt interrupts  getch  and
-       causes  it  to  return ERR with errno set to EINTR.  Under
-       the ncurses implementation, handled signals  never  inter-
-       rupt getch.
-
-       The  has_key  function is unique to ncurses.  We recommend
-       that  any  code  using  it  be  conditionalized   on   the
-       NCURSES_VERSION feature macro.
-
-
-
-

SEE ALSO

-       curses(3X),        curs_inopts(3X),        curs_mouse(3X),
-       curs_move(3X), curs_refresh(3X).  resizeterm(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_getstr.3x.html b/Ada95/html/man/curs_getstr.3x.html deleted file mode 100644 index 384545e0..00000000 --- a/Ada95/html/man/curs_getstr.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       getstr,  wgetstr,  mvgetstr,  mvwgetstr, wgetnstr - accept
-       character strings from curses terminal keyboard
-
-
-
-

SYNOPSIS

-       #include 
-
-       int getstr(char *str);
-       int getnstr(char *str, int n);
-       int wgetstr(WINDOW *win, char *str);
-       int mvgetstr(int y, int x, char *str);
-       int mvwgetstr(WINDOW *win, int y, int x, char *str);
-       int mvgetnstr(int y, int x, char *str, int n);
-       int mvwgetnstr(WINDOW *, int y, int x, char *str, int n);
-       int wgetnstr(WINDOW *win, char *str, int n);
-
-
-
-

DESCRIPTION

-       The function getstr is equivalent to a series of calls  to
-       getch, until a newline or carriage return is received (the
-       terminating character is  not  included  in  the  returned
-       string).   The  resulting  value  is  placed  in  the area
-       pointed to by the character pointer str.
-
-       wgetnstr reads at most n  characters,  thus  preventing  a
-       possible  overflow  of  the  input buffer.  Any attempt to
-       enter more characters (other than the terminating  newline
-       or  carriage  return)  causes  a beep.  Function keys also
-       cause a beep and are ignored.  The getnstr function  reads
-       from the stdscr default window.
-
-       The  user's erase and kill characters are interpreted.  If
-       keypad  mode  is  on  for   the   window,   KEY_LEFT   and
-       KEY_BACKSPACE are both considered equivalent to the user's
-       kill character.
-
-       Characters input are echoed only if echo is currently  on.
-       In  that case, backspace is echoed as deletion of the pre-
-       vious character (typically a left motion).
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon failure and an OK
-       (SVr4  specifies  only  "an integer value other than ERR")
-       upon successful completion.
-
-
-
-

NOTES

-       Note that getstr, mvgetstr, and mvwgetstr may be macros.
-
-
-
-

PORTABILITY

-       These functions are described in the XSI Curses  standard,
-       Issue  4.   They  read  single-byte  characters only.  The
-       standard specifies that they return ERR  on  failure,  but
-       the  single  error  condition  EOVERFLOW  associated  with
-       extended-level conformance is not yet  returned  (the  XSI
-
-       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
-       lied.  In fact, the  `character'  value  appended  to  the
-       string  by  those  implementations was predictable but not
-       useful (being, in fact, the low-order eight  bits  of  the
-       key's KEY_ value).
-
-       The functions getnstr, mvgetnstr, and mvwgetnstr were pre-
-       sent but not documented in SVr4.
-
-
-
-

SEE ALSO

-       curses(3X), curs_getch(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_getyx.3x.html b/Ada95/html/man/curs_getyx.3x.html deleted file mode 100644 index 1c1b5e77..00000000 --- a/Ada95/html/man/curs_getyx.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       getyx,  getparyx,  getbegyx,  getmaxyx - get curses cursor
-       and window coordinates
-
-
-
-

SYNOPSIS

-       #include 
-
-       void getyx(WINDOW *win, int y, int x);
-       void getparyx(WINDOW *win, int y, int x);
-       void getbegyx(WINDOW *win, int y, int x);
-       void getmaxyx(WINDOW *win, int y, int x);
-
-
-
-

DESCRIPTION

-       The getyx macro places the current cursor position of  the
-       given window in the two integer variables y and x.
-
-       If  win  is  a  subwindow,  the  getparyx macro places the
-       beginning coordinates of the  subwindow  relative  to  the
-       parent  window into two integer variables y and x.  Other-
-       wise, -1 is placed into y and x.
-
-       Like getyx, the getbegyx and  getmaxyx  macros  store  the
-       current  beginning  coordinates  and size of the specified
-       window.
-
-
-
-

RETURN VALUE

-       The return values of these  macros  are  undefined  (i.e.,
-       they  should not be used as the right-hand side of assign-
-       ment statements).
-
-
-
-

NOTES

-       All of these interfaces are macros and  that  "&"  is  not
-       necessary before the variables y and x.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.
-
-
-
-

SEE ALSO

-       curses(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_inch.3x.html b/Ada95/html/man/curs_inch.3x.html deleted file mode 100644 index a6310540..00000000 --- a/Ada95/html/man/curs_inch.3x.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
-       inch,  winch,  mvinch,  mvwinch  -  get  a  character  and
-       attributes from a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       chtype inch(void);
-       chtype winch(WINDOW *win);
-       chtype mvinch(int y, int x);
-       chtype mvwinch(WINDOW *win, int y, int x);
-
-
-
-

DESCRIPTION

-       These routines return the character, of  type  chtype,  at
-       the   current  position  in  the  named  window.   If  any
-       attributes are set for that  position,  their  values  are
-       OR'ed  into  the  value  returned.   Constants  defined in
-        can be used with the & (logical  AND)  operator
-       to extract the character or attributes alone.
-
-
-   Attributes
-       The  following  bit-masks  may  be  AND-ed with characters
-       returned by winch.
-
-       l  l  .   A_CHARTEXT     Bit-mask  to  extract   character
-       A_ATTRIBUTES   Bit-mask      to     extract     attributes
-       A_COLOR   Bit-mask to extract color-pair field information
-
-
-
-

NOTES

-       Note that all of these routines may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.
-
-
-
-

SEE ALSO

-       curses(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_inchstr.3x.html b/Ada95/html/man/curs_inchstr.3x.html deleted file mode 100644 index 9a14c855..00000000 --- a/Ada95/html/man/curs_inchstr.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       inchstr,   inchnstr,   winchstr,   winchnstr,   mvinchstr,
-       mvinchnstr, mvwinchstr, mvwinchnstr  -  get  a  string  of
-       characters (and attributes) from a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int inchstr(chtype *chstr);
-       int inchnstr(chtype *chstr, int n);
-       int winchstr(WINDOW *win, chtype *chstr);
-       int winchnstr(WINDOW *win, chtype *chstr, int n);
-       int mvinchstr(int y, int x, chtype *chstr);
-       int mvinchnstr(int y, int x, chtype *chstr, int n);
-       int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
-       int  mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr,
-       int n);
-
-
-
-

DESCRIPTION

-       These routines return a NULL-terminated  array  of  chtype
-       quantities, starting at the current cursor position in the
-       named window and ending at the right margin of the window.
-       The  four  functions with n as the last argument, return a
-       leading substring at most n characters long (exclusive  of
-       the  trailing (chtype)0).  Constants defined in 
-       can be used with the & (logical AND) operator  to  extract
-       the  character or the attribute alone from any position in
-       the chstr [see curs_inch(3X)].
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon  failure  and  an
-       integer  value  other  than ERR upon successful completion
-       (the number of  characters  retrieved,  exclusive  of  the
-       trailing 0).
-
-
-
-

NOTES

-       Note  that  all  routines  except winchnstr may be macros.
-       SVr4 does not document whether the result string is 0-ter-
-       minated; it does not document whether a length limit argu-
-       ment includes any trailing 0; and it does not document the
-       meaning of the return value.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  It is no more specific than the SVr4  documenta-
-       tion on the trailing 0.  It does specify that the success-
-       ful return of the functions is OK.
-
-
-
-

SEE ALSO

-       curses(3X), curs_inch(3X).
-
-
-
-
- - diff --git a/Ada95/html/man/curs_initscr.3x.html b/Ada95/html/man/curs_initscr.3x.html deleted file mode 100644 index 38e367ba..00000000 --- a/Ada95/html/man/curs_initscr.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       initscr,  newterm, endwin, isendwin, set_term, delscreen -
-       curses screen initialization and manipulation routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       WINDOW *initscr(void);
-       int endwin(void);
-       int isendwin(void);
-       SCREEN  *newterm(const  char  *type,  FILE  *outfd,   FILE
-       *infd);
-       SCREEN *set_term(SCREEN *new);
-       void delscreen(SCREEN* sp);
-
-
-
-

DESCRIPTION

-       initscr  is normally the first curses routine to call when
-       initializing a program.  A few special routines  sometimes
-       need  to  be called before it; these are slk_init, filter,
-       ripoffline, use_env.  For multiple-terminal  applications,
-       newterm may be called before initscr.
-
-       The initscr code determines the terminal type and initial-
-       izes all curses data structures.  initscr also causes  the
-       first  call  to  refresh  to  clear the screen.  If errors
-       occur, initscr writes  an  appropriate  error  message  to
-       standard error and exits; otherwise, a pointer is returned
-       to stdscr.
-
-       A program that outputs to more than  one  terminal  should
-       use  the  newterm  routine  for  each  terminal instead of
-       initscr.  A program that needs to inspect capabilities, so
-       it can continue to run in a line-oriented mode if the ter-
-       minal cannot support a screen-oriented program, would also
-       use  newterm.   The  routine newterm should be called once
-       for each terminal.  It returns a variable of type SCREEN *
-       which  should  be  saved  as a reference to that terminal.
-       The arguments are the type of the terminal to be  used  in
-       place of $TERM, a file pointer for output to the terminal,
-       and another file pointer for input from the  terminal  (if
-       type  is NULL, $TERM will be used).  The program must also
-       call endwin for each terminal being  used  before  exiting
-       from  curses.  If newterm is called more than once for the
-       same terminal, the first terminal referred to must be  the
-       last one for which endwin is called.
-
-       A  program  should  always  call  endwin before exiting or
-       escaping  from  curses  mode  temporarily.   This  routine
-       restores  tty  modes,  moves the cursor to the lower left-
-       hand corner of the screen and resets the terminal into the
-       proper non-visual mode.  Calling refresh or doupdate after
-       a temporary escape causes the  program  to  resume  visual
-       mode.
-       called without any subsequent calls to wrefresh, and FALSE
-       otherwise.
-
-       The  set_term  routine is used to switch between different
-       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.
-
-       The delscreen routine frees storage  associated  with  the
-       SCREEN  data  structure.   The  endwin routine does not do
-       this, so delscreen should be called after endwin if a par-
-       ticular SCREEN is no longer needed.
-
-
-
-

RETURN VALUE

-       endwin  returns  the  integer ERR upon failure and OK upon
-       successful completion.
-
-       Routines that return pointers always return NULL on error.
-
-
-
-

NOTES

-       Note that initscr and newterm may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  It specifies that portable applications must not
-       call initscr more than once.
-
-
-
-

SEE ALSO

-       curses(3X),       curs_kernel(3X),       curs_refresh(3X),
-       curs_slk(3X), curs_util(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_inopts.3x.html b/Ada95/html/man/curs_inopts.3x.html deleted file mode 100644 index 4f82389b..00000000 --- a/Ada95/html/man/curs_inopts.3x.html +++ /dev/null @@ -1,226 +0,0 @@ - - -
-       cbreak, nocbreak, echo, noecho, halfdelay, intrflush, key-
-       pad, meta,  nodelay,  notimeout,  raw,  noraw,  noqiflush,
-       qiflush,  timeout,  wtimeout,  typeahead  -  curses  input
-       options
-
-
-
-

SYNOPSIS

-       #include 
-
-       int cbreak(void);
-       int nocbreak(void);
-       int echo(void);
-       int noecho(void);
-       int halfdelay(int tenths);
-       int intrflush(WINDOW *win, bool bf);
-       int keypad(WINDOW *win, bool bf);
-       int meta(WINDOW *win, bool bf);
-       int nodelay(WINDOW *win, bool bf);
-       int raw(void);
-       int noraw(void);
-       void noqiflush(void);
-       void qiflush(void);
-       int notimeout(WINDOW *win, bool bf);
-       void timeout(int delay);
-       void wtimeout(WINDOW *win, int delay);
-       int typeahead(int fd);
-
-
-
-

DESCRIPTION

-       Normally, the tty driver buffers typed characters until  a
-       newline  or  carriage return is typed.  The cbreak routine
-       disables line buffering and erase/kill  character-process-
-       ing  (interrupt  and  flow  control  characters  are unaf-
-       fected), making characters typed by the  user  immediately
-       available  to  the  program.  The nocbreak routine returns
-       the terminal to normal (cooked) mode.
-
-       Initially the terminal may or may not be in  cbreak  mode,
-       as the mode is inherited; therefore, a program should call
-       cbreak or nocbreak explicitly.  Most interactive  programs
-       using  curses set the cbreak mode.  Note that cbreak over-
-       rides raw.  [See curs_getch(3X) for a  discussion  of  how
-       these routines interact with echo and noecho.]
-
-       The  echo  and  noecho routines control whether characters
-       typed by the user are echoed by getch as they  are  typed.
-       Echoing  by  the  tty  driver is always disabled, but ini-
-       tially getch is in echo  mode,  so  characters  typed  are
-       echoed.  Authors of most interactive programs prefer to do
-       their own echoing in a controlled area of the  screen,  or
-       not  to  echo  at  all, so they disable echoing by calling
-       noecho.  [See curs_getch(3X) for a discussion of how these
-       routines interact with cbreak and nocbreak.]
-
-       user  are  immediately available to the program.  However,
-       after blocking  for  tenths  tenths  of  seconds,  ERR  is
-       returned  if  nothing has been typed.  The value of tenths
-       must be a number between 1 and 255.  Use nocbreak to leave
-       half-delay mode.
-
-       If  the intrflush option is enabled, (bf is TRUE), when an
-       interrupt key  is  pressed  on  the  keyboard  (interrupt,
-       break,  quit)  all  output in the tty driver queue will be
-       flushed, giving the  effect  of  faster  response  to  the
-       interrupt,  but  causing  curses to have the wrong idea of
-       what is on the  screen.   Disabling  (bf  is  FALSE),  the
-       option  prevents the flush.  The default for the option is
-       inherited from the tty driver settings.  The window  argu-
-       ment is ignored.
-
-       The  keypad option enables the keypad of the user's termi-
-       nal.  If enabled (bf is TRUE), the user can press a  func-
-       tion  key (such as an arrow key) and wgetch returns a sin-
-       gle value representing the function key, as  in  KEY_LEFT.
-       If  disabled (bf is FALSE), curses does not treat function
-       keys specially and the program has to interpret the escape
-       sequences  itself.   If  the keypad in the terminal can be
-       turned on  (made  to  transmit)  and  off  (made  to  work
-       locally),  turning on this option causes the terminal key-
-       pad to be turned on when wgetch is  called.   The  default
-       value for keypad is false.
-
-       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 meta(win, TRUE); this is equivalent,  under  POSIX,
-       to  setting the CS8 flag on the terminal.  To force 7 bits
-       to be returned, invoke meta(win, FALSE); this  is  equiva-
-       lent,  under  POSIX, to setting the CS8 flag on the termi-
-       nal.  The window argument, win, is always ignored.  If the
-       terminfo capabilities smm (meta_on) and rmm (meta_off) are
-       defined for the terminal, smm is sent to the terminal when
-       meta(win,  TRUE)  is called and rmm is sent when meta(win,
-       FALSE) is called.
-
-       The nodelay option causes getch to be a non-blocking call.
-       If  no input is ready, getch returns ERR.  If disabled (bf
-       is FALSE), getch waits until a key is pressed.
-
-       While interpreting an input escape sequence, wgetch sets a
-       timer  while  waiting  for the next character.  If notime-
-       out(win, TRUE) is called,  then  wgetch  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.
-
-       characters  typed  are  immediately  passed through to the
-       user program.  The differences are that in raw  mode,  the
-       interrupt,  quit, suspend, and flow control characters are
-       all passed through uninterpreted, instead of generating  a
-       signal.   The  behavior  of the BREAK key depends on other
-       bits in the tty driver that are not set by curses.
-
-       When the noqiflush routine is used, normal flush of  input
-       and  output queues associated with the INTR, QUIT and SUSP
-       characters will not be done [see termio(7)].  When qiflush
-       is  called,  the queues will be flushed when these control
-       characters are read.  You may want to call noqiflush()  in
-       a  signal handler if you want output to continue as though
-       the interrupt had not occurred, after the handler exits.
-
-       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
-       input).   If delay is zero, then non-blocking read is used
-       (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
-       additional capability of being  able  to  block  for  only
-       delay milliseconds (where delay is positive).
-
-       The  curses 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 refresh or  doupdate
-       is  called again.  This allows faster response to commands
-       typed in advance.  Normally, the input FILE pointer passed
-       to  newterm,  or  stdin in the case that initscr was used,
-       will be used to do this typeahead checking.  The typeahead
-       routine  specifies  that  the  file descriptor fd is to be
-       used to check for typeahead instead.  If fd is -1, then no
-       typeahead checking is done.
-
-
-
-

RETURN VALUE

-       All  routines that return an integer return ERR upon fail-
-       ure and OK (SVr4 specifies only "an  integer  value  other
-       than  ERR")  upon  successful completion, unless otherwise
-       noted in the preceding routine descriptions.
-
-
-
-

PORTABILITY

-       These functions are described in the XSI Curses  standard,
-       Issue 4.
-
-       The  ncurses  library obeys the XPG4 standard and the his-
-       torical 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;
-       ity,  set echo or noecho explicitly just after initializa-
-       tion, even if your program remains in cooked mode.
-
-
-
-

NOTES

-       Note that echo, noecho, halfdelay, intrflush, meta,  node-
-       lay,  notimeout, noqiflush, qiflush, timeout, and wtimeout
-       may be macros.
-
-       The noraw and nocbreak calls follow historical practice in
-       that  they  attempt  to  restore to normal (`cooked') mode
-       from raw and cbreak modes respectively.  Mixing  raw/noraw
-       and  cbreak/nocbreak  calls  leads  to  tty driver control
-       states that are hard to predict or understand; it  is  not
-       recommended.
-
-
-
-

SEE ALSO

-       curses(3X), curs_getch(3X), curs_initscr(3X), termio(7)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_insch.3x.html b/Ada95/html/man/curs_insch.3x.html deleted file mode 100644 index 1281ca92..00000000 --- a/Ada95/html/man/curs_insch.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       insch,  winsch,  mvinsch,  mvwinsch  -  insert a character
-       before cursor in a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int insch(chtype ch);
-       int winsch(WINDOW *win, chtype ch);
-       int mvinsch(int y, int x, chtype ch);
-       int mvwinsch(WINDOW *win, int y, int x, chtype ch);
-
-
-
-

DESCRIPTION

-       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.
-       The insertion operation does not change the  cursor  posi-
-       tion.
-
-
-
-

RETURN VALUE

-       All  routines that return an integer return ERR upon fail-
-       ure and OK (SVr4 specifies only "an  integer  value  other
-       than  ERR")  upon  successful completion, unless otherwise
-       noted in the preceding routine descriptions.
-
-
-
-

NOTES

-       These routines do not necessarily imply use of a  hardware
-       insert character feature.
-
-       Note that insch, mvinsch, and mvwinsch may be macros.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.
-
-
-
-

SEE ALSO

-       curses(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_insstr.3x.html b/Ada95/html/man/curs_insstr.3x.html deleted file mode 100644 index b33902a0..00000000 --- a/Ada95/html/man/curs_insstr.3x.html +++ /dev/null @@ -1,120 +0,0 @@ - - -
-       insstr,  insnstr,  winsstr, winsnstr, mvinsstr, mvinsnstr,
-       mvwinsstr, mvwinsnstr - insert string before cursor  in  a
-       curses window
-
-
-
-

SYNOPSIS

-       #include 
-       int insstr(const char *str);
-       int insnstr(const char *str, int n);
-       int winsstr(WINDOW *win, const char *str);
-       int winsnstr(WINDOW *win, const char *str, int n);
-       int mvinsstr(int y, int x, const char *str);
-       int mvinsnstr(int y, int x, const char *str, int n);
-       int mvwinsstr(WINDOW *win, int y, int x, const char *str);
-       int mvwinsnstr(WINDOW *win, int y, int x, const char *str,
-       int n);
-
-
-
-

DESCRIPTION

-       These  routines insert a character string (as many charac-
-       ters as will fit on the line) before the  character  under
-       the cursor.  All characters to the right of the cursor are
-       shifted right, with the possibility of the rightmost char-
-       acters  on  the line being lost.  The cursor position does
-       not change (after moving to y, x, if specified). The  four
-       routines with n as the last argument insert a leading sub-
-       string of at most n characters.  If n<=0, then the  entire
-       string is inserted.
-
-       If  a  character in str is a tab, newline, carriage return
-       or backspace, the cursor is moved appropriately within the
-       window.   A  newline  also  does a clrtoeol before moving.
-       Tabs are considered to be at every eighth  column.   If  a
-       character in str is another control character, it is drawn
-       in the ^X notation.  Calling winch after adding a  control
-       character (and moving to it, if necessary) does not return
-       the control character, but instead returns a character  in
-       the ^-representation of the control character.
-
-
-
-

RETURN VALUE

-       All  routines that return an integer return ERR upon fail-
-       ure and OK (SVr4 specifies only "an  integer  value  other
-       than  ERR")  upon  successful completion, unless otherwise
-       noted in the preceding routine descriptions.
-
-
-
-

NOTES

-       Note that all but winsnstr may be macros.
-
-
-
-

PORTABILITY

-       These functions are described in the XSI Curses  standard,
-       Issue  4,  which  adds  const qualifiers to the arguments.
-       The XSI Curses error  conditions  EILSEQ  and  EILOVERFLOW
-       associated  with  extended-level  conformance  are not yet
-       detected (this implementation does not  yet  support  XPG4
-       curses(3X), curs_clear(3X), curs_inch(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_instr.3x.html b/Ada95/html/man/curs_instr.3x.html deleted file mode 100644 index 863bc616..00000000 --- a/Ada95/html/man/curs_instr.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       instr,  innstr, winstr, winnstr, mvinstr, mvinnstr, mvwin-
-       str, mvwinnstr - get a string of characters from a  curses
-       window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int instr(char *str);
-       int innstr(char *str, int n);
-       int winstr(WINDOW *win, char *str);
-       int winnstr(WINDOW *win, char *str, int n);
-       int mvinstr(int y, int x, char *str);
-       int mvinnstr(int y, int x, char *str, int n);
-       int mvwinstr(WINDOW *win, int y, int x, char *str);
-       int  mvwinnstr(WINDOW  *win,  int y, int x, char *str, int
-       n);
-
-
-
-

DESCRIPTION

-       These routines return  a  string  of  characters  in  str,
-       extracted  starting  at the current cursor position in the
-       named window.  Attributes are stripped  from  the  charac-
-       ters.   The  four  functions  with  n as the last argument
-       return a leading  substring  at  most  n  characters  long
-       (exclusive of the trailing NUL).
-
-
-
-

RETURN VALUE

-       All  of the functions return ERR upon failure, or the num-
-       ber of characters actually read into the string.
-
-
-
-

NOTES

-       Note that all routines except winnstr may be macros.
-
-
-
-

PORTABILITY

-       The XSI Curses error  conditions  EILSEQ  and  EILOVERFLOW
-       associated  with  extended-level  conformance  are not yet
-       detected (this implementation does not  yet  support  XPG4
-       multi-byte  characters).  SVr4 does not document whether a
-       length limit includes or excludes the trailing NUL.
-
-       The ncurses library extends the XSI description by  allow-
-       ing  a  negative value for n.  In this case, the functions
-       return the string ending at the right margin.
-
-
-
-

SEE ALSO

-       curses(3X).
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_kernel.3x.html b/Ada95/html/man/curs_kernel.3x.html deleted file mode 100644 index 9e88ccaa..00000000 --- a/Ada95/html/man/curs_kernel.3x.html +++ /dev/null @@ -1,172 +0,0 @@ - - -
-       def_prog_mode,       def_shell_mode,      reset_prog_mode,
-       reset_shell_mode, resetty, savetty, getsyx, setsyx, ripof-
-       fline, curs_set, napms - low-level curses routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       int def_prog_mode(void);
-       int def_shell_mode(void);
-       int reset_prog_mode(void);
-       int reset_shell_mode(void);
-       int resetty(void);
-       int savetty(void);
-       void getsyx(int y, int x);
-       void setsyx(int y, int x);
-       int ripoffline(int line, int (*init)(WINDOW *, int));
-       int curs_set(int visibility);
-       int napms(int ms);
-
-
-
-

DESCRIPTION

-       The  following  routines  give low-level access to various
-       curses capabilities.  Theses routines typically  are  used
-       inside library routines.
-
-       The  def_prog_mode  and  def_shell_mode  routines save the
-       current terminal modes as the  "program"  (in  curses)  or
-       "shell"   (not   in   curses)   state   for   use  by  the
-       reset_prog_mode and reset_shell_mode  routines.   This  is
-       done  automatically  by  initscr.   There is one such save
-       area for each screen context allocated by newterm().
-
-       The reset_prog_mode and reset_shell_mode routines  restore
-       the  terminal  to "program" (in curses) or "shell" (out of
-       curses) state.  These are  done  automatically  by  endwin
-       and,  after  an  endwin, by doupdate, so they normally are
-       not called.
-
-       The resetty and savetty  routines  save  and  restore  the
-       state  of  the  terminal modes.  savetty saves the current
-       state in a buffer and resetty restores the state  to  what
-       it was at the last call to savetty.
-
-       The  getsyx routine returns the current coordinates of the
-       virtual screen cursor in y and x.  If leaveok is currently
-       TRUE,  then -1,-1 is returned.  If lines have been removed
-       from the top of the screen,  using  ripoffline,  y  and  x
-       include  these  lines;  therefore,  y and x should be used
-       only as arguments for setsyx.
-
-       The setsyx routine sets the virtual screen cursor to y, x.
-       If y and x are both -1, then leaveok is set.  The two rou-
-       tines getsyx and setsyx are  designed  to  be  used  by  a
-       cursor.   The  library  routine  would  call getsyx at the
-       beginning, do its manipulation of its own  windows,  do  a
-       wnoutrefresh  on  its  windows, call setsyx, and then call
-       doupdate.
-
-       The ripoffline routine provides access to the same  facil-
-       ity  that  slk_init  [see curs_slk(3X)] uses to reduce the
-       size of the screen.   ripoffline  must  be  called  before
-       initscr or newterm is called.  If line is positive, a line
-       is removed from the top of stdscr; if line is negative,  a
-       line is removed from the bottom.  When this is done inside
-       initscr, the routine init (supplied by the user) is called
-       with  two arguments: a window pointer to the one-line win-
-       dow that has been allocated and an integer with the number
-       of columns in the window.  Inside this initialization rou-
-       tine, the integer variables LINES  and  COLS  (defined  in
-       ) are not guaranteed to be accurate and wrefresh
-       or doupdate must not be called.  It is allowable  to  call
-       wnoutrefresh during the initialization routine.
-
-       ripoffline  can  be called up to five times before calling
-       initscr or newterm.
-
-       The curs_set routine sets  the  cursor  state  is  set  to
-       invisible, normal, or very visible for visibility equal to
-       0, 1, or 2 respectively.  If  the  terminal  supports  the
-       visibility   requested,   the  previous  cursor  state  is
-       returned; otherwise, ERR is returned.
-
-       The napms routine is used to sleep for ms milliseconds.
-
-
-
-

RETURN VALUE

-       Except for curs_set,  these  routines  always  return  OK.
-       curs_set  returns the previous cursor state, or ERR if the
-       requested visibility is not supported.
-
-
-
-

NOTES

-       Note that getsyx is a macro, so & is not necessary  before
-       the variables y and x.
-
-       Older  SVr4  man  pages  warn  that  the  return  value of
-       curs_set "is currently  incorrect".   This  implementation
-       gets  it  right, but it may be unwise to count on the cor-
-       rectness of the return value anywhere else.
-
-
-
-

PORTABILITY

-       The functions setsyx and getsyx are not described  in  the
-       XSI  Curses standard, Issue 4.  All other functions are as
-       described in XSI Curses.
-
-       The SVr4 documentation describes setsyx and getsyx as hav-
-       ing  return  type  int.  This  is  misleading, as they are
-       curses(3X),       curs_initscr(3X),      curs_outopts(3X),
-       curs_refresh(3X), curs_scr_dump(3X), curs_slk(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_mouse.3x.html b/Ada95/html/man/curs_mouse.3x.html deleted file mode 100644 index 57b93a5a..00000000 --- a/Ada95/html/man/curs_mouse.3x.html +++ /dev/null @@ -1,224 +0,0 @@ - - -
-       getmouse,  ungetmouse,  mousemask, wenclose, wmouse_trafo,
-       mouseinterval - mouse interface through curses
-
-
-
-

SYNOPSIS

-       #include 
-
-       typedef unsigned long mmask_t;
-
-       typedef struct
-       {
-           short id;         /* ID to distinguish multiple devices */
-           int x, y, z;      /* event coordinates */
-           mmask_t bstate;   /* button state bits */
-       }
-       MEVENT;
-       int getmouse(MEVENT *event);
-       int ungetmouse(MEVENT *event);
-       mmask_t mousemask(mmask_t newmask, mmask_t *oldmask);
-       bool wenclose(WINDOW *win, int y, int x);
-       bool wmouse_trafo(const WINDOW* win,  int*  pY,  int*  pX,
-       bool to_screen);
-       int mouseinterval(int erval);
-
-
-
-

DESCRIPTION

-       These  functions provide an interface to mouse events from
-       ncurses(3X).  Mouse events are  represented  by  KEY_MOUSE
-       pseudo-key values in the wgetch input stream.
-
-       To  make mouse events visible, use the mousemask function.
-       This will  set  the  mouse  events  to  be  reported.   By
-       default,  no mouse events are reported.  The function will
-       return a mask to indicate which  of  the  specified  mouse
-       events  can be reported; on complete failure it returns 0.
-       If oldmask is non-NULL, this function fills the  indicated
-       location  with  the  previous  value of the given window's
-       mouse event mask.
-
-       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.
-
-       Here are the mouse event type masks:
-
-       l l _ _ l l.   Name Description  BUTTON1_PRESSED     mouse
-       button   1  down  BUTTON1_RELEASED    mouse  button  1  up
-       BUTTON1_CLICKED     mouse      button      1       clicked
-       BUTTON1_DOUBLE_CLICKED   mouse  button  1  double  clicked
-       BUTTON1_TRIPLE_CLICKED   mouse  button  1  triple  clicked
-       BUTTON2_PRESSED     mouse        button       2       down
-       BUTTON2_RELEASED    mouse        button        2        up
-       BUTTON2_CLICKED     mouse       button      2      clicked
-       BUTTON2_DOUBLE_CLICKED   mouse  button  2  double  clicked
-       BUTTON3_RELEASED    mouse        button        3        up
-       BUTTON3_CLICKED     mouse      button      3       clicked
-       BUTTON3_DOUBLE_CLICKED   mouse  button  3  double  clicked
-       BUTTON3_TRIPLE_CLICKED   mouse  button  3  triple  clicked
-       BUTTON4_PRESSED     mouse        button       4       down
-       BUTTON4_RELEASED    mouse        button        4        up
-       BUTTON4_CLICKED     mouse       button      4      clicked
-       BUTTON4_DOUBLE_CLICKED   mouse  button  4  double  clicked
-       BUTTON4_TRIPLE_CLICKED   mouse  button  4  triple  clicked
-       BUTTON_SHIFT   shift was down during button  state  change
-       BUTTON_CTRL    control was down during button state change
-       BUTTON_ALT     alt was down  during  button  state  change
-       ALL_MOUSE_EVENTS    report   all   button   state  changes
-       REPORT_MOUSE_POSITION    report mouse movement
-
-       Once a class of mouse events have been made visible  in  a
-       window,  calling  the  wgetch  function on that window may
-       return KEY_MOUSE as an indicator that a  mouse  event  has
-       been queued.  To read the event data and pop the event off
-       the queue, call getmouse.  This function will return OK if
-       a mouse event is actually visible in the given window, ERR
-       otherwise.  When getmouse returns OK, the  data  deposited
-       as  y  and  x  in  the event structure coordinates will be
-       screen-relative character-cell coordinates.  The  returned
-       state  mask  will have exactly one bit set to indicate the
-       event type.
-
-       The ungetmouse function behaves  analogously  to  ungetch.
-       It  pushes  a  KEY_MOUSE  event  onto the input queue, and
-       associates with  that  event  the  given  state  data  and
-       screen-relative character-cell coordinates.
-
-       The  wenclose  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 other-
-       wise.  It is useful for determining  what  subset  of  the
-       screen windows enclose the location of a mouse event.
-
-       The wmouse_trafo function transforms a given pair of coor-
-       dinates from stdscr-relative coordinates  to  screen-rela-
-       tive  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 to_screen is TRUE, the pointers pY, pX  must
-       reference  the coordinates of a location inside the window
-       win. They are converted to screen-relative coordinates and
-       returned  through the pointers. If the conversion was suc-
-       cessful, the function returns TRUE. If one of the  parame-
-       ters  was  NULL  or the location is not inside the window,
-       FALSE is returned. If to_screen is FALSE, the pointers pY,
-       encloses  this  point.  In  this case the function returns
-       TRUE. If one of the parameters is NULL or the point is not
-       inside  the window, FALSE is returned. Please notice, that
-       the referenced coordinates are only replaced by  the  con-
-       verted coordinates if the transformation was successful.
-
-       The mouseinterval function sets the maximum time (in thou-
-       sands of a second)  that  can  elapse  between  press  and
-       release  events  in  order  for them to be recognized as a
-       click.  This function returns the previous interval value.
-       The default is one fifth of a second.
-
-       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 get-
-       str that expects a linefeed for input-loop termination.
-
-
-
-
-

RETURN VALUE

-       getmouse, ungetmouse and mouseinterval return the  integer
-       ERR  upon failure or OK upon successful completion. mouse-
-       mask returns the mask of reportable events.  wenclose  and
-       wmouse_trafo are boolean functions returning TRUE or FALSE
-       depending on their test result.
-
-
-
-

PORTABILITY

-       These calls were designed for  ncurses(3X),  and  are  not
-       found in SVr4 curses, 4.4BSD curses, or any other previous
-       version of curses.
-
-       The feature macro NCURSES_MOUSE_VERSION is provided so the
-       preprocessor  can  be  used to test whether these features
-       are present (its value is 1).   NOTE:  THIS  INTERFACE  IS
-       EXPERIMENTAL  AND IS SUBJECT TO CHANGE WITHOUT NOTICE!  If
-       the interface is changed, the value of  NCURSES_MOUSE_VER-
-       SION will be incremented.
-
-       The  order  of the MEVENT structure members is not guaran-
-       teed.  Additional fields may be added to the structure  in
-       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 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).
-
-       The z member in the event structure is not presently used.
-       It  is  intended  for use with touch screens (which may be
-       pressure-sensitive)   or   with   3D-mice/trackballs/power
-       gloves.
-       Mouse  events under xterm will not in fact be ignored dur-
-       ing cooked mode, if they have been enabled by  wmousemask.
-       Instead,  the  xterm  mouse report sequence will appear in
-       the string read.
-
-       Mouse events under xterm will not be detected correctly in
-       a window with its keypad bit off.
-
-
-
-

SEE ALSO

-       curses(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_move.3x.html b/Ada95/html/man/curs_move.3x.html deleted file mode 100644 index 0fdf84b2..00000000 --- a/Ada95/html/man/curs_move.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       move, wmove - move curses window cursor
-
-
-
-

SYNOPSIS

-       #include 
-
-       int move(int y, int x);
-       int wmove(WINDOW *win, int y, int x);
-
-
-
-

DESCRIPTION

-       These  routines move the cursor associated with the window
-       to line y and column x.  This routine does  not  move  the
-       physical  cursor  of the terminal until refresh is called.
-       The position specified is relative to the upper  left-hand
-       corner of the window, which is (0,0).
-
-
-
-

RETURN VALUE

-       These routines return ERR upon failure and OK (SVr4 speci-
-       fies only "an integer value other than ERR") upon success-
-       ful completion.
-
-
-
-

NOTES

-       Note that move may be a macro.
-
-
-
-

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  The standard specifies that if (y,x) is within a
-       multi-column  character,  the cursor is moved to the first
-       column of that  character;  however,  this  implementation
-       does  not  yet  support  the extended-level XSI multi-byte
-       characters.
-
-
-
-

SEE ALSO

-       curses(3X), curs_refresh(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_outopts.3x.html b/Ada95/html/man/curs_outopts.3x.html deleted file mode 100644 index 72401f5d..00000000 --- a/Ada95/html/man/curs_outopts.3x.html +++ /dev/null @@ -1,172 +0,0 @@ - - -
-       clearok,   idlok,   idcok   immedok,  leaveok,  setscrreg,
-       wsetscrreg, scrollok, nl, nonl - curses output options
-
-
-
-

SYNOPSIS

-       #include 
-
-       int clearok(WINDOW *win, bool bf);
-       int idlok(WINDOW *win, bool bf);
-       void idcok(WINDOW *win, bool bf);
-       void immedok(WINDOW *win, bool bf);
-       int leaveok(WINDOW *win, bool bf);
-       int setscrreg(int top, int bot);
-       int wsetscrreg(WINDOW *win, int top, int bot);
-       int scrollok(WINDOW *win, bool bf);
-       int nl(void);
-       int nonl(void);
-
-
-
-

DESCRIPTION

-       These routines set options that change the style of output
-       within  curses.   All  options are initially FALSE, unless
-       otherwise stated.  It  is  not  necessary  to  turn  these
-       options off before calling endwin.
-
-       If  clearok is called with TRUE as argument, the next call
-       to wrefresh with this window will clear  the  screen  com-
-       pletely  and  redraw the entire screen from scratch.  This
-       is useful when the contents of the screen  are  uncertain,
-       or  in  some  cases for a more pleasing visual effect.  If
-       the win argument to clearok is the global variable curscr,
-       the  next  call  to  wrefresh  with  any window causes the
-       screen to be cleared and repainted from scratch.
-
-       If idlok is called with TRUE as  second  argument,  curses
-       considers using the hardware insert/delete line feature of
-       terminals so equipped.  Calling idlok with FALSE as second
-       argument  disables  use  of  line  insertion and deletion.
-       This option should be  enabled  only  if  the  application
-       needs  insert/delete  line, for example, for a screen edi-
-       tor.  It is disabled by default because insert/delete line
-       tends  to  be  visually annoying when used in applications
-       where it isn't really needed.  If insert/delete line  can-
-       not  be  used,  curses redraws the changed portions of all
-       lines.
-
-       If idcok is called with FALSE as second  argument,  curses
-       no longer considers using the hardware insert/delete char-
-       acter feature of terminals so equipped.  Use of  character
-       insert/delete  is  enabled by default.  Calling idcok with
-       TRUE as second argument re-enables use of character inser-
-       tion and deletion.
-
-       If  immedok is called with TRUE as argument, any change in
-       fresh.  However, it may degrade performance  considerably,
-       due  to  repeated  calls  to  wrefresh.  It is disabled by
-       default.
-
-       Normally, the hardware cursor is left at the  location  of
-       the  window  cursor  being  refreshed.  The leaveok option
-       allows the cursor to be left wherever the  update  happens
-       to leave it.  It is useful for applications where the cur-
-       sor is not used, since it  reduces  the  need  for  cursor
-       motions.   If  possible, the cursor is made invisible when
-       this option is enabled.
-
-       The setscrreg and wsetscrreg routines allow  the  applica-
-       tion  programmer  to  set a software scrolling region in a
-       window.  top and bot are the line numbers of the  top  and
-       bottom margin of the scrolling region.  (Line 0 is the top
-       line of the window.)  If  this  option  and  scrollok  are
-       enabled,  an  attempt  to  move off the bottom margin line
-       causes all lines in the scrolling  region  to  scroll  one
-       line in the direction of the first line.  Only the text of
-       the window is scrolled.  (Note that this has nothing to do
-       with  the use of a physical scrolling region capability in
-       the terminal, like that in the VT100.  If idlok is enabled
-       and   the  terminal  has  either  a  scrolling  region  or
-       insert/delete line capability, they will probably be  used
-       by the output routines.)
-
-       The  scrollok option controls what happens when the cursor
-       of a window is  moved  off  the  edge  of  the  window  or
-       scrolling  region,  either as a result of a newline action
-       on the bottom line, or typing the last  character  of  the
-       last line.  If disabled, (bf is FALSE), the cursor is left
-       on the bottom line.  If enabled, (bf is TRUE), the  window
-       is  scrolled  up  one  line (Note that in order to get the
-       physical scrolling effect on the terminal, it is also nec-
-       essary to call idlok).
-
-       The  nl  and  nonl routines control whether the underlying
-       display device translates the return key into  newline  on
-       input,  and  whether it translates newline into return and
-       line-feed on output (in either case, the call  addch('\n')
-       does the equivalent of return and line feed on the virtual
-       screen).  Initially, these translations do occur.  If  you
-       disable  them using nonl, curses will be able to make bet-
-       ter use of the line-feed capability, resulting  in  faster
-       cursor  motion.   Also, curses will then be able to detect
-       the return key.
-
-
-
-

RETURN VALUE

-       The functions setscrreg and wsetscrreg return OK upon suc-
-       cess  and ERR upon failure. All other routines that return
-       an integer always return OK.
-       These functions are described in the XSI Curses  standard,
-       Issue 4.
-
-       The  XSI  Curses  standard is ambiguous on the question of
-       whether raw() should disable the  CRLF  translations  con-
-       trolled by nl() and nonl().  BSD curses did turn off these
-       translations; AT&T curses (at least as late as  SVr1)  did
-       not.   We choose to do so, on the theory that a programmer
-       requesting raw input wants a clean (ideally  8-bit  clean)
-       connection that the operating system does not mess with.
-
-       Some  historic  curses  implementations had, as an undocu-
-       mented feature,  the  ability  to  do  the  equivalent  of
-       clearok(...,  1)  by saying touchwin(stdscr) or clear(std-
-       scr).  This will not work under ncurses.
-
-       Earlier System V  curses  implementations  specified  that
-       with  scrollok enabled, any window modification triggering
-       a scroll also forced a physical refresh.  XSI Curses  does
-       not  require this, and ncurses avoids doing it in order to
-       perform better vertical-motion  optimization  at  wrefresh
-       time.
-
-       The  XSI  Curses standard does not mention that the cursor
-       should be made invisible  as  a  side-effect  of  leaveok.
-       SVr4  curses  documentation  does  this, but the code does
-       not.
-
-
-
-

NOTES

-       Note that clearok, leaveok, scrollok, idcok, nl, nonl  and
-       setscrreg may be macros.
-
-       The immedok routine is useful for windows that are used as
-       terminal emulators.
-
-
-
-

SEE ALSO

-       curses(3X),        curs_addch(3X),         curs_clear(3X),
-       curs_initscr(3X), curs_scroll(3X), curs_refresh(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_overlay.3x.html b/Ada95/html/man/curs_overlay.3x.html deleted file mode 100644 index e9c155e1..00000000 --- a/Ada95/html/man/curs_overlay.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       overlay, overwrite, copywin - overlay and manipulate over-
-       lapped curses windows
-
-
-
-

SYNOPSIS

-       #include 
-
-       int overlay(const WINDOW *srcwin, WINDOW *dstwin);
-       int overwrite(const WINDOW *srcwin, WINDOW *dstwin);
-       int copywin(WINDOW *srcwin, WINDOW *dstwin, int sminrow,
-             int smincol, int dminrow, int dmincol, int dmaxrow,
-             int dmaxcol, int overlay);
-
-
-
-

DESCRIPTION

-       The overlay and overwrite routines overlay srcwin  on  top
-       of  dstwin.   scrwin and dstwin are not required to be the
-       same size; only text where  the  two  windows  overlap  is
-       copied.  The difference is that overlay is non-destructive
-       (blanks are not copied) whereas overwrite is  destructive.
-
-       The  copywin  routine provides a finer granularity of con-
-       trol over the overlay and overwrite routines.  Like in the
-       prefresh routine, a rectangle is specified in the destina-
-       tion window, (dminrow, dmincol)  and  (dmaxrow,  dmaxcol),
-       and  the  upper-left-corner coordinates of the source win-
-       dow, (sminrow, smincol).  If the argument overlay is true,
-       then copying is non-destructive, as in overlay.
-
-
-
-

RETURN VALUE

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

NOTES

-       Note that overlay and overwrite may be macros.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue 4 describes these functions
-       (adding the const qualifiers).  It further specifies their
-       behavior  in  the  presence  of characters with multi-byte
-       renditions (not yet supported in this implementation).
-
-
-
-

SEE ALSO

-       curses(3X), curs_pad(3X), curs_refresh(3X)
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_pad.3x.html b/Ada95/html/man/curs_pad.3x.html deleted file mode 100644 index d8eccd6b..00000000 --- a/Ada95/html/man/curs_pad.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       newpad, subpad, prefresh, pnoutrefresh, pechochar - create
-       and display curses pads
-
-
-
-

SYNOPSIS

-       #include 
-
-       WINDOW *newpad(int nlines, int ncols);
-       WINDOW *subpad(WINDOW *orig, int nlines, int ncols,
-             int begin_y, int begin_x);
-       int prefresh(WINDOW *pad, int pminrow, int pmincol,
-             int sminrow, int smincol, int smaxrow, int smaxcol);
-       int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol,
-             int sminrow, int smincol, int smaxrow, int smaxcol);
-       int pechochar(WINDOW *pad, chtype ch);
-
-
-
-

DESCRIPTION

-       The newpad routine creates and returns a pointer to a  new
-       pad data structure with the given number of lines, nlines,
-       and columns, ncols.  A pad is like a window,  except  that
-       it is not restricted by the screen size, and is not neces-
-       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-
-       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
-       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.
-
-       The subpad routine creates and returns a pointer to a sub-
-       window within a  pad  with  the  given  number  of  lines,
-       nlines,  and  columns,  ncols.   Unlike subwin, which uses
-       screen coordinates, the window is  at  position  (begin_x,
-       begin_y)  on the pad.  The window is made in the middle of
-       the window orig, so that changes made to one window affect
-       both  windows.   During  the  use of this routine, it will
-       often be necessary to call touchwin or touchline  on  orig
-       before calling prefresh.
-
-       The  prefresh  and  pnoutrefresh routines are analogous to
-       wrefresh and wnoutrefresh 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.
-       pminrow  and pmincol specify the upper left-hand corner of
-       the rectangle to be displayed in the pad.  sminrow,  smin-
-       col, smaxrow, and smaxcol specify the edges of the rectan-
-       gle to be displayed on the screen.  The  lower  right-hand
-       corner of the rectangle to be displayed in the pad is cal-
-       culated from the screen coordinates, since the  rectangles
-       must  be  the same size.  Both rectangles must be entirely
-       treated as if they were zero.
-
-       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
-       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
-       instead  of  their equivalents.  In the case of pechochar,
-       the last location of the pad on the screen is  reused  for
-       the arguments to prefresh.
-
-
-
-

RETURN VALUE

-       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
-       set errno to ENOMEM.
-
-
-
-

NOTES

-       Note that pechochar may be a macro.
-
-
-
-

PORTABILITY

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

SEE ALSO

-       curses(3X),        curs_refresh(3X),       curs_touch(3X),
-       curs_addch(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_printw.3x.html b/Ada95/html/man/curs_printw.3x.html deleted file mode 100644 index a50bad36..00000000 --- a/Ada95/html/man/curs_printw.3x.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
-       printw,  wprintw,  mvprintw,  mvwprintw,  vwprintw - print
-       formatted output in curses windows
-
-
-
-

SYNOPSIS

-       #include 
-
-       int printw(char *fmt [, arg] ...);
-       int wprintw(WINDOW *win, char *fmt [, arg] ...);
-       int mvprintw(int y, int x, char *fmt [, arg] ...);
-       int mvwprintw(WINDOW *win, int y, int x,
-             char *fmt [, arg] ...);
-
-       #include 
-       int vwprintw(WINDOW *win, char *fmt, varglist);
-
-
-
-

DESCRIPTION

-       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   routine  is  analogous  to  vprintf  [see
-       printf(3S)] and performs a wprintw using a variable  argu-
-       ment  list.  The third argument is a va_list, a pointer to
-       a list of arguments, as defined in .
-
-
-
-

RETURN VALUE

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

SEE ALSO

-       curses(3X), printf(3S), vprintf(3S)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_refresh.3x.html b/Ada95/html/man/curs_refresh.3x.html deleted file mode 100644 index 51a6a3b2..00000000 --- a/Ada95/html/man/curs_refresh.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       refresh, wrefresh, wnoutrefresh, doupdate, redrawwin, wre-
-       drawln - refresh curses windows and lines
-
-
-
-

SYNOPSIS

-       #include 
-
-       int refresh(void);
-       int wrefresh(WINDOW *win);
-       int wnoutrefresh(WINDOW *win);
-       int doupdate(void);
-       int redrawwin(WINDOW *win);
-       int wredrawln(WINDOW *win, int beg_line, int num_lines);
-
-
-
-

DESCRIPTION

-       The refresh and wrefresh  routines  (or  wnoutrefresh  and
-       doupdate)  must be called to get actual output to the ter-
-       minal, as other routines  merely  manipulate  data  struc-
-       tures.   The  routine  wrefresh copies the named window to
-       the physical terminal screen, taking into account what  is
-       already  there  in order to do optimizations.  The refresh
-       routine is the same, using stdscr as the  default  window.
-       Unless  leaveok  has  been enabled, the physical cursor of
-       the terminal is left at the location  of  the  cursor  for
-       that window.
-
-       The  wnoutrefresh  and  doupdate  routines  allow multiple
-       updates with more  efficiency  than  wrefresh  alone.   In
-       addition  to  all  the window structures, curses keeps two
-       data structures representing the terminal screen: a physi-
-       cal screen, describing what is actually on the screen, and
-       a virtual screen, describing what the programmer wants  to
-       have on the screen.
-
-       The  routine wrefresh works by first calling wnoutrefresh,
-       which copies the named window to the virtual  screen,  and
-       then  calling  doupdate, which compares the virtual screen
-       to the physical screen and does the actual update.  If the
-       programmer  wishes  to  output  several windows at once, a
-       series of calls to wrefresh results in  alternating  calls
-       to  wnoutrefresh  and  doupdate, causing several bursts of
-       output to the screen.  By first calling  wnoutrefresh  for
-       each  window,  it  is then possible to call doupdate once,
-       resulting in only one burst of output,  with  fewer  total
-       characters transmitted and less CPU time used.  If the win
-       argument to wrefresh is the global  variable  curscr,  the
-       screen  is immediately cleared and repainted from scratch.
-
-       The phrase "copies the named window to the virtual screen"
-       above  is  ambiguous.   What  actually happens is that all
-       touched (changed) lines in the window are  copied  to  the
-       virtual  screen.   This affects programs that use overlap-
-       ping windows; it means that if two  windows  overlap,  you
-       see  the  section on PORTABILITY below for a warning about
-       exploiting this behavior.)
-
-       The wredrawln routine indicates to curses that some screen
-       lines  are corrupted and should be thrown away before any-
-       thing is written over  them.   It  touches  the  indicated
-       lines  (marking  them  changed).   The routine redrawwin()
-       touches the entire window.
-
-
-
-

RETURN VALUE

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

NOTES

-       Note that refresh and redrawwin may be macros.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue  4  describes  these  func-
-       tions.
-
-       Whether  wnoutrefresh()  copies  to the virtual screen the
-       entire contents of a window or just its  changed  portions
-       has never been well-documented in historic curses versions
-       (including SVr4).  It might be unwise to  rely  on  either
-       behavior  in  programs  that  might have to be linked with
-       other curses implementations.   Instead,  you  can  do  an
-       explicit  touchwin()  before  the  wnoutrefresh()  call to
-       guarantee an entire-contents copy anywhere.
-
-
-
-

SEE ALSO

-       curses(3X), curs_outopts(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_scanw.3x.html b/Ada95/html/man/curs_scanw.3x.html deleted file mode 100644 index 521d3c29..00000000 --- a/Ada95/html/man/curs_scanw.3x.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
-       scanw,  wscanw,  mvscanw, mvwscanw, vwscanw - convert for-
-       matted input from a curses widow
-
-
-
-

SYNOPSIS

-       #include 
-
-       int scanw(char *fmt [, arg] ...);
-       int wscanw(WINDOW *win, char *fmt [, arg] ...);
-       int mvscanw(int y, int x, char *fmt [, arg] ...);
-       int mvwscanw(WINDOW *win, int y, int x,
-             char *fmt [, arg] ...);
-       int vwscanw(WINDOW *win, char *fmt, va_list varglist);
-
-
-
-

DESCRIPTION

-       The scanw, wscanw and mvscanw routines  are  analogous  to
-       scanf [see scanf(3S)].  The effect of these routines is as
-       though wgetstr were called on the window, and the  result-
-       ing line used as input for sscanf(3).  Fields which do not
-       map to a variable in the fmt field are lost.
-
-       The vwscanw routine is similar to vwprintw in that it per-
-       forms  a wscanw using a variable argument list.  The third
-       argument is a va_list, a pointer to a list  of  arguments,
-       as defined in .
-
-
-
-

RETURN VALUE

-       vwscanw returns ERR on failure and an integer equal to the
-       number of fields scanned on success.
-
-       Applications may use the  return  value  from  the  scanw,
-       wscanw,  mvscanw  and  mvwscanw  routines to determine the
-       number of fields which were mapped in the call.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue  4  describes  these  func-
-       tions.   The  function  vwscanw is marked TO BE WITHDRAWN,
-       and is to be replaced by a  function  vw_scanw  using  the
-        interface.
-
-
-
-

SEE ALSO

-       curses(3X), curs_getstr(3X), curs_printw(3X), scanf(3S)
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_scr_dmp.3x.html b/Ada95/html/man/curs_scr_dmp.3x.html deleted file mode 100644 index 5c613394..00000000 --- a/Ada95/html/man/curs_scr_dmp.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       scr_dump,  scr_restore, scr_init, scr_set - read (write) a
-       curses screen from (to) a file
-
-
-
-

SYNOPSIS

-       #include 
-
-       int scr_dump(const char *filename);
-       int scr_restore(const char *filename);
-       int scr_init(const char *filename);
-       int scr_set(const char *filename);
-
-
-
-

DESCRIPTION

-       The scr_dump routine dumps the  current  contents  of  the
-       virtual screen to the file filename.
-
-       The  scr_restore  routine  sets  the virtual screen to the
-       contents of filename, which must have been  written  using
-       scr_dump.   The  next call to doupdate restores the screen
-       to the way it looked in the dump file.
-
-       The scr_init routine reads in the contents of filename and
-       uses  them  to initialize the curses data structures about
-       what the terminal currently has on  its  screen.   If  the
-       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
-       filename is what is currently on the screen, and also what
-       the program wants on the screen.  This can be  thought  of
-       as a screen inheritance function.
-
-       To  read (write) a window from (to) a file, use the getwin
-       and putwin routines [see curs_util(3X)].
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon  failure  and  OK
-       upon success.
-
-
-
-

NOTES

-       Note  that  scr_init,  scr_set,  and  scr_restore  may  be
-       macros.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue 4,  describes  these  func-
-       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),
-       curs_util(3X), system(3S)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_scr_dump.3x.html b/Ada95/html/man/curs_scr_dump.3x.html deleted file mode 100644 index 5c613394..00000000 --- a/Ada95/html/man/curs_scr_dump.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       scr_dump,  scr_restore, scr_init, scr_set - read (write) a
-       curses screen from (to) a file
-
-
-
-

SYNOPSIS

-       #include 
-
-       int scr_dump(const char *filename);
-       int scr_restore(const char *filename);
-       int scr_init(const char *filename);
-       int scr_set(const char *filename);
-
-
-
-

DESCRIPTION

-       The scr_dump routine dumps the  current  contents  of  the
-       virtual screen to the file filename.
-
-       The  scr_restore  routine  sets  the virtual screen to the
-       contents of filename, which must have been  written  using
-       scr_dump.   The  next call to doupdate restores the screen
-       to the way it looked in the dump file.
-
-       The scr_init routine reads in the contents of filename and
-       uses  them  to initialize the curses data structures about
-       what the terminal currently has on  its  screen.   If  the
-       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
-       filename is what is currently on the screen, and also what
-       the program wants on the screen.  This can be  thought  of
-       as a screen inheritance function.
-
-       To  read (write) a window from (to) a file, use the getwin
-       and putwin routines [see curs_util(3X)].
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon  failure  and  OK
-       upon success.
-
-
-
-

NOTES

-       Note  that  scr_init,  scr_set,  and  scr_restore  may  be
-       macros.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue 4,  describes  these  func-
-       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),
-       curs_util(3X), system(3S)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_scroll.3x.html b/Ada95/html/man/curs_scroll.3x.html deleted file mode 100644 index c8908a56..00000000 --- a/Ada95/html/man/curs_scroll.3x.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
-       scroll, srcl, wscrl - scroll a curses window
-
-
-
-

SYNOPSIS

-       #include 
-
-       int scroll(WINDOW *win);
-       int scrl(int n);
-       int wscrl(WINDOW *win, int n);
-
-
-
-

DESCRIPTION

-       The  scroll  routine scrolls the window up one line.  This
-       involves moving the lines in the  window  data  structure.
-       As  an optimization, if the scrolling region of the window
-       is the entire screen, the physical screen may be  scrolled
-       at the same time.
-
-       For  positive  n,  the  scrl and wscrl routines scroll the
-       window up n lines (line i+n becomes i);  otherwise  scroll
-       the  window  down n lines.  This involves moving the lines
-       in the window character image structure.  The current cur-
-       sor position is not changed.
-
-       For these functions to work, scrolling must be enabled via
-       scrollok.
-
-
-
-

RETURN VALUE

-       These routines return ERR upon failure, and OK (SVr4  only
-       specifies "an integer value other than ERR") upon success-
-       ful completion.
-
-
-
-

NOTES

-       Note that scrl and scroll may be macros.
-
-       The SVr4 documentation says that the optimization of phys-
-       ically  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, in order to leave open the possibility of
-       smarter  optimization  of  multiple  scroll actions on the
-       next update.
-
-       Neither the SVr4 documentation specifies whether the  cur-
-       rent  attribute  or current color-pair of blanks generated
-       by the scroll function is zeroed.  Under this  implementa-
-       tion it is.
-
-
-
-

PORTABILITY

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

SEE ALSO

-       curses(3X), curs_outopts(3X)
-
- - diff --git a/Ada95/html/man/curs_slk.3x.html b/Ada95/html/man/curs_slk.3x.html deleted file mode 100644 index d76728a9..00000000 --- a/Ada95/html/man/curs_slk.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       slk_init,     slk_set,    slk_refresh,    slk_noutrefresh,
-       slk_label, slk_clear, slk_restore, slk_touch,  slk_attron,
-       slk_attrset,  slk_attroff,  slk_color  - curses soft label
-       routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       int slk_init(int fmt);
-       int slk_set(int labnum, const char *label, int fmt);
-       int slk_refresh(void);
-       int slk_noutrefresh(void);
-       char *slk_label(int labnum);
-       int slk_clear(void);
-       int slk_restore(void);
-       int slk_touch(void);
-       int slk_attron(const chtype attrs);
-       int slk_attrset(const chtype attrs);
-       attr_t slk_attr(void);
-       int slk_attroff(const chtype attrs);
-       int slk_color(short color_pair_number);
-
-
-
-

DESCRIPTION

-       The slk* functions manipulate the set of soft function-key
-       labels  that exist on many terminals.  For those terminals
-       that do not have soft labels, curses takes over the bottom
-       line  of stdscr, reducing the size of stdscr and the vari-
-       able LINES.  curses standardizes on eight labels of up  to
-       eight  characters  each.  In addition to this, the ncurses
-       implementation supports  a  mode  where  it  simulates  12
-       labels  of up to five characters each. This is most common
-       for todays PC like  enduser  devices.   Please  note  that
-       ncurses simulates this mode by taking over up to two lines
-       at the bottom of the screen, it doesn't  try  to  use  any
-       hardware support for this mode.
-
-       The  slk_init  routine  must  be  called before initscr or
-       newterm is called.  If initscr eventually uses a line from
-       stdscr to emulate the soft labels, then fmt determines how
-       the labels are arranged on the screen.  Setting fmt  to  0
-       indicates a 3-2-3 arrangement of the labels, 1 indicates a
-       4-4 arrangement and 2 indicates the PC like 4-4-4 mode. If
-       fmt  is  set to 3, it is again the PC like 4-4-4 mode, but
-       in addition an index line is generated, helping  the  user
-       to identify the key numbers easily.
-
-       The  slk_set routine requires labnum to be a label number,
-       from 1 to 8 (resp. 12); label 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.  fmt  is  either 0, 1, or 2, indicating whether the
-       label is  to be left-justified, centered, or  right-justi-
-       the wrefresh and wnoutrefresh routines.
-
-       The slk_label routine returns the current label for  label
-       number  labnum, with leading and trailing blanks stripped.
-
-       The slk_clear routine clears  the  soft  labels  from  the
-       screen.
-
-       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
-       output the next time a slk_noutrefresh is performed.
-
-       The slk_attron, slk_attrset, slk_attroff and slk_attr rou-
-       tines correspond to attron, attrset, attroff and attr_get.
-       They  have  an effect only if soft labels are simulated on
-       the bottom line of the screen.  The default highlight  for
-       soft keys is A_STANDOUT (as in System V curses, which does
-       not document this fact).
-
-       The slk_color routine corresponds to color_set. It has  an
-       effect  only  if  soft  labels are simulated on the bottom
-       line of the screen.
-
-
-
-
-

RETURN VALUE

-       These routines return ERR upon failure and OK (SVr4 speci-
-       fies only "an integer value other than ERR") upon success-
-       ful completion. slk_attr returns the  attribute  used  for
-       the soft keys.
-
-       slk_label returns NULL on error.
-
-
-
-

NOTES

-       Most applications would use slk_noutrefresh because a wre-
-       fresh is likely to follow soon.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue 4,  describes  these  func-
-       tions.   It  changes  the  argument type of the attribute-
-       manipulation    functions     slk_attron,     slk_attroff,
-       slk_attrset  to  be attr_t, and adds const qualifiers. The
-       format codes 2 and  3  for  slk_init()  and  the  function
-       slk_attr are specific to ncurses.
-
-
-
-

SEE ALSO

-       curses(3X),        curs_attr(3X),        curs_initscr(3X),
-       curs_refresh(3X)
-
-
-
-
- - diff --git a/Ada95/html/man/curs_termattrs.3x.html b/Ada95/html/man/curs_termattrs.3x.html deleted file mode 100644 index fcc417a2..00000000 --- a/Ada95/html/man/curs_termattrs.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       baudrate,  erasechar,  has_ic, has_il, killchar, longname,
-       termattrs, termname - curses environment query routines
-
-
-
-

SYNOPSIS

-       #include 
-
-       int baudrate(void);
-       char erasechar(void);
-       int has_ic(void);
-       int has_il(void);
-       char killchar(void);
-       char *longname(void);
-       attr_t termattrs(void);
-       char *termname(void);
-
-
-
-

DESCRIPTION

-       The baudrate routine returns the output speed of the  ter-
-       minal.   The  number  returned  is in bits per second, for
-       example 9600, and is an integer.
-
-       The erasechar routine returns  the  user's  current  erase
-       character.
-
-       The has_ic routine is true if the terminal has insert- and
-       delete- character capabilities.
-
-       The has_il 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
-       scrollok.
-
-       The killchar routine returns the user's current line  kill
-       character.
-
-       The  longname  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 charac-
-       ters.  It is defined only after the  call  to  initscr  or
-       newterm.   The area is overwritten by each call to newterm
-       and is not restored by set_term, so the  value  should  be
-       saved  between calls to newterm if longname is going to be
-       used with multiple terminals.
-
-       If a given terminal doesn't support a video attribute that
-       an  application  program is trying to use, curses may sub-
-       stitute a different video attribute for it.  The termattrs
-       function returns a logical OR of all video attributes sup-
-       ported by the terminal.  This information is useful when a
-       curses  program needs complete control over the appearance
-       of the screen.
-
-
-
-
-

RETURN VALUE

-       longname and termname return NULL on error.
-
-       Routines that return an integer return  ERR  upon  failure
-       and  OK  (SVr4 only specifies "an integer value other than
-       ERR") upon successful completion.
-
-
-
-

NOTES

-       Note that termattrs may be a macro.
-
-
-
-

PORTABILITY

-       The XSI Curses standard, Issue  4  describes  these  func-
-       tions.  It changes the return type of termattrs to the new
-       type attr_t.
-
-
-
-

SEE ALSO

-       curses(3X), curs_initscr(3X), curs_outopts(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_termcap.3x.html b/Ada95/html/man/curs_termcap.3x.html deleted file mode 100644 index 62830ae9..00000000 --- a/Ada95/html/man/curs_termcap.3x.html +++ /dev/null @@ -1,120 +0,0 @@ - - -
-       tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs - direct
-       curses interface to the terminfo capability database
-
-
-
-

SYNOPSIS

-       #include 
-       #include 
-       int tgetent(const char *bp, char *name);
-       int tgetflag(const char *id);
-       int tgetnum(const char *id);
-       char *tgetstr(const char *id, char **area);
-       char *tgoto(const char *cap, int col, int row);
-       int tputs(const char *str, int affcnt, int (*putc)(int));
-
-
-
-

DESCRIPTION

-       These routines are included as a conversion aid  for  pro-
-       grams  that use the termcap library.  Their parameters are
-       the same and the routines are emulated using the  terminfo
-       database.   Thus, they can only be used to query the capa-
-       bilities of entries for which a terminfo  entry  has  been
-       compiled.
-
-       The  tgetent routine loads the entry for name.  It returns
-       1 on success, 0 if there is no such entry, and -1  if  the
-       terminfo  database  could  not  be  found.   The emulation
-       ignores the buffer pointer bp.
-
-       The tgetflag routine gets the boolean  entry  for  id,  or
-       zero if it is not available.
-
-       The  tgetnum  routine gets the numeric entry for id, or -1
-       if it is not available.
-
-       The tgetstr routine returns the string entry  for  id,  or
-       zero  if  it  is  not  available.  Use tputs to output the
-       returned string.
-
-       The tgoto routine instantiates  the  parameters  into  the
-       given  capability.   The output from this routine is to be
-       passed to tputs.
-
-       The tputs routine is described  on  the  curs_terminfo(3X)
-       manual page.  It can retrieve capabilities by either term-
-       cap or terminfo name.
-
-
-
-
-

RETURN VALUE

-       Except where explicitly noted,  routines  that  return  an
-       integer  return  ERR upon failure and OK (SVr4 only speci-
-       fies "an integer value other than  ERR")  upon  successful
-       completion.
-
-       Routines that return pointers return NULL on error.
-       If you call tgetstr to fetch ca or any other parameterized
-       string, be aware that it  will  be  returned  in  terminfo
-       notation,  not  the older and not-quite-compatible termcap
-       notation.  This won't cause problems if all you do with it
-       is  call tgoto or tparm, which both expand terminfo-style.
-
-       Because terminfo conventions for representing  padding  in
-       string  capabilities  differ  from termcap's, tputs("50");
-       will put out a literal "50" rather than  busy-waiting  for
-       50 milliseconds.  Cope with it.
-
-
-
-

PORTABILITY

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

SEE ALSO

-       curses(3X), terminfo(5), putc(3S).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_terminfo.3x.html b/Ada95/html/man/curs_terminfo.3x.html deleted file mode 100644 index 2f90578c..00000000 --- a/Ada95/html/man/curs_terminfo.3x.html +++ /dev/null @@ -1,226 +0,0 @@ - - -
-       setupterm, setterm, set_curterm, del_curterm, restartterm,
-       tparm, tputs, putp, vidputs,  vidattr,  mvcur,  tigetflag,
-       tigetnum,   tigetstr   -  curses  interfaces  to  terminfo
-       database
-
-
-
-

SYNOPSIS

-       #include 
-       #include 
-
-       int setupterm(const char *term, int fildes, int *errret);
-       int setterm(const char *term);
-       TERMINAL *set_curterm(TERMINAL *nterm);
-       int del_curterm(TERMINAL *oterm);
-       int  restartterm(const  char  *term,   int   fildes,   int
-       *errret);
-       char *tparm(const char *str, ...);
-       int tputs(const char *str, int affcnt, int (*putc)(int));
-       int putp(const char *str);
-       int vidputs(chtype attrs, int (*putc)(char));
-       int vidattr(chtype attrs);
-       int mvcur(int oldrow, int oldcol, int newrow, int newcol);
-       int tigetflag(const char *capname);
-       int tigetnum(const char *capname);
-       char *tigetstr(const char *capname);
-
-
-
-

DESCRIPTION

-       These low-level routines must be called by  programs  that
-       have to deal directly with the terminfo database to handle
-       certain terminal capabilities, such as  programming  func-
-       tion  keys.   For all other functionality, curses routines
-       are more suitable and their use is recommended.
-
-       Initially,  setupterm  should  be   called.    Note   that
-       setupterm  is automatically called by initscr and newterm.
-       This  defines  the  set  of  terminal-dependent  variables
-       [listed in terminfo(5)].  The terminfo variables lines and
-       columns  are  initialized  by  setupterm  as  follows:  If
-       use_env(FALSE)  has  been  called,  values  for  lines and
-       columns specified in terminfo are used.  Otherwise, if the
-       environment  variables LINES and COLUMNS exist, their val-
-       ues are used.  If these environment variables do not exist
-       and the program is running in a window, the current window
-       size is used.  Otherwise, if the environment variables  do
-       not  exist,  the values for lines and columns specified in
-       the terminfo database are used.
-
-       The header files curses.h and term.h  should  be  included
-       (in  this order) to get the definitions for these strings,
-       numbers,  and  flags.   Parameterized  strings  should  be
-       passed  through  tparm  to instantiate them.  All terminfo
-       strings [including the output of tparm] should be  printed
-       with  tputs or putp.  Call the reset_shell_mode to restore
-       enter_ca_mode upon startup and should output  exit_ca_mode
-       before  exiting.   Programs  desiring shell escapes should
-       call
-
-       reset_shell_mode and output exit_ca_mode before the  shell
-       is   called  and  should  output  enter_ca_mode  and  call
-       reset_prog_mode after returning from the shell.
-
-       The setupterm routine reads in the terminfo database, ini-
-       tializing the terminfo structures, but does not set up the
-       output virtualization structures used by curses.  The ter-
-       minal  type is the character string term; if term is null,
-       the environment variable TERM is used.  All output  is  to
-       file  descriptor  fildes  which is initialized for output.
-       If errret is not null, then setupterm returns  OK  or  ERR
-       and  stores  a  status  value in the integer pointed to by
-       errret.  A status of 1 in errret is normal, 0  means  that
-       the  terminal  could  not  be found, and -1 means that the
-       terminfo database could not be found.  If errret is  null,
-       setupterm  prints  an  error message upon finding an error
-       and exits.  Thus, the simplest call is:
-
-             setupterm((char *)0, 1, (int *)0);,
-
-       which uses all the defaults and sends the output  to  std-
-       out.
-
-       The  setterm  routine is being replaced by setupterm.  The
-       call:
-
-             setupterm(term, 1, (int *)0)
-
-       provides the same  functionality  as  setterm(term).   The
-       setterm  routine  is  included here for BSD compatibility,
-       and is not recommended for new programs.
-
-       The set_curterm routine  sets  the  variable  cur_term  to
-       nterm, and makes all of the terminfo boolean, numeric, and
-       string variables use the values from  nterm.   It  returns
-       the old value of cur_term.
-
-       The  del_curterm  routine  frees  the  space pointed to by
-       oterm and makes it available for further use.  If oterm is
-       the  same  as  cur_term, references to any of the terminfo
-       boolean, numeric,  and  string  variables  thereafter  may
-       refer  to invalid memory locations until another setupterm
-       has been called.
-
-       The  restartterm  routine  is  similar  to  setupterm  and
-       initscr,  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
-       be different.  Accordingly, it  saves  various  tty  state
-       bits, does a setupterm, and then restores the bits.
-
-       The tparm routine instantiates the string str with parame-
-       ters pi.  A pointer is returned to the result of str  with
-       the parameters applied.
-
-       The  tputs  routine  applies  padding  information  to the
-       string str and outputs it.  The str  must  be  a  terminfo
-       string  variable  or the return value from tparm, tgetstr,
-       or tgoto.  affcnt is the number of lines affected, or 1 if
-       not  applicable.   putc is a putchar-like routine to which
-       the characters are passed, one at a time.
-
-       The putp routine calls tputs(str, 1, putchar).  Note  that
-       the  output  of  putp  always  goes  to stdout, not to the
-       fildes specified in setupterm.
-
-       The vidputs routine displays the string on the terminal in
-       the  video  attribute mode attrs, which is any combination
-       of the attributes listed in  curses(3X).   The  characters
-       are passed to the putchar-like routine putc.
-
-       The  vidattr  routine  is like the vidputs routine, except
-       that it outputs through putchar.
-
-       The mvcur routine provides low-level  cursor  motion.   It
-       takes   effect   immediately  (rather  than  at  the  next
-       refresh).
-
-       The tigetflag, tigetnum and tigetstr routines  return  the
-       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 cancelled or
-       absent from the terminal description.
-
-       The tigetnum routine returns the value -2  if  capname  is
-       not  a  numeric  capability,  or  -1 if it is cancelled or
-       absent from the terminal description.
-
-       The tigetstr routine returns the value (char *)-1 if  cap-
-       name  is  not a string capability, or 0 if it is cancelled
-       or absent from the terminal description.
-
-       The capname for each capability is given in the table col-
-       umn  entitled  capname code in the capabilities section of
-       terminfo(5).
-
-       char *boolnames, *boolcodes, *boolfnames
-
-
-       These null-terminated arrays  contain  the  capnames,  the
-       termcap  codes, and the full C names, for each of the ter-
-       minfo variables.
-
-
-
-

RETURN VALUE

-       Routines that return an integer return  ERR  upon  failure
-       and  OK  (SVr4 only specifies "an integer value other than
-       ERR") upon successful completion, unless  otherwise  noted
-       in the preceding routine descriptions.
-
-       Routines that return pointers always return NULL on error.
-
-
-
-

NOTES

-       The setupterm routine should be used in place of  setterm.
-       It  may be useful when you want to test for terminal capa-
-       bilities without committing to the allocation  of  storage
-       involved in initscr.
-
-       Note that vidattr and vidputs may be macros.
-
-
-
-

PORTABILITY

-       The  function  setterm  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.
-
-       In  System V Release 4, set_curterm has an int return type
-       and returns OK or ERR.  We have chosen  to  implement  the
-       XSI Curses semantics.
-
-       In System V Release 4, the third argument of tputs has the
-       type int (*putc)(char).
-
-       The XSI Curses standard prototypes tparm with a fixed num-
-       ber of parameters, rather than a variable argument list.
-
-
-
-

SEE ALSO

-       curses(3X),  curs_initscr(3X), curs_kernel(3X), curs_term-
-       cap(3X), putc(3S), terminfo(5)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_touch.3x.html b/Ada95/html/man/curs_touch.3x.html deleted file mode 100644 index 1f558bf8..00000000 --- a/Ada95/html/man/curs_touch.3x.html +++ /dev/null @@ -1,120 +0,0 @@ - - -
-       touchwin, touchline, untouchwin, wtouchln, is_linetouched,
-       is_wintouched - curses refresh control routines
-
-
-
-

SYNOPSIS

-       #include 
-       int touchwin(WINDOW *win);
-       int touchline(WINDOW *win, int start, int count);
-       int untouchwin(WINDOW *win);
-       int wtouchln(WINDOW *win, int y, int n, int changed);
-       int is_linetouched(WINDOW *win, int line);
-       int is_wintouched(WINDOW *win);
-
-
-
-

DESCRIPTION

-       The touchwin and touchline routines throw away  all  opti-
-       mization  information about which parts of the window have
-       been touched, by pretending that  the  entire  window  has
-       been  drawn  on.   This  is sometimes necessary when using
-       overlapping windows, since a change to one window  affects
-       the other window, but the records of which lines have been
-       changed in the other window do  not  reflect  the  change.
-       The  routine touchline only pretends that count lines have
-       been changed, beginning with line start.
-
-       The untouchwin routine marks all lines in  the  window  as
-       unchanged since the last call to wrefresh.
-
-       The wtouchln routine makes n lines in the window, starting
-       at line y, look as if they have (changed=1)  or  have  not
-       (changed=0)  been changed since the last call to wrefresh.
-
-       The is_linetouched and is_wintouched routines return  TRUE
-       if  the  specified line/window was modified since the last
-       call to wrefresh; otherwise they return FALSE.   In  addi-
-       tion,  is_linetouched returns ERR if line is not valid for
-       the given window.
-
-
-
-

RETURN VALUE

-       All routines return the integer ERR upon  failure  and  an
-       integer  value  other than ERR upon successful completion,
-       unless otherwise noted in the preceding  routine  descrip-
-       tions.
-
-
-
-

PORTABILITY

-       The  XSI  Curses  standard,  Issue 4 describes these func-
-       tions.
-
-       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(std-
-       scr).  This will not work under ncurses.
-
-
-
-

NOTES

-       curses(3X), curs_refresh(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_util.3x.html b/Ada95/html/man/curs_util.3x.html deleted file mode 100644 index e6d8f742..00000000 --- a/Ada95/html/man/curs_util.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       unctrl,   keyname,   filter,   use_env,   putwin,  getwin,
-       delay_output, flushinp - miscellaneous curses utility rou-
-       tines
-
-
-
-

SYNOPSIS

-       #include 
-
-       char *unctrl(chtype c);
-       char *keyname(int c);
-       void filter(void);
-       void use_env(char bool);
-       int putwin(WINDOW *win, FILE *filep);
-       WINDOW *getwin(FILE *filep);
-       int delay_output(int ms);
-       int flushinp(void);
-
-
-
-

DESCRIPTION

-       The  unctrl macro expands to a character string which is a
-       printable representation  of  the  character  c.   Control
-       characters  are  displayed  in  the ^X notation.  Printing
-       characters are displayed as is.
-
-       The keyname routine returns a character string correspond-
-       ing to the key c.
-
-       The filter routine, if used, must be called before initscr
-       or newterm are called.  The effect is that,  during  those
-       calls,  LINES  is  set  to 1; the capabilities clear, cup,
-       cud, cud1, cuu1, cuu,  vpa  are  disabled;  and  the  home
-       string is set to the value of cr.
-
-       The  use_env routine, if used, is called before initscr or
-       newterm are called.  When called with FALSE  as  an  argu-
-       ment,  the  values  of  lines and columns specified in the
-       terminfo database will be used, even if environment  vari-
-       ables  LINES  and COLUMNS (used by default) are set, or if
-       curses is running in  a  window  (in  which  case  default
-       behavior  would  be  to  use  the window size if LINES and
-       COLUMNS are not set).
-
-       The putwin routine writes all data associated with  window
-       win into the file to which filep points.  This information
-       can be later retrieved using the getwin function.
-
-       The getwin routine reads window related data stored in the
-       file  by putwin.  The routine then creates and initializes
-       a new window using that data.  It returns a pointer to the
-       new window.
-
-       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
-       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
-       integer value other than ERR") upon successful completion.
-
-       flushinp always returns OK.
-
-       Routines that return pointers return NULL on error.
-
-
-
-

PORTABILITY

-       The  XSI  Curses  standard,  Issue 4 describes these func-
-       tions.
-
-       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
-       describe the disabling of cuu).
-
-
-
-

NOTES

-       Note  that  unctrl  is  a macro, which is defined in <unc-
-       trl.h>.
-
-
-
-

SEE ALSO

-       curses(3X), curs_initscr(3X), curs_scr_dump(3X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/curs_window.3x.html b/Ada95/html/man/curs_window.3x.html deleted file mode 100644 index c4e2738d..00000000 --- a/Ada95/html/man/curs_window.3x.html +++ /dev/null @@ -1,176 +0,0 @@ - - -
-       newwin,  delwin,  mvwin, subwin, derwin, mvderwin, dupwin,
-       wsyncup, syncok, wcursyncup,  wsyncdown  -  create  curses
-       windows
-
-
-
-

SYNOPSIS

-       #include 
-
-       WINDOW *newwin(int nlines, int ncols, int begin_y,
-             int begin_x);
-       int delwin(WINDOW *win);
-       int mvwin(WINDOW *win, int y, int x);
-       WINDOW *subwin(WINDOW *orig, int nlines, int ncols,
-             int begin_y, int begin_x);
-       WINDOW *derwin(WINDOW *orig, int nlines, int ncols,
-             int begin_y, int begin_x);
-       int mvderwin(WINDOW *win, int par_y, int par_x);
-       WINDOW *dupwin(WINDOW *win);
-       void wsyncup(WINDOW *win);
-       int syncok(WINDOW *win, bool bf);
-       void wcursyncup(WINDOW *win);
-       void wsyncdown(WINDOW *win);
-
-
-
-

DESCRIPTION

-       Calling newwin creates and returns a pointer to a new win-
-       dow with the given number of lines and columns.  The upper
-       left-hand  corner of the window is at line begin_y, column
-       begin_x.  If either nlines or ncols is zero, they  default
-       to  LINES - begin_y and COLS - begin_x.  A new full-screen
-       window is created by calling newwin(0,0,0,0).
-
-       Calling delwin deletes the named window, freeing all  mem-
-       ory  associated  with  it  (it does not actually erase the
-       window's screen image).  Subwindows must be deleted before
-       the main window can be deleted.
-
-       Calling mvwin moves the window so that the upper left-hand
-       corner is at position (x, y).  If the move would cause the
-       window to be off the screen, it is an error and the window
-       is not moved.  Moving subwindows is allowed, but should be
-       avoided.
-
-       Calling subwin creates and returns a pointer to a new win-
-       dow with the given number of lines, nlines,  and  columns,
-       ncols.   The  window  is at position (begin_y, begin_x) on
-       the screen.  (This position is relative to the screen, and
-       not to the window orig.)  The window is made in the middle
-       of the window orig, so that changes  made  to  one  window
-       will  affect  both  windows.   The subwindow shares memory
-       with the window orig.  When using this routine, it is nec-
-       essary  to call touchwin or touchline on orig before call-
-       ing wrefresh on the subwindow.
-
-       dow orig rather than the screen.  There is  no  difference
-       between the subwindows and the derived windows.
-
-       Calling  mvderwin  moves  a  derived window (or subwindow)
-       inside its parent window.  The screen-relative  parameters
-       of  the  window  are not changed.  This routine is used to
-       display different parts of the parent window at  the  same
-       physical position on the screen.
-
-       Calling  dupwin  creates  an exact duplicate of the window
-       win.
-
-       Calling wsyncup touches all locations in ancestors of  win
-       that  are changed in win.  If syncok is called with second
-       argument TRUE then wsyncup is called  automatically  when-
-       ever there is a change in the window.
-
-       The  wsyncdown  routine  touches each location in win that
-       has been touched in any of  its  ancestor  windows.   This
-       routine  is  called by wrefresh, so it should almost never
-       be necessary to call it manually.
-
-       The routine wcursyncup updates the current cursor position
-       of  all the ancestors of the window to reflect the current
-       cursor position of the window.
-
-
-
-

RETURN VALUE

-       Routines that return an integer  return  the  integer  ERR
-       upon failure and OK (SVr4 only specifies "an integer value
-       other than ERR") upon successful completion.
-
-       delwin returns the integer ERR upon failure  and  OK  upon
-       successful completion.
-
-       Routines that return pointers return NULL on error.
-
-
-
-

NOTES

-       If  many small changes are made to the window, the wsyncup
-       option could degrade performance.
-
-       Note that syncok may be a macro.
-
-
-
-

BUGS

-       The subwindow functions (subwin, derwin,  mvderwin,  wsyn-
-       cup,  wsyncdown,  wcursyncup,  syncok)  are  flaky, incom-
-       pletely implemented, and not well tested.
-
-       The System V curses documentation is  very  unclear  about
-       what wsyncup and wsyncdown 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  curses  implementation,  is  pat-
-
-
-
-

PORTABILITY

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

SEE ALSO

-       curses(3X), curs_refresh(3X), curs_touch(3X)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/dft_fgbg.3x.html b/Ada95/html/man/dft_fgbg.3x.html deleted file mode 100644 index a19446f7..00000000 --- a/Ada95/html/man/dft_fgbg.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       dft_fgbg - use terminal's default colors
-
-
-
-

SYNOPSIS

-       #include 
-
-       int use_default_colors(void);
-
-
-
-

DESCRIPTION

-       This  is  an  extension to the curses library.  It is used
-       with terminals that support ISO 6429 color, or equivalent.
-       These terminals allow the application to reset color to an
-       unspecified default value (e.g., with SGR 39 or  SGR  49).
-       Because  they  are  designed to support this, their design
-       usually includes features to change the default foreground
-       or background colors so that they do not match the assump-
-       tion in XSI curses of white on black.
-
-       Applications that paint  a  colored  background  over  the
-       whole  screen  are  not adversely impacted by this type of
-       terminal design.  However, there are applications that are
-       designed to work with the default background.
-
-
-
-

RETURN VALUE

-       The  function  returns the integer ERR upon failure and OK
-       on success.  It will fail if either the terminal does  not
-       support  the  orig_pair or orig_colors capability.  If the
-       initialize_pair capability is found, this causes an  error
-       as well.
-
-
-
-

NOTES

-       Associated with this extension, the init_pair(3X) function
-       accepts negative arguments to specify  default  foreground
-       or background colors.
-
-
-
-

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

-       curs_color(3X), ded(1).
-
-
-
-

AUTHOR

-       Thomas Dickey (from an analysis of  the  requirements  for
-       color xterm for XFree86 3.1.2C, February 1996).
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form.3x.html b/Ada95/html/man/form.3x.html deleted file mode 100644 index ef414e32..00000000 --- a/Ada95/html/man/form.3x.html +++ /dev/null @@ -1,176 +0,0 @@ - - -
-       form - curses extension for programming forms
-
-
-
-

SYNOPSIS

-       #include 
-
-
-
-

DESCRIPTION

-       The  form library provides terminal-independent facilities
-       for composing form screens  on  character-cell  terminals.
-       The  library  includes:  field  routines, which create and
-       modify form fields; and form routines, which group  fields
-       into forms, display forms on the screen, and handle inter-
-       action with the user.
-
-       The form library uses the curses libraries, and  a  curses
-       initialization  routine  such  as  initscr  must be called
-       before using any of these  functions.   To  use  the  form
-       library, link with the options -lform -lcurses.
-
-
-   Current Default Values for Field Attributes
-       The  form  library  maintains  a  default  value for field
-       attributes.  You can get or set this  default  by  calling
-       the  appropriate  get_  or  set_ routine with a NULL field
-       pointer.  Changing  this  default  with  a  set_  function
-       affects  future  field  creations, but does not change the
-       rendering of fields already created.
-
-
-   Routine Name Index
-       The following table lists each form routine and  the  name
-       of the manual page on which it is described.
-
-       l  l  l  l  .   curses  Routine  Name Manual  Page  Name =
-       current_field  form_page(3X)  data_ahead     form_data(3X)
-       data_behind    form_data(3X)  dup_field form_field_new(3X)
-       dynamic_fieldinfo   form_field_info(3X)
-       field_arg form_field_validation(3X)
-       field_back     form_field_attributes(3X)
-       field_buffer   form_field_buffer(3X)
-       field_count    form_field(3X)
-       field_fore     form_field_attributes(3X)
-       field_index    form_page(3X)
-       field_info     form_field_info(3X)
-       field_init     form_hook(3X)
-       field_just     form_field_just(3X)
-       field_opts     form_field_opts(3X)
-       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)
-       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)
-       form_request_by_name     form_requestname(3X)
-       form_request_name   form_requestname(3X)
-       form_sub  form_win(3X)             form_term form_hook(3X)
-       form_userptr   form_userptr(3X)     form_win  form_win(3X)
-       free_field     form_field_new(3X)   free_form form_new(3X)
-       link_field     form_field_new(3X)
-       link_fieldtype form_fieldtype(3X)
-       move_field     form_field(3X) new_field form_field_new(3X)
-       new_form  form_new(3X)         new_page  form_new_page(3X)
-       pos_form_cursor     form_cursor(3X)
-       post_form form_post(3X)        scale_form     form_win(3X)
-       set_current_field   form_page(3X)
-       set_field_back form_field_attributes(3X)
-       set_field_buffer    form_field_buffer(3X)
-       set_field_fore form_field_attributes(3X)
-       set_field_init form_hook(3X)
-       set_field_just form_field_just(3X)
-       set_field_opts form_field_opts(3X)
-       set_field_pad  form_field_attributes(3X)
-       set_field_status    form_field_buffer(3X)
-       set_field_term form_hook(3X)
-       set_field_type form_field_validation(3X)
-       set_field_userptr   form_field_userptr(3X)
-       set_fieldtype_arg   form_fieldtype(3X)
-       set_fieldtype_choice     form_fieldtype(3X)
-       set_form_fields     form_field(3X)
-       set_form_init  form_hook(3X)
-       set_form_opts  form_field_opts(3X)
-       set_form_page  form_page(3X)   set_form_sub   form_win(3X)
-       set_form_term  form_hook(3X)
-       set_form_userptr    form_userptr(3X)
-       set_form_win   form_win(3X)
-       set_max_field  form_field_buffer(3X)
-       set_new_page   form_new_page(3X)
-       unpost_form    form_post(3X)
-
-
-
-

RETURN VALUE

-       Routines that return pointers return NULL on error.   Rou-
-       tines  that  return an integer return one of the following
-       error codes:
-
-       E_OK The routine succeeded.
-
-       E_CONNECTED
-            The field is already connected to a form.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The form is already posted.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_NO_ROOM
-            Form is too large for its window.
-
-       E_NOT_POSTED
-            The form has not been posted.
-
-       E_UNKNOWN_COMMAND
-            The form driver code saw an unknown request code.
-
-       E_INVALID_FIELD
-            Contents of a field are not valid.
-
-       E_NOT_CONNECTED
-            No fields are connected to the form.
-
-       E_REQUEST_DENIED
-            The form driver could not process the request.
-
-
-
-

SEE ALSO

-       curses(3X) and 3X pages  whose  names  begin  "form_"  for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       files  and .
-
-       In your library list, libform.a  should  be  before  libn-
-       curses.a; that is, you want to say `-lform -lncurses', not
-       the other way around (which would give you  a  link  error
-       using GNU ld(1) and many other linkers).
-
-
-
-

PORTABILITY

-       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  ncurses
-       by Eric S. Raymond.
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_field.3x.html b/Ada95/html/man/form_field.3x.html deleted file mode 100644 index 470f01df..00000000 --- a/Ada95/html/man/form_field.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       form_field - make and break connections between fields and
-       forms
-
-
-
-

SYNOPSIS

-       #include 
-       int set_form_fields(FORM *form, FIELD **fields);
-       FIELD **form_fields(const FORM *form);
-       int field_count(const FORM *form);
-       int move_field(FIELD *field, int frow, int fcol);
-
-
-
-

DESCRIPTION

-       The function set_form_fields  changes  the  field  pointer
-       array  of the given form.  The array must be terminated by
-       a NULL.
-
-       The function form_fields returns the field  array  of  the
-       given form.
-
-       The  function  field_count  returns the count of fields in
-       form.
-
-       The function move_field move the given field  (which  must
-       be disconnected) to a specified location on the screen.
-
-
-
-

RETURN VALUES

-       The function form_fields returns NULL on error.
-
-       The  function  field_count returns ERR (the general curses
-       error return value) on error.
-
-       The functions set_form_fields and move_field return one of
-       the following codes on error:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-       E_POSTED
-            The form is already posted.
-
-       E_CONNECTED
-            The field is already connected to a form.
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-
-
-

NOTES

-
-
-
-

PORTABILITY

-       These  routines  emulate the System V forms library.  They
-       were not supported on Version 7 or BSD versions.
-
-       The  SVr4  forms  library  documentation   specifies   the
-       field_count error value as -1 (which is the value of ERR).
-
-
-
-

AUTHORS

-       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_field_attributes.3x.html b/Ada95/html/man/form_field_attributes.3x.html deleted file mode 100644 index 2408cbcb..00000000 --- a/Ada95/html/man/form_field_attributes.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       form_field_attributes  -  color  and attribute control for
-       form fields
-
-
-
-

SYNOPSIS

-       #include 
-       int set_field_fore(FIELD *field, chtype attr);
-       chtype field_fore(const FIELD *field);
-       int set_field_back(FIELD *field, chtype attr);
-       chtype field_back(const FIELD *field);
-       int set_field_pad(FIELD *field, int pad);
-       chtype field_pad(const FIELD *field);
-
-
-
-

DESCRIPTION

-       The function set_field_fore sets the foreground  attribute
-       of  field. This is the highlight used to display the field
-       contents.  The function field_fore returns the  foreground
-       attribute.  The default is A_STANDOUT.
-
-       The  function set_field_back sets the background attribute
-       of form. This is the highlight used to display the  extent
-       fields  in  the form.  The function field_back returns the
-       background attribute.  The default is A_NORMAL.
-
-       The function set_field_pad sets the character used to fill
-       the  field.   The  function  field_pad  returns  the given
-       form's pad character.  The default is a blank.
-
-
-
-

RETURN VALUE

-       These routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-
-
-

SEE ALSO

-       curses(3X)  and  3X  pages  whose  names begin "form_" for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

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

AUTHORS

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_field_buffer.3x.html b/Ada95/html/man/form_field_buffer.3x.html deleted file mode 100644 index 5586ab10..00000000 --- a/Ada95/html/man/form_field_buffer.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       form_field_buffer - field buffer control
-
-
-
-

SYNOPSIS

-       #include 
-       int  set_field_buffer(FIELD  *field,  int  buf, const char
-       *value);
-       char *field_buffer(const FIELD *field, int buffer);
-       int set_field_status(FIELD *field, bool status);
-       bool field_status(const FIELD *field);
-       int set_max_field(FIELD *field, int max);
-
-
-
-

DESCRIPTION

-       The function set_field_buffer sets the numbered buffer  of
-       the  given  field  to contain a given string.  Buffer 0 is
-       the displayed value of the field; other  numbered  buffers
-       may be allocated by applications through the nbuf argument
-       of (see form_field_new(3X)) but are not manipulated by the
-       forms  library.   The  function  field_buffer  returns the
-       address of the buffer.
-
-       The function set_field_status sets the  associated  status
-       flag  of  field; field_status gets the current value.  The
-       status flag is set to a nonzero value whenever  the  field
-       changes.
-
-       The  function  set_max_field  sets  the maximum size for a
-       dynamic field.  An argument of 0  turns  off  any  maximum
-       size threshold for that field.
-
-
-
-

RETURN VALUE

-       The field_buffer function returns NULL on error.
-
-       The field_status function returns TRUE or FALSE.
-
-       The remaining routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-
-
-

SEE ALSO

-       curses(3X) and 3X pages  whose  names  begin  "form_"  for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_field_just.3x.html b/Ada95/html/man/form_field_just.3x.html deleted file mode 100644 index 36917070..00000000 --- a/Ada95/html/man/form_field_just.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       form_field_just - retrieve field characteristics
-
-
-
-

SYNOPSIS

-       #include 
-       int set_field_just(FIELD *field, int justification);
-       int field_just(const FIELD *field);
-
-
-
-

DESCRIPTION

-       The   function   set_field_just   sets  the  justification
-       attribute of a field; field_just returns a field's  justi-
-       fication attribute.  The attribute may be one of NO_JUSTI-
-       FICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or  JUSTIFY_CENTER.
-
-
-
-
-

RETURN VALUE

-       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:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-
-
-

SEE ALSO

-       curses(3X)  and  3X  pages  whose  names begin "form_" for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_hook.3x.html b/Ada95/html/man/form_hook.3x.html deleted file mode 100644 index 698c07f8..00000000 --- a/Ada95/html/man/form_hook.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       form_hook - set hooks for automatic invocation by applica-
-       tions
-
-
-
-

SYNOPSIS

-       #include 
-       int set_field_init(FORM *form, void (*func)(FORM *));
-       void (*)(FORM *) field_init(const FORM *form);
-       int set_field_term(FORM *form, void (*func)(FORM *));
-       void (*)(FORM *) field_term(const FORM *form);
-       int set_form_init(FORM *form, void (*func)(FORM *));
-       void (*)(FORM *) form_init(const FORM *form);
-       int set_form_term(FORM *form, void (*func)(FORM *));
-       void (*)(FORM *) form_term(const FORM *form);
-
-
-
-

DESCRIPTION

-       These functions make it possible to set hook functions  to
-       be called at various points in the automatic processing of
-       input event codes by form_driver.
-
-       The function set_field_init sets a hook to  be  called  at
-       form-post  time  and  each time the selected field changes
-       (after the change).  field_init returns the current  field
-       init hook, if any (NULL if there is no such hook).
-
-       The  function  set_field_term  sets a hook to be called at
-       form-unpost time and each time the selected field  changes
-       (before the change).  field_term returns the current field
-       term hook, if any (NULL if there is no such hook).
-
-       The function set_form_init sets a hook  to  be  called  at
-       form-post  time  and  just  after a page change once it is
-       posted.  form_init returns the current form init hook,  if
-       any (NULL if there is no such hook).
-
-       The  function  set_form_term  sets  a hook to be called at
-       form-unpost time and just before a page change once it  is
-       posted.   form_init returns the current form term hook, if
-       any (NULL if there is no such hook).
-
-
-
-

RETURN VALUE

-       Routines that return pointers return NULL on error.  Other
-       routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-
-
-

NOTES

-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_new.3x.html b/Ada95/html/man/form_new.3x.html deleted file mode 100644 index 98dfd326..00000000 --- a/Ada95/html/man/form_new.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       form_new - create and destroy forms
-
-
-
-

SYNOPSIS

-       #include 
-       FORM *new_form(FIELD **fields);
-       int free_form(FORM *form);
-
-
-
-

DESCRIPTION

-       The  function  new_form  creates a new form connected to a
-       specified field pointer array (which must  be  NULL-termi-
-       nated).
-
-       The  function  free_form  disconnects  form from its field
-       array and frees the storage allocated for the form.
-
-
-
-

RETURN VALUE

-       The function new_form returns NULL on error.
-
-       The function free_form returns one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The form has already been posted.
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_new_page.3x.html b/Ada95/html/man/form_new_page.3x.html deleted file mode 100644 index ef7cffca..00000000 --- a/Ada95/html/man/form_new_page.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       form_new_page - form pagination functions
-
-
-
-

SYNOPSIS

-       #include 
-       int set_new_page(FIELD *field, bool new_page_flag);
-       bool new_page(const FIELD *field);
-
-
-
-

DESCRIPTION

-       The  function  set_new_page  sets or resets a flag marking
-       the given field as the beginning of  a  new  page  on  its
-       form.
-
-       The  function  new_page  is  a  predicate which tests if a
-       given field marks a page beginning on its form.
-
-
-
-

RETURN VALUE

-       The function new_page returns TRUE or FALSE.
-
-       The function set_new_page return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_CONNECTED
-            The given field is already connected to a form.
-
-
-
-

SEE ALSO

-       curses(3X) and 3X pages  whose  names  begin  "form_"  for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_opts.3x.html b/Ada95/html/man/form_opts.3x.html deleted file mode 100644 index f4e6ce31..00000000 --- a/Ada95/html/man/form_opts.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       form_opts - set and get form options
-
-
-
-

SYNOPSIS

-       #include 
-       int set_form_opts(FORM *form, OPTIONS opts);
-       int form_opts_on(FORM *form, OPTIONS opts);
-       int form_opts_off(FORM *form, OPTIONS opts);
-       OPTIONS form_opts(const FORM *form);
-
-
-
-

DESCRIPTION

-       The  function  set_form_opts  sets  all  the  given form's
-       option bits  (form  option  bits  may  be  logically-OR'ed
-       together).
-
-       The  function form_opts_on turns on the given option bits,
-       and leaves others alone.
-
-       The function form_opts_off  turns  off  the  given  option
-       bits, and leaves others alone.
-
-       The  function  form_opts returns the form's current option
-       bits.
-
-       The following options are defined (all are on by default):
-
-       O_NL_OVERLOAD
-            Overload  the  REQ_NEW_LINE  forms  driver request so
-            that calling it at the end of a  field  goes  to  the
-            next field.
-
-       O_BS_OVERLOAD
-            Overload  the  REQ_DEL_PREV  forms  driver request so
-            that calling it at the beginning of a field  goes  to
-            the previous field.
-
-
-
-

RETURN VALUE

-       Except for form_opts, each routine returns one of the fol-
-       lowing:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-
-
-
-

AUTHORS

-       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_page.3x.html b/Ada95/html/man/form_page.3x.html deleted file mode 100644 index 700f8e07..00000000 --- a/Ada95/html/man/form_page.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       form_page - set and get form page number
-
-
-
-

SYNOPSIS

-       #include 
-       int set_current_field(FORM *form, FIELD *field);
-       FIELD *current_field(const FORM *);
-       int set_form_page(FORM *form, int n);
-       int form_page(const FORM *form);
-       int field_index(const FIELD *field);
-
-
-
-

DESCRIPTION

-       The  function  set_current field sets the current field of
-       the given form; current_field returns the current field of
-       the given form.
-
-       The  function  set_form_page  sets  the form's page number
-       (goes to page n of the form).
-
-       The function form_page returns  the  form's  current  page
-       number.
-
-       The function field_index returns the index of the field in
-       the field array of the form it is connected to. It returns
-       ERR  if  the  argument is the null pointer or the field is
-       not connected.
-
-
-
-

RETURN VALUE

-       Except for form_page, each routine returns one of the fol-
-       lowing:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_INVALID_FIELD
-            Contents of a field are not valid.
-
-       E_REQUEST_DENIED
-            The form driver could not process the request.
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/form_post.3x.html b/Ada95/html/man/form_post.3x.html deleted file mode 100644 index cec8b245..00000000 --- a/Ada95/html/man/form_post.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       form_post  -  write or erase forms from associated subwin-
-       dows
-
-
-
-

SYNOPSIS

-       #include 
-       int post_form(FORM *form);
-       int unpost_form(FORM *form);
-
-
-
-

DESCRIPTION

-       The function post_form displays a form to  its  associated
-       subwindow.   To trigger physical display of the subwindow,
-       use  refresh  or  some  equivalent  curses  routine   (the
-       implicit  doupdate  triggered  by  an curses input request
-       will do).
-
-       The function unpost_form erases form from  its  associated
-       subwindow.
-
-
-
-

RETURN VALUE

-       These routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-       E_POSTED
-            The form has already been posted.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_NO_ROOM
-            Form is too large for its window.
-
-       E_NOT_POSTED
-            The form has not been posted.
-
-       E_NOT_CONNECTED
-            No items are connected to the form.
-
-
-
-

SEE ALSO

-       curses(3X), form(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu.3x.html b/Ada95/html/man/menu.3x.html deleted file mode 100644 index eee145d1..00000000 --- a/Ada95/html/man/menu.3x.html +++ /dev/null @@ -1,176 +0,0 @@ - - -
-       menu - curses extension for programming menus
-
-
-
-

SYNOPSIS

-       #include 
-
-
-
-

DESCRIPTION

-       The  menu library provides terminal-independent facilities
-       for composing menu systems  on  character-cell  terminals.
-       The library includes: item routines, which create and mod-
-       ify menu items; and menu routines, which group items  into
-       menus, display menus on the screen, and handle interaction
-       with the user.
-
-       The menu library uses the curses libraries, and  a  curses
-       initialization  routine  such  as  initscr  must be called
-       before using any of these  functions.   To  use  the  menu
-       library, link with the options -lmenu -lcurses.
-
-
-   Current Default Values for Item Attributes
-       The  menu  library  maintains  a  default  value  for item
-       attributes.  You can get or set this  default  by  calling
-       the  appropriate  get_  or  set_  routine with a NULL item
-       pointer.  Changing  this  default  with  a  set_  function
-       affects  future  item  creations,  but does not change the
-       rendering of items already created.
-
-
-   Routine Name Index
-       The following table lists each menu routine and  the  name
-       of the manual page on which it is described.
-
-       l   l   .    curses   Routine   Name Manual  Page  Name  =
-       current_item   mitem_current(3X)                 free_item
-            mitem_new(3X)       free_menu            menu_new(3X)
-       item_count     menu_items(3X)
-       item_description    mitem_name(3X)
-       item_index     mitem_current(3X)                 item_init
-            menu_hook(3X) item_name      mitem_name(3X) item_opts
-            mitem_opts(3X)          item_opts_off  mitem_opts(3X)
-       item_opts_on   mitem_opts(3X) item_term      menu_hook(3X)
-       item_userptr   mitem_userptr(3X)
-       item_value     mitem_value(3X)  item_visible   mitem_visi-
-       ble(3X)          menu_back                menu_attribs(3X)
-       menu_driver    menu_driver(3X)                   menu_fore
-            menu_attribs(3X)       menu_format    menu_format(3X)
-       menu_grey               menu_attribs(3X)         menu_init
-            menu_hook(3X) menu_items     menu_items(3X) menu_mark
-            menu_mark(3X)       menu_opts           menu_opts(3X)
-       menu_opts_off  menu_opts(3X)  menu_opts_on   menu_opts(3X)
-       menu_pad        menu_attribs(3X)  menu_pattern   menu_pat-
-       tern(3X)     menu_request_by_name     menu_requestname(3X)
-            menu_win(3X)       menu_term            menu_hook(3X)
-       menu_userptr   menu_userptr(3X)                   menu_win
-            menu_win(3X)  new_item        mitem_new(3X)  new_menu
-            menu_new(3X)      pos_menu_cursor     menu_cursor(3X)
-       post_menu     menu_post(3X)    scale_menu     menu_win(3X)
-       set_current_item    mitem_current(3X)
-       set_item_init  menu_hook(3X) set_item_opts  mitem_opts(3X)
-       set_item_term  menu_hook(3X)
-       set_item_userptr    mitem_userptr(3X)
-       set_item_value mitem_value(3X)
-       set_menu_back  menu_attribs(3X)
-       set_menu_fore  menu_attribs(3X)
-       set_menu_format     menu_format(3X)
-       set_menu_grey  menu_attribs(3X)
-       set_menu_init  menu_hook(3X) set_menu_items menu_items(3X)
-       set_menu_mark  menu_mark(3X) set_menu_opts  mitem_opts(3X)
-       set_menu_pad   menu_attribs(3X)
-       set_menu_pattern    menu_pattern(3X)
-       set_menu_spacing    menu_spacing(3X)
-       set_menu_sub   menu_win(3X)   set_menu_term  menu_hook(3X)
-       set_menu_userptr    menu_userptr(3X)
-       set_menu_win   menu_win(3X)      set_top_row    mitem_cur-
-       rent(3X)          top_row                mitem_current(3X)
-       unpost_menu    menu_post(3X)
-
-
-
-

RETURN VALUE

-       Routines that return pointers return NULL on error.   Rou-
-       tines  that  return an integer return one of the following
-       error codes:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The menu is already posted.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_NO_ROOM
-            Menu is too large for its window.
-
-       E_NOT_POSTED
-            The menu has not been posted.
-
-            The menu driver code saw an unknown request code.
-
-       E_NO_MATCH
-            Character failed to match.
-
-       E_NOT_SELECTABLE
-            The designated item cannot be selected.
-
-       E_NOT_CONNECTED
-            No items are connected to the menu.
-
-       E_REQUEST_DENIED
-            The menu driver could not process the request.
-
-
-
-

SEE ALSO

-       curses(3X) and 3X pages  whose  names  begin  "menu_"  for
-       detailed descriptions of the entry points.
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       files  and .
-
-       In your library list, libmenu.a  should  be  before  libn-
-       curses.a; that is, you want to say `-lmenu -lncurses', not
-       the other way around (which would give you  a  link  error
-       using GNU ld(1) and many other linkers).
-
-
-
-

PORTABILITY

-       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  ncurses
-       by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_attribs.3x.html b/Ada95/html/man/menu_attribs.3x.html deleted file mode 100644 index a9110c00..00000000 --- a/Ada95/html/man/menu_attribs.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       menu_attributes - color and attribute control for menus
-
-
-
-

SYNOPSIS

-       #include 
-       int set_menu_fore(MENU *menu, chtype attr);
-       chtype menu_fore(const MENU *menu);
-       int set_menu_back(MENU *menu, chtype attr);
-       chtype menu_back(const MENU *menu);
-       int set_menu_grey(MENU *menu, chtype attr);
-       chtype menu_grey(const MENU *menu);
-       int set_menu_pad(MENU *menu, int pad);
-       int menu_pad(const MENU *menu);
-
-
-
-

DESCRIPTION

-       The  function  set_menu_fore sets the foreground attribute
-       of menu. This is the  highlight  used  for  selected  menu
-       items.   menu_fore  returns the foreground attribute.  The
-       default is A_STANDOUT.
-
-       The function set_menu_back sets the  background  attribute
-       of  menu.  This  is the highlight used for selectable (but
-       not  currently  selected)  menu   items.    The   function
-       menu_back  returns  the background attribute.  The default
-       is A_NORMAL.
-
-       The function set_menu_grey  sets  the  grey  attribute  of
-       menu.  This  is  the highlight used for un-selectable menu
-       items in menus that permit more than one  selection.   The
-       function   menu_grey  returns  the  grey  attribute.   The
-       default is A_UNDERLINE.
-
-       The function set_menu_pad sets the character used to  fill
-       the space between the name and description parts of a menu
-       item.  menu_pad returns the given  menu's  pad  character.
-       The default is a blank.
-
-
-
-

RETURN VALUE

-       These routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-
-
-

SEE ALSO

-       curses(3X) and 3X pages  whose  names  begin  "menu_"  for
-       detailed descriptions of the entry points.
-
-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_format.3x.html b/Ada95/html/man/menu_format.3x.html deleted file mode 100644 index 9c6e7a14..00000000 --- a/Ada95/html/man/menu_format.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       menu_format - set and get menu sizes
-
-
-
-

SYNOPSIS

-       #include 
-       int set_menu_format(MENU *menu, int rows, int cols);
-       int menu_format(const MENU *menu, int *rows, int *cols);
-
-
-
-

DESCRIPTION

-       The function set_menu_format sets the maximum display size
-       of the given menu.  If this size is too small  to  display
-       all  menu items, the menu will be made scrollable. If this
-       size is larger than the menus subwindow and the  subwindow
-       is  too  small to display all menu items, post_menu() will
-       fail.
-
-       The  default  format  is  16  rows,  1  column.    Calling
-       set_menu_format  with a null menu pointer will change this
-       default.  A zero row or column argument to set_menu_format
-       is  interpreted  as  a  request  not to change the current
-       value.
-
-       The function menu_format  returns  the  maximum-size  con-
-       straints  for the given menu into the storage addressed by
-       rows and cols.
-
-
-
-

RETURN VALUE

-       These routines returns one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The menu is already posted.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

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

AUTHORS

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_hook.3x.html b/Ada95/html/man/menu_hook.3x.html deleted file mode 100644 index edaeb7a3..00000000 --- a/Ada95/html/man/menu_hook.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       menu_hook - set hooks for automatic invocation by applica-
-       tions
-
-
-
-

SYNOPSIS

-       #include 
-       int set_item_init(MENU *menu, void (*func)(MENU *));
-       void (*)(MENU *) item_init(const MENU *menu);
-       int set_item_term(MENU *menu, void (*func)(MENU *));
-       void (*)(MENU *) item_term(const MENU *menu);
-       int set_menu_init(MENU *menu, void (*func)(MENU *));
-       void (*)(MENU *) menu_init(const MENU *menu);
-       int set_menu_term(MENU *menu, void (*func)(MENU *));
-       void (*)(MENU *) menu_term(const MENU *menu);
-
-
-
-

DESCRIPTION

-       These functions make it possible to set hook functions  to
-       be called at various points in the automatic processing of
-       input event codes by menu_driver.
-
-       The function set_item_init sets a hook  to  be  called  at
-       menu-post  time  and  each  time the selected item changes
-       (after the change).  item_init returns  the  current  item
-       init hook, if any (NULL if there is no such hook).
-
-       The  function  set_item_term  sets  a hook to be called at
-       menu-unpost time and each time the selected  item  changes
-       (before  the  change).  item_term returns the current item
-       term hook, if any (NULL if there is no such hook).
-
-       The function set_menu_init sets a hook  to  be  called  at
-       menu-post  time  and  just  after  the top row on the menu
-       changes once it is posted.  menu_init returns the  current
-       menu init hook, if any (NULL if there is no such hook).
-
-       The  function  set_menu_term  sets  a hook to be called at
-       menu-unpost time and just before the top row on  the  menu
-       changes  once it is posted.  menu_term returns the current
-       menu term hook, if any (NULL if there is no such hook).
-
-
-
-

RETURN VALUE

-       Routines that return pointers return NULL on error.  Other
-       routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_items.3x.html b/Ada95/html/man/menu_items.3x.html deleted file mode 100644 index fb016b8c..00000000 --- a/Ada95/html/man/menu_items.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       menu_items  - make and break connections between items and
-       menus
-
-
-
-

SYNOPSIS

-       #include 
-       int set_menu_items(MENU *menu, ITEM **items);
-       ITEM **menu_items(const MENU *menu);
-       int item_count(const MENU *menu);
-
-
-
-

DESCRIPTION

-       The function set_menu_items changes the item pointer array
-       of  the  given  menu.   The  array must be terminated by a
-       NULL.
-
-       The function menu_items returns  the  item  array  of  the
-       given menu.
-
-       The  function  item_count  returns  the  count of items in
-       menu.
-
-
-
-

RETURN VALUES

-       The function menu_items returns NULL on error.
-
-       The function item_count returns ERR  (the  general  curses
-       error return value) on error.
-
-       The  function  set_menu_items returns one of the following
-       codes on error:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The menu is already posted.
-
-       E_NOT_CONNECTED
-            No items are connected to the menu.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-
-       The   SVr4   menu   library  documentation  specifies  the
-       item_count error value as -1 (which is the value of  ERR).
-
-
-
-

AUTHORS

-       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_mark.3x.html b/Ada95/html/man/menu_mark.3x.html deleted file mode 100644 index 959dc1b5..00000000 --- a/Ada95/html/man/menu_mark.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       menu_mark - get and set the menu mark string
-
-
-
-

SYNOPSIS

-       #include 
-       int set_menu_mark(MENU *menu, const char *mark);
-       const char *menu_mark(const MENU *menu);
-
-
-
-

DESCRIPTION

-       In  order  to make menu selections visible on older termi-
-       nals without highlighting or color  capability,  the  menu
-       library  marks  selected  items  in  a  menu with a prefix
-       string.
-
-       The function set_menu_mark sets the mark  string  for  the
-       given  menu.   Calling set_menu_mark with a null menu item
-       will abolish the mark  string.   Note  that  changing  the
-       length  of  the  mark  string for a menu while the menu is
-       posted is likely to produce unhelpful behavior.
-
-       The default string is "-" (a dash). Calling  set_menu_mark
-       with a NULL menu argument will change this default.
-
-       The  function menu_mark returns the menu's mark string (or
-       NULL if there is none).
-
-
-
-

RETURN VALUE

-       The function menu_mark returns NULL on error.   The  func-
-       tion set_menu_mark may return the following error codes:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine  detected  an incorrect or out-of-range argu-
-            ment.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
- - diff --git a/Ada95/html/man/menu_new.3x.html b/Ada95/html/man/menu_new.3x.html deleted file mode 100644 index b96d85a2..00000000 --- a/Ada95/html/man/menu_new.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       menu_new - create and destroy menus
-
-
-
-

SYNOPSIS

-       #include 
-       MENU *new_menu(ITEM **items);
-       int free_menu(MENU *menu);
-
-
-
-

DESCRIPTION

-       The  function  new_menu  creates a new menu connected to a
-       specified item pointer array (which  must  be  NULL-termi-
-       nated).
-
-       The  function  free_menu  disconnects  menu  from its item
-       array and frees the storage allocated for the menu.
-
-
-
-

RETURN VALUE

-       The function new_menu returns NULL on error.
-
-       The function free_menu returns one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The menu has already been posted.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/menu_pattern.3x.html b/Ada95/html/man/menu_pattern.3x.html deleted file mode 100644 index 6effa22e..00000000 --- a/Ada95/html/man/menu_pattern.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       menu_pattern - get and set a menu's pattern buffer
-
-
-
-

SYNOPSIS

-       #include 
-       int set_menu_pattern(MENU *menu, const char *pattern);
-       char *menu_pattern(const MENU *menu);
-
-
-
-

DESCRIPTION

-       Every  menu  has  an  associated pattern match buffer.  As
-       input events that are printable ASCII characters come  in,
-       they  are  appended  to this match buffer and tested for a
-       match, as described in menu_driver(3X).
-
-       The function set_menu_pattern sets the pattern buffer  for
-       the  given menu and tries to find the first matching item.
-       If it succeeds, that item becomes  current;  if  not,  the
-       current item does not change.
-
-       The  function  menu_pattern  returns the pattern buffer of
-       the given menu.
-
-
-
-

RETURN VALUE

-       The function menu_pattern  returns  NULL  on  error.   The
-       function  set_menu_pattern  may return the following error
-       codes:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_NO_MATCH
-            Character failed to match.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
- - diff --git a/Ada95/html/man/menu_post.3x.html b/Ada95/html/man/menu_post.3x.html deleted file mode 100644 index 3ac47938..00000000 --- a/Ada95/html/man/menu_post.3x.html +++ /dev/null @@ -1,124 +0,0 @@ - - -
-       menu_post  -  write or erase menus from associated subwin-
-       dows
-
-
-
-

SYNOPSIS

-       #include 
-       int post_menu(MENU *menu);
-       int unpost_menu(MENU *menu);
-
-
-
-

DESCRIPTION

-       The function post_menu displays a menu to  its  associated
-       subwindow.   To trigger physical display of the subwindow,
-       use  refresh  or  some  equivalent  curses  routine   (the
-       implicit  doupdate  triggered  by  an curses input request
-       will do). post_menu resets the  selection  status  of  all
-       items.
-
-       The  function  unpost_menu erases menu from its associated
-       subwindow.
-
-
-
-

RETURN VALUE

-       These routines return one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_POSTED
-            The menu has already been posted.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_NO_ROOM
-            Menu is too large for its window. You should consider
-            to use set_menu_format() to solve the problem.
-
-       E_NOT_POSTED
-            The menu has not been posted.
-
-       E_NOT_CONNECTED
-            No items are connected to the menu.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/mitem_current.3x.html b/Ada95/html/man/mitem_current.3x.html deleted file mode 100644 index 344ada63..00000000 --- a/Ada95/html/man/mitem_current.3x.html +++ /dev/null @@ -1,122 +0,0 @@ - - -
-       mitem_current - set and get current_menu_item
-
-
-
-

SYNOPSIS

-       #include 
-       int set_current_item(MENU *menu, const ITEM *item);
-       ITEM *current_item(const MENU *menu);
-       int set_top_row(MENU *menu, int row);
-       int top_row(const MENU *menu);
-       int item_index(const ITEM *item);
-
-
-
-

DESCRIPTION

-       The  function  set_current_item sets the current item (the
-       item on  which  the  menu  cursor  is  positioned).   cur-
-       rent_item  returns  a  pointer  to the current item in the
-       given menu.
-
-       The function set_top_row sets the top row of the  menu  to
-       show  the  given  row  (the top row is initially 0, and is
-       reset to this value whenever the O_ROWMAJOR option is tog-
-       gled).   The  item  leftmost on the given row becomes cur-
-       rent.  The function top_row returns the number of the  top
-       menu row being displayed.
-
-       The function item_index returns the (zero-origin) index of
-       item in the menu's item pointer list.
-
-
-
-

RETURN VALUE

-       current_item returns NULL on error.
-
-       top_row and item_index  return  ERR  (the  general  curses
-       error value) on error.
-
-       set_current_item and set_top_row return one of the follow-
-       ing:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_BAD_ARGUMENT
-            Routine detected an incorrect or  out-of-range  argu-
-            ment.
-
-       E_BAD_STATE
-            Routine was called from an initialization or termina-
-            tion function.
-
-       E_NOT_CONNECTED
-            No items are connected to the menu.
-
-
-
-

SEE ALSO

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       These  routines  emulate  the System V menu library.  They
-       were not supported on Version 7 or BSD versions.
-
-       The SVr4 menu library documentation specifies the  top_row
-       and  index_item  error  value as -1 (which is the value of
-       ERR).
-
-
-
-

AUTHORS

-       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/mitem_name.3x.html b/Ada95/html/man/mitem_name.3x.html deleted file mode 100644 index 6e3ebef3..00000000 --- a/Ada95/html/man/mitem_name.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       mitem_name - get menu item name and description fields
-
-
-
-

SYNOPSIS

-       #include 
-       const char *item_name(const ITEM *item);
-       const char *item_description(const ITEM *item);
-
-
-
-

DESCRIPTION

-       The  function item_name returns the name part of the given
-       item.
-       The function item_description returns the description part
-       of the given item.
-
-
-
-

RETURN VALUE

-       These routines returns NULL on error.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/mitem_opts.3x.html b/Ada95/html/man/mitem_opts.3x.html deleted file mode 100644 index a4224ff5..00000000 --- a/Ada95/html/man/mitem_opts.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       mitem_opts - set and get menu item options
-
-
-
-

SYNOPSIS

-       #include 
-       int set_item_opts(ITEM *item, OPTIONS opts);
-       int item_opts_on(ITEM *item, OPTIONS opts);
-       int item_opts_off(ITEM *item, OPTIONS opts);
-       OPTIONS item_opts(const ITEM *item);
-
-
-
-

DESCRIPTION

-       The  function  set_item_opts  sets  all  the  given item's
-       option bits  (menu  option  bits  may  be  logically-OR'ed
-       together).
-
-       The  function item_opts_on turns on the given option bits,
-       and leaves others alone.
-
-       The function item_opts_off  turns  off  the  given  option
-       bits, and leaves others alone.
-
-       The  function  item_opts returns the item's current option
-       bits.
-
-       There is only one defined option bit  mask,  O_SELECTABLE.
-       When this is on, the item may be selected during menu pro-
-       cessing.  This option defaults to on.
-
-
-
-

RETURN VALUE

-       Except for item_opts, each routine returns one of the fol-
-       lowing:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
- - diff --git a/Ada95/html/man/mitem_value.3x.html b/Ada95/html/man/mitem_value.3x.html deleted file mode 100644 index 8d13b911..00000000 --- a/Ada95/html/man/mitem_value.3x.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
-       mitem_value - set and get menu item values
-
-
-
-

SYNOPSIS

-       #include 
-       int set_item_value(ITEM *item, bool value);
-       bool item_value(const ITEM *item);
-
-
-
-

DESCRIPTION

-       If  you  turn  off  the menu option O_ONEVALUE (e.g., with
-       set_menu_opts or menu_opts_off;  see  menu_opts(3X)),  the
-       menu becomes multi-valued; that is, more than one item may
-       simultaneously be selected.
-
-       In a multi_valued menu, you  can  used  set_item_value  to
-       select the given menu item (second argument TRUE) or dese-
-       lect it (second argument FALSE).
-
-
-
-

RETURN VALUE

-       The function set_item_value returns one of the following:
-
-       E_OK The routine succeeded.
-
-       E_SYSTEM_ERROR
-            System error occurred (see errno).
-
-       E_REQUEST_DENIED
-            The menu driver could not process the request.
-
-
-
-

SEE ALSO

-       curses(3X), menu(3X).
-
-
-
-

NOTES

-       The header file  automatically includes the header
-       file .
-
-
-
-

PORTABILITY

-       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
-       curses by Eric S. Raymond.
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/ncurses.3x.html b/Ada95/html/man/ncurses.3x.html deleted file mode 100644 index 164ae90a..00000000 --- a/Ada95/html/man/ncurses.3x.html +++ /dev/null @@ -1,701 +0,0 @@ - - -
-       ncurses - CRT screen handling and optimization package
-
-
-
-

SYNOPSIS

-       #include 
-
-
-
-

DESCRIPTION

-       The  ncurses  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.
-
-       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.
-
-       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.
-
-       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.
-
-       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 exiting.  To get character-at-a-time
-       input  without  echoing (most interactive, screen oriented
-       programs want this),  the  following  sequence  should  be
-       used:
-
-             initscr(); cbreak(); noecho();
-
-       Most programs would additionally use the sequence:
-
-             nonl();
-             intrflush(stdscr, FALSE);
-             keypad(stdscr, TRUE);
-
-       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
-       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
-       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
-       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
-       each character.
-
-       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
-       , 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
-       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
-
-             @DATADIR@/terminfo/a/att4424.
-
-       (The a is copied from the first letter of att4424 to avoid
-       creation  of  huge  directories.)  However, if TERMINFO is
-       set to $HOME/myterms, curses first checks
-
-             $HOME/myterms/a/att4424,
-
-       and if that fails, it then checks
-
-             @DATADIR@/terminfo/a/att4424.
-
-       This is useful for developing experimental definitions  or
-       when   write   permission  in  @DATADIR@/terminfo  is  not
-       available.
-
-       The integer  variables  LINES  and  COLS  are  defined  in
-         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  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
-       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.
-
-       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
-       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
-       specified before the coordinates.
-
-       WINDOW.
-
-       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
-       .  The type TERMINAL  is  defined  in  .
-       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
-       XPG4 or present in SVr4.
-
-       center tab(/); l l l l .  curses Routine Name/Manual  Page
-       Name  =  addch/curs_addch(3X)  addchnstr/curs_addchstr(3X)
-       addchstr/curs_addchstr(3X)         addnstr/curs_addstr(3X)
-       addstr/curs_addstr(3X)              attr_get/curs_attr(3X)
-       attr_off/curs_attr(3X)               attr_on/curs_attr(3X)
-       attr_set/curs_attr(3X)               attroff/curs_attr(3X)
-       attron/curs_attr(3X)                 attrset/curs_attr(3X)
-       baudrate/curs_termattrs(3X)             beep/curs_beep(3X)
-       bkgd/curs_bkgd(3X)                   bkgdset/curs_bkgd(3X)
-       border/curs_border(3X)                 box/curs_border(3X)
-       can_change_color/curs_color(3X)     cbreak/curs_inopts(3X)
-       chgat/curs_attr(3X)                   clear/curs_clear(3X)
-       clearok/curs_outopts(3X)           clrtobot/curs_clear(3X)
-       clrtoeol/curs_clear(3X)       color_content/curs_color(3X)
-       color_set/curs_attr(3X)           copywin/curs_overlay(3X)
-       curs_set/curs_kernel(3X)     def_prog_mode/curs_kernel(3X)
-       def_shell_mode/curs_kernel(3X)  define_key/define_key(3X)*
-       del_curterm/curs_terminfo(3X)   delay_output/curs_util(3X)
-       delch/curs_delch(3X)            deleteln/curs_deleteln(3X)
-       delscreen/curs_initscr(3X)          delwin/curs_window(3X)
-       derwin/curs_window(3X)           doupdate/curs_refresh(3X)
-       dupwin/curs_window(3X)                echo/curs_inopts(3X)
-       echochar/curs_addch(3X)            endwin/curs_initscr(3X)
-       erase/curs_clear(3X)          erasechar/curs_termattrs(3X)
-       filter/curs_util(3X)                   flash/curs_beep(3X)
-       flushinp/curs_util(3X)             getbegyx/curs_getyx(3X)
-       getbkgd/curs_bkgd(3X)                 getch/curs_getch(3X)
-       getmaxyx/curs_getyx(3X)           getmouse/curs_mouse(3X)*
-       getnstr/curs_getstr(3X)            getparyx/curs_getyx(3X)
-       getstr/curs_getstr(3X)              getsyx/curs_kernel(3X)
-       getwin/curs_util(3X)                  getyx/curs_getyx(3X)
-       halfdelay/curs_inopts(3X)        has_colors/curs_color(3X)
-       has_ic/curs_termattrs(3X)        has_il/curs_termattrs(3X)
-       has_key/curs_getch(3X)*              hline/curs_border(3X)
-       idcok/curs_outopts(3X)              idlok/curs_outopts(3X)
-       immedok/curs_outopts(3X)                inch/curs_inch(3X)
-       initscr/curs_initscr(3X)             innstr/curs_instr(3X)
-       insch/curs_insch(3X)            insdelln/curs_deleteln(3X)
-       insertln/curs_deleteln(3X)         insnstr/curs_insstr(3X)
-       insstr/curs_insstr(3X)                instr/curs_instr(3X)
-       intrflush/curs_inopts(3X)    is_linetouched/curs_touch(3X)
-       is_wintouched/curs_touch(3X)     isendwin/curs_initscr(3X)
-       keyname/curs_util(3X)                     keyok/keyok(3X)*
-       keypad/curs_inopts(3X)         killchar/curs_termattrs(3X)
-       leaveok/curs_outopts(3X)       longname/curs_termattrs(3X)
-       mcprint/curs_print(3X)*               meta/curs_inopts(3X)
-       mouseinterval/curs_mouse(3X)*    mousemask/curs_mouse(3X)*
-       move/curs_move(3X)                  mvaddch/curs_addch(3X)
-       mvaddchnstr/curs_addchstr(3X) mvaddchstr/curs_addchstr(3X)
-       mvaddnstr/curs_addstr(3X)         mvaddstr/curs_addstr(3X)
-       mvchgat/curs_attr(3X)              mvcur/curs_terminfo(3X)
-       mvdelch/curs_delch(3X)            mvderwin/curs_window(3X)
-       mvgetch/curs_getch(3X)           mvgetnstr/curs_getstr(3X)
-       mvgetstr/curs_getstr(3X)           mvhline/curs_border(3X)
-       mvinch/curs_inch(3X)           mvinchnstr/curs_inchstr(3X)
-       mvinchstr/curs_inchstr(3X)         mvinnstr/curs_instr(3X)
-       mvinsch/curs_insch(3X)           mvinsnstr/curs_insstr(3X)
-       mvinsstr/curs_insstr(3X)            mvinstr/curs_instr(3X)
-       mvprintw/curs_printw(3X)            mvscanw/curs_scanw(3X)
-       mvwaddch/curs_addch(3X)     mvwaddchnstr/curs_addchstr(3X)
-       mvwaddchstr/curs_addchstr(3X)   mvwaddnstr/curs_addstr(3X)
-       mvwaddstr/curs_addstr(3X)           mvwchgat/curs_attr(3X)
-       mvwdelch/curs_delch(3X)            mvwgetch/curs_getch(3X)
-       mvwgetnstr/curs_getstr(3X)       mvwgetstr/curs_getstr(3X)
-       mvwhline/curs_border(3X)             mvwin/curs_window(3X)
-       mvwinch/curs_inch(3X)         mvwinchnstr/curs_inchstr(3X)
-       mvwinchstr/curs_inchstr(3X)       mvwinnstr/curs_instr(3X)
-       mvwinsch/curs_insch(3X)         mvwinsnstr/curs_insstr(3X)
-       mvwinsstr/curs_insstr(3X)          mvwinstr/curs_instr(3X)
-       mvwprintw/curs_printw(3X)          mvwscanw/curs_scanw(3X)
-       mvwvline/curs_border(3X)             napms/curs_kernel(3X)
-       newpad/curs_pad(3X)               newterm/curs_initscr(3X)
-       newwin/curs_window(3X)                 nl/curs_outopts(3X)
-       nocbreak/curs_inopts(3X)           nodelay/curs_inopts(3X)
-       noecho/curs_inopts(3X)               nonl/curs_outopts(3X)
-       noqiflush/curs_inopts(3X)            noraw/curs_inopts(3X)
-       notimeout/curs_inopts(3X)         overlay/curs_overlay(3X)
-       overwrite/curs_overlay(3X)     pair_content/curs_color(3X)
-       pechochar/curs_pad(3X)           pnoutrefresh/curs_pad(3X)
-       prefresh/curs_pad(3X)               printw/curs_printw(3X)
-       putp/curs_terminfo(3X)                putwin/curs_util(3X)
-       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)   resetty/curs_kernel(3X)
-       resizeterm/resizeterm(3X)*   restartterm/curs_terminfo(3X)
-       ripoffline/curs_kernel(3X)         savetty/curs_kernel(3X)
-       scanw/curs_scanw(3X)            scr_dump/curs_scr_dump(3X)
-       scroll/curs_scroll(3X)           scrollok/curs_outopts(3X)
-       set_curterm/curs_terminfo(3X)    set_term/curs_initscr(3X)
-       setscrreg/curs_outopts(3X)          setsyx/curs_kernel(3X)
-       setterm/curs_terminfo(3X)      setupterm/curs_terminfo(3X)
-       slk_attr/curs_slk(3X)*           slk_attr_off/curs_slk(3X)
-       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)
-       slk_color/curs_slk(3X)               slk_init/curs_slk(3X)
-       slk_label/curs_slk(3X)        slk_noutrefresh/curs_slk(3X)
-       slk_refresh/curs_slk(3X)          slk_restore/curs_slk(3X)
-       slk_set/curs_slk(3X)                slk_touch/curs_slk(3X)
-       standend/curs_attr(3X)              standout/curs_attr(3X)
-       start_color/curs_color(3X)             subpad/curs_pad(3X)
-       subwin/curs_window(3X)              syncok/curs_window(3X)
-       termattrs/curs_termattrs(3X)   termname/curs_termattrs(3X)
-       tgetent/curs_termcap(3X)         tgetflag/curs_termcap(3X)
-       tgetnum/curs_termcap(3X)          tgetstr/curs_termcap(3X)
-       tgoto/curs_termcap(3X)         tigetflag/curs_terminfo(3X)
-       tigetnum/curs_terminfo(3X)      tigetstr/curs_terminfo(3X)
-       timeout/curs_inopts(3X)           touchline/curs_touch(3X)
-       touchwin/curs_touch(3X)            tparm/curs_terminfo(3X)
-       tputs/curs_termcap(3X)             tputs/curs_terminfo(3X)
-       typeahead/curs_inopts(3X)             unctrl/curs_util(3X)
-       ungetch/curs_getch(3X)          ungetmouse/curs_mouse(3X)*
-       untouchwin/curs_touch(3X) use_default_colors/dft_fgbg(3X)*
-       use_env/curs_util(3X)            vidattr/curs_terminfo(3X)
-       vidputs/curs_terminfo(3X)            vline/curs_border(3X)
-       vw_printw/curs_printw(3X)          vw_scanw/curs_scanw(3X)
-       vwprintw/curs_printw(3X)            vwscanw/curs_scanw(3X)
-       waddch/curs_addch(3X)         waddchnstr/curs_addchstr(3X)
-       waddchstr/curs_addchstr(3X)       waddnstr/curs_addstr(3X)
-       waddstr/curs_addstr(3X)            wattr_get/curs_attr(3X)
-       wattr_off/curs_attr(3X)             wattr_on/curs_attr(3X)
-       wattr_set/curs_attr(3X)             wattroff/curs_attr(3X)
-       wattron/curs_attr(3X)               wattrset/curs_attr(3X)
-       wbkgd/curs_bkgd(3X)                 wbkgdset/curs_bkgd(3X)
-       wborder/curs_border(3X)               wchgat/curs_attr(3X)
-       wclear/curs_clear(3X)             wclrtobot/curs_clear(3X)
-       wclrtoeol/curs_clear(3X)          wcolor_set/curs_attr(3X)
-       wcursyncup/curs_window(3X)           wdelch/curs_delch(3X)
-       wdeleteln/curs_deleteln(3X)       wechochar/curs_addch(3X)
-       wenclose/curs_mouse(3X)*             werase/curs_clear(3X)
-       wgetch/curs_getch(3X)             wgetnstr/curs_getstr(3X)
-       wgetstr/curs_getstr(3X)             whline/curs_border(3X)
-       winch/curs_inch(3X)             winchnstr/curs_inchstr(3X)
-       winchstr/curs_inchstr(3X)           winnstr/curs_instr(3X)
-       winsch/curs_insch(3X)          winsdelln/curs_deleteln(3X)
-       winsertln/curs_deleteln(3X)       winsnstr/curs_insstr(3X)
-       winsstr/curs_insstr(3X)              winstr/curs_instr(3X)
-       wmouse_trafo/curs_mouse(3X)            wmove/curs_move(3X)
-       wnoutrefresh/curs_refresh(3X)      wprintw/curs_printw(3X)
-       wscrl/curs_scroll(3X)          wsetscrreg/curs_outopts(3X)
-       wstandend/curs_attr(3X)            wstandout/curs_attr(3X)
-       wsyncdown/curs_window(3X)          wsyncup/curs_window(3X)
-       wtimeout/curs_inopts(3X)           wtouchln/curs_touch(3X)
-       wvline/curs_border(3X)
-
-
-
-

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
-       as the right-hand side of assignment statements).
-
-       Routines that return pointers return NULL on error.
-
-
-
-

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.
-
-       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
-            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.
-
-       COLUMNS
-            Specify  the  width  of  the  screen  in  characters.
-            Applications   running  in  a  windowing  environment
-            usually are able to obtain the width of the window in
-            which  they  are  executing.  If neither the $COLUMNS
-            value nor the terminal's screen  size  is  available,
-            ncurses  uses  the size which may be specified in the
-            terminfo database (i.e., the cols capability).
-
-            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
-
-            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, lines and cols should not be specified
-            in a terminal description for terminals which are run
-            as emulations.
-
-            Use the use_env function to disable this feature.
-
-       ESCDELAY
-            Specifies  the total time, in milliseconds, for which
-            ncurses will await  a  character  sequence,  e.g.,  a
-            function  key.  The default value, 1000 milliseconds,
-            is enough for most  uses.   However,  it  is  made  a
-            variable to accommodate unusual applications.
-
-            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.
-
-            Note that  xterm  mouse  events  are  built  up  from
-            character sequences received from the xterm.  If your
-            application makes heavy use of multiple-clicking, you
-            may  wish  to lengthen this default value because the
-            timeout applies to the composed multi-click event  as
-            well as the individual clicks.
-
-       HOME Tells  ncurses where your home directory is.  That is
-            where  it  may  read  and  write  auxiliary  terminal
-            descriptions:
-
-            $HOME/.termcap
-            $HOME/.terminfo
-
-       LINES
-            Like  COLUMNS,  specify  the  height of the screen in
-            characters.  See COLUMNS for a detailed  description.
-
-       MOUSE_BUTTONS_123
-            This applies only to the OS/2 EMX port.  It specifies
-            the order of buttons on the mouse.   OS/2  numbers  a
-            3-button mouse inconsistently from other platforms:
-
-            1 = left
-            2 = right
-            3 = middle.
-
-            123  or  321.   If  it is not specified, ncurses uses
-            132.
-
-       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.
-
-            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.
-
-            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 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
-            NCURSES_NO_SETBUF variable disables output buffering,
-            leaving the output  in  the  original  (usually  line
-            buffered) mode.
-
-       NCURSES_TRACE
-            During  initialization, the ncurses debugging library
-            checks the NCURSES_TRACE symbol.  If it  is  defined,
-            to a numeric value, ncurses calls the trace function,
-            using that value as the argument.
-
-            The argument values, which are defined  in  curses.h,
-            provide  several  types of information.  When running
-            with traces enabled, your application will write  the
-            file trace to the current directory.
-
-       TERM Denotes  your  terminal  type.  Each terminal type is
-            If the  ncurses  library  has  been  configured  with
-            termcap  support, ncurses will check for a terminal's
-            description in termcap form if it is not available in
-            the terminfo database.
-
-            The   TERMCAP   symbol  contains  either  a  terminal
-            description (with newlines stripped out), or  a  file
-            name  telling  where  the  information denoted by the
-            TERM symbol  exists.   In  either  case,  setting  it
-            directs  ncurses  to  ignore the usual place for this
-            information, e.g., /etc/termcap.
-
-       TERMINFO
-            Overrides the directory in which ncurses searches for
-            your terminal description.  This is the simplest, but
-            not the only way to change the list  of  directories.
-            The complete list of directories in order follows:
-
-            -  the last directory to which ncurses wrote, if any,
-               is searched first.
-
-            -  the directory specified by the TERMINFO symbol
-
-            -  $HOME/.terminfo
-
-            -  directories listed in the TERMINFO_DIRS symbol
-
-            -  one or more directories whose names are configured
-               and  compiled  into  the  ncurses  library,  e.g.,
-               @DATADIR@/terminfo
-
-       TERMINFO_DIRS
-            Specifies  a  list  of  directories  to  search   for
-            terminal  descriptions.   The  list  is  separated by
-            colons (i.e., ":").  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  colons (i.e., ":").  If the
-            TERMPATH symbol is not  set,  ncurses  looks  in  the
-            files   /etc/termcap,   /usr/share/misc/termcap   and
-            $HOME/.termcap, in that order.
-
-
-
-

FILES

-       @DATADIR@/tabset
-            directory containing  initialization  files  for  the
-            terminal   capability   database   @DATADIR@/terminfo
-            terminal capability database
-
-       terminfo(5) and 3X pages whose  names  begin  "curs_"  for
-       detailed routine descriptions.
-
-
-
-

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.
-
-       The  ncurses  library  includes  facilities  for capturing
-       mouse events on certain terminals (including  xterm).  See
-       the curs_mouse(3X) manual page for details.
-
-       The  ncurses library includes facilities for responding to
-       window resizing events, e.g., when running  in  an  xterm.
-       See  the  resizeterm(3X)  and wresize(3X) manual pages for
-       details.  In addition, the library may be configured  with
-       a SIGWINCH handler.
-
-       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.
-
-       The  ncurses  library  can  exploit  the  capabilities  of
-       terminals which implement the ISO-6429 SGR 39 and  SGR  49
-       controls, which allow an application to reset the terminal
-       to its original foreground and  background  colors.   From
-       the  users'  perspective,  the application is able to draw
-       colored  text  on  a  background  whose   color   is   set
-       independently,   providing   better   control  over  color
-       contrasts.  See the use_default_colors(3X) manual page for
-       details.
-
-       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:   add_wch,   add_wchnstr,   add_wchstr,
-       addnwstr, addwstr, bkgrnd, bkgrndset, border_set, box_set,
-       echo_wchar,  erasewchar,  get_wch,  get_wstr,   getbkgrnd,
-       getcchar,   getn_wstr,   getwchtype,   hline_set,  in_wch,
-       killwchar,   mvadd_wch,    mvadd_wchnstr,    mvadd_wchstr,
-       mvaddnwstr, mvaddwstr, mvget_wch, mvget_wstr, mvgetn_wstr,
-       mvhline_set, mvin_wch, mvinnwstr, mvins_nwstr,  mvins_wch,
-       mvins_wstr, mvinwchnstr, mvinwchstr, mvinwchstr, mvinwstr,
-       mvvline_set,  mvwadd_wch,  mvwadd_wchnstr,  mvwadd_wchstr,
-       mvwaddnwstr,     mvwaddwstr,     mvwget_ch,    mvwget_wch,
-       mvwget_wstr,   mvwgetn_wstr,   mvwhline_set,    mvwin_wch,
-       mvwin_wchnstr,   mvwin_wchstr,  mvwinnwstr,  mvwins_nwstr,
-       mvwins_wch,   mvwins_wstr,    mvwinwchnstr.     mvwinwstr,
-       mvwvline_set, pecho_wchar, setcchar, slk_wset, term_attrs,
-       unget_wch,  vhline_set,  vid_attr,  vid_puts,   vline_set,
-       wadd_wch,  wadd_wchnstr, wadd_wchstr, waddnwstr, waddwstr,
-       waddwstr, wbkgrnd,  wbkgrndset,  wbkgrndset,  wborder_set,
-       wecho_wchar, wecho_wchar, wget_wch, wget_wstr, wgetbkgrnd,
-       wgetn_wstr, whline_set, win_wch, win_wchnstr,  win_wchstr,
-       winnwstr,  wins_nwstr,  wins_wch,  wins_wstr,  winwchnstr,
-       winwchstr, winwstr, wunctrl, wvline_set,
-
-       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.
-
-       The  routine  slk_attr  is  not  part  of  XPG4, nor is it
-       present 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 routine mcprint was not present in any previous curses
-       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  the  XSI  standard  and  SVr4 manual pages, many entry
-       points have prototype arguments of the for char *const (or
-       (see  section  3.5.4.1), these declarations are either (a)
-       meaningless,  or  (b)  meaningless   and   illegal.    The
-       declaration  const  char  *x  is  a  modifiable pointer to
-       unmodifiable data, but char *const x' is  an  unmodifiable
-       pointer to modifiable data.  Given that C passes arguments
-       by value,  *const  as  a  formal  type  is  at  best
-       dubious.    Some   compilers   choke  on  the  prototypes.
-       Therefore, in this implementation, they have been  changed
-       to const  * globally.
-
-
-
-

NOTES

-       The  header  file    automatically  includes the
-       header files  and .
-
-       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.
-
-
-
-

AUTHORS

-       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
-       Based on pcurses by Pavel Curtis.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/Ada95/html/man/panel.3x.html b/Ada95/html/man/panel.3x.html deleted file mode 100644 index 29120fc8..00000000 --- a/Ada95/html/man/panel.3x.html +++ /dev/null @@ -1,180 +0,0 @@ - - -
-       panel - panel stack extension for curses
-
-
-
-

SYNOPSIS

-       #include 
-
-       cc [flags] sourcefiles -lpanel -lncurses
-
-       PANEL *new_panel(WINDOW *win)
-       int bottom_panel(PANEL *pan)
-       int top_panel(PANEL *pan)
-       int show_panel(PANEL *pan)
-       void update_panels();
-       int hide_panel(PANEL *pan)
-       WINDOW *panel_window(const PANEL *pan)
-       int replace_panel(PANEL *pan, WINDOW *window)
-       int move_panel(PANEL *pan, int starty, int startx)
-       int panel_hidden(const PANEL *pan)
-       PANEL *panel_above(const PANEL *pan)
-       PANEL *panel_below(const PANEL *pan)
-       int set_panel_userptr(PANEL *pan, const void *ptr)
-       const void *panel_userptr(const PANEL *pan)
-       int del_panel(PANEL *pan)
-
-
-
-

DESCRIPTION

-       Panels  are  curses(3X)  windows with the added feature of
-       depth.  Panel functions allow the use of  stacked  windows
-       and  ensure  the  proper  portions  of each window and the
-       curses stdscr window are hidden or displayed  when  panels
-       are  added,  moved,  modified or removed.  The set of cur-
-       rently visible panels is the stack of panels.  The  stdscr
-       window  is  beneath all panels, and is not considered part
-       of the stack.
-
-       A window is associated with every panel.  The  panel  rou-
-       tines  enable you to create, move, hides, and show panels,
-       as well as position a panel at any desired location in the
-       stack.
-
-       Panel routines are a functional layer added to curses(3X),
-       make only high-level curses calls, and work anywhere  ter-
-       minfo curses does.
-
-
-
-

FUNCTIONS

-       new_panel(win)
-              allocates   a   PANEL structure, associates it with
-              win, places the panel  on  the  top  of  the  stack
-              (causes   it  to   be   displayed  above  any other
-              panel) and returns a pointer to the new panel.
-
-       void update_panels()
-              refreshes the virtual screen to reflect  the  rela-
-              tions between the panels in the stack, but does not
-              update_panels() may be called more than once before
-              a  call  to doupdate(), but doupdate() is the func-
-              tion responsible for updating the physical  screen.
-
-       del_panel(pan)
-              removes the given panel from the  stack and deallo-
-              cates the PANEL structure (but not  its  associated
-              window).
-
-       hide_panel(pan)
-              removes  the  given  panel from the panel stack and
-              thus hides it from view. The PANEL structure is not
-              lost, merely removed from the stack.
-
-       show_panel(pan)
-              makes  a  hidden panel visible by placing it on top
-              of the panels in the panel stack. See COMPATIBILITY
-              below.
-
-       top_panel(pan)
-              puts  the  given visible panel on top of all panels
-              in the stack.  See COMPATIBILITY below.
-
-       bottom_panel(pan)
-              puts panel at the bottom of all panels.
-
-       move_panel(pan,starty,startx)
-              moves the given panel window so that its upper-left
-              corner  is  at  starty, startx.  It does not change
-              the position of the panel in the stack.  Be sure to
-              use  this  function,  not  mvwin(), to move a panel
-              window.
-
-       replace_panel(pan,window)
-              replaces the current window of  panel  with  window
-              (useful, for example if you want to resize a panel;
-              if you're using ncurses, you can call replace_panel
-              on  the output of wresize(3X)).  It does not change
-              the position of the panel in the stack.
-
-       panel_above(pan)
-              returns a pointer to the panel above pan.   If  the
-              panel  argument is (PANEL *)0, it returns a pointer
-              to the bottom panel in the stack.
-
-       panel_below(pan)
-              returns a pointer to the panel just below pan.   If
-              the  panel  argument  is  (PANEL  *)0, it returns a
-              pointer to the top panel in the stack.
-
-       set_panel_userptr(pan,ptr)
-              sets the panel's user pointer.
-              returns the user pointer for a given panel.
-
-       panel_window(pan)
-              returns a pointer to the window of the given panel.
-
-
-
-

DIAGNOSTICS

-       Each  routine  that  returns  a pointer returns NULL if an
-       error occurs. Each  routine  that  returns  an  int  value
-       returns OK if it executes successfully and ERR if not.
-
-
-
-

COMPATIBILITY

-       Reasonable  care  has been taken to  ensure  compatibility
-       with  the  native  panel  facility  introduced  in  SVr3.2
-       (inspection of the SVr4 manual pages suggests the program-
-       ming interface is unchanged).  The PANEL  data  structures
-       are  merely   similar. The  programmer is cautioned not to
-       directly use PANEL fields.
-
-       The functions show_panel() and top_panel()  are  identical
-       in  this  implementation,  and work equally well with dis-
-       played or hidden panels.  In the native System V implemen-
-       tation, show_panel() is intended for making a hidden panel
-       visible (at the top  of  the  stack)  and  top_panel()  is
-       intended  for  making an already-visible panel move to the
-       top of the stack. You are cautioned  to  use  the  correct
-       function   to   ensure  compatibility  with  native  panel
-       libraries.
-
-
-
-

NOTE

-       In your library list, libpanel.a should  be  before  libn-
-       curses.a;  that  is,  you want to say `-lpanel -lncurses',
-       not the other way around (which  would  give  you  a  link
-       error using GNU ld(1) and some other linkers).
-
-
-
-

FILES

-       panel.h interface for the panels library
-
-       libpanel.a the panels library itself
-
-
-
-

SEE ALSO

-       curses(3X)
-
-
-
-

AUTHOR

-       Originally   written   by   Warren  Tucker  , primarily to assist  in  porting  u386mon  to
-       systems  without  a native panels library.  Repackaged for
-       ncurses by Zeyd ben-Halim.
-
-
-
-
-
-
- - diff --git a/Ada95/html/table.html b/Ada95/html/table.html deleted file mode 100644 index 7d21204a..00000000 --- a/Ada95/html/table.html +++ /dev/null @@ -1,325 +0,0 @@ - - - -Correspondence between ncurses C and Ada functions - - -

Correspondence between ncurses C and Ada functions

-

Sorted by C function name

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C nameAda nameman page
baudrate()Baudratecurs_termattrs.3x
beep()Beepcurs_beep.3x
bottom_panel()Bottompanel.3x
box()Boxcurs_border.3x
can_change_color()Can_Change_Colorcurs_color.3x
cbreak()Set_Cbreak_Modecurs_inopts.3x
clearok()Clear_On_Next_Updatecurs_outopts.3x
color_content()Color_Contentcurs_color.3x
copywin()Copycurs_overlay.3x
current_field()Currentform_page.3x
current_item()Currentmitem_current.3x
curs_set()Set_Cursor_Visibilitycurs_kernel.3x
data_ahead()Data_Aheadform_data.3x
data_behind()Data_Behindform_data.3x
def_prog_mode()Save_Curses_Modecurs_kernel.3x
define_key()Define_Keydefine_key.3x
del_panel()Deletepanel.3x
delay_output()Delay_Outputcurs_util.3x
delwin()Deletecurs_window.3x
derwin()Derived_Windowcurs_window.3x
doupdate()Update_Screencurs_refresh.3x
dup_field()Duplicateform_field_new.3x
dupwin()Duplicatecurs_window.3x
dynamic_field_info()Dynamic_Infoform_field_info.3x
echo()Set_Echo_Modecurs_inopts.3x
endwin()End_Windowscurs_initscr.3x
erasechar()Erase_Charactercurs_termattrs.3x
field_back()Backgroundform_field_attributes.3x
field_back()Backgroundform_field_attributes.3x
field_buffer()Get_Bufferform_field_buffer.3x
field_count()Field_Countform_field.3x
field_fore()Foregroundform_field_attributes.3x
field_fore()Foregroundform_field_attributes.3x
field_index()Get_Indexform_page.3x
field_info()Infoform_field_info.3x
field_init()Get_Field_Init_Hookform_hook.3x
field_just()Get_Justificationform_field_just.3x
field_opts()Get_Optionsform_field_opts.3x
field_opts()Get_Optionsform_field_opts.3x
field_opts_on()Switch_Optionsform_field_opts.3x
field_pad()Pad_Characterform_field_attributes.3x
field_status()Changedform_field_buffer.3x
field_term()Get_Field_Term_Hookform_hook.3x
field_type()Get_Typeform_field_validation.3x
field_userptrGet_User_Dataform_field_userptr.3x
field_userptrGet_User_Dataform_field_userptr.3x
flash()Flash_Screencurs_beep.3x
flushinp()Flush_Inputcurs_util.3x
form_driver()Driverform_driver.3x
form_fields()Fieldsform_field.3x
form_init()Get_Form_Init_Hookform_hook.3x
form_opts()Get_Optionsform_opts.3x
form_opts()Get_Optionsform_opts.3x
form_opts_on()Switch_Optionsform_opts.3x
form_page()Pageform_page.3x
form_sub()Get_Sub_Windowform_win.3x
form_term()Get_Form_Term_Hookform_hook.3x
form_userptrGet_User_Dataform_userptr.3x
form_userptrGet_User_Dataform_userptr.3x
form_win()Get_Windowform_win.3x
free_field()Deleteform_field_new.3x
free_form()Deleteform_new.3x
free_item()Deletemitem_new.3x
free_menu()Deletemenu_new.3x
getbegyx()Get_Window_Positioncurs_getyx.3x
getmaxyx()Get_Sizecurs_getyx.3x
getmouse()Get_Mousecurs_mouse.3x
getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
getyx()Get_Cursor_Positioncurs_getyx.3x
halfdelay()Half_Delaycurs_inopts.3x
has_colors()Has_Colorscurs_color.3x
has_ic()Has_Insert_Charactercurs_termattrs.3x
has_il()Has_Insert_Linecurs_termattrs.3x
has_key()Has_Keycurs_getch.3x
hide_panel()Hidepanel.3x
idcok()Use_Insert_Delete_Charactercurs_outopts.3x
idlok()Use_Insert_Delete_Linecurs_outopts.3x
immedok()Immediate_Update_Modecurs_outopts.3x
init_color()Init_Colorcurs_color.3x
init_pair()Init_Paircurs_color.3x
initscr()Init_Screencurs_initscr.3x
initscr()Init_Windowscurs_initscr.3x
intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
is_linetouched()Is_Touchedcurs_touch.3x
is_wintouched()Is_Touchedcurs_touch.3x
isendwin()Is_End_Windowcurs_initscr.3x
item_count()Item_Countmenu_items.3x
item_description();Descriptionmitem_name.3x
item_index()Get_Indexmitem_current.3x
item_init()Get_Item_Init_Hookmenu_hook.3x
item_name()Namemitem_name.3x
item_opts()Get_Optionsmitem_opts.3x
item_opts()Get_Optionsmitem_opts.3x
item_opts_on()Switch_Optionsmitem_opts.3x
item_term()Get_Item_Term_Hookmenu_hook.3x
item_userptrGet_User_Datamitem_userptr.3x
item_userptrGet_User_Datamitem_userptr.3x
item_value()Valuemitem_value.3x
item_visible()Visiblemitem_visible.3x
keyname()Key_Namecurs_util.3x
keyname()Key_Namecurs_util.3x
keyok()Enable_Keykeyok.3x
keypad()Set_KeyPad_Modecurs_inopts.3x
killchar()Kill_Charactercurs_termattrs.3x
leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
link_field()Linkform_field_new.3x
longname()Long_Namecurs_termattrs.3x
longname()Long_Namecurs_termattrs.3x
menu_back()Backgroundmenu_attribs.3x
menu_back()Backgroundmenu_attribs.3x
menu_driver()Drivermenu_new.3x
menu_fore()Foregroundmenu_attribs.3x
menu_fore()Foregroundmenu_attribs.3x
menu_format()Formatmenu_format.3x
menu_grey()Greymenu_attribs.3x
menu_grey()Greymenu_attribs.3x
menu_init()Get_Menu_Init_Hookmenu_hook.3x
menu_items()Itemsmenu_items.3x
menu_mark()Markmenu_mark.3x
menu_opts()Get_Optionsmenu_opts.3x
menu_opts()Get_Optionsmenu_opts.3x
menu_opts_on()Switch_Optionsmenu_opts.3x
menu_pad()Pad_Charactermenu_attribs.3x
menu_pattern()Patternmenu_pattern.3x
menu_spacing()Spacingmenu_spacing.3x
menu_sub()Get_Sub_Windowmenu_win.3x
menu_term()Get_Menu_Term_Hookmenu_hook.3x
menu_userptrGet_User_Datamenu_userptr.3x
menu_userptrGet_User_Datamenu_userptr.3x
menu_win()Get_Windowmenu_win.3x
meta()Set_Meta_Modecurs_inopts.3x
mouseinterval()Mouse_Intervalcurs_mouse.3x
mousemask()Start_Mousecurs_mouse.3x
move_field()Moveform_field.3x
move_panel()Movepanel.3x
mvderwin()Move_Derived_Windowcurs_window.3x
mvwaddch()Addcurs_addch.3x
mvwaddchnstr()Addcurs_addchstr.3x
mvwaddnstr()Addcurs_addstr.3x
mvwchgat()Change_Attributescurs_attr.3x
mvwdelch()Delete_Charactercurs_delch.3x
mvwin()Move_Windowcurs_window.3x
mvwinch()Peekcurs_inch.3x
mvwinchnstr()Peekcurs_inchstr.3x
mvwinnstr()Peekcurs_instr.3x
mvwinsch()Insertcurs_winch.3x
mvwinsnstr()Insertcurs_winch.3x
napms()Nap_Milli_Secondscurs_kernel.3x
new_field()Createform_field_new.3x
new_field()New_Fieldform_field_new.3x
new_form()Createform_new.3x
new_form()New_Formform_new.3x
new_item()Createmitem_new.3x
new_item()New_Itemmitem_new.3x
new_menu()Createmenu_new.3x
new_page()Is_New_Pageform_new_page.3x
new_panel()Createpanel.3x
new_panel()New_Panelpanel.3x
newpad()New_Padcurs_pad.3x
newwin()Createcurs_window.3x
nl()Set_NL_Modecurs_outopts.3x
nodelay()Set_NoDelay_Modecurs_inopts.3x
notimeout()Set_Escape_Time_Modecurs_inopts.3x
overlay()Overlaycurs_overlay.3x
overwrite()Overwritecurs_overlay.3x
pair_content()Pair_Contentcurs_color.3x
panel_above()Abovepanel.3x
panel_below()Belowpanel.3x
panel_hidden()Is_Hiddenpanel.3x
panel_userptrGet_User_Datapanel.3x
panel_userptrGet_User_Datapanel.3x
panel_window()Get_Windowpanel.3x
panel_window()Panel_Windowpanel.3x
pechochar()Add_Character_To_Pad_And_Echo_Itcurs_pad.3x
pnoutrefresh()Refresh_Without_Updatecurs_pad.3x
pos_form_cursor()Position_Cursorform_cursor.3x
pos_menu_cursor()Position_Cursormenu_cursor.3x
post_form()Postform_post.3x
post_menu()Postmenu_post.3x
prefresh()Refreshcurs_pad.3x
qiflush()Set_Queue_Interrupt_Modecurs_inopts.3x
raw()Set_Raw_Modecurs_inopts.3x
redrawwin()Redrawcurs_refresh.3x
replace_panel()Replacepanel.3x
reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
resetty();Reset_Terminal_Statecurs_kernel.3x
ripoffline()Rip_Off_Linescurs_kernel.3x
savetty()Save_Terminal_Statecurs_kernel.3x
scale_form()Scaleform_win.3x
scale_menu()Scalemenu_win.3x
scrollok()Allow_Scrollingcurs_outopts.3x
set_current_field()Set_Currentform_page.3x
set_current_item()Set_Currentmitem_current.3x
set_field_back()Set_Backgroundform_field_attributes.3x
set_field_buffer()Set_Bufferform_field_buffer.3x
set_field_fore()Set_Foregroundform_field_attributes.3x
set_field_init()Set_Field_Init_Hookform_hook.3x
set_field_just()Set_Justificationform_field_just.3x
set_field_max()Set_Maximum_Sizeform_field_buffer.3x
set_field_opts()Set_Optionsform_field_opts.3x
set_field_pad()Set_Pad_Characterform_field_attributes.3x
set_field_status()Set_Statusform_field_buffer.3x
set_field_term()Set_Field_Term_Hookform_hook.3x
set_field_type()Set_Typeform_fieldtype.3x
set_field_userptrSet_User_Dataform_field_userptr.3x
set_form_fields()Redefineform_field.3x
set_form_fields()Set_Fieldsform_field.3x
set_form_init()Set_Form_Init_Hookform_hook.3x
set_form_opts()Set_Optionsform_opts.3x
set_form_page()Set_Pageform_page.3x
set_form_sub()Set_Sub_Windowform_win.3x
set_form_term()Set_Form_Term_Hookform_hook.3x
set_form_userptrSet_User_Dataform_userptr.3x
set_form_win()Set_Windowform_win.3x
set_item_init()Set_Item_Init_Hookmenu_hook.3x
set_item_opts()Set_Optionsmitem_opts.3x
set_item_term()Set_Item_Term_Hookmenu_hook.3x
set_item_userptrSet_User_Datamitem_userptr.3x
set_item_value()Set_Valuemitem_value.3x
set_menu_back()Set_Backgroundmenu_attribs.3x
set_menu_fore()Set_Foregroundmenu_attribs.3x
set_menu_format()Set_Formatmenu_format.3x
set_menu_grey()Set_Greymenu_attribs.3x
set_menu_init()Set_Menu_Init_Hookmenu_hook.3x
set_menu_items()Redefinemenu_items.3x
set_menu_mark()Set_Markmenu_mark.3x
set_menu_opts()Set_Optionsmenu_opts.3x
set_menu_pad()Set_Pad_Charactermenu_attribs.3x
set_menu_pattern()Set_Patternmenu_pattern.3x
set_menu_spacing()Set_Spacingmenu_spacing.3x
set_menu_sub()Set_Sub_Windowmenu_win.3x
set_menu_term()Set_Menu_Term_Hookmenu_hook.3x
set_menu_userptrSet_User_Datamenu_userptr.3x
set_menu_win()Set_Windowmenu_win.3x
set_new_page()Set_New_Pageform_new_page.3x
set_panel_userptrSet_User_Datapanel.3x
set_top_row()Set_Top_Rowmitem_current.3x
show_panel()Showpanel.3x
slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
slk_attr()Get_Soft_Label_Key_Attributescurs_slk.3x
slk_attron()Switch_Soft_Label_Key_Attributescurs_slk.3x
slk_attrset()Set_Soft_Label_Key_Attributescurs_slk.3x
slk_clear()Clear_Soft_Label_Keyscurs_slk.3x
slk_color()Set_Soft_Label_Key_Colorcurs_slk.3x
slk_init()Init_Soft_Label_Keyscurs_slk.3x
slk_label()Get_Soft_Label_Keycurs_slk.3x
slk_label()Get_Soft_Label_Keycurs_slk.3x
slk_noutrefresh()Refresh_Soft_Label_Keys_Without_Updatecurs_slk.3x
slk_refresh()Refresh_Soft_Label_Keycurs_slk.3x
slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
slk_set()Set_Soft_Label_Keycurs_slk.3x
slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
start_clolor()Start_Colorcurs_color.3x
stdscrStandard_Windowcurs_initscr.3x
subpad()Sub_Padcurs_pad.3x
subwin()Sub_Windowcurs_window.3x
syncok()Set_Synch_Modecurs_window.3x
termattrs()Supported_Attributescurs_termattrs.3x
termname()Terminal_Namecurs_termattrs.3x
termname()Terminal_Namecurs_termattrs.3x
top_panel()Toppanel.3x
top_row()Top_Rowmitem_current.3x
touchline()Touchcurs_touch.3x
touchwin()Touchcurs_touch.3x
unctrl()Un_Controlcurs_util.3x
unctrl()Un_Controlcurs_util.3x
ungetch()Undo_Keystrokecurs_getch.3x
ungetmouse()Unget_Mousecurs_mouse.3x
untouchwin()Untouchcurs_touch.3x
update_panels()Update_Panelspanel.3x
waddch()Addcurs_addch.3x
waddchnstr()Addcurs_addchstr.3x
waddnstr()Addcurs_addstr.3x
wattr_get()Get_Character_Attributescurs_attr.3x
wattr_get()Get_Character_Attributecurs_attr.3x
wattron()Switch_Character_Attributecurs_attr.3x
wattrset()Set_Character_Attributescurs_attr.3x
wbkgd()Change_Backgroundcurs_bkgd.3x
wbkgdget()Get_Backgroundcurs_bkgd.3x
wbkgdset()Set_Backgroundcurs_bkgd.3x
wborder()Bordercurs_border.3x
wchgat()Change_Attributescurs_attr.3x
wclear()Clearcurs_clear.3x
wclrtobot()Clear_To_End_Of_Screencurs_clear.3x
wclrtoeol()Clear_To_End_Of_Linecurs_clear.3x
wcolor_set()Set_Colorcurs_attr.3x
wdelch()Delete_Charactercurs_delch.3x
wdeleteln()Delete_Linecurs_deleteln.3x
wechochar()Add_With_Immediate_Echocurs_addch.3x
wenclose()Enclosed_In_Windowcurs_mouse.3x
werase()Erasecurs_clear.3x
wgetch()Get_Keystrokecurs_getch.3x
wgetnstr()Getcurs_getstr.3x
whline()Horizontal_Linecurs_border.3x
winch()Peekcurs_inch.3x
winchnstr()Peekcurs_inchstr.3x
winnstr()Peekcurs_instr.3x
winsch()Insertcurs_winch.3x
winsdelln()Insert_Delete_Linescurs_deleteln.3x
winsertln()Insert_Linecurs_deleteln.3x
winsnstr()Insertcurs_winch.3x
wmove()Move_Cursorcurs_move.3x
wnoutrefresh()Refresh_Without_Updatecurs_refresh.3x
wredrawln()Redrawcurs_refresh.3x
wrefresh()Refreshcurs_refresh.3x
wscrl()Scrollcurs_scroll.3x
wsetscrreg()Set_Scroll_Regioncurs_outopts.3x
wsyncdown()Synchronize_Downwardscurs_window.3x
wsyncup()Synchronize_Upwardscurs_window.3x
wtimeout()Set_Timeout_Modecurs_inopts.3x
wtouchln()Change_Line_Statuscurs_touch.3x
wvline()Vertical_Linecurs_border.3x
diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in index c43e2873..c9582fb7 100644 --- a/Ada95/samples/Makefile.in +++ b/Ada95/samples/Makefile.in @@ -29,7 +29,7 @@ # Author: Juergen Pfeifer 1996 # # Version Control -# $Revision: 1.21 $ +# $Revision: 1.24 $ # .SUFFIXES: @@ -82,7 +82,7 @@ ALIB = @cf_ada_package@ ABASE = $(ALIB)-curses CARGS =-cargs $(ADAFLAGS) -LARGS =-largs -L../../lib $(LD_FLAGS) -lncurses +LARGS =-largs -L../../lib $(LD_FLAGS) -lAdaCurses -lncurses@LIB_SUFFIX@ PROGS = tour rain @@ -102,6 +102,7 @@ all :: demo1 rainy_day sources : @ +libs \ install \ install.libs :: @ diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in index 46b232ad..a3de1954 100644 --- a/Ada95/src/Makefile.in +++ b/Ada95/src/Makefile.in @@ -29,7 +29,7 @@ # Author: Juergen Pfeifer 1996 # # Version Control -# $Revision: 1.19 $ +# $Revision: 1.20 $ # .SUFFIXES: @@ -171,10 +171,12 @@ dotouch : sources : @ -install :: -install.libs :: -uninstall :: +libs \ +install \ +install.libs \ +uninstall \ uninstall.libs :: + @ generics: $(GENALIS) @ diff --git a/INSTALL b/INSTALL index 5033c44b..9058c061 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,8 @@ --- $Id: INSTALL,v 1.33 1999/09/18 23:04:36 tom Exp $ +-- $Id: INSTALL,v 1.38 2000/07/08 22:46:08 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- + ************************************************************ * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. * ************************************************************ @@ -27,9 +28,6 @@ read the USING NCURSES WITH EMACS section below. If you are trying to build applications using gpm with ncurses, read the USING NCURSES WITH GPM section below. -If you are trying to build Elvis using ncurses for terminal support, -read the USING NCURSES WITH ELVIS section below. - If you are running over the Andrew File System see the note below on USING NCURSES WITH AFS. @@ -40,7 +38,9 @@ If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based i386 Unixes, go read the Portability section in the TO-DO file before you do anything else. + REQUIREMENTS: +------------ You will need the following in order to build and install ncurses under UNIX: @@ -52,7 +52,9 @@ You will need the following in order to build and install ncurses under UNIX: Ncurses has been also built in the OS/2 EMX environment. + INSTALLATION PROCEDURE: +---------------------- 1. First, decide whether you want ncurses to replace your existing library (in which case you'll need super-user privileges) or be installed in parallel @@ -66,7 +68,7 @@ INSTALLATION PROCEDURE: The package gets installed beneath the --prefix directory as follows: In $(prefix)/bin: tic, infocmp, captoinfo, tset, - reset, clear, tput, toe + reset, clear, tput, toe In $(prefix)/lib: libncurses*.* libcurses.a In $(prefix)/share/terminfo: compiled terminal descriptions In $(prefix)/include: C header files @@ -102,19 +104,19 @@ INSTALLATION PROCEDURE: If you do not specify any models, the normal and debug libraries will be configured. Typing `configure' with no arguments is equivalent to: - ./configure --with-normal --with-debug --enable-overwrite + ./configure --with-normal --with-debug --enable-overwrite Typing - ./configure --with-shared + ./configure --with-shared makes the shared libraries the default, resulting in - ./configure --with-shared --with-normal --with-debug --enable-overwrite + ./configure --with-shared --with-normal --with-debug --enable-overwrite If you want only shared libraries, type - ./configure --with-shared --without-normal --without-debug + ./configure --with-shared --without-normal --without-debug Rules for generating shared libraries are highly dependent upon the choice of host system and compiler. We've been testing shared libraries on Linux @@ -130,14 +132,14 @@ INSTALLATION PROCEDURE: 3. Type `make'. Ignore any warnings, no error messages should be produced. This should compile the ncurses library, the terminfo compiler tic(1), captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) - programs (see the man pages for explanation of what they do), some test + programs (see the manual pages for explanation of what they do), some test programs, and the panels, menus, and forms libraries. 4. Run ncurses and several other test programs in the test directory to verify that ncurses functions correctly before doing an install that may overwrite system files. Read the file test/README for details on the test programs. - + NOTE: You must have installed the terminfo database, or set the environment variable $TERMINFO to point to a SVr4-compatible terminfo database before running the test programs. Not all vendors' terminfo @@ -149,17 +151,17 @@ INSTALLATION PROCEDURE: cursor addressing and window scrolling works OK, etc. 5. Once you've tested, you can type `make install' to install libraries, - the programs, the terminfo database and the man pages. Alternately, you + the programs, the terminfo database and the manual pages. Alternately, you can type `make install' in each directory you want to install. In the top-level directory, you can do a partial install using these commands: 'make install.progs' installs tic, infocmp, etc... - 'make install.includes' installs the headers. - 'make install.libs' installs the libraries (and the headers). - 'make install.data' installs the terminfo data. (Note: `tic' must - be installed before the terminfo data can be - compiled). - 'make install.man' installs the man pages. + 'make install.includes' installs the headers. + 'make install.libs' installs the libraries (and the headers). + 'make install.data' installs the terminfo data. (Note: `tic' must + be installed before the terminfo data can be + compiled). + 'make install.man' installs the manual pages. ############################################################################ # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing # @@ -168,9 +170,9 @@ INSTALLATION PROCEDURE: # this purpose. Don't forget to run tic on the file once you're done. # ############################################################################ - The terminfo(5) manual page wants to be preprocessed with tbl(1) before + The terminfo(5) manual page must be preprocessed with tbl(1) before being formatted by nroff(1). Modern man(1) implementations tend to do - this by default, but you may want to look at your version's man page + this by default, but you may want to look at your version's manual page to be sure. If the system already has a curses library that you need to keep using @@ -205,7 +207,7 @@ INSTALLATION PROCEDURE: the configure script to not attempt to determine the type of 'bool' which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++. - + 7. If you're running an older Linux, you must either (a) tell Linux that the console terminal type is `linux' or (b) make a link to or copy of the linux entry in the appropriate place under your terminfo directory, named @@ -226,7 +228,527 @@ INSTALLATION PROCEDURE: and you'll have to redo it. There is no need to have entries for all possible screen sizes, ncurses will figure out the size automatically. + +SUMMARY OF CONFIGURE OPTIONS: +---------------------------- + + The configure script provides a short list of its options when you type + + ./configure --help + + The --help and several options are common to all configure scripts that are + generated with autoconf. Those are all listed before the line + + --enable and --with options recognized: + + The other options are specific to this package. We list them in alphabetic + order. + + --disable-big-core + Assume machine has little memory. The configure script attempts to + determine if your machine has enough memory (about 6Mb) to compile the + terminfo database without writing portions to disk. Some allocators + return deceptive results, so you may have to override the configure + script. Or you may be building tic for a smaller machine. + + --disable-database + Use only built-in data. The ncurses libraries normally read terminfo + and termcap data from disk. You can configure ncurses to have a + built-in database, aka "fallback" entries. Embedded applications may + have no need for an external database. + + --disable-ext-funcs + Disable function-extensions. Configure ncurses without the functions + that are not specified by XSI. See ncurses/modules for the exact + list of library modules that would be suppressed. + + --disable-leaks + For testing, compile-in code that frees memory that normally would not + be freed, to simplify analysis of memory-leaks. + + --disable-macros + For testing, use functions rather than macros. The program will run + more slowly, but it is simpler to debug. This makes a header file + "nomacros.h". See also the --enable-expanded option. + + --disable-overwrite + If you are installing ncurses on a system which contains another + development version of curses, or which could be confused by the loader + for another version, we recommend that you leave out the link to + -lcurses. The ncurses library is always available as -lncurses. + Disabling overwrite also causes the ncurses header files to be + installed into a subdirectory, e.g., /usr/local/include/ncurses, + rather than the include directory. This makes it simpler to avoid + compile-time conflicts with other versions of curses.h + + --disable-scroll-hints + 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. + + --enable-broken_linker + A few platforms have what we consider a broken linker: it cannot link + objects from an archive solely by referring to data objects in those + files, but requires a function reference. This configure option + changes several data references to functions to work around this + problem. + + NOTE: With ncurses 5.1, this may not be necessary, since we are + told that some linkers interpret uninitialized global data as a + different type of reference which behaves as described above. We have + explicitly initialized all of the global data to work around the + problem. + + --enable-bsdpad + Recognize BSD-style prefix padding. Some ancient BSD programs (such as + nethack) call tputs("50") to implement delays. + + --enable-colorfgbg + Compile with experimental $COLORFGBG code. That environment variable + is set by some terminal emulators as a hint to applications, by + advertising the default foreground and background colors. During + initialization, ncurses sets color pair 0 to match this. + + --enable-const + The curses interface as documented in XSI is rather old, in fact + including features that precede ANSI C. The prototypes generally do + not make effective use of "const". When using stricter compilers (or + gcc with appropriate warnings), you may see warnings about the mismatch + between const and non-const data. We provide a configure option which + changes the interfaces to use const - quieting these warnings and + reflecting the actual use of the parameters more closely. The ncurses + library uses the symbol NCURSES_CONST for these instances of const, + and if you have asked for compiler warnings, will add gcc's const-qual + warning. There will still be warnings due to subtle inconsistencies + in the interface, but at a lower level. + + NOTE: configuring ncurses with this option may detract from the + portability of your applications by encouraging you to use const in + places where the XSI curses interface would not allow them. Similar + issues arise when porting to SVr4 curses, which uses const in even + fewer places. + + --enable-echo + Use the option --disable-echo to make the build-log less verbose by + suppressing the display of the compile and link commands. This makes + it easier to see the compiler warnings. (You can always use "make -n" + to see the options that are used). + + --enable-expanded + For testing, generate functions for certain macros to make them visible + as such to the debugger. See also the --disable-macros option. + + --enable-getcap + Use the 4.4BSD getcap code if available, or a bundled version of it to + fetch termcap entries. Entries read in this way cannot use (make + cross-references to) the terminfo tree, but it is faster than reading + /etc/termcap. + + --enable-getcap-cache + Cache translated termcaps under the directory $HOME/.terminfo + + NOTE: this sounds good - it makes ncurses run faster the second time. + But look where the data comes from - an /etc/termcap containing lots of + entries that are not up to date. If you configure with this option and + forget to install the terminfo database before running an ncurses + application, you will end up with a hidden terminfo database that + generally does not support color and will miss some function keys. + + --enable-hard-tabs + Compile-in cursor-optimization code that uses hard-tabs. We would make + this a standard feature except for the concern that the terminfo entry + may not be accurate, or that your stty settings have disabled the use + of tabs. + + --enable-hashmap + Compile with hashmap scrolling-optimization code. This is the default, + replacing an older scrolling-hints algorithm. + + --enable-no-padding + Compile-in support for the $NCURSES_NO_PADDING environment variable, + which allows you to suppress the effect of non-mandatory padding in + terminfo entries. This is the default, unless you have disabled the + extended functions. + + --enable-rpath + Use rpath option when generating shared libraries. This applies mainly + to systems using the GNU linker (read the manpage). + + --enable-safe-sprintf + Compile with experimental safe-sprintf code. You may consider using + this if you are building ncurses for a system that has neither + vsnprintf() or vsprintf(). It is slow, however. + + --enable-sigwinch + Compile support for ncurses' SIGWINCH handler. If your application has + its own SIGWINCH handler, ncurses will not use its own. The ncurses + handler causes wgetch() to return KEY_RESIZE when the screen-size + changes. This option is the default, unless you have disabled the + extended functions. + + --enable-symlinks + If your system supports symbolic links, make tic use symbolic links + rather than hard links to save diskspace when writing aliases in the + terminfo database. + + --enable-tcap-names + Compile-in support for user-definable terminal capabilities. Use the + -x option of tic and infocmp to treat unrecognized terminal + capabilities as user-defined strings. This option is the default, + unless you have disabled the extended functions. + + --enable-termcap + Compile in support for reading terminal descriptions from termcap if no + match is found in the terminfo database. See also the --enable-getcap + and --enable-getcap-cache options. + + --enable-warnings + Turn on GCC compiler warnings. There should be only a few. + + --enable-widec + Compile with experimental wide-character code. This makes a different + version of the libraries (e.g., libncursesw.so), which stores + characters in 16-bits. We provide a simple UTF-8 driver and test + program to use this feature with terminals that can display UTF-8. + + NOTE: applications compiled with this configuration are not compatible + with those built for 8-bit characters. You cannot simply make a + symbolic link to equate libncurses.so with libncursesw.so + + --enable-xmc-glitch + Compile-in support experimental xmc (magic cookie) code. + + --with-ada-compiler=CMD + Specify the Ada95 compiler command (default "gnatmake") + + --with-ada-include=DIR + Tell where to install the Ada includes (default: + PREFIX/lib/ada/adainclude) + + --with-ada-objects=DIR + Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib) + + --with-dbmalloc + For testing, compile and link with Conor Cahill's dbmalloc library. + + --with-debug + Generate debug-libraries (default). These are named by adding "_g" + to the root, e.g., libncurses_g.a + + --with-develop + Enable experimental/development options. This does not count those + that change the interface, such as --enable-widec. + + --with-dmalloc + For testing, compile and link with Gray Watson's dmalloc library. + + --with-fallbacks=XXX + Specify a list of fallback terminal descriptions which will be + compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES. + + --with-gpm + use Alessandro Rubini's GPM library to provide mouse support on the + Linux console. + + --with-install-prefix=XXX + Allows you to specify an alternate location for installing ncurses + after building it. The value you specify is prepended to the "real" + install location. This simplifies making binary packages. + + NOTE: a few systems build shared libraries with fixed pathnames; this + option probably will not work for those configurations. + + --with-manpage-format=XXX + Tell the configure script how you would like to install man-pages. The + option value must be one of these: gzip, compress, BSDI, normal, + formatted. If you do not give this option, the configure script + attempts to determine which is the case. + + --with-manpage-renames=XXX + Tell the configure script that you wish to rename the manpages while + installing. Currently the only distribution which does this is + the Linux Debian. The option value specifies the name of a file + that lists the renamed files, e.g., $srcdir/man/man_db.renames + + --with-manpage-symlinks + Tell the configure script that you wish to make symbolic links in the + man-directory for aliases to the man-pages. This is the default, but + can be disabled for systems that provide this automatically. Doing + this on systems that do not support symbolic links will result in + copying the man-page for each alias. + + --with-normal + Generate normal (i.e., static) libraries (default). + + --with-profile + Generate profile-libraries These are named by adding "_p" to the root, + e.g., libncurses_p.a + + --with-rcs-ids + Compile-in RCS identifiers. Most of the C files have an identifier. + + --with-shared + Generate shared-libraries. The names given depend on the system for + which you are building, typically using a ".so" suffix, along with + symbolic links that refer to the release version. + + NOTE: Unless you override the configure script by setting the $CFLAGS + environment variable, these will not be built with the -g debugging + option. + + --with-shlib-version=XXX + Specify whether to use the release or ABI version for shared libraries. + 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-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 + libraries. 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-terminfo-dirs=XXX + Specify a search-list of terminfo directories which will be compiled into + the ncurses library (default: DATADIR/terminfo) + + --with-termlib + When building the ncurses library, organize this as two parts: the + curses library (libncurses) and the low-level terminfo library + (libtinfo). This is done to accommodate applications that use only + the latter. The terminfo library is about half the size of the total. + + --without-ada + Suppress the configure script's check for Ada95, do not build the + Ada95 binding and related demo. + + --without-cxx + XSI curses declares "bool" as part of the interface. C++ also declares + "bool". Neither specifies the size and type of booleans, but both + insist on the same name. We chose to accommodate this by making the + configure script check for the size and type (e.g., unsigned or signed) + that your C++ compiler uses for booleans. If you do not wish to use + ncurses with C++, use this option to tell the configure script to not + adjust ncurses bool to match C++. + + --without-cxx-binding + Suppress the configure script's check for C++, do not build the + C++ binding and related demo. + + --without-progs + Tell the configure script to suppress the build of ncurses' application + programs (e.g., tic). The test applications will still be built if you + type "make", though not if you simply do "make install". + + +COMPATIBILITY WITH OLDER VERSIONS OF NCURSES: +-------------------------------------------- + + Because ncurses implements the X/Open Curses Specification, its interface + is fairly stable. That does not mean the interface does not change. + Changes are made to the documented interfaces when we find differences + between ncurses and X/Open or implementations which they certify (such as + Solaris). We add extensions to those interfaces to solve problems not + addressed by the original curses design, but those must not conflict with + the X/Open documentation. + + Here are some of the major interface changes, and related problems which + you may encounter when building a system with different versions of + ncurses: + + 5.1 (July 8, 2000) + Interface changes: + + + made the extended terminal capabilities + (configure --enable-tcap-names) a standard feature. This should + be transparent to applications that do not require it. + + + removed the trace() function and related trace support from the + production library. + + + modified curses.h.in, undef'ing some symbols to avoid conflict + with C++ STL. + + Added extensions: assume_default_colors(). + + 5.0 (October 23, 1999) + Interface changes: + + + implemented the wcolor_set() and slk_color() functions. + + + move macro winch to a function, to hide details of struct ldat + + + corrected prototypes for slk_* functions, using chtype rather than + attr_t. + + + the slk_attr_{set,off,on} functions need an additional void* + parameter according to XSI. + + + modified several prototypes to correspond with 1997 version of X/Open + Curses: [w]attr_get(), [w]attr_set(), border_set() have different + parameters. Some functions were renamed or misspelled: + erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used + attr_get(). + + Added extensions: keybound(), curses_version(). + + Terminfo database changes: + + + change translation for termcap 'rs' to terminfo 'rs2', which is + the documented equivalent, rather than 'rs1'. + + The problems are subtler in recent releases. + + a) This release provides users with the ability to define their own + terminal capability extensions, like termcap. To accomplish this, + we redesigned the TERMTYPE struct (in term.h). Very few + applications use this struct. They must be recompiled to work with + the 5.0 library. + + a) If you use the extended terminfo names (i.e., you used configure + --enable-tcap-names), the resulting terminfo database can have some + entries which are not readable by older versions of ncurses. This + is a bug in the older versions: + + + the terminfo database stores booleans, numbers and strings in + arrays. The capabilities that are listed in the arrays are + specified by X/Open. ncurses recognizes a number of obsolete and + extended names which are stored past the end of the specified + entries. + + + a change to read_entry.c in 951001 made the library do an lseek() + call incorrectly skipping data which is already read from the + string array. This happens when the number of strings in the + terminfo data file is greater than STRCOUNT, the number of + specified and obsolete or extended strings. + + + as part of alignment with the X/Open final specification, in the + 990109 patch we added two new terminfo capabilities: + set_a_attributes and set_pglen_inch). This makes the indices for + the obsolete and extended capabilities shift up by 2. + + + the last two capabilities in the obsolete/extended list are memu + and meml, which are found in most terminfo descriptions for xterm. + + When trying to read this terminfo entry, the spurious lseek() + causes the library to attempt to read the final portion of the + terminfo data (the text of the string capabilities) 4 characters + past its starting point, and reads 4 characters too few. The + library rejects the data, and applications are unable to + initialize that terminal type. + + FIX: remove memu and meml from the xterm description. They are + obsolete, not used by ncurses. (It appears that the feature was + added to xterm to make it more like hpterm). + + This is not a problem if you do not use the -x option of tic to + create a terminfo database with extended names. Note that the + user-defined terminal capabilities are not affected by this bug, + since they are stored in a table after the older terminfo data ends, + and are invisible to the older libraries. + + c) Some developers did not wish to use the C++ binding, and used the + configure --without-cxx option. This causes problems if someone + uses the ncurses library from C++ because that configure test + determines the type for C++'s bool and makes ncurses match it, since + both C++ and curses are specified to declare bool. Calling ncurses + functions with the incorrect type for bool will cause execution + errors. In 5.0 we added a configure option "--without-cxx-binding" + which controls whether the binding itself is built and installed. + + 4.2 (March 2, 1998) + Interface changes: + + + correct prototype for termattrs() as per XPG4 version 2. + + + add placeholder prototypes for color_set(), erasewchar(), + term_attrs(), wcolor_set() as per XPG4 version 2. + + + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in + SVr4 headers. + + New extensions: keyok() and define_key(). + + Terminfo database changes: + + + corrected definition in curses.h for ACS_LANTERN, which was 'I' + rather than 'i'. + + 4.1 (May 15, 1997) + + We added these extensions: use_default_colors(). Also added + configure option --enable-const, to support the use of const where + X/Open should have, but did not, specify. + + The terminfo database content changed the representation of color for + most entries that use ANSI colors. SVr4 curses treats the setaf/setab + and setf/setb capabilities differently, interchanging the red/blue + colors in the latter. + + 4.0 (December 24, 1996) + + We bumped to version 4.0 because the newly released dynamic loader + (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL + versions were inconsistent. At that point, ncurses ABI was 3.4 and the + REL was 1.9.9g, so we made them consistent. + + 1.9.9g (December 1, 1996) + + This fixed most of the problems with 1.9.9e, and made these interface + changes: + + + remove tparam(), which had been provided for compatibility with + some termcap. tparm() is standard, and does not conflict with + application's fallback for missing tparam(). + + + turn off hardware echo in initscr(). This changes the sense of the + echo() function, which was initialized to echoing rather than + nonechoing (the latter is specified). There were several other + corrections to the terminal I/O settings which cause applications to + behave differently. + + + implemented several functions (such as attr_on()) which were + available only as macros. + + + corrected several typos in curses.h.in (i.e., the mvXXXX macros). + + + corrected prototypes for delay_output(), + has_color, immedok() and idcok(). + + + corrected misspelled getbkgd(). Some applications used the + misspelled name. + + + added _yoffset to WINDOW. The size of WINDOW does not impact + applications, since they use only pointers to WINDOW structs. + + These changes were made to the terminfo database: + + + removed boolean 'getm' which was available as an extended name. + + We added these extensions: wresize(), resizeterm(), has_key() and + mcprint(). + + 1.9.9e (March 24, 1996) + + not recommended (a last-minute/untested change left the forms and + menus libraries unusable since they do not repaint the screen). + Foreground/background colors are combined incorrectly, working properly + only on a black background. When this was released, the X/Open + specification was available only in draft form. + + Some applications (such as lxdialog) were "fixed" to work with the + incorrect color scheme. + + 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, @@ -265,7 +787,7 @@ IF YOU ARE A SYSTEM INTEGRATOR: reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d mappings that will set this up: - keycode 15 = Tab Tab + keycode 15 = Tab Tab alt keycode 15 = Meta_Tab shift keycode 15 = F26 string F26 ="\033[Z" @@ -297,7 +819,10 @@ IF YOU ARE A SYSTEM INTEGRATOR: to us explaining why you don't want to, so we can work out nomenclature that will make users' lives easier rather than harder. -RECENT XTERM VERSIONS + +RECENT XTERM VERSIONS: +--------------------- + The terminfo database file included with this distribution assumes you are running an XFree86 xterm based on X11R6 (i.e., xterm-r6). The earlier X11R5 entry (xterm-r5) is provided as well. @@ -311,7 +836,10 @@ RECENT XTERM VERSIONS applications that assume these capabilities will produce incorrect output on the older xterm (e.g., highlighting is not cleared). -CONFIGURING FALLBACK ENTRIES + +CONFIGURING FALLBACK ENTRIES: +---------------------------- + In order to support operation of ncurses programs before the terminfo tree is accessible (that is, in single-user mode or at OS installation time) the ncurses library can be compiled to include an array of @@ -348,7 +876,10 @@ CONFIGURING FALLBACK ENTRIES fallbacks. A good rule of thumb for modern vt100-like entries is that each one will cost about 2.5K of text space. + BSD CONVERSION NOTES: +-------------------- + If you need to support really ancient BSD programs, you probably want to configure with the --enable-bsdpad option. What this does is enable code in tputs() that recognizes a numeric prefix on a @@ -359,7 +890,7 @@ BSD CONVERSION NOTES: an application you probably want to put the remainder of this section in the package README file.) - The following note applies only if you have configured ncurses with + The following note applies only if you have configured ncurses with --enable-termcap. ------------------------------- CUT HERE -------------------------------- @@ -432,54 +963,26 @@ USING NCURSES WITH GPM: which is used on Linux console. Be aware that GPM is commonly installed as a shared library which contains a wrapper for the curses wgetch() function (libcurses.o). Some integrators have simplified - linking applications by combining all of libcurses.so (the BSD curses) - into the libgpm.so file, producing symbol conflicts with ncurses. You - may be able to work around this problem by linking as follows: + linking applications by combining all or part of libcurses.so (the BSD + curses) into the libgpm.so file, producing symbol conflicts with + ncurses (specifically the wgetch function). You may be able to work + around this problem by linking as follows: cc -o foo foo.o -lncurses -lgpm -lncurses but the linker may not cooperate, producing mysterious errors. A patched version of gpm is available: - ftp.clark.net:/pub/dickey/ncurses/gpm-1.10-970125.tgz + dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz This patch is incorporated in gpm 1.12; however some integrators - are slow to update this library. - -USING NCURSES WITH ELVIS: - To use ncurses as the screen-painting library for Elvis, apply the - following patch to the Elvis curses - -*** curses.c.orig Sun Jun 26 05:48:23 1994 ---- curses.c Sun Feb 11 16:50:41 1996 -*************** -*** 986,992 **** - { - if (has_IM) - do_IM(); -! do_IC(); - qaddch(ch); - if (has_EI) - do_EI(); ---- 986,995 ---- - { - if (has_IM) - do_IM(); -!#ifdef NCURSES_VERSION -! else /* ncurses does insertion in a slightly nonstandard way */ -!#endif -! do_IC(); - qaddch(ch); - if (has_EI) - do_EI(); - -This patch is for elvis-1.8pl4 but it can even be used for elvis-1.8pl3 with -an offset of -11 lines. + are slow to update this library. Current distributions of gpm can + be configured properly using the --without-curses option. BUGS: Send any feedback to the ncurses mailing list at - bug-ncurses@gnu.org. To subscribe send mail to - bug-ncurses-request@gnu.org with body that reads: + bug-ncurses@gnu.org. To subscribe send mail to + bug-ncurses-request@gnu.org with body that reads: subscribe ncurses The Hacker's Guide in the misc directory includes some guidelines diff --git a/MANIFEST b/MANIFEST index a69adea6..0007f2aa 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,7 +4,9 @@ ./Ada95/TODO ./Ada95/gen/Makefile.in ./Ada95/gen/gen.c +./Ada95/gen/html.m4 ./Ada95/gen/normal.m4 +./Ada95/gen/table.m4 ./Ada95/gen/terminal_interface-curses-aux.ads.m4 ./Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 ./Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 @@ -17,152 +19,6 @@ ./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 ./Ada95/gen/terminal_interface-curses-panels.ads.m4 ./Ada95/gen/terminal_interface-curses.ads.m4 -./Ada95/html/ada/files.htm -./Ada95/html/ada/files/T.htm -./Ada95/html/ada/funcs.htm -./Ada95/html/ada/funcs/A.htm -./Ada95/html/ada/funcs/C.htm -./Ada95/html/ada/funcs/E.htm -./Ada95/html/ada/funcs/F.htm -./Ada95/html/ada/funcs/G.htm -./Ada95/html/ada/funcs/I.htm -./Ada95/html/ada/funcs/L.htm -./Ada95/html/ada/funcs/M.htm -./Ada95/html/ada/funcs/N.htm -./Ada95/html/ada/funcs/P.htm -./Ada95/html/ada/funcs/R.htm -./Ada95/html/ada/funcs/S.htm -./Ada95/html/ada/funcs/T.htm -./Ada95/html/ada/funcs/U.htm -./Ada95/html/ada/funcs/V.htm -./Ada95/html/ada/index.htm -./Ada95/html/ada/main.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm -./Ada95/html/ada/terminal_interface-curses-forms__ads.htm -./Ada95/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm -./Ada95/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm -./Ada95/html/ada/terminal_interface-curses-menus__ads.htm -./Ada95/html/ada/terminal_interface-curses-mouse__ads.htm -./Ada95/html/ada/terminal_interface-curses-panels-user_data__ads.htm -./Ada95/html/ada/terminal_interface-curses-panels__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-float_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm -./Ada95/html/ada/terminal_interface-curses-text_io__ads.htm -./Ada95/html/ada/terminal_interface-curses__ads.htm -./Ada95/html/ada/terminal_interface__ads.htm -./Ada95/html/index.html -./Ada95/html/man/curs_addch.3x.html -./Ada95/html/man/curs_addchstr.3x.html -./Ada95/html/man/curs_addstr.3x.html -./Ada95/html/man/curs_attr.3x.html -./Ada95/html/man/curs_beep.3x.html -./Ada95/html/man/curs_bkgd.3x.html -./Ada95/html/man/curs_border.3x.html -./Ada95/html/man/curs_clear.3x.html -./Ada95/html/man/curs_color.3x.html -./Ada95/html/man/curs_delch.3x.html -./Ada95/html/man/curs_deleteln.3x.html -./Ada95/html/man/curs_getch.3x.html -./Ada95/html/man/curs_getstr.3x.html -./Ada95/html/man/curs_getyx.3x.html -./Ada95/html/man/curs_inch.3x.html -./Ada95/html/man/curs_inchstr.3x.html -./Ada95/html/man/curs_initscr.3x.html -./Ada95/html/man/curs_inopts.3x.html -./Ada95/html/man/curs_insch.3x.html -./Ada95/html/man/curs_insstr.3x.html -./Ada95/html/man/curs_instr.3x.html -./Ada95/html/man/curs_kernel.3x.html -./Ada95/html/man/curs_mouse.3x.html -./Ada95/html/man/curs_move.3x.html -./Ada95/html/man/curs_outopts.3x.html -./Ada95/html/man/curs_overlay.3x.html -./Ada95/html/man/curs_pad.3x.html -./Ada95/html/man/curs_print.3x.html -./Ada95/html/man/curs_printw.3x.html -./Ada95/html/man/curs_refresh.3x.html -./Ada95/html/man/curs_scanw.3x.html -./Ada95/html/man/curs_scr_dmp.3x.html -./Ada95/html/man/curs_scr_dump.3x.html -./Ada95/html/man/curs_scroll.3x.html -./Ada95/html/man/curs_slk.3x.html -./Ada95/html/man/curs_termattrs.3x.html -./Ada95/html/man/curs_termcap.3x.html -./Ada95/html/man/curs_terminfo.3x.html -./Ada95/html/man/curs_touch.3x.html -./Ada95/html/man/curs_util.3x.html -./Ada95/html/man/curs_window.3x.html -./Ada95/html/man/define_key.3x.html -./Ada95/html/man/dft_fgbg.3x.html -./Ada95/html/man/form.3x.html -./Ada95/html/man/form_cursor.3x.html -./Ada95/html/man/form_data.3x.html -./Ada95/html/man/form_driver.3x.html -./Ada95/html/man/form_field.3x.html -./Ada95/html/man/form_field_attributes.3x.html -./Ada95/html/man/form_field_buffer.3x.html -./Ada95/html/man/form_field_info.3x.html -./Ada95/html/man/form_field_just.3x.html -./Ada95/html/man/form_field_new.3x.html -./Ada95/html/man/form_field_opts.3x.html -./Ada95/html/man/form_field_userptr.3x.html -./Ada95/html/man/form_field_validation.3x.html -./Ada95/html/man/form_fieldtype.3x.html -./Ada95/html/man/form_hook.3x.html -./Ada95/html/man/form_new.3x.html -./Ada95/html/man/form_new_page.3x.html -./Ada95/html/man/form_opts.3x.html -./Ada95/html/man/form_page.3x.html -./Ada95/html/man/form_post.3x.html -./Ada95/html/man/form_requestname.3x.html -./Ada95/html/man/form_userptr.3x.html -./Ada95/html/man/form_win.3x.html -./Ada95/html/man/keyok.3x.html -./Ada95/html/man/menu.3x.html -./Ada95/html/man/menu_attribs.3x.html -./Ada95/html/man/menu_cursor.3x.html -./Ada95/html/man/menu_driver.3x.html -./Ada95/html/man/menu_format.3x.html -./Ada95/html/man/menu_hook.3x.html -./Ada95/html/man/menu_items.3x.html -./Ada95/html/man/menu_mark.3x.html -./Ada95/html/man/menu_new.3x.html -./Ada95/html/man/menu_opts.3x.html -./Ada95/html/man/menu_pattern.3x.html -./Ada95/html/man/menu_post.3x.html -./Ada95/html/man/menu_requestname.3x.html -./Ada95/html/man/menu_spacing.3x.html -./Ada95/html/man/menu_userptr.3x.html -./Ada95/html/man/menu_win.3x.html -./Ada95/html/man/mitem_current.3x.html -./Ada95/html/man/mitem_name.3x.html -./Ada95/html/man/mitem_new.3x.html -./Ada95/html/man/mitem_opts.3x.html -./Ada95/html/man/mitem_userptr.3x.html -./Ada95/html/man/mitem_value.3x.html -./Ada95/html/man/mitem_visible.3x.html -./Ada95/html/man/ncurses.3x.html -./Ada95/html/man/panel.3x.html -./Ada95/html/man/resizeterm.3x.html -./Ada95/html/man/wresize.3x.html -./Ada95/html/table.html ./Ada95/samples/Makefile.in ./Ada95/samples/README ./Ada95/samples/explain.txt @@ -270,7 +126,6 @@ ./README.glibc ./TO-DO ./aclocal.m4 -./announce.html ./announce.html.in ./c++/Makefile.in ./c++/NEWS @@ -302,6 +157,211 @@ ./configure.in ./convert_configure.pl ./dist.mk +./doc/hackguide.doc +./doc/html/Ada95.html +./doc/html/ada/files.htm +./doc/html/ada/files/T.htm +./doc/html/ada/funcs.htm +./doc/html/ada/funcs/A.htm +./doc/html/ada/funcs/B.htm +./doc/html/ada/funcs/C.htm +./doc/html/ada/funcs/D.htm +./doc/html/ada/funcs/E.htm +./doc/html/ada/funcs/F.htm +./doc/html/ada/funcs/G.htm +./doc/html/ada/funcs/H.htm +./doc/html/ada/funcs/I.htm +./doc/html/ada/funcs/K.htm +./doc/html/ada/funcs/L.htm +./doc/html/ada/funcs/M.htm +./doc/html/ada/funcs/N.htm +./doc/html/ada/funcs/O.htm +./doc/html/ada/funcs/P.htm +./doc/html/ada/funcs/Q.htm +./doc/html/ada/funcs/R.htm +./doc/html/ada/funcs/S.htm +./doc/html/ada/funcs/T.htm +./doc/html/ada/funcs/U.htm +./doc/html/ada/funcs/V.htm +./doc/html/ada/funcs/W.htm +./doc/html/ada/index.htm +./doc/html/ada/main.htm +./doc/html/ada/table.html +./doc/html/ada/terminal_interface-curses-aux__adb.htm +./doc/html/ada/terminal_interface-curses-aux__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm +./doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm +./doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm +./doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm +./doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm +./doc/html/ada/terminal_interface-curses-forms__adb.htm +./doc/html/ada/terminal_interface-curses-forms__ads.htm +./doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm +./doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm +./doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm +./doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm +./doc/html/ada/terminal_interface-curses-menus__adb.htm +./doc/html/ada/terminal_interface-curses-menus__ads.htm +./doc/html/ada/terminal_interface-curses-mouse__adb.htm +./doc/html/ada/terminal_interface-curses-mouse__ads.htm +./doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm +./doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm +./doc/html/ada/terminal_interface-curses-panels__adb.htm +./doc/html/ada/terminal_interface-curses-panels__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm +./doc/html/ada/terminal_interface-curses-text_io__adb.htm +./doc/html/ada/terminal_interface-curses-text_io__ads.htm +./doc/html/ada/terminal_interface-curses__adb.htm +./doc/html/ada/terminal_interface-curses__ads.htm +./doc/html/ada/terminal_interface__ads.htm +./doc/html/announce.html +./doc/html/hackguide.html +./doc/html/index.html +./doc/html/man/captoinfo.1m.html +./doc/html/man/clear.1.html +./doc/html/man/curs_addch.3x.html +./doc/html/man/curs_addchstr.3x.html +./doc/html/man/curs_addstr.3x.html +./doc/html/man/curs_attr.3x.html +./doc/html/man/curs_beep.3x.html +./doc/html/man/curs_bkgd.3x.html +./doc/html/man/curs_border.3x.html +./doc/html/man/curs_clear.3x.html +./doc/html/man/curs_color.3x.html +./doc/html/man/curs_delch.3x.html +./doc/html/man/curs_deleteln.3x.html +./doc/html/man/curs_extend.3x.html +./doc/html/man/curs_getch.3x.html +./doc/html/man/curs_getstr.3x.html +./doc/html/man/curs_getyx.3x.html +./doc/html/man/curs_inch.3x.html +./doc/html/man/curs_inchstr.3x.html +./doc/html/man/curs_initscr.3x.html +./doc/html/man/curs_inopts.3x.html +./doc/html/man/curs_insch.3x.html +./doc/html/man/curs_insstr.3x.html +./doc/html/man/curs_instr.3x.html +./doc/html/man/curs_kernel.3x.html +./doc/html/man/curs_mouse.3x.html +./doc/html/man/curs_move.3x.html +./doc/html/man/curs_outopts.3x.html +./doc/html/man/curs_overlay.3x.html +./doc/html/man/curs_pad.3x.html +./doc/html/man/curs_print.3x.html +./doc/html/man/curs_printw.3x.html +./doc/html/man/curs_refresh.3x.html +./doc/html/man/curs_scanw.3x.html +./doc/html/man/curs_scr_dump.3x.html +./doc/html/man/curs_scroll.3x.html +./doc/html/man/curs_slk.3x.html +./doc/html/man/curs_termattrs.3x.html +./doc/html/man/curs_termcap.3x.html +./doc/html/man/curs_terminfo.3x.html +./doc/html/man/curs_touch.3x.html +./doc/html/man/curs_trace.3x.html +./doc/html/man/curs_util.3x.html +./doc/html/man/curs_window.3x.html +./doc/html/man/define_key.3x.html +./doc/html/man/dft_fgbg.3x.html +./doc/html/man/form.3x.html +./doc/html/man/form_cursor.3x.html +./doc/html/man/form_data.3x.html +./doc/html/man/form_driver.3x.html +./doc/html/man/form_field.3x.html +./doc/html/man/form_field_attributes.3x.html +./doc/html/man/form_field_buffer.3x.html +./doc/html/man/form_field_info.3x.html +./doc/html/man/form_field_just.3x.html +./doc/html/man/form_field_new.3x.html +./doc/html/man/form_field_opts.3x.html +./doc/html/man/form_field_userptr.3x.html +./doc/html/man/form_field_validation.3x.html +./doc/html/man/form_fieldtype.3x.html +./doc/html/man/form_hook.3x.html +./doc/html/man/form_new.3x.html +./doc/html/man/form_new_page.3x.html +./doc/html/man/form_opts.3x.html +./doc/html/man/form_page.3x.html +./doc/html/man/form_post.3x.html +./doc/html/man/form_requestname.3x.html +./doc/html/man/form_userptr.3x.html +./doc/html/man/form_win.3x.html +./doc/html/man/infocmp.1m.html +./doc/html/man/infotocap.1m.html +./doc/html/man/keybound.3x.html +./doc/html/man/keyok.3x.html +./doc/html/man/menu.3x.html +./doc/html/man/menu_attribs.3x.html +./doc/html/man/menu_cursor.3x.html +./doc/html/man/menu_driver.3x.html +./doc/html/man/menu_format.3x.html +./doc/html/man/menu_hook.3x.html +./doc/html/man/menu_items.3x.html +./doc/html/man/menu_mark.3x.html +./doc/html/man/menu_new.3x.html +./doc/html/man/menu_opts.3x.html +./doc/html/man/menu_pattern.3x.html +./doc/html/man/menu_post.3x.html +./doc/html/man/menu_requestname.3x.html +./doc/html/man/menu_spacing.3x.html +./doc/html/man/menu_userptr.3x.html +./doc/html/man/menu_win.3x.html +./doc/html/man/mitem_current.3x.html +./doc/html/man/mitem_name.3x.html +./doc/html/man/mitem_new.3x.html +./doc/html/man/mitem_opts.3x.html +./doc/html/man/mitem_userptr.3x.html +./doc/html/man/mitem_value.3x.html +./doc/html/man/mitem_visible.3x.html +./doc/html/man/ncurses.3x.html +./doc/html/man/panel.3x.html +./doc/html/man/resizeterm.3x.html +./doc/html/man/term.5.html +./doc/html/man/term.7.html +./doc/html/man/terminfo.5.html +./doc/html/man/tic.1m.html +./doc/html/man/toe.1m.html +./doc/html/man/tput.1.html +./doc/html/man/tset.1.html +./doc/html/man/wresize.3x.html +./doc/html/ncurses-intro.html +./doc/ncurses-intro.doc ./form/Makefile.in ./form/READ.ME ./form/fld_arg.c @@ -380,6 +440,7 @@ ./man/curs_color.3x ./man/curs_delch.3x ./man/curs_deleteln.3x +./man/curs_extend.3x ./man/curs_getch.3x ./man/curs_getstr.3x ./man/curs_getyx.3x @@ -407,6 +468,7 @@ ./man/curs_termcap.3x ./man/curs_terminfo.3x ./man/curs_touch.3x +./man/curs_trace.3x ./man/curs_util.3x ./man/curs_window.3x ./man/define_key.3x @@ -435,10 +497,12 @@ ./man/form_userptr.3x ./man/form_win.3x ./man/infocmp.1m +./man/infotocap.1m ./man/keybound.3x ./man/keyok.3x ./man/make_sed.sh ./man/man_db.renames +./man/manlinks.sed ./man/menu.3x ./man/menu_attribs.3x ./man/menu_cursor.3x @@ -516,14 +580,11 @@ ./misc/emx.src ./misc/form.def ./misc/form.ref -./misc/hackguide.doc -./misc/hackguide.html +./misc/indent.pro ./misc/makedef.cmd ./misc/makellib ./misc/menu.def ./misc/menu.ref -./misc/ncurses-intro.doc -./misc/ncurses-intro.html ./misc/ncurses.def ./misc/ncurses.ref ./misc/panel.def @@ -733,7 +794,6 @@ ./progs/toe.c ./progs/tput.c ./progs/tset.c -./shlib-versions ./sysdeps/unix/sysv/linux/Makefile ./sysdeps/unix/sysv/linux/alpha/configure ./sysdeps/unix/sysv/linux/configure @@ -789,6 +849,7 @@ ./test/ncurses.c ./test/ncurses_tst.hin ./test/newdemo.c +./test/railroad.c ./test/rain.c ./test/tclock.c ./test/test.priv.h diff --git a/NEWS b/NEWS index 274f0815..558846f5 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ --- $Id: NEWS,v 1.504 1999/10/24 00:31:05 tom Exp $ +-- $Id: NEWS,v 1.577 2000/07/08 20:59:25 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,549 @@ 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. +20000708 5.1 release for upload to ftp.gnu.org + + document configure options in INSTALL. + + add man-page for ncurses trace functions. + + correct return value shown in curs_touch.3x for is_linetouched() and + is_wintouched(), in curs_initscr.3x for isendwin(), and in + curs_termattr.3x for has_ic() and has_il(). + + add prototypes for touchline() and touchwin(), adding them to the + list of generated functions. + + modify fifo_push() to put ERR into the fifo just like other values to + return from wgetch(). It was returning without doing that, making + end-of-file condition incorrectly return a 0 (reported by Todd C + Miller). + + uncomment CC_SHARED_OPTS for progs and tack (see 971115), since they + are needed for SCO OpenServer. + + move _nc_disable_period from free_ttype.c to comp_scan.c to appease + dynamic loaders on SCO and IRIX64. + + add "-a" option to test/ncurses.c to invoke assume_default_colors() + for testing. + + correct assignment in assume_default_colors() which tells ncurses + whether to use default colors, or the assumed ones (reported by Gary + Funck ). + + review/correct logic in mk-1st.awk for making symbolic links for + shared libraries, in particular for FreeBSD, etc. + + regenerate misc/*.def files for OS/2 EMX dll's. + + correct quoting of values for CC_SHARED_OPTS in aclocal.m4 for + cases openbsd2*, openbsd*, freebsd* and netbsd* (patch by Peter + Wemm) (err in 20000610). + + minor updates to release notes, as well as adding/updating URLs for + examples cited in announce.html + > several fixes from Philippe Blain : + + correct placement of ifdef for NCURSES_XNAMES in function + _nc_free_termtype(), fixes a memory leak. + + add a call to _nc_synchook() to the end of function whline() like + that in wvline() (difference was in 1.9.4). + + make ClearScreen() a little faster by moving two instances of + UpdateAttr() out of for-loops. + + simplify ClrBottom() by eliminating the tstLine data, using for-loops + (cf: 960428). + +20000701 pre-release + + change minor version to 1, i.e., ncurses 5.1 + + add experimental configure option --enable-colorfgbg to check for + $COLORTERM variable as set by rxvt/aterm/Eterm. + + add Eterm terminfo entry (Michael Jennings ). + + modify manlinks.sed to pick aliases from the SYNOPSIS section, and + several manpages so manlinks.sed can find aliases for creating + symbolic links. + + add explanation to run_tic.sh regarding extended terminal + capabilities. + + change message format for edit_cfg.sh, since some people interpret + it as a warning. + + correct unescaped '$' in sysv5uw7*|unix_sv* rule for CF_SHARED_OPTS + configure macro (report by Thanh Ma ). + + correct logic in lib_twait.c as used by lib_mouse.c for GPM mouse + support when poll() is used rather than select() (prompted by + discussion with David Allen ). + +20000624 pre-release + + modify TransformLine() to check for cells with different color pairs + that happen to render the same display colors. + + apply $NCURSES_NO_PADDING to cost-computation in mvcur(). + + improve cost computation in PutRange() by accounting for the use + of parm_right_cursor in mvcur(). + + correct cost computation in EmitRange(), which was not using the + normalized value for cursor_address. + + newer config.guess, config.sub (reference version used in TIN 1.5.6). + +20000617 + + update config.guess, config.sub (reference version used in PCRE 3.2). + + resync changes to gnathtml against version 1.22, regenerated html + files under doc/html/ada using this (1.22.1.1). + + regenerated html files under doc/html/man after correcting top and + bottom margin options for man2html in dist.mk + + minor fixes to test programs ncurses 'i' and testcurs program to make + the subwindow's background color cover the subwindow. + + modify configure script so AC_MSG_ERROR is temporarily defined to a + warning in AC_PROG_CXX to make it recover from a missing C++ compiler + without requiring user to add --without-cxx option (from comment by + Akim Demaille to autoconf mailing list). + + modify headers.sh to avoid creating temporary files in the build + directory when installing headers (reported by Sergei Pokrovsky + ) + +20000610 + + regenerated the html files under doc/html/ada/files and + doc/html/ada/funcs with a slightly-improved gnathtml. + + add kmous capability to linux terminfo entry to allow it to use + xterm-style events provided by gpm patch by Joerg Schoen. + + make the configure macro CF_SHARED_OPTS a little smarter by testing + if -fPIC is supported by gcc rather than -fpic. The former option + allows larger symbol tables. + + update config.guess and config.sub (patches by + Kevin Buettner for elf64_ia64 + Bernd Kuemmerlen and MacOS X). + + add warning for 'tic -cv' about use of '^?' in terminfo source, which + is an extension. + +20000527 + + modify echo() behavior of getch() to match Solaris curses for + carriage return and backspace (reported by Neil Zanella). + + change _nc_flush() to a function. + + modify delscreen() to check if the output stream has been closed, and + if so, free the buffer allocated for setbuf (this provides an + ncurses-specific way to avoid a memory leak when repeatedly calling + newterm reported by Chipp C ). + + correct typo in curs_getch.3x manpage regarding noecho (reported by + David Malone ). + + add a "make libs" rule. + + make the Ada95 interface build with configure --enable-widec. + + if the configure --enable-widec option is given, append 'w' to names + of the generated libraries (e.g., libncursesw.so) to avoid conflict + with existing ncurses libraries. + +20000520 + + modify view.c to make a rudimentary viewer of UTF-8 text if ncurses + is configured with the experimental wide-character support. + + add a simple UTF-8 output driver to the experimental wide-character + support. If any of the environment variables LC_ALL, LC_CTYPE or + LANG contain the string "UTF-8", this driver will be used to + translate the output to UTF-8. This works with XFree86 xterm. + + modify configure script to allow building shared libraries on BeOS + (from a patch by by Valeriy E Ushakov). + + modify lib_addch.c to allow repeated update to the lower-right + corner, rather than displaying only the first character written until + the cursor is moved. Recent versions of SVr4 curses can update the + lower-right corner, and behave this way (reported by Neil Zanella). + + add a limit-check in _nc_do_color(), to avoid using invalid color + pair value (from bug report by Brendan O'Dea ). + +20000513 + + the tack program knows how to use smcup and rmcup but the "show caps + that can be tested" feature did not reflect this knowledge. Correct + the display in the menu tack/test/edit/c (patch by Daniel Weaver). + + xterm-16color does allow bold+colors, removed ncv#32 from that + terminfo entry. + +20000506 + + correct assignment to SP->_has_sgr_39_49 in lib_dft_fgbg.c, which + broke check for screen's AX capability (reported by Valeriy E Ushakov + ). + + change man2html rule in dist.mk to workaround bug in some man-programs + that ignores locale when rendering hyphenation. + + change web- and ftp-site to dickey.his.com + +20000429 + + move _nc_curr_token from parse_entry.c to comp_scan.c, to work around + problem linking tack on MacOS X DP3. + + include in lib_napms.c to compile on MacOS X DP3 + (reported by Gerben Wierda ). + + modify lib_vidattr.c to check for ncv fixes when pair-0 is not + default colors. + + add -d option to ncurses.c, to turn on default-colors for testing. + + add a check to _nc_makenew() to ensure that newwin() and newpad() + calls do not silently fail by passing too-large limits. + + add symbol NCURSES_SIZE_T to use rather than explicit 'short' for + internal window and pad sizes. Note that since this is visible in + the WINDOW struct, it would be an ABI change to make this an 'int' + (prompted by a question by Bastian Trompetter + , who attempted to create a 96000-line pad). + +20000422 + + add mgterm terminfo entry from NetBSD, minor adjustments to sun-ss5, + aixterm entries -TD + + modify tack/ansi.c to make it more tolerant of bad ANSI replies. An + example of an illegal ANSI resonse can be found using Microsoft's + Telnet client. A correct display can be found using a VT-4xx + terminal or XFree86 xterm with: + XTerm*VT100*decTerminalID: 450 + (patch by Daniel Weaver). + + modify gdc.c to recognize 'q' for quit, 's' for single-step and ' ' + for resume. Add '-n' option to force gdc's standard input to + /dev/null, to both illustrate the use of newterm() for specifying + alternate inputs as well as for testing signal handling. + + minor fix for configure option --with-manpage-symlinks, for target + directories that contain a period ('.') (reported by Larry Virden). + +20000415 + + minor additions to beterm entry (feedback from Rico Tudor) -TD + + corrections/updates for some IBM terminfo entries -TD + + modify _nc_screen_wrap() so that when exiting curses mode with + non-default colors, the last line on the screen will be cleared to + the screen's default colors (request by Alexander Lukyanov). + + modify ncurses.c 'r' example to set nonl(), allowing control/M to be + read for demonstrating the REQ_NEW_LINE operation (prompted by a + question by Tony L Keith" ). + + modify ncurses.c 'r' example of field_info() to work on Solaris 2.7, + documented extension of ncurses which allows a zero pointer. + + modify fmt_complex() to avoid buffer overflow in case of excess + recursion, and to recognize "%e%?" as a synonym for else-if, which + means that it will not recur for that special case. + + add logic to support $TERMCAP variable in case the USE_GETCAP symbol + is defined (patch by Todd C Miller). + + modify one of the m4 files used to generate the Ada95 sources, + to avoid using the token "symbols" (patch by Juergen Pfeifer). + +20000408 + + add terminfo entries bsdos-pc-m, bsdos-pc-mono (Jeffrey C Honig) + + correct spelling error in terminfo entry name: bq300-rv was given as + bg300-rv in esr's version. + + modify redrawwin() macro so its parameter is fully parenthesized + (fixes Debian bug report #61088). + + correct formatting error in dump_entry() which set incorrect column + value when no newline trimming was needed at the end of an entry, + before appending "use=" clauses (cf: 960406). + +20000401 + + add configure option --with-manpage-symlinks + + change unctrl() to render C1 characters (128-159) as ~@, ~A, etc. + + change makefiles so trace() function is provided only if TRACE is + defined, e.g., in the debug library. Modify related calls to + _tracechar() to use unctrl() instead. + +20000325 + + add screen's AX capability (for ECMA SGR 39 and 49) to applicable + terminfo entries, use presence of this as a check for a small + improvement in setting default colors. + + improve logic in _nc_do_color() implementing assume_default_colors() + by passing in previous color pair info to eliminate redundant call to + set_original_colors(). (Part of this is from a patch by Alexander + Lukyanov). + + modify warning in _nc_trans_string() about a possibly too-long string + to do this once only rather than for each character past the + threshold (600). Change interface of _nc_trans_string() to allow + check for buffer overflow. + + correct use of memset in _nc_read_entry_source() to initialize ENTRY + struct each time before reading new data into it, rather than once + per loop (cf: 990301). This affects multi-entry in-core operations + such as "infocmp -Fa". + +20000319 + + remove a spurious pointer increment in _nc_infotocap() changes from + 20000311. Add check for '.' in format of number, since that also + is not permitted in termcap. + + correct typo in rxvt-basic terminfo from temporary change made while + integrating 20000318. + +20000318 + + revert part of the vt220 change (request by Todd C Miller). + + add ansi-* terminfo entries from Eric's version. + + add -a option to tic and infocmp, which retains commented-out + capabilities during source translation/comparison, e.g., captoinfo + and infotocap. + + modify cardfile.c to display an empty card if no input data file is + found, fixes a core dump in that case (reported by Bruno Haible). + + correct bracketing in CF_MATH_LIB configure macro, which gave wrong + result for OS/2 EMX. + + supply required parameter for _nc_resolve_uses() call in + read_termcap.c, overlooked in 20000311 (reported by Todd C Miller). + > patches by Bruno Haible : + + fix a compiler warning in fty_enum.c + + correct LIB_PREFIX expression for DEPS_CURSES in progs, tack + makefiles, which resulted in redundant linking (cf: 20000122). + +20000311 + + make ifdef's for BROKEN_LINKER consistent (patch by Todd C Miller). + + improved tack/README (patch by Daniel Weaver). + + modify tput.c to ensure that unspecified parameters are passed to + tparm() as 0's. + + add a few checks in infocmp to guard against buffer overflow when + displaying string capabilities. + + add check for zero-uses in infocmp's file_comparison() function + before calling _nc_align_termtype(). Otherwise one parameter is + indexed past the end of the uses-array. + + add an option -q to infocmp to specify the less verbose output, + keeping the existing format as the default, though not retaining the + previous behavior that made the -F option compare each entry to + itself. + + adapted patch by Eric Raymond to make infocmp -F less verbose + (the submitted patch was unusable because it did not compile + properly): + + modify write_entry.c to ensure that absent or cancelled booleans + are written as FALSE, for consistency with infocmp which now + assumes this. Note that for the small-core configuration, tic + may not produce the same result as before. + + change some private library interfaces used by infocmp, e.g., + _nc_resolve_uses(). + + add a check in _nc_infotocap() to ensure that cm-style capabilities + accept only %d codes when converting the format from terminfo to + termcap. + + modify ENTRY struct to separate the data in 'parent' into the name + and link values (the original idea to merge both into 'parent' was + not good). + + discard repair_acsc(tterm); + > patch by Juergen Pfeifer: + + drop support for gnat 3.10 + + move generated documentation and html files under ./doc directory, + adding makefile rules for this to dist.mk + +20000304 + + correct conflicting use of tparm() in 20000226 change to tic, which + made it check only one entry at a time. + + fix errors in ncurses-intro.html and hackguide.html shown by Dave + Raggett's tidy. + + make the example in ncurses-intro.html do something plausible, and + corrected misleading comment (reported by Neil Zanella). + + modify pnoutrefresh() to set newscr->_leaveok as wnoutrefresh() does, + to fix a case where the cursor position was not updated as in + Solaris (patch by David Mosberger ). + + add a limit-check for wresize() to ensure that a subwindow does not + address out of bounds. + + correct offsets used for subwindows in wresize() (patch by Michael + Andres ). + + regenerate html'ized manual pages with man2html 3.0.1 (patch by + Juergen Pfeifer). This generated a file with a space in its name, + which I removed. + + fix a few spelling errors in tack. + + modify tack/Makefile.in to match linker options of progs/Makefile.in; + otherwise it does not build properly for older HPUX shared library + configurations. + + add several terminfo entries from esr's "11.0". + +20000226 + + make 'tput flash' work properly for xterm by flushing output in + delay_output() when using napms(), and modifying xterm's terminfo to + specify no padding character. Otherwise, xterm's reported baud rate + can mislead ncurses into producing too few padding characters + (Debian #58530). + + add a check to tic for consistency between sgr and the separate + capabilities such as smso, use this to check/correct several + terminfo entries (Debian #58530). + + add a check to tic if cvvis is the same as cnorm, adjusted several + terminfo entries to remove the conflict (Debian #58530). + + correct prototype shown in attr_set()/wattr_set() manpages (fixes + Debian #53962). + + minor clarification for curs_set() and leaveok() manpages. + + use mkstemp() for creating temporary file for tic's processing of + $TERMCAP contents (fixes Debian #56465). + + correct two errors from integrating Alexander's changes: did not + handle the non-bce case properly in can_erase_with() (noted by + Alexander), and left fg/bg uninitialized in the pair-zero case of + _nc_do_color() (reported by Dr Werner Fink and + Ismael Cordeiro ). + +20000219 + + store default-color code consistently as C_MASK, even if given as + -1 for convenience (adapted from patches by Alexander Lukyanov). + > patches by Alexander Lukyanov: + + change can_clear_with() macro to accommodate logic for + assume_default_colors(), making most of the FILL_BCE logic + unnecessary. Made can_clear_with() an inline function to make it + simpler to read. + +20000212 + + corrected form of recent copyright dates. + + minor corrections to xterm-xf86-v333 terminfo entry -TD + > patches by Alexander Lukyanov: + + reworded dft_fgbg.3x to avoid assuming that the terminal's default + colors are white on black. + + fix initialization of tstLine so that it is filled with current blank + character in any case. Previously it was possible to have it filled + with old blank. The wrong over-optimization was introduced in 991002 + patch. (it is not very critical as the only bad effect is not using + clr_eos for clearing if blank has changed). + +20000205 + + minor corrections/updates to several terminfo entries: rxvt-basic, + vt520, vt525, ibm5151, xterm-xf86-v40 -TD + + modify ifdef's for poll() to allow it to use , thereby + allowing poll() to be used on Linux. + + add CF_FUNC_POLL macro to check if poll() is able to select from + standard input. If not we will not use it, preferring select() + (adapted from patch by Michael Pakovic ). + + update CF_SHARED_OPTS macro for SCO Unixware 7.1 to allow building + shared libraries (reported/tested by Thanh ). + + override $LANGUAGE in build to avoid incorrect ordering of keynames. + + correct CF_MATH_LIB parameter, must be sin(x), not sqrt(x). + +20000122 + + resync CF_CHECK_ERRNO and CF_LIB_PREFIX macros from tin and xterm. + + modify CF_MATH_LIB configure macro to parameterize the test function + used, for reuse in dialog and similar packages. + + correct tests for file-descriptors in OS/2 EMX mouse support. A + negative value could be used by FD_SET, causing the select() call + to wait indefinitely. + +20000115 + + additional fixes for non-bce terminals (handling of delete_character) + to work when assume_default_colors() is not specified. + + modify warning message from _nc_parse_entry() regarding extended + capability names to print only if tic/infocmp/toe have the -v flag + set, and not at all in ordinary user applications. Otherwise, this + warning would be shown for screen's extended capabilities in programs + that use the termcap interface (reported by Todd C Miller). + + modify use of _nc_tracing from programs such as tic so their debug + level is not in the same range as values set by trace() function. + + small panel header cleanup (patch by Juergen Pfeifer). + + add 'railroad' demo for termcap interface. + + modify 'tic' to write its usage message to stderr (patch by Todd C + Miller). + +20000108 + + add prototype for erase() to curses.h.in, needed to make test + programs build with c++/g++. + + add .c.i and .c.h suffix rules to generated makefiles, for debugging. + + correct install rule for tack.1; it assumed that file was in the + current directory (reported by Mike Castle ). + + modify terminfo/termcap translation to suppress acsc before trying + sgr if the entry would be too large (patch by Todd C Miller). + + document a special case of incompatiblity between ncurses 4.2 and + 5.0, add a section for this in INSTALL. + + add TRACE_DATABASE flag for trace(). + +20000101 + + update mach, add mach-color terminfo entries based on Debian diffs + for ncurses 5.0 -TD + + add entries for xterm-hp, xterm-vt220, xterm-vt52 and xterm-noapp + terminfo entries -TD + + change OTrs capabilities to rs2 in terminfo.src -TD + + add obsolete and extended capabilities to 'screen' terminfo -TD + + corrected conversion from terminfo rs2 to termcap rs (cf: 980704) + + make conversion to termcap ug (underline glitch) more consistently + applied. + + fix out-of-scope use of 'personal[]' buffer in 'toe' (this error + was in the original pre-1.9.7 version, when $HOME/.terminfo was + introduced). + + modify 'toe' to ignore terminfo directories to which it has no + permissions. + + modify read_termtype(), fixing 'toe', which could dump core when it + found an incomplete entry such as "dumb" because it did not + initialize its buffer for _nc_read_file_entry(). + + use -fPIC rather than -fpic for shared libraries on Linux, not + needed for i386 but some ports (from Debian diffs for 5.0). + + use explicit VALID_NUMERIC() checks in a few places that had been + overlooked, and add a check to ensure that init_tabs is nonzero, + to avoid divide-by-zero (reported by Todd C Miller). + + minor fix for CF_ANSI_CC_CHECK configure macro, for HPUX 10.x (from + tin). + +19991218 + + reorder tests during mouse initialization to allow for gpm to run in + xterm, or for xterm to be used under OS/2 EMX. Also drop test for + $DISPLAY in favor of kmous=\E[M or $TERM containing "xterm" (report + by Christian Weisgerber ). + + modify raw() and noraw() to clear/restore IEXTEN flag which affects + stty lnext on systems such as FreeBSD (report by Bruce Evans + , via Jason Evans ). + + fix a potential (but unlikely) buffer overflow in failed() function + of tset.c (reported by Todd C Miller). + + add manual-page for ncurses extensions, documented curses_version(), + use_extended_names(). + +19991211 + + treat as untranslatable to termcap those terminfo strings which + contain non-decimal formatting, e.g., hexadecimal or octal. + + correct commented-out capabilities that cannot be translated to + termcap, which did not check if a colon must be escaped. + + correct termcap translation for "%>" and "%+", which did not check + if a colon must be escaped, for instance. + + use save_string/save_char for _nc_captoinfo() to eliminate fixed + buffer (originally for _nc_infotocap() in 960301 -TD). + + correct expression used for terminfo equivalent of termcap %B, + adjust regent100 entry which uses this. + + some cleanup and commenting of ad hoc cases in _nc_infotocap(). + + eliminate a fixed-buffer in tic, used for translating comments. + + add manpage for infotocap + +19991204 + + add kvt and gnome terminfo entries -TD + + correct translation of "%%" by infotocap, which was emitted as "%". + + add "obsolete" termcap strings to terminfo.src + + modify infocmp to default to showing obsolete capabilities rather + than terminfo only. + + modify write_entry.c so that if extended names (i.e., configure + --enable-tcap-names) are active, then tic will also write "obsolete" + capabilities that are present in the terminfo source. + + modify tic so that when running as captoinfo or infotocap, it + initializes the output format as in -C and -I options, respectively. + + improve infocmp and tic -f option by splitting long strings that do + not have if-then-else construct, but do have parameters, e.g., the + initc for xterm-88color. + + refine MKtermsort.sh slightly by using bool for the *_from_termcap + arrays. + +19991127 + + additional fixes for non-bce terminals (handling of clear_screen, + clr_eol, clr_eos, scrolling) to work when assume_default_colors() is + not specified. + + several small changes to xterm terminfo entries -TD. + + move logic for _nc_windows in lib_freeall.c inside check for nonnull + SP, since it is part of that struct. + + remove obsolete shlib-versions, which was unintentionally re-added + in 970927. + + modify infocmp -e, -E options to ensure that generated fallback.c + type for Booleans agrees with term.h (reported by Eric Norum + ). + + correct configure script's use of $LIB_PREFIX, which did not work + for installing the c++ directory if $libdir did not end with "/lib" + (reported by Huy Le ). + + modify infocmp so -L and -f options work together. + + modify the initialization of SP->_color_table[] in start_color() so + that color_content() will return usable values for COLORS greater + than 8. + + modify ncurses 'd' test in case COLORS is greater than 16, e.g., for + xterm-88color, to limit the displayed/computed colors to 16. + > patch by Juergen Pfeifer: + + simplify coding of the panel library according to suggestions by + Philippe Blain. + + improve macro coding for a few macros in curses.priv.h + +19991113 + + modify treatment of color pair 0 so that if ncurses is configured + to support default colors, and they are not active, then ncurses + will set that explicitly, not relying on orig_colors or orig_pair. + + add new extension, assume_default_colors() to provide better control + over the use of default colors. + + modify test programs to use more-specific ifdef's for existence of + wresize(), resizeterm() and use_default_colors(). + + modify configure script to add specific ifdef's for some functions + that are included when --enable-ext-funcs is in effect, so their + existence can be ifdef'd in the test programs. + + reorder some configure options, moving those extensions that have + evolved from experimental status into a new section. + + change configure --enable-tcap-names to enable this by default. + +19991106 + + install tack's manpage (reported by Robert Weiner + ) + + correct worm.c's handling of KEY_RESIZE (patch by Frank Heckenbach). + + modify curses.h.in, undef'ing some symbols to avoid conflict with C++ + STL (reported by Matt Gerassimoff ) + +19991030 + + modify linux terminfo entry to indicate that dim does not mix with + color (reported by Klaus Weide ). + + correct several typos in terminfo entries related to missing '[' + in CSI's -TD + + fix several compiler warnings in c++ binding (reported by Tim + Mooney for alphaev56-dec-osf4.0f + + rename parameter of _nc_free_entries() to accommodate lint. + + correct lint rule for tack, used incorrect list of source files. + + add case to config.guess, config.sub for Rhapsody. + + improve configure tests for libg++ and libstdc++ by omitting the + math library (which is missing on Rhapsody), and improved test for + the math library itself (adapted from path by Nelson H. F. Beebe). + + explicitly initialize to zero several data items which were + implicitly initialized, e.g., cur_term. If not explicitly + initialized, their storage type is C (common), and causes problems + linking on Rhapsody 5.5 using gcc 2.7.2.1 (reported by Nelson H. F. + Beebe). + + modify Ada95 binding to not include the linker option for Ada + bindings in the Ada headers, but in the Makefiles instead (patch by + Juergen Pfeifer). + 19991023 5.0 release for upload to ftp.gnu.org + effective with release of 5.0, change NCURSES_VERSION_PATCH to 4-digit year. @@ -349,7 +892,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. + split up an expression in configure script check for ldconfig to workaround limitation of BSD/OS sh (reported by Jeff Haas ). - + correct a typo in man/form_hook.3x (Todd Miller). + + correct a typo in man/form_hook.3x (Todd C Miller). 990318 pre-release + parenthesize and undef 'index' symbol in c++ binding and demo, to @@ -515,7 +1058,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. bsdos-bold to bsdos-pc (patch by Jeffrey C Honig). + modify tput to accept termcap names as an alternative to terminfo names (patch by Jeffrey C Honig). - + correct a typo in term.7 (Todd Miller). + + correct a typo in term.7 (Todd C Miller). + add configure --with-shlib-version option to allow installing shared libraries named according to release or ABI versions. This parameterizes some existing logic in the configure script, and is @@ -737,7 +1280,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. rid of a hardcoded list of candidate directories in the configure script. + add some error-checking to _nc_read_file_entry() to ensure that - strings are properly terminated (Todd Miller). + strings are properly terminated (Todd C Miller). + rename manpage file curs_scr_dmp.3x to curs_scr_dump.3x, to correspond with contents (reported by Neil Zanella ). @@ -767,7 +1310,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. tic, infocmp). + modify tic, infocmp to discard redundant i3, r3 strings when output to termcap format. - > patch by Alexander V Lukyanov: + > patch by Alexander V Lukyanov: + improve performance of tparm, now it takes 19% instead of 25% when profiling worm. + rename maxlen/minlen to prec/width for better readability. @@ -792,7 +1335,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. string #define (compile time vs runtime). + when setting errno to ENOMEM, set it right before the return, not before code that could, possibly, set errno to a different value. - > patches by Alexander V Lukyanov: + > patches by Alexander V Lukyanov: + use default background in update_cost_from_blank() + disable scroll-hints when hashmap is configured. + improve integration of hashmap scrolling code, by adding oldhash and @@ -827,12 +1370,12 @@ Changes since 1.9.9e are recorded by Thomas Dickey. manpage (patch by Rick Ohnemus ). + add Makefile.os2 and supporting scripts to generate dll's on OS/2 EMX (from J.J.G.Ripoll, with further integration by TD). - + correct a typo in icl6404 terminfo entry. - + add xtermm and xtermc terminfo entries. + + correct a typo in icl6404 terminfo entry. + + add xtermm and xtermc terminfo entries. > from esr's terminfo version: - + Added Francesco Potorti's tuned Wyse 99 entries. - + dtterm enacs correction from Alexander V Lukyanov. - + Add ncsa-ns, ncsa-m-ns and ncsa-m entries from esr version. + + Added Francesco Potorti's tuned Wyse 99 entries. + + dtterm enacs correction from Alexander V Lukyanov. + + Add ncsa-ns, ncsa-m-ns and ncsa-m entries from esr version. 980822 + document AT&T acs characters in terminfo.5 manpage. @@ -1147,7 +1690,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey. + the slk_attr_{set,off,on} functions need an additional void* parameter according to XSI. + fix the C++ and Ada95 binding as well as the man pages to - reflect above enhancements. + reflect above enhancements. 980307 + use 'stat()' rather than 'access()' in toe.c to check for the diff --git a/README.emx b/README.emx index 4fa430ab..15882d3b 100644 --- a/README.emx +++ b/README.emx @@ -1,4 +1,4 @@ --- $Id: README.emx,v 1.1 1998/11/21 20:13:05 tom Exp $ +-- $Id: README.emx,v 1.2 2000/05/06 17:41:56 tom Exp $ -- Author: Thomas Dickey ------------------------------------------------------------------------------- @@ -16,16 +16,16 @@ the EMX development tools, of course. Get these programs to start: Apply the autoconf patches from - http://www.clark.net/pub/dickey/autoconf - ftp://ftp.clark.net/pub/dickey/autoconf + http://dickey.his.com/autoconf + ftp://dickey.his.com/autoconf These are ordered by date: - autoconf-2.12-970309.patch - autoconf-2.12-970429.patch - autoconf-2.12-971222-emx.patch - autoconf-2.12-971222.patch - autoconf-2.12-971230.patch + autoconf-2.12-970309.patch.gz + autoconf-2.12-970429.patch.gz + autoconf-2.12-971222-emx.patch.gz + autoconf-2.12-971222.patch.gz + autoconf-2.12-971230.patch.gz I built my development environment for ncurses using EMX 0.9c at the end of 1997. Much of the EMX patch for autoconf was done originally by J.J.G.Ripoll, diff --git a/aclocal.m4 b/aclocal.m4 index b4edb242..490bbed7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998,1999 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2000 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 * @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1996,1997,1998 dnl -dnl $Id: aclocal.m4,v 1.179 1999/10/23 21:49:25 tom Exp $ +dnl $Id: aclocal.m4,v 1.214 2000/07/07 15:11:34 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl --------------------------------------------------------------------------- @@ -74,7 +74,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \ "" \ -qlanglvl=ansi \ -std1 \ - "-Aa -D_HPUX_SOURCE +e" \ + -Ae \ "-Aa -D_HPUX_SOURCE" \ -Xc do @@ -303,7 +303,7 @@ AC_DEFUN([CF_CHECK_ERRNO], AC_MSG_CHECKING(if external $1 is declared) AC_CACHE_VAL(cf_cv_dcl_$1,[ AC_TRY_COMPILE([ -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include @@ -311,7 +311,7 @@ AC_CACHE_VAL(cf_cv_dcl_$1,[ #include ], [long x = (long) $1], [eval 'cf_cv_dcl_'$1'=yes'], - [eval 'cf_cv_dcl_'$1'=no]') + [eval 'cf_cv_dcl_'$1'=no']) ]) eval 'cf_result=$cf_cv_dcl_'$1 @@ -463,6 +463,33 @@ int main() { fi ])])dnl 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],[ +AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[ +AC_TRY_RUN([ +#include +#ifdef HAVE_POLL_H +#include +#else +#include +#endif +int main() { + struct pollfd myfds; + int ret; + + myfds.fd = 0; + myfds.events = POLLIN; + + ret = poll(&myfds, 1, 100); + exit(ret != 0); +}], + [cf_cv_working_poll=yes], + [cf_cv_working_poll=no], + [cf_cv_working_poll=unknown])]) +test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL) +])dnl +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. @@ -619,10 +646,10 @@ changequote(<<, >>)dnl cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\ sed -e 's/[^0-9 \.]//g' | $AWK '{print $<<1>>;}'` case $cf_cv_gnat_version in - 3.[1-9]*|[4-9].*) + 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.10 or better. Disabling Ada95 binding. + *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. cf_cv_prog_gnat_correct=no ;; esac @@ -655,14 +682,13 @@ esac if test $ac_cv_prog_gxx = yes; then AC_MSG_CHECKING([for lib$cf_gpp_libname]) cf_save="$LIBS" - LIBS="$LIBS -l$cf_gpp_libname -lm" + LIBS="$LIBS -l$cf_gpp_libname" AC_TRY_LINK([ #include <$cf_gpp_libname/builtin.h> ], - [//float foo=abs(1.0); - two_arg_error_handler_t foo2 = lib_error_handler], + [two_arg_error_handler_t foo2 = lib_error_handler], [cf_cxx_library=yes - CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm" + CXXLIBS="$CXXLIBS -l$cf_gpp_libname" if test "$cf_gpp_libname" = cpp ; then AC_DEFINE(HAVE_GPP_BUILTIN_H) else @@ -671,10 +697,9 @@ if test $ac_cv_prog_gxx = yes; then [AC_TRY_LINK([ #include ], - [//float foo=abs(1.0); - two_arg_error_handler_t foo2 = lib_error_handler], + [two_arg_error_handler_t foo2 = lib_error_handler], [cf_cxx_library=yes - CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm" + CXXLIBS="$CXXLIBS -l$cf_gpp_libname" AC_DEFINE(HAVE_BUILTIN_H)], [cf_cxx_library=no])]) LIBS="$cf_save" @@ -729,10 +754,10 @@ dnl $1 = variable to set AC_DEFUN([CF_LIB_PREFIX], [ case $cf_cv_system_name in - os2) $1='' ;; - *) $1='lib' ;; + os2) LIB_PREFIX='' ;; + *) LIB_PREFIX='lib' ;; esac - LIB_PREFIX=[$]$1 +ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- @@ -759,11 +784,19 @@ do for cf_item in $CF_LIST_MODELS do CF_LIB_SUFFIX($cf_item,cf_suffix) + if test $cf_item = shared ; then + if test $cf_cv_do_symlinks = yes ; then + case "$cf_cv_shlib_version" in #(vi + rel) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; #(vi + abi) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;; + esac + fi + fi cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}" done if test $cf_dir = ncurses ; then - case "$LIB_SUBSETS" in + case "$LIB_SUBSETS" in #(vi termlib+*) #(vi ;; *) #(vi @@ -807,11 +840,13 @@ do do $AWK -f $srcdir/mk-1st.awk \ name=$cf_dir \ + traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ + ShlibVer=$cf_cv_shlib_version \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ @@ -822,6 +857,7 @@ do test $cf_dir = ncurses && WITH_OVERWRITE=no $AWK -f $srcdir/mk-2nd.awk \ name=$cf_dir \ + traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ subset=$cf_subset \ @@ -840,6 +876,7 @@ do if test -f $cf_dir/Makefile ; then case "$cf_dir" in Ada95) #(vi + echo 'libs \' >> Makefile echo 'install.libs \' >> Makefile echo 'uninstall.libs ::' >> Makefile echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >> Makefile @@ -859,6 +896,7 @@ if test "$cf_dir" != "c++" ; then echo 'lint \' >> Makefile fi cat >> Makefile <> Makefile </<\$END\/\$NAME>/" >> ../headers.sed - done - fi - rm -f \$TMP - sed -f ../headers.sed \$SRC > \$TMP - eval \$PRG \$TMP \$DST - rm -f \$TMP + TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$ + TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$ + END=\`basename \$DST\` + for i in \`cat \$REF/../*/headers |fgrep -v "#"\` + do + NAME=\`basename \$i\` + echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED + done + rm -f \$TMPSRC + sed -f \$TMPSED \$SRC > \$TMPSRC + eval \$PRG \$TMPSRC \$DST/\$SRC + rm -f \$TMPSRC \$TMPSED ;; *) eval \$PRG \$SRC \$DST @@ -984,9 +1022,10 @@ done ])dnl dnl --------------------------------------------------------------------------- -dnl Compute the library-suffix from the given model name +dnl Compute the library file-suffix from the given model name dnl $1 = model name dnl $2 = variable to set +dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. AC_DEFUN([CF_LIB_SUFFIX], [ AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) @@ -996,22 +1035,17 @@ AC_DEFUN([CF_LIB_SUFFIX], profile) $2='_p.a' ;; shared) case $cf_cv_system_name in - openbsd*|freebsd*) - $2='.so.$(REL_VERSION)' ;; - netbsd*) - if test -f /usr/libexec/ld.elf_so; then - $2='.so' - else - $2='.so.$(REL_VERSION)' - fi - ;; hpux*) $2='.sl' ;; *) $2='.so' ;; esac esac + test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- dnl Compute the string to append to -library from the given model name +dnl $1 = model name +dnl $2 = variable to set +dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. AC_DEFUN([CF_LIB_TYPE], [ case $1 in @@ -1020,6 +1054,7 @@ AC_DEFUN([CF_LIB_TYPE], profile) $2='_p' ;; shared) $2='' ;; esac + test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" ])dnl dnl --------------------------------------------------------------------------- dnl Some systems have a non-ANSI linker that doesn't pull in modules that have @@ -1267,6 +1302,21 @@ fi AC_MSG_RESULT($cf_manpage_renames) ])dnl 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_ARG_WITH(manpage-symlinks, + [ --with-manpage-symlinks specify manpage-symlinks], + [cf_manpage_symlinks=$withval], + [cf_manpage_symlinks=yes]) + +AC_MSG_RESULT($cf_manpage_symlinks) +])dnl +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. @@ -1275,6 +1325,7 @@ AC_DEFUN([CF_MAN_PAGES], CF_HELP_MESSAGE(Options to Specify How Manpages are Installed:) CF_MANPAGE_FORMAT CF_MANPAGE_RENAMES +CF_MANPAGE_SYMLINKS if test "$prefix" = "NONE" ; then cf_prefix="$ac_default_prefix" @@ -1303,6 +1354,7 @@ datadir="$datadir" MKDIRS="`cd $srcdir && pwd`/mkinstalldirs" INSTALL="$INSTALL" INSTALL_DATA="$INSTALL_DATA" + TMP=\${TMPDIR-/tmp}/man\$\$ trap "rm -f \$TMP" 0 1 2 5 15 @@ -1312,6 +1364,9 @@ shift mandir=\{{$}}1 shift +srcdir=\{{$}}1 +shift + for i in \{{$}}* ; do case \$i in #(vi *.orig|*.rej) ;; #(vi @@ -1322,8 +1377,14 @@ case \$i in #(vi \$MKDIRS $cf_subdir\$section fi fi + aliases= source=\`basename \$i\` CF_EOF +if test "$cf_manpage_symlinks" = yes ; then +cat >>man/edit_man.sh <>man/edit_man.sh <>man/edit_man.sh < + #include + ], + [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)], + [cf_cv_need_libm=no], + [cf_cv_need_libm=yes])]) +if test "$cf_cv_need_libm" = yes +then +ifelse($1,,[ + LIBS="$LIBS -lm" +],[$1=-lm]) +fi +]) +dnl --------------------------------------------------------------------------- dnl Compute the object-directory name from the given model name AC_DEFUN([CF_OBJ_SUBDIR], [ @@ -1411,6 +1527,8 @@ AC_DEFUN([CF_PATH_SYNTAX],[ case ".[$]$1" in #(vi ./*) #(vi ;; +.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX + ;; .\[$]{*prefix}*) #(vi eval $1="[$]$1" case ".[$]$1" in #(vi @@ -1545,11 +1663,28 @@ AC_DEFUN([CF_SHARED_OPTS], cf_cv_rm_so_locs=no + # Some less-capable ports of gcc support only -fpic + CC_SHARED_OPTS= + if test -n "$GCC" + then + AC_MSG_CHECKING(which $CC option to use) + cf_save_CFLAGS="$CFLAGS" + for CC_SHARED_OPTS in -fPIC -fpic '' + do + CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" + AC_TRY_COMPILE([#include ],[int x = 1],[break],[]) + done + AC_MSG_RESULT($CC_SHARED_OPTS) + CFLAGS="$cf_save_CFLAGS" + fi + case $cf_cv_system_name in + beos*) + MK_SHARED_LIB='$(CC) -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0' + ;; hpux10.*) # (tested with gcc 2.7.2 -- I don't have c89) if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' else CC_SHARED_OPTS='+Z' @@ -1564,7 +1699,6 @@ AC_DEFUN([CF_SHARED_OPTS], hpux*) # (tested with gcc 2.7.2 -- I don't have c89) if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' else CC_SHARED_OPTS='+Z' @@ -1577,9 +1711,7 @@ AC_DEFUN([CF_SHARED_OPTS], ;; irix*) # tested with IRIX 5.2 and 'cc'. - if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' - else + if test -z "$GCC"; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]' @@ -1587,37 +1719,36 @@ AC_DEFUN([CF_SHARED_OPTS], ;; linux*|gnu*) # tested with Linux 2.0.29 and gcc 2.7.2 (ELF) - CC_SHARED_OPTS='-fpic' test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," if test $DFT_LWR_MODEL = "shared" ; then LOCAL_LDFLAGS='-Wl,-rpath,../lib' LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' fi test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel - if test $cf_cv_shlib_version = no ; then - MK_SHARED_LIB='$(CC) -shared -Wl,-stats,-lc -o $[@]' - else - MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@].$(ABI_VERSION)`,-stats,-lc -o $[@]' - fi + MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]' ;; openbsd2*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]' ;; openbsd*|freebsd*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -o $[@]' test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel ;; netbsd*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," if test $DFT_LWR_MODEL = "shared" && test $cf_cv_ld_rpath = yes ; then LOCAL_LDFLAGS='-Wl,-rpath,../lib' LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS" - MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@].$(ABI_VERSION)` -o $[@]' - test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel + MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]' + if test $cf_cv_shlib_version = auto; then + if test ! -f /usr/libexec/ld.elf_so; then + cf_cv_shlib_version=rel + fi + fi else MK_SHARED_LIB='$(LD) -Bshareable -o $[@]' fi @@ -1626,7 +1757,6 @@ AC_DEFUN([CF_SHARED_OPTS], # tested with OSF/1 V3.2 and 'cc' # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't # link with shared libs). - CC_SHARED_OPTS='' MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $[@]`' test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath" case $host_os in @@ -1643,12 +1773,10 @@ 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 - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-belf -KPIC' fi - MK_SHARED_LIB='$(LD) -dy -G -h `basename [$]@.$(ABI_VERSION)` -o [$]@' + MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o [$]@' if test $cf_cv_ld_rpath = yes ; then # only way is to set LD_RUN_PATH but no switch for it RUN_PATH=$libdir @@ -1659,9 +1787,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 - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]' @@ -1669,22 +1795,22 @@ 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 - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-KPIC' fi - MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@].$(ABI_VERSION)` -o $[@]' + MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]' if test $cf_cv_ld_rpath = yes ; then cf_ld_rpath_opt="-R" EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS" fi test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel ;; - unix_sv*) - # tested with UnixWare 1.1.2 - CC_SHARED_OPTS='-KPIC' - MK_SHARED_LIB='$(LD) -d y -G -o $[@]' + sysv5uw7*|unix_sv*) + # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) + if test $ac_cv_prog_gcc != yes; then + CC_SHARED_OPTS='-KPIC' + fi + MK_SHARED_LIB='$(LD) -d y -G -o [$]@' ;; *) CC_SHARED_OPTS='unknown' @@ -1697,15 +1823,7 @@ AC_DEFUN([CF_SHARED_OPTS], rel|abi) case "$MK_SHARED_LIB" in #(vi *'-o $[@]') - if test "$cf_cv_do_symlinks" = reverse ; then - AC_ERROR(cannot use --with-shlib-version with this platform) - fi - if test "$cf_cv_shlib_version" = rel ; then - MK_SHARED_LIB="$MK_SHARED_LIB"'.$(REL_VERSION)' - else - MK_SHARED_LIB="$MK_SHARED_LIB"'.$(ABI_VERSION)' - fi - cf_cv_do_symlinks=yes + test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes ;; *) AC_MSG_WARN(ignored --with-shlib-version) @@ -1833,7 +1951,7 @@ AC_DEFUN([CF_SRC_MODULES], AC_MSG_CHECKING(for src modules) # dependencies and linker-arguments for test-programs -TEST_DEPS="${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS" +TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS" TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS" # dependencies and linker-arguments for utility-programs @@ -1868,7 +1986,7 @@ do CF_UPPER(cf_have_include,$cf_dir) AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H) AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include}) - TEST_DEPS="${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS" + TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS" TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS" fi fi @@ -1890,7 +2008,7 @@ SRC_SUBDIRS="$SRC_SUBDIRS misc test" test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++" ADA_SUBDIRS= -if test "$cf_cv_prog_gnat_correct" = yes && test -d $srcdir/Ada95; then +if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then SRC_SUBDIRS="$SRC_SUBDIRS Ada95" ADA_SUBDIRS="gen src samples" fi @@ -1924,12 +2042,11 @@ os2*) #(vi esac AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[ cf_save="$LIBS" - LIBS="$LIBS -l$cf_stdcpp_libname -lm" + LIBS="$LIBS -l$cf_stdcpp_libname" AC_TRY_LINK([ #include ],[ char buf[80]; strstreambuf foo(buf, sizeof(buf)) -//destroy foo ], [cf_cv_libstdcpp=yes], [cf_cv_libstdcpp=no]) diff --git a/announce.html.in b/announce.html.in index b797f0d0..936b2053 100644 --- a/announce.html.in +++ b/announce.html.in @@ -1,6 +1,6 @@ @@ -33,153 +33,141 @@ the library and tools.

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

Release Notes

-We decided to release ncurses as a new whole number release (5.0) because it -incorporates several interface changes, including some that would invalidate -existing shared libraries. These are the highlights from the change-log -since ncurses 4.2 release. +This release is designed to be upward compatible from ncurses 5.0; very few +applications will require recompilation, depending on the platform. +These are the highlights from the change-log since ncurses 5.0 release.

Interface changes:

    -
  • The principal source of changes to the interface comes from the - release of X/Open Curses in 1997. Earlier versions of ncurses (4.0 - and before) were based on a draft version of the specification. The - release version adds parameters to some functions to support the - evolving internationalization of curses. These summarize the impact: -
      -
    • modified several prototypes to correspond with 1997 version of - X/Open Curses (affects ABI since developers have used attr_get). - -
    • corrected prototypes for slk_* functions, using chtype rather than - attr_t. - -
    • the slk_attr_{set,off,on} functions need an additional void* - parameter according to XSI. - -
    • correct macros for wattr_set, wattr_get, separate wattrset macro from - these to preserve behavior that allows attributes to be combined with - color pair numbers. - -
    • reviewed/updated curses.h, term.h against X/Open Curses Issue 4 - Version 2. This includes making some parameters NCURSES_CONST - rather than const, e.g., in termcap.h. - -
    • reviewed/corrected macros in curses.h as per XSI document. - -
    • add set_a_attributes and set_pglen_inch to terminfo structure, as per - XSI and Solaris 2.5. -
    -
  • The newest version of the X/Open Curses is implemented on Solaris - and other vendor's systems. It adds new features to the terminfo - descriptions: -
      -
    • implement tparm %l format. - -
    • implement tparm printf-style width and precision for %s, %d, %x, %o - as per XSI. -
    -
  • We made additional changes to reduce impact by future interface - changes: -
      -
    • rename key_names[] array to _nc_key_names since it is not part of - the curses interface. - -
    • move macro winch to a function, to hide details of struct ldat -
    -
  • modify configure script to embed ABI in shared libraries for HP-UX - 10.x (detailed request by Tim Mooney). - -
  • modify configuration of shared libraries on Digital Unix so that - versioning is embedded in the library, rather than implied by - links (patch by Tim Mooney). +
  • made the extended terminal capabilities + (configure --enable-tcap-names) + a standard feature (though the configure script can disable it, + it is built by default). + +
  • removed the trace() function and related trace support + from the production library. This is the only interface change that + may cause problems with existing applications linked to shared + libraries, since not all platforms use the minor version number. + +
  • explicitly initialized to zero several data items which were + implicitly initialized, e.g., cur_term. If not explicitly + initialized, their storage type is C (common), and causes problems + linking on some platforms. + +
  • modified curses.h.in, undef'ing some symbols to avoid conflict with + C++ STL.
New features:
    -
  • enable sigwinch handler by default. +
  • added a new extension, assume_default_colors() to + provide better control over the use of default colors. This is + the principal visible difference between ncurses 5.1 and preceding + versions. The new extension allows an application to specify what + colors pair 0 uses. +

    + NOTE: Pair 0 defaults to white on black unless + you have invoked use_default_colors() or set it via + assume_default_colors(). An application that calls + start_colors() without setting the background color + will consistently have a black background no matter what color your + terminal's background actually is. + +

  • made several fixes to the terminfo-to-termcap conversion, and + have been using the generated termcaps without further hand-tuning. + This builds on the extension use_extended_names() by + adding "obsolete" termcap strings to terminfo.src +
      +
    • modified tic so that if extended names (i.e., + configure --enable-tcap-names) are active, then tic -x + will also write "obsolete" capabilities that are present in the + terminfo source. + +
    • added screen's AX capability (for ECMA SGR 39 and 49) to applicable + terminfo entries, use presence of this as a check for a small + improvement in setting default colors. + +
    • add -a option to tic and infocmp, which retains commented-out + capabilities during source translation/comparison, e.g., captoinfo + and infotocap. +
    + +
  • implemented limited support for UTF-8, useful with XFree86 xterm: +
      +
    • if the configure --enable-widec option is + given, append 'w' to names of the generated libraries (e.g., + libncursesw.so) to avoid conflict with existing ncurses libraries. +
    • add a simple UTF-8 output driver to the experimental + wide-character support. If any of the environment variables + LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this driver + will be used to translate the output to UTF-8. +
    • modified view.c to make a rudimentary viewer of UTF-8 text. +
    + +
  • modify raw() and noraw() to clear/restore + IEXTEN flag which affects stty lnext on systems such as FreeBSD + +
  • reordered tests during mouse initialization to allow for gpm to run + in xterm, or for xterm to be used under OS/2 EMX. Also dropped test + for $DISPLAY in favor of the terminfo capability + kmous=\E[M or + if $TERM environment variable contains "xterm". + +
  • added configure option --with-manpage-symlinks, which + provides for fully indexing manpage entries by making symbolic links + for the aliases. + +
  • changed unctrl() to render C1 characters (128-159) as + ~@, ~A, etc. + +
  • add experimental configure option --enable-colorfgbg to check for + $COLORTERM variable as set by rxvt/aterm/Eterm. + +
  • made the infocmp -F option less verbose. + +
  • dropped support for gnat 3.10 (gnat 3.12 is current). -
  • turn on hashmap scrolling code by default - -
  • improved support for termcap applications +
+Major bug fixes:
    -
  • modify tput to accept termcap names as an alternative to terminfo - names. +
  • modified infocmp -e, -E options to ensure that generated fallback.c + type for Booleans agrees with term.h -
  • provide support for termcap PC variable by copying it from terminfo - data and using it as the padding character in tputs. +
  • documented a special case of incompatiblity between ncurses 4.2 and + 5.0, added a section for this in INSTALL. -
  • provide support for termcap ospeed variable by copying it from the - internal cur_term member, and using ospeed as the baudrate - reference for the delay_output and tputs functions. +
  • corrected tests for file-descriptors in OS/2 EMX mouse support. A + negative value could be used by FD_SET, causing the select() call to + wait indefinitely. -
  • change name-comparisons in lib_termcap to compare no more than 2 - characters. +
  • made 'tput flash' work properly for xterm by flushing output in + delay_output() when using napms(), and modifying xterm's terminfo to + specify no padding character. Otherwise, xterm's reported baud rate + could mislead ncurses into producing too few padding characters. -
  • add configure option --enable-tcap-names, which essentially - allows users to define new capabilities as in termcap. -
-
  • add mouse support to ncurses menus. - -
  • add mouse and dll support for OS/2 EMX +
  • modified lib_addch.c to allow repeated update to the lower-right + corner, rather than displaying only the first character written until + the cursor is moved. Recent versions of SVr4 curses can update the + lower-right corner, and behave this way. -
  • modify terminfo parsing to accept octal and hexadecimal constants +
  • modified echo() behavior of getch() to match Solaris curses for + carriage return and backspace (reported by Neil Zanella). -
  • add configure option --enable-no-padding, to allow environment - variable $NCURSES_NO_PADDING to eliminate non-mandatory padding, - thereby making terminal emulators (e.g., for vt100) a little more - efficient. +
  • corrected offsets used for subwindows in wresize() -
  • modify lib_color.c to eliminate dependency on orig_colors and - orig_pair, since SVr4 curses does not require these either, but - uses them when they are available. +
  • modified configure script so AC_MSG_ERROR is temporarily defined to + a warning in AC_PROG_CXX to make it recover from a missing C++ + compiler without requiring user to add --without-cxx option -
  • add -f option to infocmp and tic, which formats the terminfo - if/then/else/endif so that they are readable (with newlines and - tabs). +
  • corrected logic in lib_twait.c as used by lib_mouse.c for GPM mouse + support when poll() is used rather than select(). -
  • modify tic to compile into %'char' form in preference to %{number}, - since that is a little more efficient. - -Major bug fixes: -
      -
    • modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a - problem where ncurses applications which were run via a shell script - would hang when given a ^Z. Also, check if the terminal's process - group is consistent, i.e., a shell has not taken ownership of it, - before deciding to save the current terminal settings in the SIGTSTP - handler. - -
    • suppress sc/rc capabilities from terminal description if they appear - in smcup/rmcup. This affects only scrolling optimization, to fix a - problem reported by several people with xterm's alternate screen, - though the problem is more general. - -
    • modify relative_move and tputs to avoid an interaction with the - BSD-style padding. The relative_move function could produce a string - to replace on the screen which began with a numeric character, which - was then interpreted by tputs as padding. - -
    • modify setupterm so that cancelled strings are treated the same as - absent strings, cancelled and absent booleans false (does not affect - tic, infocmp). - -
    • modify lib_vidattr.c to allow for terminal types (e.g., xterm-color) - which may reset all attributes in the 'op' capability, so that colors - are set before turning on bold and other attributes, but still after - turning attributes off. - -
    • use 'access()' to check if ncurses library should be permitted to - open or modify files with fopen/open/link/unlink/remove calls, in - case the calling application is running in setuid mode. - -
    • correction to doupdate, for case where terminal does not support - insert/delete character. The logic did not check that there was a - difference in alignment of changes to old/new screens before - repainting the whole non-blank portion of the line. Modified to fall - through into logic that reduces by the portion which does not differ. +
    • made several fixes for buffer overflows, unchecked recursion, + improvements in performance, etc. See the NEWS file for details.

    Features of Ncurses

    @@ -294,39 +282,62 @@ including (versions starting with those noted):
    cdk
    Curses Development Kit -Curses Development Kit -ftp://ftp.clark.net/pub/dickey/cdk. +
    +http://www.vexus.ca/CDK.html +
    +http://dickey.his.com/cdk.
    ded
    directory-editor -ftp://ftp.clark.net/pub/dickey/ded. +
    +http://dickey.his.com/ded.
    dialog
    the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. +
    +http://dickey.his.com/dialog.
    lynx
    the character-screen WWW browser +
    +http://lynx.isc.org/release.
    Midnight Commander 4.1
    file manager +
    +www.gnome.org/mc/.
    mutt
    mail utility +
    +http://www.mutt.org.
    ncftp
    file-transfer utility +
    +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/.
    tin
    newsreader, supporting color, MIME -ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff. +
    +http://www.tin.org.
    taper
    tape archive utility +
    +http://members.iinet.net.au/~yusuf/taper/.
    vh-1.6
    Volks-Hypertext browser for the Jargon File +
    +http://www.bg.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.
    vile
    vi-like-emacs -ftp://ftp.clark.net/pub/dickey/vile. +
    +http://dickey.his.com/vile.

    @@ -339,10 +350,10 @@ The original developers of ncurses are Zeyd Ben-Halim and Eric S. Raymond. Ongoing work is being done by -Thomas Dickey +Thomas Dickey and Jürgen Pfeifer. -Thomas Dickey +Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. Contact the current maintainers at @@ -359,7 +370,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://ftp.clark.net/pub/dickey/ncurses. +ftp://dickey.his.com/ncurses.

    Future Plans

      diff --git a/c++/Makefile.in b/c++/Makefile.in index 886678df..e8079893 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.51 1999/10/23 20:13:02 tom Exp $ +# $Id: Makefile.in,v 1.52 2000/05/28 01:44:34 tom Exp $ ############################################################################## # Copyright (c) 1998,1999 Free Software Foundation, Inc. # # # @@ -76,7 +76,7 @@ ABI_VERSION = @cf_cv_abi_version@ LINK = @LINK_PROGS@ $(CXX) @CXXLDFLAGS@ -LIBROOT = ncurses++ +LIBROOT = ncurses++@LIB_SUFFIX@ LIBNAME = @LIB_PREFIX@$(LIBROOT).a LDFLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \ @@ -94,7 +94,10 @@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) AUTO_SRC = \ etip.h -all: $(AUTO_SRC) ../lib/$(LIBNAME) demo$x +all \ +libs :: $(AUTO_SRC) ../lib/$(LIBNAME) + +all :: demo$x sources : $(AUTO_SRC) diff --git a/c++/cursesapp.cc b/c++/cursesapp.cc index ae88b44e..eaaadc7e 100644 --- a/c++/cursesapp.cc +++ b/c++/cursesapp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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 "cursesapp.h" #include "internal.h" -MODULE_ID("$Id: cursesapp.cc,v 1.4 1999/05/16 17:31:11 juergen Exp $") +MODULE_ID("$Id: cursesapp.cc,v 1.6 1999/10/30 23:59:37 tom Exp $") void NCursesApplication::init(bool bColors) { @@ -85,7 +85,7 @@ int NCursesApplication::rinit(NCursesWindow& w) { void NCursesApplication::push(Soft_Label_Key_Set& S) { SLK_Link* L = new SLK_Link; - assert(L); + assert(L != 0); L->prev = slk_stack; L->SLKs = &S; slk_stack = L; @@ -121,7 +121,7 @@ int NCursesApplication::operator()(void) { Soft_Label_Key_Set::Label_Layout fmt = useSLKs(); if (fmt!=Soft_Label_Key_Set::None) { S = new Soft_Label_Key_Set(fmt); - assert(S); + assert(S != 0); init_labels(*S); } diff --git a/c++/cursesf.cc b/c++/cursesf.cc index 12b9cd4f..a993322b 100644 --- a/c++/cursesf.cc +++ b/c++/cursesf.cc @@ -35,7 +35,7 @@ #include "cursesapp.h" #include "internal.h" -MODULE_ID("$Id: cursesf.cc,v 1.9 1999/05/16 17:29:36 juergen Exp $") +MODULE_ID("$Id: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $") NCursesFormField::~NCursesFormField () { if (field) @@ -49,7 +49,7 @@ FIELD** NCursesForm::mapFields(NCursesFormField* nfields[]) { int fieldCount = 0,lcv; - assert(nfields); + assert(nfields != 0); for (lcv=0; nfields[lcv]->field; ++lcv) ++fieldCount; @@ -350,18 +350,18 @@ NCursesForm::virtualize(int c) { // bool UserDefinedFieldType::fcheck(FIELD *f, const void *u) { NCursesFormField* F = (NCursesFormField*)u; - assert(F); + assert(F != 0); UserDefinedFieldType* udf = (UserDefinedFieldType*)(F->fieldtype()); - assert(udf); + assert(udf != 0); return udf->field_check(*F); } bool UserDefinedFieldType::ccheck(int c, const void *u) { NCursesFormField* F = (NCursesFormField*)u; - assert(F); + assert(F != 0); UserDefinedFieldType* udf = (UserDefinedFieldType*)(F->fieldtype()); - assert(udf); + assert(udf != 0); return udf->char_check(c); } @@ -379,19 +379,19 @@ FIELDTYPE* UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice = bool UserDefinedFieldType_With_Choice::next_choice(FIELD *f, const void *u) { NCursesFormField* F = (NCursesFormField*)u; - assert(F); + assert(F != 0); UserDefinedFieldType_With_Choice* udf = (UserDefinedFieldType_With_Choice*)(F->fieldtype()); - assert(udf); + assert(udf != 0); return udf->next(*F); } bool UserDefinedFieldType_With_Choice::prev_choice(FIELD *f, const void *u) { NCursesFormField* F = (NCursesFormField*)u; - assert(F); + assert(F != 0); UserDefinedFieldType_With_Choice* udf = (UserDefinedFieldType_With_Choice*)(F->fieldtype()); - assert(udf); + assert(udf != 0); return udf->previous(*F); } diff --git a/c++/cursesf.h b/c++/cursesf.h index 1119f5cb..89f0cbe9 100644 --- a/c++/cursesf.h +++ b/c++/cursesf.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer 1997 * ****************************************************************************/ -// $Id: cursesf.h,v 1.10 1999/05/16 17:31:42 juergen Exp $ +// $Id: cursesf.h,v 1.11 1999/10/30 23:59:37 tom Exp $ #ifndef _CURSESF_H #define _CURSESF_H @@ -310,7 +310,7 @@ private: // Get the backward pointer to the C++ object from a FORM static inline NCursesForm* getHook(const FORM *f) { UserHook* hook = (UserHook*)::form_userptr(f); - assert(hook && hook->m_owner==f); + assert(hook != 0 && hook->m_owner==f); return (NCursesForm*)(hook->m_back); } @@ -329,13 +329,13 @@ protected: // internal routines inline void set_user(void *user) { UserHook* uptr = (UserHook*)::form_userptr (form); - assert (uptr && uptr->m_back==this && uptr->m_owner==form); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form); uptr->m_user = user; } inline void *get_user() { UserHook* uptr = (UserHook*)::form_userptr (form); - assert (uptr && uptr->m_back==this && uptr->m_owner==form); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form); return uptr->m_user; } diff --git a/c++/cursesm.cc b/c++/cursesm.cc index 599b5f17..3b4dbd58 100644 --- a/c++/cursesm.cc +++ b/c++/cursesm.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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 "cursesapp.h" #include "internal.h" -MODULE_ID("$Id: cursesm.cc,v 1.11 1999/07/31 09:45:23 juergen Exp $") +MODULE_ID("$Id: cursesm.cc,v 1.12 1999/10/30 23:59:37 tom Exp $") NCursesMenuItem::~NCursesMenuItem() { if (item) @@ -304,7 +304,7 @@ NCursesMenu::operator()(void) { if (drvCmnd == CMD_ACTION) { if (options() & O_ONEVALUE) { NCursesMenuItem* itm = current_item(); - assert(itm); + assert(itm != 0); if (itm->options() & O_SELECTABLE) { b_action = itm->action(); diff --git a/c++/cursesm.h b/c++/cursesm.h index 5037ae23..26e0b4ce 100644 --- a/c++/cursesm.h +++ b/c++/cursesm.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,7 @@ * Author: Juergen Pfeifer 1997 * ****************************************************************************/ -// $Id: cursesm.h,v 1.12 1999/05/16 17:30:27 juergen Exp $ +// $Id: cursesm.h,v 1.13 1999/10/30 23:59:37 tom Exp $ #ifndef _CURSESM_H #define _CURSESM_H @@ -137,10 +137,10 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&); // function pointer for items. class NCursesMenuCallbackItem : public NCursesMenuItem { private: - const ITEMCALLBACK* p_fct; + ITEMCALLBACK* p_fct; public: - NCursesMenuCallbackItem(const ITEMCALLBACK* fct = NULL, + NCursesMenuCallbackItem(ITEMCALLBACK* fct = NULL, const char* p_name = NULL, const char* p_descript = NULL ) : NCursesMenuItem (p_name, p_descript), @@ -179,7 +179,7 @@ private: // Get the backward pointer to the C++ object from a MENU static inline NCursesMenu* getHook(const MENU *m) { UserHook* hook = (UserHook*)::menu_userptr(m); - assert(hook && hook->m_owner==m); + assert(hook != 0 && hook->m_owner==m); return (NCursesMenu*)(hook->m_back); } @@ -198,13 +198,13 @@ protected: // internal routines inline void set_user(void *user) { UserHook* uptr = (UserHook*)::menu_userptr (menu); - assert (uptr && uptr->m_back==this && uptr->m_owner==menu); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu); uptr->m_user = user; } inline void *get_user() { UserHook* uptr = (UserHook*)::menu_userptr (menu); - assert (uptr && uptr->m_back==this && uptr->m_owner==menu); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu); return uptr->m_user; } diff --git a/c++/cursesp.cc b/c++/cursesp.cc index e0c17aea..3bcf3d26 100644 --- a/c++/cursesp.cc +++ b/c++/cursesp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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 "cursesp.h" #include "internal.h" -MODULE_ID("$Id: cursesp.cc,v 1.14 1999/05/16 17:30:51 juergen Exp $") +MODULE_ID("$Id: cursesp.cc,v 1.15 1999/10/30 23:59:37 tom Exp $") NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0; @@ -52,7 +52,7 @@ void NCursesPanel::init() { NCursesPanel::~NCursesPanel() { UserHook* hook = (UserHook*)::panel_userptr(p); - assert(hook && hook->m_back==this && hook->m_owner==p); + assert(hook != 0 && hook->m_back==this && hook->m_owner==p); delete hook; ::del_panel(p); ::update_panels(); diff --git a/c++/cursesp.h b/c++/cursesp.h index 51cb4cdb..6293dd10 100644 --- a/c++/cursesp.h +++ b/c++/cursesp.h @@ -1,8 +1,40 @@ // * This makes emacs happy -*-Mode: C++;-*- +/**************************************************************************** + * Copyright (c) 1998,1999 Free 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: Juergen Pfeifer 1997 * + ****************************************************************************/ + #ifndef _CURSESP_H #define _CURSESP_H -// $Id: cursesp.h,v 1.11 1999/07/31 09:46:05 juergen Exp $ +// $Id: cursesp.h,v 1.12 1999/10/31 00:00:02 tom Exp $ #include @@ -29,14 +61,14 @@ private: protected: void set_user(void *user) { UserHook* uptr = (UserHook*)::panel_userptr (p); - assert (uptr && uptr->m_back==this && uptr->m_owner==p); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p); uptr->m_user = user; } // Set the user pointer of the panel. void *get_user() { UserHook* uptr = (UserHook*)::panel_userptr (p); - assert (uptr && uptr->m_back==this && uptr->m_owner==p); + assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p); return uptr->m_user; } diff --git a/c++/cursesw.cc b/c++/cursesw.cc index 4072c3c3..baae046e 100644 --- a/c++/cursesw.cc +++ b/c++/cursesw.cc @@ -25,7 +25,7 @@ #include "cursesw.h" #include "internal.h" -MODULE_ID("$Id: cursesw.cc,v 1.15 1999/09/11 23:26:29 tom Exp $") +MODULE_ID("$Id: cursesw.cc,v 1.16 1999/11/13 23:42:17 tom Exp $") #define COLORS_NEED_INITIALIZATION -1 #define COLORS_NOT_INITIALIZED 0 @@ -424,9 +424,11 @@ NCursesWindow::setcolor(short pair) return OK; } +#ifdef HAVE_HAS_KEY extern "C" int _nc_has_mouse(void); bool NCursesWindow::has_mouse() const { return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse()) ? TRUE : FALSE); } +#endif diff --git a/c++/edit_cfg.sh b/c++/edit_cfg.sh index e108074a..efea8332 100755 --- a/c++/edit_cfg.sh +++ b/c++/edit_cfg.sh @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: edit_cfg.sh,v 1.7 1999/09/12 02:00:14 tom Exp $ +# $Id: edit_cfg.sh,v 1.8 2000/07/01 16:07:37 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -36,6 +36,7 @@ # $1 = ncurses_cfg.h # $2 = etip.h # +echo "substituting autoconf'd values from $1 into $2" for name in \ CPP_HAS_PARAM_INIT \ ETIP_NEEDS_MATH_EXCEPTION \ @@ -49,16 +50,18 @@ do mv $2 $2.bak if ( grep "[ ]$name[ ]1" $1 2>&1 >/dev/null) then - sed -e 's/define '$name'.*$/ define '$name' 1/' $2.bak >$2 + value=1 + sed -e 's/define '$name'.*$/define '$name' 1/' $2.bak >$2 else - sed -e 's/define '$name'.*$/ define '$name' 0/' $2.bak >$2 + value=0 + sed -e 's/define '$name'.*$/define '$name' 0/' $2.bak >$2 fi if (cmp -s $2 $2.bak) then - echo '** same: '$name + echo '... '$name $value mv $2.bak $2 else - echo '** edit: '$name + echo '... '$name $value rm -f $2.bak fi done diff --git a/config.guess b/config.guess index 729d6cfe..49949643 100755 --- a/config.guess +++ b/config.guess @@ -1,7 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. + +version='2000-06-13' + # This file 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 of the License, or @@ -22,7 +25,7 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -35,6 +38,60 @@ # (but try to keep the structure clean). # +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of this system. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Use $HOST_CC if defined. $CC may point to a cross-compiler +if test x"$CC_FOR_BUILD" = x; then + if test x"$HOST_CC" != x; then + CC_FOR_BUILD="$HOST_CC" + else + if test x"$CC" != x; then + CC_FOR_BUILD="$CC" + else + CC_FOR_BUILD=cc + fi + fi +fi + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then @@ -46,11 +103,49 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-cbm ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format. + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -59,46 +154,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <dummy.s + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 @@ -106,9 +217,6 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -133,16 +241,16 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 @@ -150,7 +258,7 @@ EOF echo pyramid-pyramid-bsd fi exit 0 ;; - NILE:*:*:dcosx) + NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) @@ -195,21 +303,38 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -222,9 +347,6 @@ EOF powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -238,8 +360,13 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); @@ -254,10 +381,10 @@ EOF exit (-1); } EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) @@ -275,15 +402,18 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -307,13 +437,9 @@ EOF i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; - *:MVS:*:* | *:OS390:*:*|*:OS/390:*:*) - # uname -m gives a processor model number /* S/390 -- gil -- 1389 */ - echo s390-ibm-os390 # on R1 and R2, uname -s reports OS390 - exit 0 ;; # on R3, uname -s reports OS/390 *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >$dummy.c #include main() @@ -324,8 +450,8 @@ EOF exit(0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -353,7 +479,7 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -372,8 +498,10 @@ EOF case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 ) - sed 's/^ //' << EOF >dummy.c + 9000/[678][0-9][0-9]) + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include @@ -404,14 +532,14 @@ EOF exit (0); } EOF - (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` - rm -f dummy.c dummy + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -436,8 +564,8 @@ EOF exit (0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -446,6 +574,9 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; @@ -462,6 +593,9 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -492,37 +626,40 @@ EOF -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; @@ -532,6 +669,15 @@ EOF i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; @@ -541,16 +687,15 @@ EOF *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g @@ -558,68 +703,146 @@ EOF s/ .*// p'` case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + *ia64) + echo "${UNAME_MACHINE}-unknown-linux" + exit 0 + ;; + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + echo "${UNAME_MACHINE}-pc-linux" + exit 0 + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32ppc | elf32ppclinux) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unkown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; + shelf_linux) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main EOF LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac - objdump --private-headers dummy | \ + objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi - rm -f dummy.s dummy + rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c <$dummy.c < /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif @@ -629,8 +852,10 @@ main(argc, argv) return 0; } EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + elif test "${UNAME_MACHINE}" = "s390"; then + echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. @@ -649,15 +874,17 @@ EOF ;; esac # Determine whether the default compiler is a.out or elf - cat >dummy.c <$dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #ifdef __ELF__ # ifdef __GLIBC__ -# if (__GLIBC__ >= 2) +# if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); @@ -671,8 +898,8 @@ main(argc, argv) return 0; } EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. @@ -687,25 +914,21 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - # SysVr5/Unixware7 - i?86:*:5*:* | i?86:SYSTEM_V:5*:*) - if uname -a | grep SCO >/dev/null 2>/dev/null ; then - (/bin/uname -s|egrep UnixWare >/dev/null) && UNAME_VER=uw${UNAME_VERSION} - if /bin/uname -X 2>/dev/null >/dev/null ; then - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - fi - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}${UNAME_VER} + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv4.2uw${UNAME_VERSION} + i?86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) @@ -717,19 +940,20 @@ EOF (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i?86:UnixWare:*:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - fi - echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) + # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp @@ -770,7 +994,7 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:*) + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) @@ -782,6 +1006,9 @@ EOF SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; @@ -812,7 +1039,7 @@ EOF news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else @@ -828,12 +1055,45 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-W:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -cat >dummy.c <$dummy.c < # include @@ -871,7 +1131,10 @@ main () #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -931,8 +1194,8 @@ main () } EOF -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -964,6 +1227,47 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess version = $version + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub index 9c47333a..8fa14be2 100755 --- a/config.sub +++ b/config.sub @@ -1,6 +1,10 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. + +version='2000-06-13' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,8 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +51,61 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -94,15 +131,25 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; -sco5) - os=sco3.2v5 + os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) @@ -121,6 +168,9 @@ case $os in os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -143,27 +193,41 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) + | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) + i[234567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -172,28 +236,49 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -223,6 +308,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; aux) basic_machine=m68k-apple os=-aux @@ -266,6 +355,9 @@ case $basic_machine in crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -299,6 +391,10 @@ case $basic_machine in encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -317,6 +413,14 @@ case $basic_machine in basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -332,13 +436,30 @@ case $basic_machine in basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) @@ -347,16 +468,16 @@ case $basic_machine in hppa-next) os=-nextstep3 ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs - ;; - s390 | s390-ibm*) -# OS/390 support after: -# Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition -- GNU Utilities Downloads -# URL: http://www.mks.com/s390/gnu/download.htm#autoconf - basic_machine=s390-ibm # /* S/390 -- gil -- 1419 */ - os=-os390 ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) @@ -375,6 +496,22 @@ case $basic_machine in basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + i386-go32 | go32) + basic_machine=i386-unknown + os=-go32 + ;; + i386-mingw32 | mingw32) + basic_machine=i386-unknown + os=-mingw32 + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -403,6 +540,10 @@ case $basic_machine in miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu @@ -417,10 +558,34 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-unknown + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -433,6 +598,10 @@ case $basic_machine in basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -458,9 +627,28 @@ case $basic_machine in basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -478,19 +666,19 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | nexen) + pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; - pentiumpro | p6 | k6 | 6x86) + pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; - pentium-* | p5-* | k5-* | nexen-*) + pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) @@ -514,12 +702,20 @@ case $basic_machine in ps2) basic_machine=i386-ibm ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; sequent) basic_machine=i386-sequent ;; @@ -527,6 +723,10 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -534,6 +734,13 @@ case $basic_machine in spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -574,10 +781,18 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -595,6 +810,10 @@ case $basic_machine in basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -618,6 +837,14 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -625,6 +852,10 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -632,6 +863,15 @@ case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown @@ -654,7 +894,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4) + base_machine=sh-unknown + ;; + sparc | sparcv9) basic_machine=sparc-sun ;; cydra) @@ -666,6 +909,16 @@ case $basic_machine in orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -716,16 +969,37 @@ case $os in | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* | -os390* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos*) + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -735,6 +1009,12 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -750,12 +1030,18 @@ case $os in -acis*) os=-aos ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; + -nsk) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -781,9 +1067,18 @@ case $os in # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -*MiNT) + os=-mint + ;; -none) ;; *) @@ -809,6 +1104,9 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; @@ -830,6 +1128,15 @@ case $basic_machine in # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -839,12 +1146,18 @@ case $basic_machine in *-be) os=-beos ;; - s390-ibm) - os=-os390 # /* S/390 -- gil -- 1451 */ - ;; *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -908,6 +1221,18 @@ case $basic_machine in f301-fujitsu) os=-uxpv ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -929,9 +1254,15 @@ case $basic_machine in -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -947,7 +1278,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -959,9 +1290,26 @@ case $basic_machine in -aux*) vendor=apple ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure index db90758f..51180b9b 100755 --- a/configure +++ b/configure @@ -1,6 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.179 +# From configure.in Revision: 1.195 + # Guess values for system-dependent variables and create Makefiles. @@ -197,11 +198,12 @@ Options to Specify How Manpages are Installed: --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and optionally formatted, e.g., gzip,formatted --with-manpage-renames specify manpage-renaming + --with-manpage-symlinks specify manpage-symlinks Options to Specify the Libraries Built/Used: --with-shared generate shared-libraries - --with-normal generate normal-libraries (default) EOF cat <&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:640: checking host system type" >&5 +echo "configure:646: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -727,7 +733,7 @@ cf_user_CFLAGS="$CFLAGS" ### Default install-location echo $ac_n "checking for prefix""... $ac_c" 1>&6 -echo "configure:731: checking for prefix" >&5 +echo "configure:737: checking for prefix" >&5 if test "x$prefix" = "xNONE" ; then case "$cf_cv_system_name" in # non-vendor systems don't have a conflict @@ -742,7 +748,7 @@ echo "$ac_t""$prefix" 1>&6 if test "x$prefix" = "xNONE" ; then echo $ac_n "checking for default include-directory""... $ac_c" 1>&6 -echo "configure:746: checking for default include-directory" >&5 +echo "configure:752: checking for default include-directory" >&5 test -n "$verbose" && echo 1>&6 for cf_symbol in \ $includedir \ @@ -772,7 +778,7 @@ 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:776: checking for $ac_word" >&5 +echo "configure:782: 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 @@ -802,7 +808,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:806: checking for $ac_word" >&5 +echo "configure:812: 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 @@ -853,7 +859,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:857: checking for $ac_word" >&5 +echo "configure:863: 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 @@ -885,7 +891,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:889: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:895: 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. @@ -896,12 +902,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 900 "configure" +#line 906 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:911: \"$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 @@ -927,12 +933,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:931: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:937: 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:936: checking whether we are using GNU C" >&5 +echo "configure:942: 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 @@ -941,7 +947,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:945: \"$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:951: \"$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 @@ -960,7 +966,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:964: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:970: 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 @@ -993,7 +999,7 @@ fi if test -n "$GCC" ; then echo $ac_n "checking version of gcc""... $ac_c" 1>&6 -echo "configure:997: checking version of gcc" >&5 +echo "configure:1003: checking version of gcc" >&5 eval "$CC --version" fi if test $host != $build; then @@ -1002,7 +1008,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1006: checking for $ac_word" >&5 +echo "configure:1012: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1033,7 +1039,7 @@ done fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1037: checking how to run the C preprocessor" >&5 +echo "configure:1043: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1048,13 +1054,13 @@ else # 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:1058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1064: \"$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 : @@ -1065,13 +1071,13 @@ else 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:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1081: \"$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 : @@ -1082,13 +1088,13 @@ else 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:1092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1098: \"$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 : @@ -1114,13 +1120,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1118: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1124: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1138,7 +1144,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1160,7 +1166,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1164: checking for POSIXized ISC" >&5 +echo "configure:1170: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1182,7 +1188,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1186: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:1192: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1200,13 +1206,13 @@ for cf_arg in "-DCC_HAS_PROTOS" \ "" \ -qlanglvl=ansi \ -std1 \ - "-Aa -D_HPUX_SOURCE +e" \ + -Ae \ "-Aa -D_HPUX_SOURCE" \ -Xc do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -1283,7 +1289,7 @@ freebsd*) #(vi # Extract the first word of "ldconfig", so it can be a program name with args. set dummy ldconfig; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1287: checking for $ac_word" >&5 +echo "configure:1293: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1320,7 +1326,7 @@ esac echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6 -echo "configure:1324: checking if you want to ensure bool is consistent with C++" >&5 +echo "configure:1330: checking if you want to ensure bool is consistent with C++" >&5 # Check whether --with-cxx or --without-cxx was given. if test "${with_cxx+set}" = set; then @@ -1335,12 +1341,12 @@ if test "X$cf_with_cxx" = Xno ; then CXX="" GXX="" else - for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl + for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1344: checking for $ac_word" >&5 +echo "configure:1350: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1372,7 +1378,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1376: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1382: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1383,12 +1389,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1387 "configure" +#line 1393 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1411,15 +1417,15 @@ cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 if test $ac_cv_prog_cxx_works = no; then - { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } + echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX=""; fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1418: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1424: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1423: checking whether we are using GNU C++" >&5 +echo "configure:1429: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1428,7 +1434,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1447,7 +1453,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1451: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1457: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1478,11 +1484,11 @@ else fi fi -fi + fi if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6 -echo "configure:1486: checking if you want to build C++ binding and demo" >&5 +echo "configure:1492: checking if you want to build C++ binding and demo" >&5 # Check whether --with-cxx-binding or --without-cxx-binding was given. if test "${with_cxx_binding+set}" = set; then @@ -1495,7 +1501,7 @@ fi echo "$ac_t""$cf_with_cxx_binding" 1>&6 echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6 -echo "configure:1499: checking if you want to build with Ada95" >&5 +echo "configure:1505: checking if you want to build with Ada95" >&5 # Check whether --with-ada or --without-ada was given. if test "${with_ada+set}" = set; then @@ -1508,7 +1514,7 @@ fi echo "$ac_t""$cf_with_ada" 1>&6 echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6 -echo "configure:1512: checking if you want to build programs such as tic" >&5 +echo "configure:1518: checking if you want to build programs such as tic" >&5 # Check whether --with-progs or --without-progs was given. if test "${with_progs+set}" = set; then @@ -1531,7 +1537,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1535: checking for $ac_word" >&5 +echo "configure:1541: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1561,7 +1567,7 @@ test -n "$AWK" && break done echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1565: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1571: 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 @@ -1599,7 +1605,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1603: checking for a BSD compatible install" >&5 +echo "configure:1609: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1662,7 +1668,7 @@ case $INSTALL in esac echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:1666: checking for long file names" >&5 +echo "configure:1672: checking for long file names" >&5 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1706,7 +1712,7 @@ EOF fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1710: checking whether ln -s works" >&5 +echo "configure:1716: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1729,7 +1735,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1733: checking for $ac_word" >&5 +echo "configure:1739: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1761,7 +1767,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1765: checking for $ac_word" >&5 +echo "configure:1771: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1795,7 +1801,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1799: checking for $ac_word" >&5 +echo "configure:1805: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1831,7 +1837,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then else echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6 -echo "configure:1835: checking for loader (symbol LD)" >&5 +echo "configure:1841: checking for loader (symbol LD)" >&5 test -z "$LD" && LD=ld echo "$ac_t""$LD" 1>&6 @@ -1845,7 +1851,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then else echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6 -echo "configure:1849: checking for archiver (symbol AR)" >&5 +echo "configure:1855: checking for archiver (symbol AR)" >&5 test -z "$AR" && AR=ar echo "$ac_t""$AR" 1>&6 @@ -1859,7 +1865,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then else echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6 -echo "configure:1863: checking for archiver options (symbol AR_OPTS)" >&5 +echo "configure:1869: checking for archiver options (symbol AR_OPTS)" >&5 test -z "$AR_OPTS" && AR_OPTS=rv echo "$ac_t""$AR_OPTS" 1>&6 @@ -1871,7 +1877,7 @@ AR_OPTS=${cf_cv_subst_AR_OPTS} echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6 -echo "configure:1875: checking for makeflags variable" >&5 +echo "configure:1881: checking for makeflags variable" >&5 if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1907,7 +1913,7 @@ echo "$ac_t""$cf_cv_makeflags" 1>&6 echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6 -echo "configure:1911: checking if you have specified an install-prefix" >&5 +echo "configure:1917: checking if you have specified an install-prefix" >&5 # Check whether --with-install-prefix or --without-install-prefix was given. if test "${with_install_prefix+set}" = set; then @@ -1927,7 +1933,7 @@ echo "$ac_t""$INSTALL_PREFIX" 1>&6 echo $ac_n "checking format of man-pages""... $ac_c" 1>&6 -echo "configure:1931: checking format of man-pages" >&5 +echo "configure:1937: checking format of man-pages" >&5 # Check whether --with-manpage-format or --without-manpage-format was given. @@ -1979,7 +1985,7 @@ echo "$ac_t""$cf_manpage_form" 1>&6 echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6 -echo "configure:1983: checking for manpage renaming" >&5 +echo "configure:1989: checking for manpage renaming" >&5 # Check whether --with-manpage-renames or --without-manpage-renames was given. @@ -2021,6 +2027,22 @@ fi echo "$ac_t""$cf_manpage_renames" 1>&6 +echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6 +echo "configure:2032: checking for manpage symlinks" >&5 + + +# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given. +if test "${with_manpage_symlinks+set}" = set; then + withval="$with_manpage_symlinks" + cf_manpage_symlinks=$withval +else + cf_manpage_symlinks=yes +fi + + +echo "$ac_t""$cf_manpage_symlinks" 1>&6 + + if test "$prefix" = "NONE" ; then cf_prefix="$ac_default_prefix" else @@ -2047,6 +2069,7 @@ datadir="$datadir" MKDIRS="`cd $srcdir && pwd`/mkinstalldirs" INSTALL="$INSTALL" INSTALL_DATA="$INSTALL_DATA" + TMP=\${TMPDIR-/tmp}/man\$\$ trap "rm -f \$TMP" 0 1 2 5 15 @@ -2056,6 +2079,9 @@ shift mandir=\$1 shift +srcdir=\$1 +shift + for i in \$* ; do case \$i in #(vi *.orig|*.rej) ;; #(vi @@ -2066,8 +2092,14 @@ case \$i in #(vi \$MKDIRS $cf_subdir\$section fi fi + aliases= source=\`basename \$i\` CF_EOF +if test "$cf_manpage_symlinks" = yes ; then +cat >>man/edit_man.sh <>man/edit_man.sh <>man/edit_man.sh <&6 -echo "configure:2148: checking if you want to build shared libraries" >&5 +echo "configure:2213: checking if you want to build shared libraries" >&5 # Check whether --with-shared or --without-shared was given. if test "${with_shared+set}" = set; then @@ -2158,7 +2223,7 @@ echo "$ac_t""$with_shared" 1>&6 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6 -echo "configure:2162: checking if you want to build static libraries" >&5 +echo "configure:2227: checking if you want to build static libraries" >&5 # Check whether --with-normal or --without-normal was given. if test "${with_normal+set}" = set; then @@ -2172,7 +2237,7 @@ echo "$ac_t""$with_normal" 1>&6 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal" echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6 -echo "configure:2176: checking if you want to build debug libraries" >&5 +echo "configure:2241: checking if you want to build debug libraries" >&5 # Check whether --with-debug or --without-debug was given. if test "${with_debug+set}" = set; then @@ -2186,7 +2251,7 @@ echo "$ac_t""$with_debug" 1>&6 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug" echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6 -echo "configure:2190: checking if you want to build profiling libraries" >&5 +echo "configure:2255: checking if you want to build profiling libraries" >&5 # Check whether --with-profile or --without-profile was given. if test "${with_profile+set}" = set; then @@ -2199,8 +2264,49 @@ fi echo "$ac_t""$with_profile" 1>&6 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile" +############################################################################### + +echo $ac_n "checking for specified models""... $ac_c" 1>&6 +echo "configure:2271: checking for specified models" >&5 +test -z "$cf_list_models" && cf_list_models=normal +echo "$ac_t""$cf_list_models" 1>&6 + +### Use the first model as the default, and save its suffix for use in building +### up test-applications. +echo $ac_n "checking for default model""... $ac_c" 1>&6 +echo "configure:2278: checking for default model" >&5 +DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` +echo "$ac_t""$DFT_LWR_MODEL" 1>&6 + + +DFT_UPR_MODEL=`echo $DFT_LWR_MODEL | tr '[a-z]' '[A-Z]'` + + +TINFO_NAME=tinfo + + +LIB_NAME=ncurses + + +LIB_DIR=../lib + + case $cf_cv_system_name in + os2) LIB_PREFIX='' ;; + *) LIB_PREFIX='lib' ;; + esac +cf_prefix=$LIB_PREFIX + + +LIB_PREFIX=$cf_prefix + + +LIB_SUFFIX= + + +############################################################################### + echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6 -echo "configure:2204: checking if you want to build a separate terminfo library" >&5 +echo "configure:2310: checking if you want to build a separate terminfo library" >&5 # Check whether --with-termlib or --without-termlib was given. if test "${with_termlib+set}" = set; then @@ -2214,7 +2320,7 @@ echo "$ac_t""$with_termlib" 1>&6 ### Checks for special libraries, must be done up-front. echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6 -echo "configure:2218: checking if you want to link with dbmalloc for testing" >&5 +echo "configure:2324: checking if you want to link with dbmalloc for testing" >&5 # Check whether --with-dbmalloc or --without-dbmalloc was given. if test "${with_dbmalloc+set}" = set; then @@ -2227,7 +2333,7 @@ fi echo "$ac_t""$with_dbmalloc" 1>&6 if test $with_dbmalloc = yes ; then echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6 -echo "configure:2231: checking for debug_malloc in -ldbmalloc" >&5 +echo "configure:2337: checking for debug_malloc in -ldbmalloc" >&5 ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2235,7 +2341,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2356: \"$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 @@ -2276,7 +2382,7 @@ fi fi echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6 -echo "configure:2280: checking if you want to link with dmalloc for testing" >&5 +echo "configure:2386: checking if you want to link with dmalloc for testing" >&5 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then @@ -2289,7 +2395,7 @@ fi echo "$ac_t""$with_dmalloc" 1>&6 if test $with_dmalloc = yes ; then echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6 -echo "configure:2293: checking for dmalloc_debug in -ldmalloc" >&5 +echo "configure:2399: checking for dmalloc_debug in -ldmalloc" >&5 ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2297,7 +2403,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2418: \"$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 @@ -2339,7 +2445,7 @@ fi SHLIB_LIST="" echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6 -echo "configure:2343: checking if you want to link with the gpm mouse library" >&5 +echo "configure:2449: checking if you want to link with the gpm mouse library" >&5 # Check whether --with-gpm or --without-gpm was given. if test "${with_gpm+set}" = set; then @@ -2352,7 +2458,7 @@ fi echo "$ac_t""$with_gpm" 1>&6 if test $with_gpm = yes ; then echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:2356: checking for Gpm_Open in -lgpm" >&5 +echo "configure:2462: 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 @@ -2360,7 +2466,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:2481: \"$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 @@ -2397,17 +2503,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2401: checking for $ac_hdr" >&5 +echo "configure:2507: 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:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2517: \"$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* @@ -2441,77 +2547,6 @@ fi fi -TINFO_LIST="$SHLIB_LIST" -test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo" - - - - - -echo $ac_n "checking for specified models""... $ac_c" 1>&6 -echo "configure:2453: checking for specified models" >&5 -test -z "$cf_list_models" && cf_list_models=normal -echo "$ac_t""$cf_list_models" 1>&6 - -### Use the first model as the default, and save its suffix for use in building -### up test-applications. -DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` - -DFT_UPR_MODEL=`echo $DFT_LWR_MODEL | tr '[a-z]' '[A-Z]'` - - - case $DFT_LWR_MODEL in - normal) DFT_DEP_SUFFIX='.a' ;; - debug) DFT_DEP_SUFFIX='_g.a' ;; - profile) DFT_DEP_SUFFIX='_p.a' ;; - shared) - case $cf_cv_system_name in - openbsd*|freebsd*) - DFT_DEP_SUFFIX='.so.$(REL_VERSION)' ;; - netbsd*) - if test -f /usr/libexec/ld.elf_so; then - DFT_DEP_SUFFIX='.so' - else - DFT_DEP_SUFFIX='.so.$(REL_VERSION)' - fi - ;; - hpux*) DFT_DEP_SUFFIX='.sl' ;; - *) DFT_DEP_SUFFIX='.so' ;; - esac - esac - - case $DFT_LWR_MODEL in - normal) DFT_ARG_SUFFIX='' ;; - debug) DFT_ARG_SUFFIX='_g' ;; - profile) DFT_ARG_SUFFIX='_p' ;; - shared) DFT_ARG_SUFFIX='' ;; - esac - - case $DFT_LWR_MODEL in - normal) DFT_OBJ_SUBDIR='objects' ;; - debug) DFT_OBJ_SUBDIR='obj_g' ;; - profile) DFT_OBJ_SUBDIR='obj_p' ;; - shared) DFT_OBJ_SUBDIR='obj_s' ;; - esac - -TINFO_NAME=tinfo - - -LIB_NAME=ncurses - - -LIB_DIR=../lib - - case $cf_cv_system_name in - os2) cf_prefix='' ;; - *) cf_prefix='lib' ;; - esac - LIB_PREFIX=$cf_prefix - - -LIB_PREFIX=$LIB_DIR/$cf_prefix - - if test X"$CC_G_OPT" = X"" ; then CC_G_OPT='-g' @@ -2525,15 +2560,18 @@ if test X"$CXX_G_OPT" = X"" ; then fi +echo $ac_n "checking for default loader flags""... $ac_c" 1>&6 +echo "configure:2565: checking for default loader flags" >&5 case $DFT_LWR_MODEL in normal) LD_MODEL='' ;; debug) LD_MODEL=$CC_G_OPT ;; profile) LD_MODEL='-pg';; shared) LD_MODEL='' ;; esac +echo "$ac_t""$LD_MODEL" 1>&6 echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6 -echo "configure:2537: checking if rpath option should be used" >&5 +echo "configure:2575: checking if rpath option should be used" >&5 # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then @@ -2555,7 +2593,7 @@ echo "$ac_t""$cf_cv_ld_rpath" 1>&6 cf_cv_do_symlinks=no echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6 -echo "configure:2559: checking if release/abi version should be used for shared libs" >&5 +echo "configure:2597: checking if release/abi version should be used for shared libs" >&5 # Check whether --with-shlib-version or --without-shlib-version was given. if test "${with_shlib_version+set}" = set; then @@ -2581,11 +2619,44 @@ fi cf_cv_rm_so_locs=no + # Some less-capable ports of gcc support only -fpic + CC_SHARED_OPTS= + if test -n "$GCC" + then + echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6 +echo "configure:2628: checking which $CC option to use" >&5 + cf_save_CFLAGS="$CFLAGS" + for CC_SHARED_OPTS in -fPIC -fpic '' + do + CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" + cat > conftest.$ac_ext < +int main() { +int x = 1 +; return 0; } +EOF +if { (eval echo configure:2641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done + echo "$ac_t""$CC_SHARED_OPTS" 1>&6 + CFLAGS="$cf_save_CFLAGS" + fi + case $cf_cv_system_name in + beos*) + MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0' + ;; hpux10.*) # (tested with gcc 2.7.2 -- I don't have c89) if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' else CC_SHARED_OPTS='+Z' @@ -2600,7 +2671,6 @@ fi hpux*) # (tested with gcc 2.7.2 -- I don't have c89) if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' else CC_SHARED_OPTS='+Z' @@ -2613,9 +2683,7 @@ fi ;; irix*) # tested with IRIX 5.2 and 'cc'. - if test -n "$GCC"; then - CC_SHARED_OPTS='-fPIC' - else + if test -z "$GCC"; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@' @@ -2623,37 +2691,36 @@ fi ;; linux*|gnu*) # tested with Linux 2.0.29 and gcc 2.7.2 (ELF) - CC_SHARED_OPTS='-fpic' test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," if test $DFT_LWR_MODEL = "shared" ; then LOCAL_LDFLAGS='-Wl,-rpath,../lib' LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' fi test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel - if test $cf_cv_shlib_version = no ; then - MK_SHARED_LIB='$(CC) -shared -Wl,-stats,-lc -o $@' - else - MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)`,-stats,-lc -o $@' - fi + MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@' ;; openbsd2*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@' ;; openbsd*|freebsd*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" MK_SHARED_LIB='$(LD) -Bshareable -o $@' test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel ;; netbsd*) - CC_SHARED_OPTS='-fpic -DPIC' + CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," if test $DFT_LWR_MODEL = "shared" && test $cf_cv_ld_rpath = yes ; then LOCAL_LDFLAGS='-Wl,-rpath,../lib' LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS" - MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)` -o $@' - test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel + MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@' + if test $cf_cv_shlib_version = auto; then + if test ! -f /usr/libexec/ld.elf_so; then + cf_cv_shlib_version=rel + fi + fi else MK_SHARED_LIB='$(LD) -Bshareable -o $@' fi @@ -2662,7 +2729,6 @@ fi # tested with OSF/1 V3.2 and 'cc' # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't # link with shared libs). - CC_SHARED_OPTS='' MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`' test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath" case $host_os in @@ -2679,12 +2745,10 @@ fi ;; sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98 # tested with osr5.0.5 - if test $ac_cv_prog_gcc = yes; then - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-belf -KPIC' fi - MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@' + MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@' if test $cf_cv_ld_rpath = yes ; then # only way is to set LD_RUN_PATH but no switch for it RUN_PATH=$libdir @@ -2695,9 +2759,7 @@ fi ;; sunos4*) # tested with SunOS 4.1.1 and gcc 2.7.0 - if test $ac_cv_prog_gcc = yes; then - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-KPIC' fi MK_SHARED_LIB='$(LD) -assert pure-text -o $@' @@ -2705,21 +2767,21 @@ fi ;; solaris2*) # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 - if test $ac_cv_prog_gcc = yes; then - CC_SHARED_OPTS='-fpic' - else + if test $ac_cv_prog_gcc != yes; then CC_SHARED_OPTS='-KPIC' fi - MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@' + MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@' if test $cf_cv_ld_rpath = yes ; then cf_ld_rpath_opt="-R" EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS" fi test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel ;; - unix_sv*) - # tested with UnixWare 1.1.2 - CC_SHARED_OPTS='-KPIC' + sysv5uw7*|unix_sv*) + # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) + if test $ac_cv_prog_gcc != yes; then + CC_SHARED_OPTS='-KPIC' + fi MK_SHARED_LIB='$(LD) -d y -G -o $@' ;; *) @@ -2733,15 +2795,7 @@ fi rel|abi) case "$MK_SHARED_LIB" in #(vi *'-o $@') - if test "$cf_cv_do_symlinks" = reverse ; then - { echo "configure: error: cannot use --with-shlib-version with this platform" 1>&2; exit 1; } - fi - if test "$cf_cv_shlib_version" = rel ; then - MK_SHARED_LIB="$MK_SHARED_LIB"'.$(REL_VERSION)' - else - MK_SHARED_LIB="$MK_SHARED_LIB"'.$(ABI_VERSION)' - fi - cf_cv_do_symlinks=yes + test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes ;; *) echo "configure: warning: ignored --with-shlib-version" 1>&2 @@ -2752,18 +2806,18 @@ fi if test -n "$cf_ld_rpath_opt" ; then echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6 -echo "configure:2756: checking if we need a space after rpath option" >&5 +echo "configure:2810: checking if we need a space after rpath option" >&5 cf_save_LIBS="$LIBS" LIBS="$LIBS ${cf_ld_rpath_opt}/usr/lib" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_rpath_space=no else @@ -2802,27 +2856,20 @@ fi ### use option --disable-overwrite to leave out the link to -lcurses echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6 -echo "configure:2806: checking if you wish to install ncurses overwriting curses" >&5 +echo "configure:2860: checking if you wish to install ncurses overwriting curses" >&5 # Check whether --enable-overwrite or --disable-overwrite was given. if test "${enable_overwrite+set}" = set; then enableval="$enable_overwrite" with_overwrite=$enableval - test "$with_overwrite" = no && \ - test "x$includedir" = 'x${prefix}/include' && \ - includedir='$(prefix)/include/ncurses' - else with_overwrite=yes fi echo "$ac_t""$with_overwrite" 1>&6 -echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6 -echo "configure:2822: checking where we will install curses.h" >&5 -echo "$ac_t""$includedir" 1>&6 echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6 -echo "configure:2826: checking if external terminfo-database is used" >&5 +echo "configure:2873: checking if external terminfo-database is used" >&5 # Check whether --enable-database or --disable-database was given. if test "${enable_database+set}" = set; then @@ -2838,25 +2885,8 @@ test $with_database != no && cat >> confdefs.h <<\EOF EOF -echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6 -echo "configure:2843: checking if you want to build with function extensions" >&5 - -# Check whether --enable-ext-funcs or --disable-ext-funcs was given. -if test "${enable_ext_funcs+set}" = set; then - enableval="$enable_ext_funcs" - with_ext_funcs=$enableval -else - with_ext_funcs=yes -fi - -echo "$ac_t""$with_ext_funcs" 1>&6 -test "$with_ext_funcs" = yes && cat >> confdefs.h <<\EOF -#define NCURSES_EXT_FUNCS 1 -EOF - - echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6 -echo "configure:2860: checking for list of fallback descriptions" >&5 +echo "configure:2890: checking for list of fallback descriptions" >&5 # Check whether --with-fallbacks or --without-fallbacks was given. if test "${with_fallbacks+set}" = set; then @@ -2871,7 +2901,7 @@ FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'` echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6 -echo "configure:2875: checking for list of terminfo directories" >&5 +echo "configure:2905: checking for list of terminfo directories" >&5 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given. @@ -2890,6 +2920,8 @@ do case ".$cf_src_path" in #(vi ./*) #(vi ;; +.a-zA-Z:\\/*) #(vi OS/2 EMX + ;; .\${*prefix}*) #(vi eval cf_src_path="$cf_src_path" case ".$cf_src_path" in #(vi @@ -2928,7 +2960,7 @@ fi ### use option --disable-big-core to make tic run on small machines ### We need 4Mb, check if we can allocate 50% more than that. echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6 -echo "configure:2932: checking if big-core option selected" >&5 +echo "configure:2964: checking if big-core option selected" >&5 # Check whether --enable-big-core or --disable-big-core was given. if test "${enable_big_core+set}" = set; then @@ -2939,14 +2971,14 @@ else with_big_core=no else cat > conftest.$ac_ext < #include int main() { exit(malloc(6000000L) == 0); } EOF -if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then with_big_core=yes else @@ -2968,7 +3000,7 @@ EOF ### use option --enable-termcap to compile in the termcap fallback support echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6 -echo "configure:2972: checking if you want termcap-fallback support" >&5 +echo "configure:3004: checking if you want termcap-fallback support" >&5 # Check whether --enable-termcap or --disable-termcap was given. if test "${enable_termcap+set}" = set; then @@ -2989,7 +3021,7 @@ else ### use option --enable-getcap to use a hacked getcap for reading termcaps echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6 -echo "configure:2993: checking if fast termcap-loader is needed" >&5 +echo "configure:3025: checking if fast termcap-loader is needed" >&5 # Check whether --enable-getcap or --disable-getcap was given. if test "${enable_getcap+set}" = set; then @@ -3006,7 +3038,7 @@ EOF echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6 -echo "configure:3010: checking if translated termcaps will be cached in ~/.terminfo" >&5 +echo "configure:3042: checking if translated termcaps will be cached in ~/.terminfo" >&5 # Check whether --enable-getcap-cache or --disable-getcap-cache was given. if test "${enable_getcap_cache+set}" = set; then @@ -3032,12 +3064,12 @@ for ac_func in \ unlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3036: checking for $ac_func" >&5 +echo "configure:3068: 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:3096: \"$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 @@ -3091,12 +3123,12 @@ if test "$ac_cv_prog_cc_cross" = yes ; then symlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3095: checking for $ac_func" >&5 +echo "configure:3127: 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:3155: \"$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 @@ -3145,7 +3177,7 @@ done else echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6 -echo "configure:3149: checking if link/symlink functions work" >&5 +echo "configure:3181: checking if link/symlink functions work" >&5 if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3157,7 +3189,7 @@ else eval 'ac_cv_func_'$cf_func'=error' else cat > conftest.$ac_ext < @@ -3186,7 +3218,7 @@ int main() } EOF -if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_link_funcs="$cf_cv_link_funcs $cf_func" @@ -3222,7 +3254,7 @@ with_symlinks=no if test "$ac_cv_func_link" != yes ; then echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6 -echo "configure:3226: checking if tic should use symbolic links" >&5 +echo "configure:3258: checking if tic should use symbolic links" >&5 if test "$ac_cv_func_symlink" = yes ; then with_symlinks=yes else @@ -3231,7 +3263,7 @@ echo "configure:3226: checking if tic should use symbolic links" >&5 echo "$ac_t""$with_symlinks" 1>&6 elif test "$ac_cv_func_symlink" != yes ; then echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6 -echo "configure:3235: checking if tic should use hard links" >&5 +echo "configure:3267: checking if tic should use hard links" >&5 if test "$ac_cv_func_link" = yes ; then with_links=yes else @@ -3240,7 +3272,7 @@ echo "configure:3235: checking if tic should use hard links" >&5 echo "$ac_t""$with_links" 1>&6 else echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6 -echo "configure:3244: checking if tic should use symbolic links" >&5 +echo "configure:3276: checking if tic should use symbolic links" >&5 # Check whether --enable-symlinks or --disable-symlinks was given. if test "${enable_symlinks+set}" = set; then @@ -3262,9 +3294,27 @@ test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF EOF +### use option --enable-broken-linker to force on use of broken-linker support +echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6 +echo "configure:3300: checking if you want broken-linker support code" >&5 + +# Check whether --enable-broken_linker or --disable-broken_linker was given. +if test "${enable_broken_linker+set}" = set; then + enableval="$enable_broken_linker" + with_broken_linker=$enableval +else + with_broken_linker=$BROKEN_LINKER +fi + +echo "$ac_t""$with_broken_linker" 1>&6 +test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF +#define BROKEN_LINKER 1 +EOF + + ### use option --enable-bsdpad to have tputs process BSD-style prefix padding echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6 -echo "configure:3268: checking if tputs should process BSD-style prefix padding" >&5 +echo "configure:3318: checking if tputs should process BSD-style prefix padding" >&5 # Check whether --enable-bsdpad or --disable-bsdpad was given. if test "${enable_bsdpad+set}" = set; then @@ -3280,9 +3330,66 @@ test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF EOF +### Enable compiling-in rcs id's +echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6 +echo "configure:3336: checking if RCS identifiers should be compiled-in" >&5 + +# Check whether --with-rcs-ids or --without-rcs-ids was given. +if test "${with_rcs_ids+set}" = set; then + withval="$with_rcs_ids" + with_rcs_ids=$withval +else + with_rcs_ids=no +fi + +echo "$ac_t""$with_rcs_ids" 1>&6 +test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF +#define USE_RCS_IDS 1 +EOF + + +############################################################################### + + +### Note that some functions (such as const) are normally disabled anyway. +echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6 +echo "configure:3357: checking if you want to build with function extensions" >&5 + +# Check whether --enable-ext-funcs or --disable-ext-funcs was given. +if test "${enable_ext_funcs+set}" = set; then + enableval="$enable_ext_funcs" + with_ext_funcs=$enableval +else + with_ext_funcs=yes +fi + +echo "$ac_t""$with_ext_funcs" 1>&6 +if test "$with_ext_funcs" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_HAS_KEY 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_RESIZETERM 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_USE_DEFAULT_COLORS 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_WRESIZE 1 +EOF + + cat >> confdefs.h <<\EOF +#define NCURSES_EXT_FUNCS 1 +EOF + +fi + ### use option --enable-const to turn on use of const beyond that in XSI. echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6 -echo "configure:3286: checking for extended use of const keyword" >&5 +echo "configure:3393: checking for extended use of const keyword" >&5 # Check whether --enable-const or --disable-const was given. if test "${enable_const+set}" = set; then @@ -3303,28 +3410,80 @@ EOF fi -### Enable compiling-in rcs id's -echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6 -echo "configure:3309: checking if RCS identifiers should be compiled-in" >&5 +### use option --enable-hashmap to turn on use of hashmap scrolling logic +echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6 +echo "configure:3416: checking if you want hashmap scrolling-optimization code" >&5 -# Check whether --with-rcs-ids or --without-rcs-ids was given. -if test "${with_rcs_ids+set}" = set; then - withval="$with_rcs_ids" - with_rcs_ids=$withval +# Check whether --enable-hashmap or --disable-hashmap was given. +if test "${enable_hashmap+set}" = set; then + enableval="$enable_hashmap" + with_hashmap=$enableval +else + with_hashmap=yes +fi + +echo "$ac_t""$with_hashmap" 1>&6 +test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF +#define USE_HASHMAP 1 +EOF + + +echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6 +echo "configure:3433: checking if you want \$NCURSES_NO_PADDING code" >&5 + +# Check whether --enable-no-padding or --disable-no-padding was given. +if test "${enable_no_padding+set}" = set; then + enableval="$enable_no_padding" + with_no_padding=$enableval +else + with_no_padding=$with_ext_funcs +fi + +echo "$ac_t""$with_no_padding" 1>&6 +test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF +#define NCURSES_NO_PADDING 1 +EOF + + +### use option --enable-sigwinch to turn on use of SIGWINCH logic +echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6 +echo "configure:3451: checking if you want SIGWINCH handler" >&5 + +# Check whether --enable-sigwinch or --disable-sigwinch was given. +if test "${enable_sigwinch+set}" = set; then + enableval="$enable_sigwinch" + with_sigwinch=$enableval +else + with_sigwinch=$with_ext_funcs +fi + +echo "$ac_t""$with_sigwinch" 1>&6 +test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF +#define USE_SIGWINCH 1 +EOF + + +### use option --enable-tcap-names to allow user to define new capabilities +echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6 +echo "configure:3469: checking if you want user-definable terminal capabilities like termcap" >&5 + +# Check whether --enable-tcap-names or --disable-tcap-names was given. +if test "${enable_tcap_names+set}" = set; then + enableval="$enable_tcap_names" + with_tcap_names=$enableval else - with_rcs_ids=no + with_tcap_names=$with_ext_funcs fi -echo "$ac_t""$with_rcs_ids" 1>&6 -test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF -#define USE_RCS_IDS 1 -EOF +echo "$ac_t""$with_tcap_names" 1>&6 +NCURSES_XNAMES=0 +test "$with_tcap_names" = yes && NCURSES_XNAMES=1 ############################################################################### echo $ac_n "checking if you want all experimental code""... $ac_c" 1>&6 -echo "configure:3328: checking if you want all experimental code" >&5 +echo "configure:3487: checking if you want all experimental code" >&5 # Check whether --with-develop or --without-develop was given. if test "${with_develop+set}" = set; then @@ -3336,27 +3495,27 @@ fi echo "$ac_t""$with_develop" 1>&6 -### use option --enable-broken-linker to force on use of broken-linker support -echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6 -echo "configure:3342: checking if you want broken-linker support code" >&5 +### use option --enable-colorfgbg to turn on use of $COLORFGBG environment +echo $ac_n "checking if you want experimental colorfgbg code""... $ac_c" 1>&6 +echo "configure:3501: checking if you want experimental colorfgbg code" >&5 -# Check whether --enable-broken_linker or --disable-broken_linker was given. -if test "${enable_broken_linker+set}" = set; then - enableval="$enable_broken_linker" - with_broken_linker=$enableval +# Check whether --enable-hard-tabs or --disable-hard-tabs was given. +if test "${enable_hard_tabs+set}" = set; then + enableval="$enable_hard_tabs" + with_colorfgbg=$enableval else - with_broken_linker=$BROKEN_LINKER + with_colorfgbg=$with_develop fi -echo "$ac_t""$with_broken_linker" 1>&6 -test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF -#define BROKEN_LINKER 1 +echo "$ac_t""$with_colorfgbg" 1>&6 +test "$with_colorfgbg" = yes && cat >> confdefs.h <<\EOF +#define USE_COLORFGBG 1 EOF ### use option --enable-hard-tabs to turn on use of hard-tabs optimize echo $ac_n "checking if you want experimental hard-tabs code""... $ac_c" 1>&6 -echo "configure:3360: checking if you want experimental hard-tabs code" >&5 +echo "configure:3519: checking if you want experimental hard-tabs code" >&5 # Check whether --enable-hard-tabs or --disable-hard-tabs was given. if test "${enable_hard_tabs+set}" = set; then @@ -3372,43 +3531,8 @@ test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF EOF -### use option --enable-hashmap to turn on use of hashmap scrolling logic -echo $ac_n "checking if you want experimental hashmap code""... $ac_c" 1>&6 -echo "configure:3378: checking if you want experimental hashmap code" >&5 - -# Check whether --enable-hashmap or --disable-hashmap was given. -if test "${enable_hashmap+set}" = set; then - enableval="$enable_hashmap" - with_hashmap=$enableval -else - with_hashmap=yes -fi - -echo "$ac_t""$with_hashmap" 1>&6 -test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF -#define USE_HASHMAP 1 -EOF - - -echo $ac_n "checking if you want experimental no-padding code""... $ac_c" 1>&6 -echo "configure:3395: checking if you want experimental no-padding code" >&5 - -# Check whether --enable-no-padding or --disable-no-padding was given. -if test "${enable_no_padding+set}" = set; then - enableval="$enable_no_padding" - with_no_padding=$enableval -else - with_no_padding=yes -fi - -echo "$ac_t""$with_no_padding" 1>&6 -test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF -#define NCURSES_NO_PADDING 1 -EOF - - echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6 -echo "configure:3412: checking if you want experimental safe-sprintf code" >&5 +echo "configure:3536: checking if you want experimental safe-sprintf code" >&5 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given. if test "${enable_safe_sprintf+set}" = set; then @@ -3425,17 +3549,17 @@ EOF ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic +# when hashmap is used scroll hints are useless +if test "$with_hashmap" = no ; then echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6 -echo "configure:3430: checking if you want to experiment without scrolling-hints code" >&5 +echo "configure:3556: checking if you want to experiment without scrolling-hints code" >&5 # Check whether --enable-scroll-hints or --disable-scroll-hints was given. if test "${enable_scroll_hints+set}" = set; then enableval="$enable_scroll_hints" with_scroll_hints=$enableval else - with_scroll_hints=yes; - # when hashmap is used scroll hints are useless - test $with_hashmap = yes && with_scroll_hints=no + with_scroll_hints=yes fi echo "$ac_t""$with_scroll_hints" 1>&6 @@ -3443,45 +3567,11 @@ test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF #define USE_SCROLL_HINTS 1 EOF - -### use option --enable-tcap-names to allow user to define new capabilities -echo $ac_n "checking if you want experimental definable names like termcap""... $ac_c" 1>&6 -echo "configure:3450: checking if you want experimental definable names like termcap" >&5 - -# Check whether --enable-tcap-names or --disable-tcap-names was given. -if test "${enable_tcap_names+set}" = set; then - enableval="$enable_tcap_names" - with_tcap_names=$enableval -else - with_tcap_names=$with_develop -fi - -echo "$ac_t""$with_tcap_names" 1>&6 -NCURSES_XNAMES=0 -test "$with_tcap_names" = yes && NCURSES_XNAMES=1 - - -### use option --enable-sigwinch to turn on use of SIGWINCH logic -echo $ac_n "checking if you want experimental SIGWINCH handler""... $ac_c" 1>&6 -echo "configure:3467: checking if you want experimental SIGWINCH handler" >&5 - -# Check whether --enable-sigwinch or --disable-sigwinch was given. -if test "${enable_sigwinch+set}" = set; then - enableval="$enable_sigwinch" - with_sigwinch=$enableval -else - with_sigwinch=yes fi -echo "$ac_t""$with_sigwinch" 1>&6 -test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF -#define USE_SIGWINCH 1 -EOF - - ### use option --enable-widec to turn on use of wide-character support echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6 -echo "configure:3485: checking if you want experimental wide-character code" >&5 +echo "configure:3575: checking if you want experimental wide-character code" >&5 # Check whether --enable-widec or --disable-widec was given. if test "${enable_widec+set}" = set; then @@ -3492,14 +3582,17 @@ else fi echo "$ac_t""$with_widec" 1>&6 -test "$with_widec" = yes && cat >> confdefs.h <<\EOF +if test "$with_widec" = yes ; then + LIB_SUFFIX="w${LIB_SUFFIX}" + cat >> confdefs.h <<\EOF #define USE_WIDEC_SUPPORT 1 EOF +fi ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize echo $ac_n "checking if you want experimental xmc code""... $ac_c" 1>&6 -echo "configure:3503: checking if you want experimental xmc code" >&5 +echo "configure:3596: checking if you want experimental xmc code" >&5 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. if test "${enable_xmc_glitch+set}" = set; then @@ -3549,11 +3642,11 @@ if test -n "$with_warnings"; then if test -n "$GCC" then cat > conftest.$ac_ext <&6 -echo "configure:3557: checking for $CC warning options" >&5 +echo "configure:3650: checking for $CC warning options" >&5 cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" cf_warn_CONST="" @@ -3571,7 +3664,7 @@ echo "configure:3557: checking for $CC warning options" >&5 Wstrict-prototypes $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:3668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES" @@ -3603,9 +3696,9 @@ EOF if test -n "$GCC" then echo "checking for $CC __attribute__ directives" 1>&6 -echo "configure:3607: checking for $CC __attribute__ directives" >&5 +echo "configure:3700: checking for $CC __attribute__ directives" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:3740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 cat conftest.h >>confdefs.h # else @@ -3723,12 +3816,12 @@ fi ### Checks for libraries. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:3727: checking for gettimeofday" >&5 +echo "configure:3820: checking for gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+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:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -3774,7 +3867,7 @@ else echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3778: checking for gettimeofday in -lbsd" >&5 +echo "configure:3871: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3782,7 +3875,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3890: \"$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 @@ -3819,105 +3912,52 @@ fi fi -MATH_LIB="" -echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3825: checking for sin" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sin'+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 sin(); - -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_sin) || defined (__stub___sin) -choke me -#else -sin(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sin=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_sin=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:3871: checking for sin in -lm" >&5 -ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6 +echo "configure:3918: checking if -lm needed for math functions" >&5 +if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < + #include + int main() { -sin() +double x = rand(); printf("result = %g\n", sin(x)) ; return 0; } EOF -if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3934: \"$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" + cf_cv_need_libm=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + cf_cv_need_libm=yes 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 - MATH_LIB="-lm" -else - echo "$ac_t""no" 1>&6 fi +echo "$ac_t""$cf_cv_need_libm" 1>&6 +if test "$cf_cv_need_libm" = yes +then +MATH_LIB=-lm fi ### Checks for header files. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3916: checking for ANSI C header files" >&5 +echo "configure:3956: 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 @@ -3925,7 +3965,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3969: \"$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* @@ -3942,7 +3982,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 @@ -3960,7 +4000,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 @@ -3981,7 +4021,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3992,7 +4032,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4020,12 +4060,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4024: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4064: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4033,7 +4073,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4058,7 +4098,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4062: checking for opendir in -ldir" >&5 +echo "configure:4102: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4066,7 +4106,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4121: \"$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 @@ -4099,7 +4139,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4103: checking for opendir in -lx" >&5 +echo "configure:4143: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4107,7 +4147,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4162: \"$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 @@ -4142,13 +4182,13 @@ fi echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6 -echo "configure:4146: checking for regular-expression headers" >&5 +echo "configure:4186: checking for regular-expression headers" >&5 if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4161,7 +4201,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_regex="regex.h" else @@ -4170,7 +4210,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < int main() { @@ -4180,7 +4220,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_regex="regexp.h" else @@ -4191,7 +4231,7 @@ else cf_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext < int main() { @@ -4201,7 +4241,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_regex="regexpr.h" else @@ -4241,34 +4281,33 @@ getopt.h \ libc.h \ limits.h \ locale.h \ +poll.h \ sys/bsdtypes.h \ sys/ioctl.h \ sys/param.h \ -poll.h \ +sys/poll.h \ sys/select.h \ -sys/stropts.h \ sys/time.h \ sys/times.h \ termio.h \ termios.h \ ttyent.h \ unistd.h \ -values.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4262: checking for $ac_hdr" >&5 +echo "configure:4301: 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:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4311: \"$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* @@ -4299,7 +4338,7 @@ done # Note: even non-Posix ISC needs to declare fd_set if test "$ISC" = yes ; then echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6 -echo "configure:4303: checking for main in -lcposix" >&5 +echo "configure:4342: checking for main in -lcposix" >&5 ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4307,14 +4346,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4357: \"$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 @@ -4342,7 +4381,7 @@ else fi echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6 -echo "configure:4346: checking for bzero in -linet" >&5 +echo "configure:4385: checking for bzero in -linet" >&5 ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4350,7 +4389,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4404: \"$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 @@ -4384,17 +4423,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4388: checking for $ac_hdr" >&5 +echo "configure:4427: 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:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4437: \"$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* @@ -4424,13 +4463,13 @@ fi echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6 -echo "configure:4428: checking if sys/time.h works with sys/select.h" >&5 +echo "configure:4467: 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 < @@ -4445,7 +4484,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sys_time_select=yes else @@ -4474,12 +4513,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4478: checking for working const" >&5 +echo "configure:4517: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4549,21 +4588,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4553: checking for inline" >&5 +echo "configure:4592: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4595,20 +4634,20 @@ EOF echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6 -echo "configure:4599: checking if unsigned literals are legal" >&5 +echo "configure:4638: checking if unsigned literals are legal" >&5 if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_unsigned_literals=yes else @@ -4626,7 +4665,7 @@ echo "$ac_t""$cf_cv_unsigned_literals" 1>&6 echo $ac_n "checking for type of chtype""... $ac_c" 1>&6 -echo "configure:4630: checking for type of chtype" >&5 +echo "configure:4669: checking for type of chtype" >&5 if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4635,7 +4674,7 @@ else cf_cv_typeof_chtype=long else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_typeof_chtype=`cat cf_test.out` else @@ -4714,7 +4753,7 @@ test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L" echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6 -echo "configure:4718: checking for number of bits in chtype" >&5 +echo "configure:4757: checking for number of bits in chtype" >&5 if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4723,7 +4762,7 @@ else cf_cv_shift_limit=32 else cat > conftest.$ac_ext < @@ -4746,7 +4785,7 @@ int main() } EOF -if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_shift_limit=`cat cf_test.out` else @@ -4766,7 +4805,7 @@ echo "$ac_t""$cf_cv_shift_limit" 1>&6 echo $ac_n "checking for width of character-index""... $ac_c" 1>&6 -echo "configure:4770: checking for width of character-index" >&5 +echo "configure:4809: checking for width of character-index" >&5 if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4793,16 +4832,16 @@ echo "$ac_t""$cf_cv_widec_shift" 1>&6 echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6 -echo "configure:4797: checking if external errno is declared" >&5 +echo "configure:4836: checking if external errno is declared" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #endif #include @@ -4812,7 +4851,7 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'errno'=yes' else @@ -4843,13 +4882,13 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist echo $ac_n "checking if external errno exists""... $ac_c" 1>&6 -echo "configure:4847: checking if external errno exists" >&5 +echo "configure:4886: checking if external errno exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_errno'+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:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'errno'=yes' else @@ -4891,23 +4930,23 @@ fi echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6 -echo "configure:4895: checking if data-only library module links" >&5 +echo "configure:4934: checking if data-only library module links" >&5 if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest.a cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } ; then + if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then mv conftest.o data.o && \ ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null fi rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:4963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then mv conftest.o func.o && \ ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null fi @@ -4932,7 +4971,7 @@ EOF cf_cv_link_dataonly=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_link_dataonly=yes else @@ -4966,17 +5005,17 @@ EOF echo $ac_n "checking for speed_t""... $ac_c" 1>&6 -echo "configure:4970: checking for speed_t" >&5 +echo "configure:5009: checking for speed_t" >&5 OSPEED_INCLUDES= cat > conftest.$ac_ext < int main() { speed_t some_variable = 0 ; return 0; } EOF -if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* OSPEED_TYPE=speed_t else @@ -4987,14 +5026,14 @@ else fi rm -f conftest* cat > conftest.$ac_ext < int main() { speed_t some_variable = 0 ; return 0; } EOF -if { (eval echo configure:4998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* OSPEED_TYPE=speed_t OSPEED_INCLUDES="#include " @@ -5017,9 +5056,11 @@ fi ### Checks for library functions. -for ac_func in getcwd \ +for ac_func in \ +getcwd \ getttynam \ memccpy \ +mkstemp \ nanosleep \ poll \ remove \ @@ -5040,12 +5081,12 @@ vsscanf \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5044: checking for $ac_func" >&5 +echo "configure:5085: 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:5113: \"$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 @@ -5092,18 +5133,16 @@ else fi done - - if test "$with_getcap" = "yes" ; then echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6 -echo "configure:5101: checking for terminal-capability database functions" >&5 +echo "configure:5140: checking for terminal-capability database functions" >&5 if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5118,7 +5157,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_cgetent=yes else @@ -5141,20 +5180,20 @@ fi echo $ac_n "checking for isascii""... $ac_c" 1>&6 -echo "configure:5145: checking for isascii" >&5 +echo "configure:5184: checking for isascii" >&5 if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int x = isascii(' ') ; return 0; } EOF -if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_isascii=yes else @@ -5175,9 +5214,9 @@ EOF if test $ac_cv_func_sigaction = yes; then echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6 -echo "configure:5179: checking whether sigaction needs _POSIX_SOURCE" >&5 +echo "configure:5218: checking whether sigaction needs _POSIX_SOURCE" >&5 cat > conftest.$ac_ext < @@ -5186,7 +5225,7 @@ int main() { struct sigaction act ; return 0; } EOF -if { (eval echo configure:5190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* sigact_bad=no else @@ -5195,7 +5234,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* sigact_bad=yes cat >> confdefs.h <<\EOF @@ -5233,16 +5272,16 @@ if test $ac_cv_header_termios_h = yes ; then esac if test $termios_bad = maybe ; then echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6 -echo "configure:5237: checking whether termios.h needs _POSIX_SOURCE" >&5 +echo "configure:5276: checking whether termios.h needs _POSIX_SOURCE" >&5 cat > conftest.$ac_ext < int main() { struct termios foo; int x = foo.c_iflag ; return 0; } EOF -if { (eval echo configure:5246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=no else @@ -5251,7 +5290,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=unknown else @@ -5285,7 +5324,7 @@ if test "$cross_compiling" = yes ; then echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2 else echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 -echo "configure:5289: checking whether setvbuf arguments are reversed" >&5 +echo "configure:5328: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5293,7 +5332,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ @@ -5307,7 +5346,7 @@ main () { exit(0); /* Non-reversed systems segv here. */ } EOF -if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setvbuf_reversed=yes else @@ -5332,12 +5371,12 @@ fi fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5336: checking return type of signal handlers" >&5 +echo "configure:5375: 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 @@ -5354,7 +5393,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5374,13 +5413,13 @@ EOF echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6 -echo "configure:5378: checking for type sigaction_t" >&5 +echo "configure:5417: checking for type sigaction_t" >&5 if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5388,7 +5427,7 @@ int main() { sigaction_t x ; return 0; } EOF -if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_type_sigaction=yes else @@ -5408,7 +5447,7 @@ EOF echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:5412: checking declaration of size-change" >&5 +echo "configure:5451: checking declaration of size-change" >&5 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5422,7 +5461,7 @@ do CFLAGS="$cf_save_CFLAGS" test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" cat > conftest.$ac_ext < #if HAVE_TERMIOS_H @@ -5461,7 +5500,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -5493,12 +5532,12 @@ EOF echo $ac_n "checking for memmove""... $ac_c" 1>&6 -echo "configure:5497: checking for memmove" >&5 +echo "configure:5536: checking for memmove" >&5 if eval "test \"`echo '$''{'ac_cv_func_memmove'+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:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_memmove=yes" else @@ -5540,12 +5579,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for bcopy""... $ac_c" 1>&6 -echo "configure:5544: checking for bcopy" >&5 +echo "configure:5583: checking for bcopy" >&5 if eval "test \"`echo '$''{'ac_cv_func_bcopy'+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:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_bcopy=yes" else @@ -5584,7 +5623,7 @@ if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6 -echo "configure:5588: checking if bcopy does overlapping moves" >&5 +echo "configure:5627: checking if bcopy does overlapping moves" >&5 if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5593,7 +5632,7 @@ else cf_cv_good_bcopy=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_good_bcopy=yes else @@ -5643,6 +5682,57 @@ EOF fi +echo $ac_n "checking if poll really works""... $ac_c" 1>&6 +echo "configure:5687: checking if poll really works" >&5 +if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + cf_cv_working_poll=unknown +else + cat > conftest.$ac_ext < +#ifdef HAVE_POLL_H +#include +#else +#include +#endif +int main() { + struct pollfd myfds; + int ret; + + myfds.fd = 0; + myfds.events = POLLIN; + + ret = poll(&myfds, 1, 100); + exit(ret != 0); +} +EOF +if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + cf_cv_working_poll=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + cf_cv_working_poll=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$cf_cv_working_poll" 1>&6 +test "$cf_cv_working_poll" = "yes" && cat >> confdefs.h <<\EOF +#define HAVE_WORKING_POLL 1 +EOF + + + if test -z "$cf_user_CFLAGS" ; then CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'` CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'` @@ -5650,13 +5740,13 @@ fi echo $ac_n "checking for builtin $CC bool type""... $ac_c" 1>&6 -echo "configure:5654: checking for builtin $CC bool type" >&5 +echo "configure:5744: checking for builtin $CC bool type" >&5 if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5666,7 +5756,7 @@ int main() { bool x = false ; return 0; } EOF -if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_cc_bool_type=1 else @@ -5703,15 +5793,15 @@ os2*) #(vi ;; esac echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6 -echo "configure:5707: checking for library $cf_stdcpp_libname" >&5 +echo "configure:5797: checking for library $cf_stdcpp_libname" >&5 if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cf_save="$LIBS" - LIBS="$LIBS -l$cf_stdcpp_libname -lm" + LIBS="$LIBS -l$cf_stdcpp_libname" cat > conftest.$ac_ext < @@ -5719,11 +5809,10 @@ int main() { char buf[80]; strstreambuf foo(buf, sizeof(buf)) -//destroy foo ; return 0; } EOF -if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_libstdcpp=yes else @@ -5758,24 +5847,23 @@ os2*) #(vi esac if test $ac_cv_prog_gxx = yes; then echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6 -echo "configure:5762: checking for lib$cf_gpp_libname" >&5 +echo "configure:5851: checking for lib$cf_gpp_libname" >&5 cf_save="$LIBS" - LIBS="$LIBS -l$cf_gpp_libname -lm" + LIBS="$LIBS -l$cf_gpp_libname" cat > conftest.$ac_ext < int main() { -//float foo=abs(1.0); - two_arg_error_handler_t foo2 = lib_error_handler +two_arg_error_handler_t foo2 = lib_error_handler ; return 0; } EOF -if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cxx_library=yes - CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm" + CXXLIBS="$CXXLIBS -l$cf_gpp_libname" if test "$cf_gpp_libname" = cpp ; then cat >> confdefs.h <<\EOF #define HAVE_GPP_BUILTIN_H 1 @@ -5792,20 +5880,19 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { -//float foo=abs(1.0); - two_arg_error_handler_t foo2 = lib_error_handler +two_arg_error_handler_t foo2 = lib_error_handler ; return 0; } EOF -if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cxx_library=yes - CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm" + CXXLIBS="$CXXLIBS -l$cf_gpp_libname" cat >> confdefs.h <<\EOF #define HAVE_BUILTIN_H 1 EOF @@ -5829,7 +5916,7 @@ fi ;; esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:5833: checking how to run the C++ preprocessor" >&5 +echo "configure:5920: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5842,12 +5929,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5938: \"$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 : @@ -5875,17 +5962,17 @@ for ac_hdr in typeinfo do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5879: checking for $ac_hdr" >&5 +echo "configure:5966: 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:5889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5976: \"$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* @@ -5913,13 +6000,13 @@ done echo $ac_n "checking for builtin $CXX bool type""... $ac_c" 1>&6 -echo "configure:5917: checking for builtin $CXX bool type" >&5 +echo "configure:6004: checking for builtin $CXX bool type" >&5 if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5929,7 +6016,7 @@ int main() { bool x = false ; return 0; } EOF -if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_builtin_bool=1 else @@ -5949,7 +6036,7 @@ fi echo $ac_n "checking for size of $CXX bool""... $ac_c" 1>&6 -echo "configure:5953: checking for size of $CXX bool" >&5 +echo "configure:6040: checking for size of $CXX bool" >&5 if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5959,7 +6046,7 @@ else cf_cv_type_of_bool=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_type_of_bool=`cat cf_test.out` else @@ -6015,7 +6102,7 @@ fi echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6 -echo "configure:6019: checking for special defines needed for etip.h" >&5 +echo "configure:6106: checking for special defines needed for etip.h" >&5 cf_save_CXXFLAGS="$CXXFLAGS" cf_result="none" for cf_math in "" MATH_H @@ -6026,7 +6113,7 @@ do test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" cat > conftest.$ac_ext < @@ -6035,7 +6122,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* test -n "$cf_math" && cat >> confdefs.h <&6 -echo "configure:6066: checking if $CXX accepts parameter initialization" >&5 +echo "configure:6153: checking if $CXX accepts parameter initialization" >&5 if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6078,7 +6165,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cf_cv_cpp_param_init=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_cpp_param_init=yes else @@ -6141,7 +6228,7 @@ else # may change. echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6 -echo "configure:6145: checking for fallback type of bool" >&5 +echo "configure:6232: checking for fallback type of bool" >&5 case "$host_cpu" in #(vi i?86) cf_cv_type_of_bool=char ;; #(vi *) cf_cv_type_of_bool=int ;; @@ -6157,7 +6244,7 @@ cf_ada_make=gnatmake # Extract the first word of "$cf_ada_make", so it can be a program name with args. set dummy $cf_ada_make; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6161: checking for $ac_word" >&5 +echo "configure:6248: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6191,10 +6278,10 @@ else cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\ sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'` case $cf_cv_gnat_version in - 3.[1-9]*|[4-9].*) + 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.10 or better. Disabling Ada95 binding. + *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. cf_cv_prog_gnat_correct=no ;; esac @@ -6211,7 +6298,7 @@ esac # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6215: checking for $ac_word" >&5 +echo "configure:6302: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_m4_exists'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6244,7 +6331,7 @@ fi fi if test "$cf_cv_prog_gnat_correct" = yes; then echo $ac_n "checking if GNAT works""... $ac_c" 1>&6 -echo "configure:6248: checking if GNAT works" >&5 +echo "configure:6335: checking if GNAT works" >&5 rm -f conftest* cat >>conftest.ads <&2 - fi +# This has been fixed! +# if test $with_shared = no +# then +# AC_MSG_WARN(Ada95 applications will not link properly with static libraries) +# fi fi fi @@ -6388,7 +6480,7 @@ fi ### Construct the library-subsets, if any, from this set of keywords: ### none, base, ext_funcs, termlib. echo $ac_n "checking for library subsets""... $ac_c" 1>&6 -echo "configure:6392: checking for library subsets" >&5 +echo "configure:6484: checking for library subsets" >&5 if test "$with_termlib" = yes ; then LIB_SUBSETS="termlib " else @@ -6398,6 +6490,13 @@ LIB_SUBSETS="${LIB_SUBSETS}base" test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" echo "$ac_t""$LIB_SUBSETS" 1>&6 +LIB_TRACING=DEBUG +case "$CFLAGS" in +*-DTRACE*) + LIB_TRACING=all + ;; +esac + ### Construct the list of include-directories to be generated CPPFLAGS="$CPPFLAGS -I. -I../include" @@ -6436,10 +6535,65 @@ fi +### Build up pieces for makefile rules +echo $ac_n "checking default library suffix""... $ac_c" 1>&6 +echo "configure:6541: checking default library suffix" >&5 + + case $DFT_LWR_MODEL in + normal) DFT_ARG_SUFFIX='' ;; + debug) DFT_ARG_SUFFIX='_g' ;; + profile) DFT_ARG_SUFFIX='_p' ;; + shared) DFT_ARG_SUFFIX='' ;; + esac + test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" +echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6 + +echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6 +echo "configure:6553: checking default library-dependency suffix" >&5 + + + case $DFT_LWR_MODEL in + normal) DFT_DEP_SUFFIX='.a' ;; + debug) DFT_DEP_SUFFIX='_g.a' ;; + profile) DFT_DEP_SUFFIX='_p.a' ;; + shared) + case $cf_cv_system_name in + hpux*) DFT_DEP_SUFFIX='.sl' ;; + *) DFT_DEP_SUFFIX='.so' ;; + esac + esac + test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}" +echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6 + +echo $ac_n "checking default object directory""... $ac_c" 1>&6 +echo "configure:6570: checking default object directory" >&5 + + case $DFT_LWR_MODEL in + normal) DFT_OBJ_SUBDIR='objects' ;; + debug) DFT_OBJ_SUBDIR='obj_g' ;; + profile) DFT_OBJ_SUBDIR='obj_p' ;; + shared) DFT_OBJ_SUBDIR='obj_s' ;; + esac +echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6 + +TINFO_LIST="$SHLIB_LIST" +test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}" + +echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6 +echo "configure:6584: checking where we will install curses.h" >&5 +test "$with_overwrite" = no && \ +test "x$includedir" = 'x${prefix}/include' && \ + includedir='$(prefix)/include/ncurses'${LIB_SUFFIX} +echo "$ac_t""$includedir" 1>&6 + + + + + ### Set up low-level terminfo dependencies for makefiles. Note that we ### could override this. if test "$with_termlib" = yes ; then - TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" + TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}" fi PROG_DEPS="$TEST_DEPS" @@ -6450,10 +6604,10 @@ PROG_ARGS="$TEST_ARGS" echo $ac_n "checking for src modules""... $ac_c" 1>&6 -echo "configure:6454: checking for src modules" >&5 +echo "configure:6608: checking for src modules" >&5 # dependencies and linker-arguments for test-programs -TEST_DEPS="${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS" +TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS" TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS" # dependencies and linker-arguments for utility-programs @@ -6496,7 +6650,7 @@ EOF #define HAVE_LIB${cf_have_include} 1 EOF - TEST_DEPS="${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS" + TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS" TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS" fi fi @@ -6518,7 +6672,7 @@ SRC_SUBDIRS="$SRC_SUBDIRS misc test" test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++" ADA_SUBDIRS= -if test "$cf_cv_prog_gnat_correct" = yes && test -d $srcdir/Ada95; then +if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then SRC_SUBDIRS="$SRC_SUBDIRS Ada95" ADA_SUBDIRS="gen src samples" fi @@ -6735,18 +6889,13 @@ s%@AR@%$AR%g s%@AR_OPTS@%$AR_OPTS%g s%@cf_cv_makeflags@%$cf_cv_makeflags%g s%@INSTALL_PREFIX@%$INSTALL_PREFIX%g -s%@EXTRA_LIBS@%$EXTRA_LIBS%g -s%@TINFO_LIST@%$TINFO_LIST%g -s%@SHLIB_LIST@%$SHLIB_LIST%g -s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g +s%@cf_list_models@%$cf_list_models%g s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g -s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g -s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g -s%@cf_list_models@%$cf_list_models%g s%@TINFO_NAME@%$TINFO_NAME%g s%@LIB_NAME@%$LIB_NAME%g s%@LIB_PREFIX@%$LIB_PREFIX%g +s%@LIB_SUFFIX@%$LIB_SUFFIX%g s%@CC_G_OPT@%$CC_G_OPT%g s%@CXX_G_OPT@%$CXX_G_OPT%g s%@LD_MODEL@%$LD_MODEL%g @@ -6786,6 +6935,12 @@ s%@cf_generic_objects@%$cf_generic_objects%g s%@ADA_INCLUDE@%$ADA_INCLUDE%g s%@ADA_OBJECTS@%$ADA_OBJECTS%g s%@ACPPFLAGS@%$ACPPFLAGS%g +s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g +s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g +s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g +s%@EXTRA_LIBS@%$EXTRA_LIBS%g +s%@TINFO_LIST@%$TINFO_LIST%g +s%@SHLIB_LIST@%$SHLIB_LIST%g s%@TEST_DEPS@%$TEST_DEPS%g s%@TEST_ARGS@%$TEST_ARGS%g s%@PROG_ARGS@%$PROG_ARGS%g @@ -7010,7 +7165,9 @@ CF_LIST_MODELS="$cf_list_models" DFT_LWR_MODEL="$DFT_LWR_MODEL" LDCONFIG="$LDCONFIG" LIB_NAME="$LIB_NAME" +LIB_SUFFIX="$LIB_SUFFIX" LIB_SUBSETS="$LIB_SUBSETS" +LIB_TRACING="$LIB_TRACING" SRC_SUBDIRS="$SRC_SUBDIRS" TINFO_NAME="$TINFO_NAME" WITH_ECHO="$with_echo" @@ -7021,6 +7178,7 @@ cf_cv_rel_version="$cf_cv_rel_version" cf_cv_rm_so_locs="$cf_cv_rm_so_locs" cf_cv_system_name="$cf_cv_system_name" cf_with_cxx_binding="$cf_with_cxx_binding" +cf_cv_shlib_version="$cf_cv_shlib_version" target="$target" @@ -7031,10 +7189,10 @@ cat >> $CONFIG_STATUS <<\EOF case $cf_cv_system_name in - os2) cf_prefix='' ;; - *) cf_prefix='lib' ;; + os2) LIB_PREFIX='' ;; + *) LIB_PREFIX='lib' ;; esac - LIB_PREFIX=$cf_prefix +cf_prefix=$LIB_PREFIX @@ -7053,25 +7211,25 @@ do profile) cf_suffix='_p.a' ;; shared) case $cf_cv_system_name in - openbsd*|freebsd*) - cf_suffix='.so.$(REL_VERSION)' ;; - netbsd*) - if test -f /usr/libexec/ld.elf_so; then - cf_suffix='.so' - else - cf_suffix='.so.$(REL_VERSION)' - fi - ;; hpux*) cf_suffix='.sl' ;; *) cf_suffix='.so' ;; esac esac - + test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}" + + if test $cf_item = shared ; then + if test $cf_cv_do_symlinks = yes ; then + case "$cf_cv_shlib_version" in #(vi + rel) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; #(vi + abi) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;; + esac + fi + fi cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}" done if test $cf_dir = ncurses ; then - case "$LIB_SUBSETS" in + case "$LIB_SUBSETS" in #(vi termlib+*) #(vi ;; *) #(vi @@ -7103,19 +7261,11 @@ CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'` profile) cf_suffix='_p.a' ;; shared) case $cf_cv_system_name in - openbsd*|freebsd*) - cf_suffix='.so.$(REL_VERSION)' ;; - netbsd*) - if test -f /usr/libexec/ld.elf_so; then - cf_suffix='.so' - else - cf_suffix='.so.$(REL_VERSION)' - fi - ;; hpux*) cf_suffix='.sl' ;; *) cf_suffix='.so' ;; esac esac + test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}" case $cf_item in @@ -7145,11 +7295,13 @@ CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'` do $AWK -f $srcdir/mk-1st.awk \ name=$cf_dir \ + traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ + ShlibVer=$cf_cv_shlib_version \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ @@ -7160,6 +7312,7 @@ CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'` test $cf_dir = ncurses && WITH_OVERWRITE=no $AWK -f $srcdir/mk-2nd.awk \ name=$cf_dir \ + traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ subset=$cf_subset \ @@ -7178,6 +7331,7 @@ do if test -f $cf_dir/Makefile ; then case "$cf_dir" in Ada95) #(vi + echo 'libs \' >> Makefile echo 'install.libs \' >> Makefile echo 'uninstall.libs ::' >> Makefile echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile @@ -7197,6 +7351,7 @@ if test "$cf_dir" != "c++" ; then echo 'lint \' >> Makefile fi cat >> Makefile <> Makefile </<\$END\/\$NAME>/" >> ../headers.sed - done - fi - rm -f \$TMP - sed -f ../headers.sed \$SRC > \$TMP - eval \$PRG \$TMP \$DST - rm -f \$TMP + TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$ + TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$ + END=\`basename \$DST\` + for i in \`cat \$REF/../*/headers |fgrep -v "#"\` + do + NAME=\`basename \$i\` + echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED + done + rm -f \$TMPSRC + sed -f \$TMPSED \$SRC > \$TMPSRC + eval \$PRG \$TMPSRC \$DST/\$SRC + rm -f \$TMPSRC \$TMPSED ;; *) eval \$PRG \$SRC \$DST diff --git a/configure.in b/configure.in index d1bcd88e..0cd345e1 100644 --- a/configure.in +++ b/configure.in @@ -28,10 +28,10 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1996,1997 dnl -dnl $Id: configure.in,v 1.179 1999/10/24 00:32:42 tom Exp $ +dnl $Id: configure.in,v 1.195 2000/07/05 22:24:29 tom Exp $ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.12.971222) -AC_REVISION($Revision: 1.179 $) +AC_PREREQ(2.12.971230) +AC_REVISION($Revision: 1.195 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -115,7 +115,11 @@ if test "X$cf_with_cxx" = Xno ; then CXX="" GXX="" else + pushdef([AC_MSG_ERROR], + [AC_MSG_RESULT([You don't have any C++ compiler, too bad]); dnl + cf_with_cxx=no; CXX=""; GXX="";])dnl AC_PROG_CXX + popdef([AC_MSG_ERROR])dnl fi changequote(,)dnl if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi @@ -190,6 +194,7 @@ CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:) ### Use "--without-normal --with-shared" to allow the default model to be ### shared, for example. cf_list_models="" +AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug") AC_MSG_CHECKING(if you want to build shared libraries) AC_ARG_WITH(shared, @@ -223,6 +228,39 @@ AC_ARG_WITH(profile, AC_MSG_RESULT($with_profile) test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile" +############################################################################### + +AC_MSG_CHECKING(for specified models) +test -z "$cf_list_models" && cf_list_models=normal +AC_MSG_RESULT($cf_list_models) + +### Use the first model as the default, and save its suffix for use in building +### up test-applications. +AC_MSG_CHECKING(for default model) +DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` +AC_MSG_RESULT($DFT_LWR_MODEL) + +CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl + +AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal") +AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL") + +TINFO_NAME=tinfo +AC_SUBST(TINFO_NAME) + +LIB_NAME=ncurses +AC_SUBST(LIB_NAME) + +LIB_DIR=../lib +CF_LIB_PREFIX(cf_prefix) +LIB_PREFIX=$cf_prefix +AC_SUBST(LIB_PREFIX) + +LIB_SUFFIX= +AC_SUBST(LIB_SUFFIX) + +############################################################################### + AC_MSG_CHECKING(if you want to build a separate terminfo library) AC_ARG_WITH(termlib, [ --with-termlib generate separate terminfo library], @@ -267,42 +305,6 @@ if test $with_gpm = yes ; then ],AC_MSG_WARN(Cannot link with gpm library - read the FAQ)) fi -TINFO_LIST="$SHLIB_LIST" -test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo" - -AC_SUBST(EXTRA_LIBS) -AC_SUBST(TINFO_LIST) -AC_SUBST(SHLIB_LIST) - -AC_MSG_CHECKING(for specified models) -test -z "$cf_list_models" && cf_list_models=normal -AC_MSG_RESULT($cf_list_models) - -### Use the first model as the default, and save its suffix for use in building -### up test-applications. -DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` -CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl -CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl -CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl -CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl -AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj") -AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal") -AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL") -AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a") -AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("") -AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug") - -TINFO_NAME=tinfo -AC_SUBST(TINFO_NAME) - -LIB_NAME=ncurses -AC_SUBST(LIB_NAME) - -LIB_DIR=../lib -CF_LIB_PREFIX(cf_prefix) -LIB_PREFIX=$LIB_DIR/$cf_prefix -AC_SUBST(LIB_PREFIX) - dnl Not all ports of gcc support the -g option if test X"$CC_G_OPT" = X"" ; then @@ -317,6 +319,7 @@ if test X"$CXX_G_OPT" = X"" ; then fi AC_SUBST(CXX_G_OPT) +AC_MSG_CHECKING(for default loader flags) case $DFT_LWR_MODEL in normal) LD_MODEL='' ;; debug) LD_MODEL=$CC_G_OPT ;; @@ -324,6 +327,7 @@ profile) LD_MODEL='-pg';; shared) LD_MODEL='' ;; esac AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg) +AC_MSG_RESULT($LD_MODEL) AC_MSG_CHECKING(if rpath option should be used) AC_ARG_ENABLE(rpath, @@ -348,15 +352,9 @@ CF_HELP_MESSAGE(Fine-Tuning Your Configuration:) AC_MSG_CHECKING(if you wish to install ncurses overwriting curses) AC_ARG_ENABLE(overwrite, [ --disable-overwrite leave out the link to -lcurses], - [with_overwrite=$enableval - test "$with_overwrite" = no && \ - test "x$includedir" = 'x${prefix}/include' && \ - includedir='$(prefix)/include/ncurses' - ], + [with_overwrite=$enableval], [with_overwrite=yes]) AC_MSG_RESULT($with_overwrite) -AC_MSG_CHECKING(where we will install curses.h) -AC_MSG_RESULT($includedir) AC_MSG_CHECKING(if external terminfo-database is used) AC_ARG_ENABLE(database, @@ -366,14 +364,6 @@ AC_ARG_ENABLE(database, AC_MSG_RESULT($with_database) test $with_database != no && AC_DEFINE(USE_DATABASE) -AC_MSG_CHECKING(if you want to build with function extensions) -AC_ARG_ENABLE(ext-funcs, - [ --disable-ext-funcs disable function-extensions], - [with_ext_funcs=$enableval], - [with_ext_funcs=yes]) -AC_MSG_RESULT($with_ext_funcs) -test "$with_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS) - AC_MSG_CHECKING(for list of fallback descriptions) AC_ARG_WITH(fallbacks, [ --with-fallbacks=XXX specify list of fallback terminal descriptions], @@ -480,6 +470,15 @@ fi test "$with_links" = yes && AC_DEFINE(USE_LINKS) test "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS) +### use option --enable-broken-linker to force on use of broken-linker support +AC_MSG_CHECKING(if you want broken-linker support code) +AC_ARG_ENABLE(broken_linker, + [ --enable-broken_linker compile with broken-linker support code], + [with_broken_linker=$enableval], + [with_broken_linker=$BROKEN_LINKER]) +AC_MSG_RESULT($with_broken_linker) +test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER) + ### use option --enable-bsdpad to have tputs process BSD-style prefix padding AC_MSG_CHECKING(if tputs should process BSD-style prefix padding) AC_ARG_ENABLE(bsdpad, @@ -489,6 +488,33 @@ AC_ARG_ENABLE(bsdpad, AC_MSG_RESULT($with_bsdpad) test "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS) +### Enable compiling-in rcs id's +AC_MSG_CHECKING(if RCS identifiers should be compiled-in) +AC_ARG_WITH(rcs-ids, + [ --with-rcs-ids compile-in RCS identifiers], + [with_rcs_ids=$withval], + [with_rcs_ids=no]) +AC_MSG_RESULT($with_rcs_ids) +test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS) + +############################################################################### +CF_HELP_MESSAGE(Extensions:) + +### Note that some functions (such as const) are normally disabled anyway. +AC_MSG_CHECKING(if you want to build with function extensions) +AC_ARG_ENABLE(ext-funcs, + [ --disable-ext-funcs disable function-extensions], + [with_ext_funcs=$enableval], + [with_ext_funcs=yes]) +AC_MSG_RESULT($with_ext_funcs) +if test "$with_ext_funcs" = yes ; then + AC_DEFINE(HAVE_HAS_KEY) + AC_DEFINE(HAVE_RESIZETERM) + AC_DEFINE(HAVE_USE_DEFAULT_COLORS) + AC_DEFINE(HAVE_WRESIZE) + AC_DEFINE(NCURSES_EXT_FUNCS) +fi + ### use option --enable-const to turn on use of const beyond that in XSI. AC_MSG_CHECKING(for extended use of const keyword) AC_ARG_ENABLE(const, @@ -503,14 +529,42 @@ if test "$with_ext_const" = yes ; then fi AC_SUBST(NCURSES_CONST) -### Enable compiling-in rcs id's -AC_MSG_CHECKING(if RCS identifiers should be compiled-in) -AC_ARG_WITH(rcs-ids, - [ --with-rcs-ids compile-in RCS identifiers], - [with_rcs_ids=$withval], - [with_rcs_ids=no]) -AC_MSG_RESULT($with_rcs_ids) -test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS) +### use option --enable-hashmap to turn on use of hashmap scrolling logic +AC_MSG_CHECKING(if you want hashmap scrolling-optimization code) +AC_ARG_ENABLE(hashmap, + [ --enable-hashmap compile with hashmap scrolling-optimization code], + [with_hashmap=$enableval], + [with_hashmap=yes]) +AC_MSG_RESULT($with_hashmap) +test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP) + +AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code) +AC_ARG_ENABLE(no-padding, + [ --enable-no-padding compile with \$NCURSES_NO_PADDING code], + [with_no_padding=$enableval], + [with_no_padding=$with_ext_funcs]) +AC_MSG_RESULT($with_no_padding) +test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING) + +### use option --enable-sigwinch to turn on use of SIGWINCH logic +AC_MSG_CHECKING(if you want SIGWINCH handler) +AC_ARG_ENABLE(sigwinch, + [ --enable-sigwinch compile with SIGWINCH handler], + [with_sigwinch=$enableval], + [with_sigwinch=$with_ext_funcs]) +AC_MSG_RESULT($with_sigwinch) +test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH) + +### use option --enable-tcap-names to allow user to define new capabilities +AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap) +AC_ARG_ENABLE(tcap-names, + [ --enable-tcap-names compile with user-definable terminal capabilities], + [with_tcap_names=$enableval], + [with_tcap_names=$with_ext_funcs]) +AC_MSG_RESULT($with_tcap_names) +NCURSES_XNAMES=0 +test "$with_tcap_names" = yes && NCURSES_XNAMES=1 +AC_SUBST(NCURSES_XNAMES) ############################################################################### CF_HELP_MESSAGE(Experimental Code:) @@ -521,14 +575,14 @@ AC_ARG_WITH(develop, [with_develop=no]) AC_MSG_RESULT($with_develop) -### use option --enable-broken-linker to force on use of broken-linker support -AC_MSG_CHECKING(if you want broken-linker support code) -AC_ARG_ENABLE(broken_linker, - [ --enable-broken_linker compile with broken-linker support code], - [with_broken_linker=$enableval], - [with_broken_linker=$BROKEN_LINKER]) -AC_MSG_RESULT($with_broken_linker) -test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER) +### use option --enable-colorfgbg to turn on use of $COLORFGBG environment +AC_MSG_CHECKING(if you want experimental colorfgbg code) +AC_ARG_ENABLE(hard-tabs, + [ --enable-colorfgbg compile with experimental \$COLORFGBG code], + [with_colorfgbg=$enableval], + [with_colorfgbg=$with_develop]) +AC_MSG_RESULT($with_colorfgbg) +test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG) ### use option --enable-hard-tabs to turn on use of hard-tabs optimize AC_MSG_CHECKING(if you want experimental hard-tabs code) @@ -539,23 +593,6 @@ AC_ARG_ENABLE(hard-tabs, AC_MSG_RESULT($with_hardtabs) test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS) -### use option --enable-hashmap to turn on use of hashmap scrolling logic -AC_MSG_CHECKING(if you want experimental hashmap code) -AC_ARG_ENABLE(hashmap, - [ --enable-hashmap compile with experimental hashmap code], - [with_hashmap=$enableval], - [with_hashmap=yes]) -AC_MSG_RESULT($with_hashmap) -test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP) - -AC_MSG_CHECKING(if you want experimental no-padding code) -AC_ARG_ENABLE(no-padding, - [ --enable-no-padding compile with experimental no-padding code], - [with_no_padding=$enableval], - [with_no_padding=yes]) -AC_MSG_RESULT($with_no_padding) -test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING) - AC_MSG_CHECKING(if you want experimental safe-sprintf code) AC_ARG_ENABLE(safe-sprintf, [ --enable-safe-sprintf compile with experimental safe-sprintf code], @@ -565,35 +602,16 @@ AC_MSG_RESULT($with_safe_sprintf) test "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF) ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic +# when hashmap is used scroll hints are useless +if test "$with_hashmap" = no ; then AC_MSG_CHECKING(if you want to experiment without scrolling-hints code) AC_ARG_ENABLE(scroll-hints, - [ --disable-scroll-hints compile hashmap without scroll-hints code], + [ --disable-scroll-hints compile without scroll-hints code], [with_scroll_hints=$enableval], - [with_scroll_hints=yes; - # when hashmap is used scroll hints are useless - test $with_hashmap = yes && with_scroll_hints=no]) + [with_scroll_hints=yes]) AC_MSG_RESULT($with_scroll_hints) test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS) - -### use option --enable-tcap-names to allow user to define new capabilities -AC_MSG_CHECKING(if you want experimental definable names like termcap) -AC_ARG_ENABLE(tcap-names, - [ --enable-tcap-names compile with experimental definable-name code], - [with_tcap_names=$enableval], - [with_tcap_names=$with_develop]) -AC_MSG_RESULT($with_tcap_names) -NCURSES_XNAMES=0 -test "$with_tcap_names" = yes && NCURSES_XNAMES=1 -AC_SUBST(NCURSES_XNAMES) - -### use option --enable-sigwinch to turn on use of SIGWINCH logic -AC_MSG_CHECKING(if you want experimental SIGWINCH handler) -AC_ARG_ENABLE(sigwinch, - [ --enable-sigwinch compile with experimental SIGWINCH handler], - [with_sigwinch=$enableval], - [with_sigwinch=yes]) -AC_MSG_RESULT($with_sigwinch) -test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH) +fi ### use option --enable-widec to turn on use of wide-character support AC_MSG_CHECKING(if you want experimental wide-character code) @@ -602,7 +620,10 @@ AC_ARG_ENABLE(widec, [with_widec=$enableval], [with_widec=no]) AC_MSG_RESULT($with_widec) -test "$with_widec" = yes && AC_DEFINE(USE_WIDEC_SUPPORT) +if test "$with_widec" = yes ; then + LIB_SUFFIX="w${LIB_SUFFIX}" + AC_DEFINE(USE_WIDEC_SUPPORT) +fi ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize AC_MSG_CHECKING(if you want experimental xmc code) @@ -678,9 +699,7 @@ AC_CHECK_LIB(bsd, gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY) LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday -MATH_LIB="" -AC_CHECK_FUNC(sin,, - AC_CHECK_LIB(m, sin,[MATH_LIB="-lm"])) +CF_MATH_LIB(MATH_LIB,sin(x)) AC_SUBST(MATH_LIB) ### Checks for header files. @@ -695,19 +714,18 @@ getopt.h \ libc.h \ limits.h \ locale.h \ +poll.h \ sys/bsdtypes.h \ sys/ioctl.h \ sys/param.h \ -poll.h \ +sys/poll.h \ sys/select.h \ -sys/stropts.h \ sys/time.h \ sys/times.h \ termio.h \ termios.h \ ttyent.h \ unistd.h \ -values.h \ ) # check for ISC (this may also define _POSIX_SOURCE) @@ -735,9 +753,11 @@ CF_LINK_DATAONLY CF_SPEED_TYPE ### Checks for library functions. -AC_CHECK_FUNCS( getcwd \ +AC_CHECK_FUNCS( \ +getcwd \ getttynam \ memccpy \ +mkstemp \ nanosleep \ poll \ remove \ @@ -756,8 +776,6 @@ vfscanf \ vsnprintf \ vsscanf \ ) - - if test "$with_getcap" = "yes" ; then CF_CGETENT fi @@ -776,6 +794,7 @@ AC_TYPE_SIGNAL CF_TYPE_SIGACTION CF_SIZECHANGE CF_FUNC_MEMMOVE +CF_FUNC_POLL dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS if test -z "$cf_user_CFLAGS" ; then @@ -882,21 +901,22 @@ if test "$cf_cv_prog_gnat_correct" = yes; then CF_WITH_PATH(ada-include, [ --with-ada-include=DIR Ada includes are in DIR], ADA_INCLUDE, - PREFIX/lib/gnu-Ada/adainclude, - [$]prefix/lib/gnu-Ada/adainclude) + PREFIX/lib/ada/adainclude, + [$]prefix/lib/ada/adainclude) AC_SUBST(ADA_INCLUDE) CF_WITH_PATH(ada-objects, [ --with-ada-objects=DIR Ada objects are in DIR], ADA_OBJECTS, - PREFIX/lib/gnu-Ada/adalib, - [$]prefix/lib/gnu-Ada/adalib) + PREFIX/lib/ada/adalib, + [$]prefix/lib/ada/adalib) AC_SUBST(ADA_OBJECTS) - if test $with_shared = no - then - AC_MSG_WARN(Ada95 applications will not link properly with static libraries) - fi +# This has been fixed! +# if test $with_shared = no +# then +# AC_MSG_WARN(Ada95 applications will not link properly with static libraries) +# fi fi fi @@ -930,14 +950,50 @@ LIB_SUBSETS="${LIB_SUBSETS}base" test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" AC_MSG_RESULT($LIB_SUBSETS) +LIB_TRACING=DEBUG +case "$CFLAGS" in +*-DTRACE*) + LIB_TRACING=all + ;; +esac + ### Construct the list of include-directories to be generated CF_INCLUDE_DIRS CF_ADA_INCLUDE_DIRS +### Build up pieces for makefile rules +AC_MSG_CHECKING(default library suffix) +CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl +AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("") +AC_MSG_RESULT($DFT_ARG_SUFFIX) + +AC_MSG_CHECKING(default library-dependency suffix) +CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl +AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a") +AC_MSG_RESULT($DFT_DEP_SUFFIX) + +AC_MSG_CHECKING(default object directory) +CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl +AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj") +AC_MSG_RESULT($DFT_OBJ_SUBDIR) + +TINFO_LIST="$SHLIB_LIST" +test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}" + +AC_MSG_CHECKING(where we will install curses.h) +test "$with_overwrite" = no && \ +test "x$includedir" = 'x${prefix}/include' && \ + includedir='$(prefix)/include/ncurses'${LIB_SUFFIX} +AC_MSG_RESULT($includedir) + +AC_SUBST(EXTRA_LIBS) +AC_SUBST(TINFO_LIST) +AC_SUBST(SHLIB_LIST) + ### Set up low-level terminfo dependencies for makefiles. Note that we ### could override this. if test "$with_termlib" = yes ; then - TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" + TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}" fi PROG_DEPS="$TEST_DEPS" @@ -970,7 +1026,9 @@ CF_LIST_MODELS="$cf_list_models" DFT_LWR_MODEL="$DFT_LWR_MODEL" LDCONFIG="$LDCONFIG" LIB_NAME="$LIB_NAME" +LIB_SUFFIX="$LIB_SUFFIX" LIB_SUBSETS="$LIB_SUBSETS" +LIB_TRACING="$LIB_TRACING" SRC_SUBDIRS="$SRC_SUBDIRS" TINFO_NAME="$TINFO_NAME" WITH_ECHO="$with_echo" @@ -981,6 +1039,7 @@ cf_cv_rel_version="$cf_cv_rel_version" cf_cv_rm_so_locs="$cf_cv_rm_so_locs" cf_cv_system_name="$cf_cv_system_name" cf_with_cxx_binding="$cf_with_cxx_binding" +cf_cv_shlib_version="$cf_cv_shlib_version" target="$target" ],sort)dnl diff --git a/dist.mk b/dist.mk index 090d2f33..55645949 100644 --- a/dist.mk +++ b/dist.mk @@ -1,4 +1,4 @@ -# $Id: dist.mk,v 1.172 1999/10/23 12:29:39 tom Exp $ +# $Id: dist.mk,v 1.209 2000/07/08 19:43:10 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -9,8 +9,8 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 -NCURSES_MINOR = 0 -NCURSES_PATCH = 19991023 +NCURSES_MINOR = 1 +NCURSES_PATCH = 20000708 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) @@ -18,7 +18,16 @@ VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) DUMP = lynx -dump DUMP2 = $(DUMP) -nolist -ALL = ANNOUNCE announce.html misc/ncurses-intro.doc misc/hackguide.doc +GNATHTML= `type -p gnathtml || type -p gnathtml.pl` + +# man2html 3.0.1 is a Perl script which assumes that pages are fixed size. +# Not all man programs agree with this assumption; some use half-spacing, which +# has the effect of lengthening the text portion of the page -- so man2html +# would remove some text. The man program on Redhat 6.1 appears to work with +# man2html if we set the top/bottom margins to 6 (the default is 7). +MAN2HTML= man2html -botm=6 -topm=6 -cgiurl '$$title.$$section$$subsection.html' + +ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml all : $(ALL) @@ -26,19 +35,66 @@ dist: $(ALL) (cd ..; tar cvf ncurses-$(VERSION).tar `sed announce.html +doc/html/announce.html: announce.html.in + sed 's,@VERSION@,$(VERSION),' $@ + +ANNOUNCE : doc/html/announce.html + $(DUMP) doc/html/announce.html > $@ -ANNOUNCE : announce.html - $(DUMP) announce.html >ANNOUNCE +doc/ncurses-intro.doc: doc/html/ncurses-intro.html + $(DUMP2) doc/html/ncurses-intro.html > $@ +doc/hackguide.doc: doc/html/hackguide.html + $(DUMP2) doc/html/hackguide.html > $@ -misc/ncurses-intro.doc: misc/ncurses-intro.html - $(DUMP2) misc/ncurses-intro.html > misc/ncurses-intro.doc -misc/hackguide.doc: misc/hackguide.html - $(DUMP2) misc/hackguide.html > misc/hackguide.doc +# Note that this rule assumes the manpages were installed - it does not use +# the copies in the build tree except to get the list of names. +manhtml: MANIFEST + @rm -f doc/html/man/*.html + @mkdir -p doc/html/man + @rm -f subst.tmp ; + @for f in man/*.[0-9]*; do \ + m=`basename $$f` ;\ + x=`echo $$m | awk -F. '{print $$2;}'` ;\ + xu=`echo $$x | dd conv=ucase 2>/dev/null` ;\ + if [ "$${x}" != "$${xu}" ]; then \ + echo "s/$${xu}/$${x}/g" >> subst.tmp ;\ + fi ;\ + done + @sort < subst.tmp | uniq > subst.sed + @rm -f subst.tmp + @for f in man/*.[0-9]* ; do \ + m=`basename $$f` ;\ + g=$${m}.html ;\ + if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\ + echo "Converting $$m to HTML" ;\ + man $$f | tr '\255' '-' | $(MAN2HTML) | \ + sed -f subst.sed |\ + sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \ + > doc/html/man/$$g ;\ + done + @rm -f subst.sed + @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 + @rm -f MANIFEST.tmp + +# +# Please note that this target can only be properly built if the build of the +# Ada95 subdir has been done. The reason is, that the gnathtml tool uses the +# .ali files generated by the Ada95 compiler during the build process. These +# .ali files contain cross referencing information required by gnathtml. +adahtml: MANIFEST + if [ ! -z "$(GNATHTML)" ]; then \ + (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 ;\ + rm -f MANIFEST.tmp ;\ + fi # Prepare distribution for version control vcprepare: diff --git a/misc/hackguide.doc b/doc/hackguide.doc similarity index 99% rename from misc/hackguide.doc rename to doc/hackguide.doc index 5fd49b3a..e9828d29 100644 --- a/misc/hackguide.doc +++ b/doc/hackguide.doc @@ -38,7 +38,6 @@ 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 (including the original BSD curses and System V curses. * Conformant with the XSI Curses standard issued as part of XPG4 by @@ -93,7 +92,6 @@ How to Design Extensions 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 not attempt to compile it under a plain ANSI/POSIX environment. * Adding such implementation methods does not introduce @@ -108,13 +106,11 @@ How to Design Extensions 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 elaborate mark-up. @@ -150,7 +146,6 @@ How to Design Extensions 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 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 diff --git a/Ada95/html/index.html b/doc/html/Ada95.html similarity index 95% rename from Ada95/html/index.html rename to doc/html/Ada95.html index 333c1321..89073216 100644 --- a/Ada95/html/index.html +++ b/doc/html/Ada95.html @@ -1,13 +1,16 @@ + Ada95 Binding for ncurses - +

      Ada95 Binding for ncurses

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

      @@ -27,11 +30,10 @@ This binding comes AS IS with no warranty, implied or expressed.

    • This document describes Version 01.00 of the binding.
    • The functionality is modelled to be compatible with the ncurses package, a clone of the SVr4 curses model.
      -I did the development on an Intel box running -Linux 1.3.x, 2.0, 2.2 -ncurses-4.x and the +I did the development on an Intel box running the latest stable release of +Linux, ncurses and the most recent released GNU Ada Translator -gnat versions 3.10p to 3.11p. For any older versions of ncurses and gnat +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 @@ -39,7 +41,7 @@ If you don't have this program, you can get the FSF version
    • Ada programs are supposed to be readable. One of my favourite 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.
    • +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 has it's counterpart with a more or less similar formal parameter list @@ -80,7 +82,6 @@ forms subsystem.
    • The *_IO packages are currently output only.
    -

    Hierarchy of packages

    +
    +

    Functions/Procedures

    +[ ] +[A] +[B] +[C] +[D] +[E] +[F] +[G] +[H] +[I] +[K] +[L] +[M] +[N] +[O] +[P] +[Q] +[R] +[S] +[T] +[U] +[V] +[W] + + + + + + + + + diff --git a/doc/html/ada/main.htm b/doc/html/ada/main.htm new file mode 100644 index 00000000..2a403dc6 --- /dev/null +++ b/doc/html/ada/main.htm @@ -0,0 +1,66 @@ + + +

    [No frame version is here]

    Files

    +[T] + +

    Functions/Procedures

    +[ ] +[A] +[B] +[C] +[D] +[E] +[F] +[G] +[H] +[I] +[K] +[L] +[M] +[N] +[O] +[P] +[Q] +[R] +[S] +[T] +[U] +[V] +[W] + +
    +You should start your browsing with one of these files: + -Major bug fixes: -
      -
    • modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a - problem where ncurses applications which were run via a shell script - would hang when given a ^Z. Also, check if the terminal's process - group is consistent, i.e., a shell has not taken ownership of it, - before deciding to save the current terminal settings in the SIGTSTP - handler. - -
    • suppress sc/rc capabilities from terminal description if they appear - in smcup/rmcup. This affects only scrolling optimization, to fix a - problem reported by several people with xterm's alternate screen, - though the problem is more general. - -
    • modify relative_move and tputs to avoid an interaction with the - BSD-style padding. The relative_move function could produce a string - to replace on the screen which began with a numeric character, which - was then interpreted by tputs as padding. - -
    • modify setupterm so that cancelled strings are treated the same as - absent strings, cancelled and absent booleans false (does not affect - tic, infocmp). - -
    • modify lib_vidattr.c to allow for terminal types (e.g., xterm-color) - which may reset all attributes in the 'op' capability, so that colors - are set before turning on bold and other attributes, but still after - turning attributes off. - -
    • use 'access()' to check if ncurses library should be permitted to - open or modify files with fopen/open/link/unlink/remove calls, in - case the calling application is running in setuid mode. - -
    • correction to doupdate, for case where terminal does not support - insert/delete character. The logic did not check that there was a - difference in alignment of changes to old/new screens before - repainting the whole non-blank portion of the line. Modified to fall - through into logic that reduces by the portion which does not differ. +
    • made several fixes for buffer overflows, unchecked recursion, + improvements in performance, etc. See the NEWS file for details.

    Features of Ncurses

    @@ -294,39 +282,62 @@ including (versions starting with those noted):
    cdk
    Curses Development Kit -Curses Development Kit -ftp://ftp.clark.net/pub/dickey/cdk. +
    +http://www.vexus.ca/CDK.html +
    +http://dickey.his.com/cdk.
    ded
    directory-editor -ftp://ftp.clark.net/pub/dickey/ded. +
    +http://dickey.his.com/ded.
    dialog
    the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. +
    +http://dickey.his.com/dialog.
    lynx
    the character-screen WWW browser +
    +http://lynx.isc.org/release.
    Midnight Commander 4.1
    file manager +
    +www.gnome.org/mc/.
    mutt
    mail utility +
    +http://www.mutt.org.
    ncftp
    file-transfer utility +
    +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/.
    tin
    newsreader, supporting color, MIME -ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff. +
    +http://www.tin.org.
    taper
    tape archive utility +
    +http://members.iinet.net.au/~yusuf/taper/.
    vh-1.6
    Volks-Hypertext browser for the Jargon File +
    +http://www.bg.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.
    vile
    vi-like-emacs -ftp://ftp.clark.net/pub/dickey/vile. +
    +http://dickey.his.com/vile.

    @@ -339,10 +350,10 @@ The original developers of ncurses are Zeyd Ben-Halim and Eric S. Raymond. Ongoing work is being done by -Thomas Dickey +Thomas Dickey and Jürgen Pfeifer. -Thomas Dickey +Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. Contact the current maintainers at @@ -359,7 +370,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://ftp.clark.net/pub/dickey/ncurses. +ftp://dickey.his.com/ncurses.

    Future Plans

      diff --git a/misc/hackguide.html b/doc/html/hackguide.html similarity index 93% rename from misc/hackguide.html rename to doc/html/hackguide.html index 417399a6..ce033a1c 100644 --- a/misc/hackguide.html +++ b/doc/html/hackguide.html @@ -1,6 +1,6 @@ @@ -19,18 +19,14 @@ this one.

      Contents

      @@ -60,24 +53,21 @@ This document is a hacker's tour of the ncurses library and uti 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.

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

      +characteristics:

      • 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 X/Open. -

      • High-quality -- stable and reliable code, wide portability, good packaging, superior documentation. -

      • Featureful -- should eliminate as much of the drudgery of C interface programming as possible, freeing programmers to think at a higher level of design. @@ -86,7 +76,7 @@ characteristics:

        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.

        +to historical curses versions.

        Why System V Curses?

        @@ -99,7 +89,7 @@ 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 with -System V took us most of the way to base-level XSI conformance.

        +System V took us most of the way to base-level XSI conformance.

        How to Design Extensions

        @@ -113,7 +103,7 @@ 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. -You can use this to condition the calls to the mouse API calls.

        +You can use this to condition the calls to the mouse API calls.

        Portability and Configuration

        @@ -125,12 +115,11 @@ 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 methods -not available under POSIX/ANSI, provided only that:

        +not available under POSIX/ANSI, provided only that:

        • 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 incompatibilities in the ncurses API between platforms.
        @@ -138,12 +127,12 @@ not available under POSIX/ANSI, provided only that:

        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 feature -macro, which you then use to condition your code.

        +macro, which you then use to condition your code.

        Documentation Conventions

        There are three kinds of documentation associated with this package. Each -has a different preferred format:

        +has a different preferred format:

        • Package-internal files (README, INSTALL, TO-DO etc.) @@ -151,14 +140,14 @@ has a different preferred format:

        • Everything else (i.e., narrative documentation).
        -Our conventions are simple:

        +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 elaborate mark-up.

          + no point in elaborate mark-up.

        2. Mark up manual pages in the man macros. These have to be viewable - through traditional man(1) programs.

          + through traditional man(1) programs.

        3. Write everything else in HTML.
        @@ -171,7 +160,7 @@ 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 exporting things like the -announcement document to WWW pretty trivial.

        +announcement document to WWW pretty trivial.

        How to Report Bugs

        @@ -193,17 +182,17 @@ before contacting us that will help get the bug fixed quickly.

        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 wait a while.

        +have to wait a while.

          -
        1. Develop a recipe to reproduce the bug.

          - +

        2. 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 one of -the test programs provided with the distribution.)

          +the test programs provided with the distribution.)

        3. Try to reproduce the bug on a different terminal type.

          @@ -221,7 +210,7 @@ bug reproduces on both.

          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 of the bugs we've seen -are either triggered or masked by these.

          +are either triggered or masked by these.

        4. Generate and examine a trace file for the broken behavior.

          @@ -248,7 +237,7 @@ 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 any bug in -the screen-update logic quite exactly.

          +the screen-update logic quite exactly.

        5. Report details and symptoms, not just interpretations.

          @@ -299,7 +288,7 @@ with hardscroll.

          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!

          +need to run this, you probably belong on our development team!

          A Tour of the Ncurses Library

          @@ -376,7 +365,8 @@ 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 @@ -384,7 +374,8 @@ 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 want to introduce a new debug trace level for some reasoon.

          @@ -392,7 +383,8 @@ 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 @@ -407,7 +399,8 @@ 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.

          @@ -415,13 +408,15 @@ terminfo capability representation.

          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. @@ -429,7 +424,8 @@ 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 @@ -440,7 +436,8 @@ 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. @@ -450,7 +447,8 @@ 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 is to support fallback to /etc/termcap. These files include -

          +
          + alloc_entry.c captoinfo.c comp_captab.c @@ -461,8 +459,9 @@ comp_scan.c parse_entry.c read_termcap.c write_entry.c -
          -We'll discuss these in the compiler tour.

          + +

          +We'll discuss these in the compiler tour.

          The Engine Room

          @@ -487,7 +486,7 @@ 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.

          +simulates a System V select.

          Mouse Events

          @@ -526,7 +525,7 @@ 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).

          +events) into a gesture (a high-level or composite event).

          Output and Screen Updating

          @@ -571,7 +570,7 @@ optimization improves efficiency.

          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 mask values, near the end.

          +for mask values, near the end.

          The Forms and Menu Libraries

          @@ -586,7 +585,7 @@ 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 -slightly cleaned up for ncurses.

          +slightly cleaned up for ncurses.

          A Tour of the Terminfo Compiler

          @@ -601,7 +600,7 @@ 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 of file".

          +till you run out of file".

          Translation of Non-use Capabilities

          @@ -622,7 +621,7 @@ 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 about this in the section on Source-Form -Translation.

          +Translation.

          Use Capability Resolution

          @@ -672,7 +671,7 @@ Name collisions will still be detected, just not as cleanly. The 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.

          +overwriting ones that predate it.

          Source-Form Translation

          @@ -697,7 +696,7 @@ 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 acsc string.

          +get translated to an acsc string.

          Other Utilities

          @@ -709,7 +708,7 @@ 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 tputs() of a selected capability.

          +followed by a tputs() of a selected capability.

          Style Tips for Developers

          @@ -739,7 +738,7 @@ 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!

          +Have fun!

          Porting Hints

          @@ -751,9 +750,10 @@ 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.

          +ports. -

          +
          + lib_addch.c lib_addstr.c lib_bkgd.c @@ -786,39 +786,45 @@ lib_tputs.c lib_unctrl.c lib_window.c panel.c -
          +
          +

          -This module is pure curses, but calls outstr():

          +This module is pure curses, but calls outstr(): -

          +
          + lib_getstr.c -
          +
          +

          These modules are pure curses, except that they use tputs() -and putp():

          +and putp(): -

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

          +This modules assist in POSIX emulation on non-POSIX systems:

          sigaction.c
          signal calls
          The following source files will not be needed for a -single-terminal-type port.

          +single-terminal-type port. -

          +
          + alloc_entry.c captoinfo.c clear.c @@ -834,11 +840,12 @@ parse_entry.c read_entry.c tput.c write_entry.c -
          +
          +

          The following modules will use open()/read()/write()/close()/lseek() on files, -but no other OS calls.

          +but no other OS calls.

          lib_screen.c @@ -850,7 +857,7 @@ but no other OS calls.

          Modules that would have to be modified for a port start here:

          The following modules are `pure curses' but contain assumptions inappropriate -for a memory-mapped port.

          +for a memory-mapped port.

          lib_longname.c
          assumes there may be multiple terminals diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 00000000..3fbd24c5 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,30 @@ + + + + +Welcome to ncurses + + + + +

          Welcome to ncurses

          +From this index page you have access to these further documents +

          +We also have HTML versions of all the ncurses manpages. + + + diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html new file mode 100644 index 00000000..18f4cd94 --- /dev/null +++ b/doc/html/man/captoinfo.1m.html @@ -0,0 +1,190 @@ + + +

          +
          +
          +
          +

          NAME

          +       captoinfo  - convert a termcap description into a terminfo
          +       description
          +
          +
          +
          +

          SYNOPSIS

          +       captoinfo [-vn width]  [-V] [-1] [-w width] file . . .
          +
          +
          +
          +

          DESCRIPTION

          +       captoinfo looks in file  for  termcap  descriptions.   For
          +       each  one  found,  an  equivalent  terminfo description is
          +       written to standard output.  Termcap tc  capabilities  are
          +       translated directly to terminfo use capabilities.
          +
          +       If no file is given, then the environment variable TERMCAP
          +       is used for the filename or entry.  If TERMCAP is  a  full
          +       pathname to a file, only the terminal whose name is speci-
          +       fied in the environment variable TERM  is  extracted  from
          +       that  file.   If  the  environment variable TERMCAP is not
          +       set, then the file @DATADIR@/terminfo is read.
          +
          +       -v   print out tracing information on  standard  error  as
          +            the program runs.
          +
          +       -V   print  out the version of the program in use on stan-
          +            dard error and exit.
          +
          +       -1   cause the fields to print out one to a line.   Other-
          +            wise, the fields will be printed several to a line to
          +            a maximum width of 60 characters.
          +
          +       -w   change the output to width characters.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo  Compiled     terminal      description
          +                           database.
          +
          +
          +
          +

          TRANSLATIONS FROM NONSTANDARD CAPABILITIES

          +       Some  obsolete nonstandard capabilities will automatically
          +       be translated into  standard  (SVr4/XSI  Curses)  terminfo
          +       capabilities  by  captoinfo.   Whenever one of these auto-
          +       matic translations is done,  the  program  will  issue  an
          +       notification to stderr, inviting the user to check that it
          +       has not mistakenly translated  a  completely  unknown  and
          +       random capability and/or syntax error.
          +
          +       Nonstd   Std    From           Terminfo
          +        name    name                 capability
          +       -----------------------------------------------
          +       BO       mr     AT&T    enter_reverse_mode
          +       CI       vi     AT&T    cursor_invisible
          +       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
          +       EN       @7     XENIX   key_end
          +       GE       ae     XENIX   exit_alt_charset_mode
          +       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
          +       PU       kP     XENIX   key_ppage
          +       RT       @8     XENIX   kent
          +       UP       ku     XENIX   kcuu1
          +       KA       k;     Tek     key_f10
          +       KB       F1     Tek     key_f11
          +       KC       F2     Tek     key_f12
          +       KD       F3     Tek     key_f13
          +       KE       F4     Tek     key_f14
          +       KF       F5     Tek     key_f15
          +       BC       Sb     Tek     set_background
          +       FC       Sf     Tek     set_foreground
          +       HS       mh     Iris    enter_dim_mode
          +
          +       XENIX  termcap  also used to have a set of extension capa-
          +       bilities for forms drawing, designed to take advantage  of
          +       the IBM PC high-half graphics.  They were as follows:
          +
          +       Cap          Graphic
          +       -----------------------------
          +       G2    upper left
          +       G3    lower left
          +       G1    upper right
          +       G4    lower right
          +       GR    pointing right
          +       GL    pointing left
          +       GU    pointing up
          +       GD    pointing down
          +       GH    horizontal line
          +       GV    vertical line
          +       GC    intersection
          +       G6    upper left
          +       G7    lower left
          +       G5    upper right
          +       G8    lower right
          +       Gr    tee pointing right
          +       Gr    tee pointing left
          +       Gu    tee pointing up
          +       Gd    tee pointing down
          +       Gh    horizontal line
          +       Gv    vertical line
          +       Gc    intersection
          +       GG    acs magic cookie count
          +
          +       If  the  single-line  capabilities occur in an entry, they
          +       will automatically be composed into an acsc  string.   The
          +       double-line capabilities and GG are discarded with a warn-
          +       ing message.
          +
          +       IBM's AIX has a terminfo facility descended from SVr1 ter-
          +       minfo but incompatible with the SVr4 format. The following
          +       AIX extensions are automatically translated:
          +
          +        IBM    XSI
          +       -------------
          +       ksel    kslt
          +       kbtab   kcbt
          +       font0   s0ds
          +       font1   s1ds
          +       font2   s2ds
          +       font3   s3ds
          +
          +       Additionally, the AIX box1 capability  will  be  automati-
          +       cally translated to an acsc string.
          +
          +       Hewlett-Packard's  terminfo  library supports two nonstan-
          +       dard terminfo capabilities meml  (memory  lock)  and  memu
          +       (memory  unlock).   These will be discarded with a warning
          +       message.
          +
          +
          +
          +

          NOTES

          +       This utility is actually a link to tic(1m), running in  -I
          +       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
          +       repeat it n times.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), infocmp(1m), terminfo(5)
          +
          +
          +
          +

          AUTHOR

          +       Eric S. Raymond <esr@snark.thyrsus.com>
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html new file mode 100644 index 00000000..fad1c207 --- /dev/null +++ b/doc/html/man/clear.1.html @@ -0,0 +1,74 @@ + + +
          +
          +
          +
          +

          NAME

          +       clear - clear the terminal screen
          +
          +
          +
          +

          SYNOPSIS

          +       clear
          +
          +
          +
          +

          DESCRIPTION

          +       clear clears your screen if this is possible.  It looks in
          +       the environment for the terminal type and then in the ter-
          +       minfo database to figure out how to clear the screen.
          +
          +
          +
          +

          SEE ALSO

          +       tput(1), terminfo(5)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_addch.3x.html b/doc/html/man/curs_addch.3x.html new file mode 100644 index 00000000..74fdef6e --- /dev/null +++ b/doc/html/man/curs_addch.3x.html @@ -0,0 +1,189 @@ + + +
          +
          +
          +
          +

          NAME

          +       addch,  waddch,  mvaddch,  mvwaddch, echochar, wechochar -
          +       add a character (with attributes) to a curses window, then
          +       advance the cursor
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int addch(chtype ch);
          +       int waddch(WINDOW *win, chtype ch);
          +       int mvaddch(int y, int x, chtype ch);
          +       int mvwaddch(WINDOW *win, int y, int x, chtype ch);
          +       int echochar(chtype ch);
          +       int wechochar(WINDOW *win, chtype ch);
          +
          +
          +
          +

          DESCRIPTION

          +       The  addch,  waddch, mvaddch and mvwaddch routines put the
          +       character ch into the given window at its  current  window
          +       position,  which  is then advanced.  They are analogous to
          +       putchar in stdio(3).  If the advance is at the right  mar-
          +       gin,  the  cursor  automatically wraps to the beginning of
          +       the next line.  At the bottom  of  the  current  scrolling
          +       region,  if  scrollok  is enabled, the scrolling region is
          +       scrolled up one line.
          +
          +       If ch is a tab, newline, or backspace, the cursor is moved
          +       appropriately within the window.  Backspace moves the cur-
          +       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-
          +       sidered to be at every eighth column.
          +
          +       If ch is any control character other than tab, newline, or
          +       backspace,  it  is  drawn  in  ^X notation.  Calling winch
          +       after adding a control character does not return the char-
          +       acter  itself, but instead returns the ^-representation of
          +       the control character.
          +
          +       Video attributes can be combined with a character argument
          +       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-
          +       fined video attribute constants that can be usefully OR'ed
          +       into characters.
          +
          +       The echochar and wechochar routines are  equivalent  to  a
          +       call  to addch followed by a call to refresh, or a call to
          +       waddch followed by a call to wrefresh.  The knowledge that
          +       only  a  single character is being output is used and, for
          +       non-control characters, a  considerable  performance  gain
          +       may  be  seen  by  using  these  routines instead of their
          +       equivalents.
          +
          +   Line Graphics
          +       The following variables may be used to  add  line  drawing
          +       characters  to  the screen with routines of the addch fam-
          +       ily.  The default character listed below is  used  if  the
          +       acsc   capability   doesn't   define  a  terminal-specific
          +       replacement for it (but see the EXTENSIONS section below).
          +       The names are taken from VT100 nomenclature.
          +
          +       Name           Default   Description
          +       --------------------------------------------------
          +       ACS_BLOCK      #         solid square block
          +       ACS_BOARD      #         board of squares
          +       ACS_BTEE       +         bottom tee
          +       ACS_BULLET     o         bullet
          +       ACS_CKBOARD    :         checker board (stipple)
          +       ACS_DARROW     v         arrow pointing down
          +       ACS_DEGREE     '         degree symbol
          +       ACS_DIAMOND    +         diamond
          +       ACS_GEQUAL     >         greater-than-or-equal-to
          +       ACS_HLINE      -         horizontal line
          +       ACS_LANTERN    #         lantern symbol
          +       ACS_LARROW     <         arrow pointing left
          +       ACS_LEQUAL     <         less-than-or-equal-to
          +       ACS_LLCORNER   +         lower left-hand corner
          +       ACS_LRCORNER   +         lower right-hand corner
          +       ACS_LTEE       +         left tee
          +       ACS_NEQUAL     !         not-equal
          +       ACS_PI         *         greek pi
          +       ACS_PLMINUS    #         plus/minus
          +       ACS_PLUS       +         plus
          +       ACS_RARROW     >         arrow pointing right
          +       ACS_RTEE       +         right tee
          +       ACS_S1         -         scan line 1
          +       ACS_S3         -         scan line 3
          +       ACS_S7         -         scan line 7
          +       ACS_S9         _         scan line 9
          +       ACS_STERLING   f         pound-sterling symbol
          +       ACS_TTEE       +         top tee
          +       ACS_UARROW     ^         arrow pointing up
          +       ACS_ULCORNER   +         upper left-hand corner
          +       ACS_URCORNER   +         upper right-hand corner
          +       ACS_VLINE      |         vertical line
          +
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon failure and OK on
          +       success (the SVr4 manuals specify only "an  integer  value
          +       other than ERR") upon successful completion, unless other-
          +       wise noted in the preceding routine descriptions.
          +
          +
          +
          +

          NOTES

          +       Note that addch, mvaddch, mvwaddch, and  echochar  may  be
          +       macros.
          +
          +
          +
          +

          PORTABILITY

          +       All  these functions are described in the XSI Curses stan-
          +       dard, Issue 4.  The defaults specified  for  forms-drawing
          +       characters apply in the POSIX locale.
          +
          +       Some  ACS symbols (ACS_S3, ACS_S7, ACS_LEQUAL, ACS_GEQUAL,
          +       ACS_PI, ACS_NEQUAL, ACS_STERLING) were not  documented  in
          +       any  publicly  released  System V.  However, many publicly
          +       available terminfos include acsc strings  in  which  their
          +       key  characters  (pryz{|}) are embedded, and a second-hand
          +       list of their character descriptions has  come  to  light.
          +       The   ACS-prefixed   names  for  them  were  invented  for
          +       ncurses(3x).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_attr(3x), curs_clear(3x),  curs_inch(3x),
          +       curs_outopts(3x), curs_refresh(3x), putc(3S).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_addchstr.3x.html b/doc/html/man/curs_addchstr.3x.html new file mode 100644 index 00000000..43f244de --- /dev/null +++ b/doc/html/man/curs_addchstr.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       addchstr,  addchnstr,  waddchstr,  waddchnstr, mvaddchstr,
          +       mvaddchnstr, mvwaddchstr, mvwaddchnstr - add a  string  of
          +       characters (and attributes) to a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int addchstr(const chtype *chstr);
          +       int addchnstr(const chtype *chstr, int n);
          +       int waddchstr(WINDOW *win, const chtype *chstr);
          +       int waddchnstr(WINDOW *win, const chtype *chstr, int n);
          +       int mvaddchstr(int y, int x, const chtype *chstr);
          +       int mvaddchnstr(int y, int x, const chtype *chstr, int n);
          +       int mvwaddchstr(WINDOW *win, int y, int  x,  const  chtype
          +       *chstr);
          +       int  mvwaddchnstr(WINDOW  *win, int y, int x, const chtype
          +       *chstr, int n);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines copy chstr into the window image  structure
          +       at  and  after the current cursor position.  The four rou-
          +       tines with n as the last argument copy at most n elements,
          +       but  no  more than will fit on the line.  If n=-1 then the
          +       whole string is copied, to the maximum number  of  charac-
          +       ters that will fit on the line.
          +
          +       The window cursor is not advanced, and these routines work
          +       faster than waddnstr.  On the other hand, they don't  per-
          +       form  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.
          +
          +
          +
          +
          +

          RETURN VALUES

          +       All routines return the integer ERR upon failure and OK on
          +       success  (the  SVr4 manuals specify only "an integer value
          +       other than ERR") upon successful completion, unless other-
          +       wise noted in the preceding routine descriptions.
          +
          +
          +
          +

          NOTES

          +       Note that all routines except waddchnstr may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       All  these  entry  points  are described in the XSI Curses
          +       standard, Issue 4.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_addstr.3x.html b/doc/html/man/curs_addstr.3x.html new file mode 100644 index 00000000..e83e795f --- /dev/null +++ b/doc/html/man/curs_addstr.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       addstr,  addnstr,  waddstr, waddnstr, mvaddstr, mvaddnstr,
          +       mvwaddstr, mvwaddnstr - add a string of  characters  to  a
          +       curses window and advance cursor
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int addstr(const char *str);
          +       int addnstr(const char *str, int n);
          +       int waddstr(WINDOW *win, const char *str);
          +       int waddnstr(WINDOW *win, const char *str, int n);
          +       int mvaddstr(int y, int x, const char *str);
          +       int mvaddnstr(int y, int x, const char *str, int n);
          +       int mvwaddstr(WINDOW *win, int y, int x, const char *str);
          +       int mvwaddnstr(WINDOW *win, int y, int x, const char *str,
          +       int n);
          +
          +
          +
          +

          DESCRIPTION

          +       These  routines  write  the characters of the (null-termi-
          +       nated) character string str on the given  window.   It  is
          +       similar  to  calling waddch once for each character in the
          +       string.  The four routines with n  as  the  last  argument
          +       write  at  most n characters.  If n is -1, then the entire
          +       string will be added.
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon failure and OK on
          +       success  (the  SVr4 manuals specify only "an integer value
          +       other than ERR") upon successful completion.
          +
          +
          +
          +

          NOTES

          +       Note  that  all  of  these  routines  except  waddstr  and
          +       waddnstr may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       All  these  entry  points  are described in the XSI Curses
          +       standard, Issue 4.  The XSI errors EILSEQ  and  EOVERFLOW,
          +       associated  with  extended-level  conformance, are not yet
          +       detected.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_addch(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_attr.3x.html b/doc/html/man/curs_attr.3x.html new file mode 100644 index 00000000..6c2df3d1 --- /dev/null +++ b/doc/html/man/curs_attr.3x.html @@ -0,0 +1,186 @@ + + +
          +
          +
          +
          +

          NAME

          +       attroff,  wattroff,  attron,  wattron,  attrset, wattrset,
          +       color_set,  wcolor_set,  standend,  wstandend,   standout,
          +       wstandout,   attr_get,   wattr_get,  attr_off,  wattr_off,
          +       attr_on, wattr_on,  attr_set,  wattr_set,  chgat,  wchgat,
          +       mvchgat, mvwchgat, PAIR_NUMBER - curses character and win-
          +       dow attribute control routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       int attroff(int attrs);
          +       int wattroff(WINDOW *win, int attrs);
          +       int attron(int attrs);
          +       int wattron(WINDOW *win, int attrs);
          +       int attrset(int attrs);
          +       int wattrset(WINDOW *win, int attrs);
          +       int color_set(short color_pair_number, void* opts);
          +       int wcolor_set(WINDOW *win, short color_pair_number,
          +             void* opts);
          +       int standend(void);
          +       int wstandend(WINDOW *win);
          +       int standout(void);
          +       int wstandout(WINDOW *win);
          +       int attr_get(attr_t *attrs, short *pair, void *opts);
          +       int wattr_get(WINDOW *win, attr_t *attrs, short *pair,
          +              void *opts);
          +       int attr_off(attr_t attrs, void *opts);
          +       int wattr_off(WINDOW *win, attr_t attrs, void *opts);
          +       int attr_on(attr_t attrs, void *opts);
          +       int wattr_on(WINDOW *win, attr_t attrs, void *opts);
          +       int attr_set(attr_t attrs, short pair, void *opts);
          +       int wattr_set(WINDOW *win, attr_t attrs, short pair,  void
          +       *opts);
          +       int chgat(int n, attr_t attr, short color,
          +             const void *opts)
          +       int wchgat(WINDOW *win, int n, attr_t attr,
          +             short color, const void *opts)
          +       int mvchgat(int y, int x, int n, attr_t attr,
          +             short color, const void *opts)
          +       int mvwchgat(WINDOW *win, int y, int x, int n,
          +             attr_t attr, short color, const void *opts)
          +
          +
          +
          +

          DESCRIPTION

          +       These  routines  manipulate  the current attributes of the
          +       named window.  The current attributes of a window apply to
          +       all  characters that are written into the window with wad-
          +       dch, waddstr and wprintw.  Attributes are  a  property  of
          +       the  character,  and  move  with the character through any
          +       scrolling and insert/delete line/character operations.  To
          +       the  extent  possible,  they  are displayed as appropriate
          +       modifications to the graphic rendition of  characters  put
          +       on the screen.
          +
          +       The  routine  attrset  sets  the current attributes of the
          +       given window to attrs.  The routine attroff turns off  the
          +       named  attributes  without turning any other attributes on
          +       or off.  The routine attron turns on the named  attributes
          +       without affecting any others.  The routine standout is the
          +       same as attron(A_STANDOUT).  The routine standend  is  the
          +       same as attrset(A_NORMAL) or attrset(0), that is, it turns
          +       off all attributes.
          +
          +       The routine color_set sets the current color of the  given
          +       window  to the foreground/background combination described
          +       by the color_pair_number. The parameter opts  is  reserved
          +       for future use, applications must supply a null pointer.
          +
          +       The  routine  wattr_get  returns the current attribute and
          +       color pair for the given window; attr_get returns the cur-
          +       rent  attribute  and color pair for stdscr.  The remaining
          +       attr_* functions operate exactly  like  the  corresponding
          +       attr*  functions,  except that they take arguments of type
          +       attr_t rather than int.
          +
          +       The routine chgat changes the attributes of a given number
          +       of  characters  starting at the current cursor location of
          +       stdscr.  It does not update the cursor and does  not  per-
          +       form  wrapping.   A  character count of -1 or greater than
          +       the remaining window width means to change attributes  all
          +       the  way to the end of the current line.  The wchgat func-
          +       tion generalizes this to any window; the mvwchgat function
          +       does a cursor move before acting.  In these functions, the
          +       color argument is a color-pair  index  (as  in  the  first
          +       argument  of  init_pair,  see  curs_color(3x)).   The opts
          +       argument is not presently used, but is  reserved  for  the
          +       future (leave it NULL).
          +
          +   Attributes
          +       The following video attributes, defined in <curses.h>, can
          +       be passed to the routines attron, attroff, and attrset, or
          +       OR'ed with the characters passed to addch.
          +
          +        A_NORMAL        Normal display (no highlight)
          +        A_STANDOUT      Best highlighting mode of the terminal.
          +        A_UNDERLINE     Underlining
          +        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
          +        A_ALTCHARSET    Alternate character set
          +        A_CHARTEXT      Bit-mask to extract a character
          +        COLOR_PAIR(n)   Color-pair number n
          +
          +       The following macro is the reverse of COLOR_PAIR(n):
          +
          +       PAIR_NUMBER(attrs) Returns the pair number associated
          +                          with the COLOR_PAIR(n) attribute.
          +
          +       The  return values of many of these routines are not mean-
          +       ingful (they are implemented as macro-expanded assignments
          +       and  simply  return their argument).  The SVr4 manual page
          +       claims (falsely) that these routines always return 1.
          +
          +
          +
          +
          +

          NOTES

          +       Note that attroff,  wattroff,  attron,  wattron,  attrset,
          +       wattrset, standend and standout may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       All  these functions are supported in the XSI Curses stan-
          +       dard, Issue 4.  The standard defined  the  dedicated  type
          +       for  highlights,  attr_t,  which  is  not  defined in SVr4
          +       curses. The functions taking attr_t arguments are not sup-
          +       ported under SVr4.
          +
          +       The  XSI  Curses  standard  states that whether the tradi-
          +       tional  functions  attron/attroff/attrset  can  manipulate
          +       attributes  other  than A_BLINK, A_BOLD, A_DIM, A_REVERSE,
          +       A_STANDOUT, or A_UNDERLINE is "unspecified".   Under  this
          +       implementation  as  well  as  SVr4 curses, these functions
          +       correctly manipulate all other  highlights  (specifically,
          +       A_ALTCHARSET, A_PROTECT, and A_INVIS).
          +
          +       XSI  Curses added the new entry points, attr_get, attr_on,
          +       attr_off,  attr_set,   wattr_on,   wattr_off,   wattr_get,
          +       wattr_set.   These  are intended to work with a new series
          +       of highlight macros prefixed with WA_.
          +
          +        WA_NORMAL       Normal display (no highlight)
          +        WA_STANDOUT     Best highlighting mode of the terminal.
          +        WA_UNDERLINE    Underlining
          +        WA_REVERSE      Reverse video
          +        WA_BLINK        Blinking
          +        WA_DIM          Half bright
          +        WA_BOLD         Extra bright or bold
          +        WA_ALTCHARSET   Alternate character set
          +
          +       The XSI curses standard specifies that each pair of corre-
          +       sponding  A_  and WA_-using functions operates on the same
          +       current-highlight information.
          +
          +       The XSI standard extended conformance level adds new high-
          +       lights A_HORIZONTAL, A_LEFT, A_LOW, A_RIGHT, A_TOP, A_VER-
          +       TICAL (and corresponding WA_ macros for each)  which  this
          +       curses does not yet support.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),        curs_addch(3x),        curs_addstr(3x),
          +       curs_printw(3x)
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_beep.3x.html b/doc/html/man/curs_beep.3x.html new file mode 100644 index 00000000..516cd688 --- /dev/null +++ b/doc/html/man/curs_beep.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       beep, flash - curses bell and screen flash routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int beep(void);
          +       int flash(void);
          +
          +
          +
          +

          DESCRIPTION

          +       The beep and flash routines are used to alert the terminal
          +       user.  The routine beep sounds an  audible  alarm  on  the
          +       terminal,  if  possible;  otherwise  it flashes the screen
          +       (visible bell).  The routine flash 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.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return OK if they  succeed  in  beeping  or
          +       flashing, ERR otherwise.
          +
          +
          +
          +

          EXTENSIONS

          +       SVr4's  beep  and flash routines always returned OK, so it
          +       was not possible to tell when the beep or flash failed.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are defined in the  XSI  Curses  standard,
          +       Issue  4.  Like SVr4, it specifies that they always return
          +       OK.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_bkgd.3x.html b/doc/html/man/curs_bkgd.3x.html new file mode 100644 index 00000000..d498f465 --- /dev/null +++ b/doc/html/man/curs_bkgd.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       bkgdset,  wbkgdset,  bkgd,  wbkgd, getbkgd - curses window
          +       background manipulation routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       void bkgdset(const chtype ch);
          +       void wbkgdset(WINDOW *win, const chtype ch);
          +       int bkgd(const chtype ch);
          +       int wbkgd(WINDOW *win, const chtype ch);
          +       chtype getbkgd(WINDOW *win);
          +
          +
          +
          +

          DESCRIPTION

          +       The bkgdset and wbkgdset  routines  manipulate  the  back-
          +       ground  of  the  named window.  The window background is a
          +       chtype consisting of any combination of attributes  (i.e.,
          +       rendition)  and  a  character.   The attribute part of the
          +       background is combined (OR'ed) with all non-blank  charac-
          +       ters  that  are written into the window with waddch.  Both
          +       the character and attribute parts of  the  background  are
          +       combined   with  the  blank  characters.   The  background
          +       becomes a property of the character  and  moves  with  the
          +       character   through   any   scrolling   and  insert/delete
          +       line/character operations.
          +
          +       To the extent  possible  on  a  particular  terminal,  the
          +       attribute  part  of  the  background  is  displayed as the
          +       graphic rendition of the character put on the screen.
          +
          +       The bkgd and wbkgd functions set the  background  property
          +       of  the  current  or  specified window and then apply this
          +       setting to every character position in that window:
          +
          +              The rendition of every character on the  screen  is
          +              changed to the new background rendition.
          +
          +              Wherever  the  former background character appears,
          +              it is changed to the new background character.
          +
          +       The getbkgd function returns the  given  window's  current
          +       background character/attribute pair.
          +
          +
          +
          +

          RETURN VALUE

          +       The  routines  bkgd  and wbkgd return the integer OK.  The
          +       SVr4.0 manual says "or a non-negative integer  if  immedok
          +       is set", but this appears to be an error.
          +
          +
          +
          +

          NOTES

          +       Note that bkgdset and bkgd may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  The draft does not include const  qualifiers  on
          +       the arguments.  The standard specifies that bkgd and wbkgd
          +       return ERR, on failure. but gives no failure conditions.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_addch(3x), curs_outopts(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_border.3x.html b/doc/html/man/curs_border.3x.html new file mode 100644 index 00000000..44f6e435 --- /dev/null +++ b/doc/html/man/curs_border.3x.html @@ -0,0 +1,135 @@ + + +
          +
          +
          +
          +

          NAME

          +       border,  wborder,  box, hline, whline, vline, wvline, mvh-
          +       line, mvwhline, mvvline, mvwvline - create curses borders,
          +       horizontal and vertical lines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       int border(chtype ls, chtype rs, chtype ts, chtype bs,
          +          chtype tl, chtype tr, chtype bl, chtype br);
          +       int wborder(WINDOW *win, chtype ls, chtype rs,
          +          chtype ts, chtype bs, chtype tl, chtype tr,
          +          chtype bl, chtype br);
          +       int box(WINDOW *win, chtype verch, chtype horch);
          +       int hline(chtype ch, int n);
          +       int whline(WINDOW *win, chtype ch, int n);
          +       int vline(chtype ch, int n);
          +       int wvline(WINDOW *win, chtype ch, int n);
          +       mvhline(int y, int x, chtype ch, int n);
          +       mvwhline(WINDOW *, int y, int x, chtype ch, int n);
          +       int mvvline(int y, int x, chtype ch, int n);
          +       int mvwvline(WINDOW *, int y, int x, chtype ch, int n);
          +
          +
          +
          +

          DESCRIPTION

          +       The border, wborder and box routines draw a box around the
          +       edges of a window.  The argument ls  is  a  character  and
          +       attributes  used  for  the  left  side of the border, rs -
          +       right side, ts - top side, bs -  bottom  side,  tl  -  top
          +       left-hand  corner, tr - top right-hand corner, bl - bottom
          +       left-hand corner, and br - bottom right-hand  corner.   If
          +       any of these arguments is zero, then the following default
          +       values (defined in curses.h) are used instead:  ACS_VLINE,
          +       ACS_VLINE,     ACS_HLINE,     ACS_HLINE,     ACS_ULCORNER,
          +       ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER.
          +
          +       box(win, verch, horch) is a shorthand  for  the  following
          +       call:  wborder(win,  verch,  verch, horch, horch, 0, 0, 0,
          +       0).
          +
          +       The hline and whline functions draw a horizontal (left  to
          +       right)  line using ch starting at the current cursor posi-
          +       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
          +       changed.   The  line  is  at most n characters long, or as
          +       many as fit into the window.
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer  OK.   The  SVr4.0  manual
          +       says  "or  a  non-negative integer if immedok is set", but
          +       this appears to be an error.
          +
          +
          +
          +

          NOTES

          +       The borders generated by these functions are  inside  bor-
          +       ders (this is also true of SVr4 curses, though the fact is
          +       not documented).
          +
          +       Note that border and box may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue 4.  Additional functions mvhline, mvvline, mvwhline,
          +       and mvwvline are described there which this implementation
          +       does  not  yet  support.  The standard specifies that they
          +       return ERR on failure, but specifies no error  conditions.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_outopts(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_clear.3x.html b/doc/html/man/curs_clear.3x.html new file mode 100644 index 00000000..1a874f2e --- /dev/null +++ b/doc/html/man/curs_clear.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       erase,  werase,  clear,  wclear, clrtobot, wclrtobot, clr-
          +       toeol, wclrtoeol - clear all or part of a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       # include <curses.h>
          +
          +       int erase(void);
          +       int werase(WINDOW *win);
          +       int clear(void);
          +       int wclear(WINDOW *win);
          +       int clrtobot(void);
          +       int wclrtobot(WINDOW *win);
          +       int clrtoeol(void);
          +       int wclrtoeol(WINDOW *win);
          +
          +
          +
          +

          DESCRIPTION

          +       The erase and werase routines copy blanks to  every  posi-
          +       tion in the window, clearing the screen.
          +
          +       The  clear  and wclear routines are like erase and werase,
          +       but they also call clearok, so that the screen is  cleared
          +       completely  on  the  next call to wrefresh for that window
          +       and repainted from scratch.
          +
          +       The clrtobot and wclrtobot routines erase from the  cursor
          +       to the end of screen.  That is, they erase all lines below
          +       the cursor in the window.  Also, the current line  to  the
          +       right of the cursor, inclusive, is erased.
          +
          +       The clrtoeol and wclrtoeol routines erase the current line
          +       to the right of the cursor, inclusive, to the end  of  the
          +       current line.
          +
          +       Blanks created by erasure have the current background ren-
          +       dition (as set by wbkgdset) merged into them.
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer  OK.   The  SVr4.0  manual
          +       says  "or  a  non-negative integer if immedok is set", but
          +       this appears to be an error.
          +
          +
          +
          +

          NOTES

          +       Note that erase, werase, clear, wclear, clrtobot, and clr-
          +       toeol may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  The standard specifies that they return  ERR  on
          +       failure, but specifies no error conditions.
          +
          +       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.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_outopts(3x), curs_refresh(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html new file mode 100644 index 00000000..296d8e9e --- /dev/null +++ b/doc/html/man/curs_color.3x.html @@ -0,0 +1,242 @@ + + +
          +
          +
          +
          +

          NAME

          +       start_color,     init_pair,     init_color,    has_colors,
          +       can_change_color, color_content, pair_content,  COLOR_PAIR
          +       - curses color manipulation routines
          +
          +
          +
          +

          SYNOPSIS

          +       # include <curses.h>
          +       int start_color(void);
          +       int init_pair(short pair, short f, short b);
          +       int init_color(short color, short r, short g, short b);
          +       bool has_colors(void);
          +       bool can_change_color(void);
          +       int  color_content(short  color, short *r, short *g, short
          +       *b);
          +       int pair_content(short pair, short *f, short *b);
          +
          +
          +
          +

          DESCRIPTION

          +   Overview
          +       curses support color attributes  on  terminals  with  that
          +       capability.   To  use  these  routines start_color must be
          +       called, usually right after initscr.   Colors  are  always
          +       used  in pairs (referred to as color-pairs).  A color-pair
          +       consists of a foreground  color  (for  characters)  and  a
          +       background color (for the blank field on which the charac-
          +       ters are displayed).  A programmer  initializes  a  color-
          +       pair  with  the routine init_pair.  After it has been ini-
          +       tialized, COLOR_PAIR(n), a macro  defined  in  <curses.h>,
          +       can be used as a new video attribute.
          +
          +       If  a  terminal  is capable of redefining colors, the pro-
          +       grammer can use the routine init_color to change the defi-
          +       nition   of   a   color.    The  routines  has_colors  and
          +       can_change_color  return  TRUE  or  FALSE,  depending   on
          +       whether  the  terminal  has color capabilities and whether
          +       the  programmer  can  change  the  colors.   The   routine
          +       color_content  allows  a programmer to extract the amounts
          +       of red, green,  and  blue  components  in  an  initialized
          +       color.   The  routine  pair_content allows a programmer to
          +       find out how a given color-pair is currently defined.
          +
          +   Routine Descriptions
          +       The start_color routine requires no arguments.  It must be
          +       called  if  the programmer wants to use colors, and before
          +       any other color manipulation routine  is  called.   It  is
          +       good  practice  to  call this routine right after initscr.
          +       start_color initializes eight basic  colors  (black,  red,
          +       green,  yellow,  blue,  magenta, cyan, and white), and two
          +       global variables,  COLORS  and  COLOR_PAIRS  (respectively
          +       defining  the maximum number of colors and color-pairs the
          +       terminal can support).  It also restores the colors on the
          +       terminal to the values they had when the terminal was just
          +       turned on.
          +
          +       The init_pair routine changes the definition of  a  color-
          +       pair.   It takes three arguments: the number of the color-
          +       pair to be changed, the foreground color number,  and  the
          +       background color number.  For portable applications:
          +
          +       -    The value of the first argument must be between 1 and
          +            COLOR_PAIRS-1.
          +
          +       -    The value of the second and third arguments  must  be
          +            between  0  and  COLORS (the 0 color pair is wired to
          +            white on black and cannot be changed).
          +
          +       If the color-pair was previously initialized,  the  screen
          +       is  refreshed  and  all  occurrences of that color-pair is
          +       changed to the new definition.
          +
          +       As an extension, ncurses allows you to set  color  pair  0
          +       via  the  assume_default_colors routine, or to specify the
          +       use of default colors  (color  number  -1)  if  you  first
          +       invoke the use_default_colors routine.
          +
          +       The  init_color routine changes the definition of a color.
          +       It takes four arguments: the number of  the  color  to  be
          +       changed  followed  by three RGB values (for the amounts of
          +       red, green, and blue components).  The value of the  first
          +       argument  must  be between 0 and COLORS.  (See the section
          +       Colors for the default color index.)   Each  of  the  last
          +       three  arguments must be a value between 0 and 1000.  When
          +       init_color is used, all occurrences of that color  on  the
          +       screen immediately change to the new definition.
          +
          +       The  has_colors routine requires no arguments.  It returns
          +       TRUE if the terminal can manipulate colors; otherwise,  it
          +       returns FALSE.  This routine facilitates writing terminal-
          +       independent programs.  For example, a programmer  can  use
          +       it  to  decide  whether  to  use color or some other video
          +       attribute.
          +
          +       The can_change_color routine requires  no  arguments.   It
          +       returns  TRUE  if  the  terminal  supports  colors and can
          +       change their definitions; other, it returns  FALSE.   This
          +       routine facilitates writing terminal-independent programs.
          +
          +       The color_content routine gives programmers a way to  find
          +       the intensity of the red, green, and blue (RGB) components
          +       in a color.  It requires four arguments: the color number,
          +       and  three addresses of shorts for storing the information
          +       about the amounts of red, green, and  blue  components  in
          +       the  given color.  The value of the first argument must be
          +       between 0 and COLORS.  The values that are stored  at  the
          +       addresses  pointed  to  by  the  last  three arguments are
          +       between 0 (no component) and 1000 (maximum amount of  com-
          +       ponent).
          +
          +       The  pair_content  routine  allows programmers to find out
          +       what colors a given color-pair consists of.   It  requires
          +       three  arguments: the color-pair number, and two addresses
          +       of shorts for storing the foreground  and  the  background
          +       color  numbers.   The  value of the first argument must be
          +       between 1 and COLOR_PAIRS-1.  The values that  are  stored
          +       at  the addresses pointed to by the second and third argu-
          +       ments are between 0 and COLORS.
          +
          +   Colors
          +       In <curses.h> the following macros are defined.  These are
          +       the  default colors.  curses also assumes that COLOR_BLACK
          +       is the default background color for all terminals.
          +
          +             COLOR_BLACK
          +             COLOR_RED
          +             COLOR_GREEN
          +             COLOR_YELLOW
          +             COLOR_BLUE
          +             COLOR_MAGENTA
          +             COLOR_CYAN
          +             COLOR_WHITE
          +
          +
          +
          +

          RETURN VALUE

          +       The routines can_change_color()  and  has_colors()  return
          +       TRUE or FALSE.
          +
          +       All other routines return the integer ERR upon failure and
          +       an OK (SVr4 specifies only "an integer  value  other  than
          +       ERR") upon successful completion.
          +
          +
          +
          +

          NOTES

          +       In  the  ncurses implementation, there is a separate color
          +       activation flag, color palette,  color  pairs  table,  and
          +       associated  COLORS and COLOR_PAIRS counts for each screen;
          +       the start_color function only affects the current  screen.
          +       The SVr4/XSI interface is not really designed with this in
          +       mind, and historical  implementations  may  use  a  single
          +       shared color palette.
          +
          +       Note that setting an implicit background color via a color
          +       pair affects only character cells that a  character  write
          +       operation  explicitly  touches.   To change the background
          +       color used when parts of a window are blanked  by  erasing
          +       or scrolling operations, see curs_bkgd(3x).
          +
          +       Several  caveats  apply  on 386 and 486 machines with VGA-
          +       compatible graphics:
          +
          +       -    COLOR_YELLOW is actually brown.  To get  yellow,  use
          +            COLOR_YELLOW combined with the A_BOLD attribute.
          +
          +       -    The  A_BLINK  attribute  should  in  theory cause the
          +            background to go bright.  This often fails  to  work,
          +            and  even  some cards for which it mostly works (such
          +            as the Paradise and compatibles) do the  wrong  thing
          +            when you try to set a bright "yellow" background (you
          +            get a blinking yellow foreground instead).
          +
          +       -    Color RGB values are not settable.
          +
          +
          +
          +

          PORTABILITY

          +       This implementation satisfies XSI Curses's  minimum  maxi-
          +       mums for COLORS and COLOR_PAIRS.
          +
          +       The  init_pair  routine  accepts  negative values of fore-
          +       ground   and   background    color    to    support    the
          +       use_default_colors extension, but only if that routine has
          +       been first invoked.
          +
          +       The assumption that COLOR_BLACK is the default  background
          +       color   for  all  terminals  can  be  modified  using  the
          +       assume_default_colors extension,
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_initscr(3x), curs_attr(3x), dft_fgbg(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_delch.3x.html b/doc/html/man/curs_delch.3x.html new file mode 100644 index 00000000..8d376480 --- /dev/null +++ b/doc/html/man/curs_delch.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       delch,  wdelch, mvdelch, mvwdelch - delete character under
          +       the cursor in a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int delch(void);
          +       int wdelch(WINDOW *win);
          +       int mvdelch(int y, int x);
          +       int mvwdelch(WINDOW *win, int y, int x);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines delete the character under the cursor;  all
          +       characters to the right of the cursor on the same line are
          +       moved to the left one position and the last  character  on
          +       the line is filled with a blank.  The cursor position does
          +       not change (after moving to y, x,  if  specified).   (This
          +       does  not  imply use of the hardware delete character fea-
          +       ture.)
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon failure and an OK
          +       (SVr4  specifies  only  "an integer value other than ERR")
          +       upon successful completion.
          +
          +
          +
          +

          NOTES

          +       Note that delch, mvdelch, and mvwdelch may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue  4.   The standard specifies that they return ERR on
          +       failure, but specifies no error conditions.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_deleteln.3x.html b/doc/html/man/curs_deleteln.3x.html new file mode 100644 index 00000000..62cb0a49 --- /dev/null +++ b/doc/html/man/curs_deleteln.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       deleteln,  wdeleteln,  insdelln, winsdelln, insertln, win-
          +       sertln - delete and insert lines in a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int deleteln(void);
          +       int wdeleteln(WINDOW *win);
          +       int insdelln(int n);
          +       int winsdelln(WINDOW *win, int n);
          +       int insertln(void);
          +       int winsertln(WINDOW *win);
          +
          +
          +
          +

          DESCRIPTION

          +       The deleteln and wdeleteln routines delete the line  under
          +       the cursor in the window; all lines below the current line
          +       are moved up one line.  The bottom line of the  window  is
          +       cleared.  The cursor position does not change.
          +
          +       The  insdelln  and  winsdelln  routines,  for  positive n,
          +       insert n lines into the specified window above the current
          +       line.   The  n  bottom  lines  are  lost.  For negative n,
          +       delete n lines (starting with the one under  the  cursor),
          +       and  move  the remaining lines up.  The bottom n lines are
          +       cleared.  The current cursor position remains the same.
          +
          +       The insertln and insertln routines, insert  a  blank  line
          +       above the current line and the bottom line is lost.
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon failure and an OK
          +       (SVr4 specifies only "an integer value  other  than  ERR")
          +       upon successful completion.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  The standard specifies that they return  ERR  on
          +       failure, but specifies no error conditions.
          +
          +
          +
          +

          NOTES

          +       Note that all but winsdelln may be macros.
          +
          +       These  routines  do  not require a hardware line delete or
          +       insert feature in the terminal.  In fact, they  won't  use
          +       hardware  line  delete/insert  unless idlok(..., TRUE) has
          +       been set on the current window.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_extend.3x.html b/doc/html/man/curs_extend.3x.html new file mode 100644 index 00000000..8fbb8867 --- /dev/null +++ b/doc/html/man/curs_extend.3x.html @@ -0,0 +1,78 @@ + + +
          +
          +
          +
          +

          NAME

          +       curs_extend:  curses_version, use_extended_names - miscel-
          +       laneous curses extensions
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       const char * curses_version(void);
          +       int use_extended_names(bool enable);
          +
          +
          +
          +

          DESCRIPTION

          +       These functions are extensions to the curses library which
          +       do not fit easily into other categories.
          +
          +       Use  curses_version() to get the version number, including
          +       patch level of the library, e.g., 5.0.19991023
          +
          +       The use_extended_names()  function  controls  whether  the
          +       calling  application  is  able to use user-defined or non-
          +       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
          +       to compile extended terminal definitions.  However you can
          +       disable  this  feature  to  ensure compatiblity with other
          +       implementations of curses
          +
          +
          +
          +

          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

          +       curs_getch(3x),       curs_mouse(3x),      curs_print(3x),
          +       define_key(3x),  dft_fgbg(3x),  keybound(3x),   keyok(3x),
          +       resizeterm(3x), wresize(3x).
          +
          +
          +
          +

          AUTHOR

          +       Thomas Dickey.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_getch.3x.html b/doc/html/man/curs_getch.3x.html new file mode 100644 index 00000000..833b88e6 --- /dev/null +++ b/doc/html/man/curs_getch.3x.html @@ -0,0 +1,296 @@ + + +
          +
          +
          +
          +

          NAME

          +       getch,  wgetch,  mvgetch, mvwgetch, ungetch, has_key - get
          +       (or push back) characters from curses terminal keyboard
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int getch(void);
          +       int wgetch(WINDOW *win);
          +       int mvgetch(int y, int x);
          +       int mvwgetch(WINDOW *win, int y, int x);
          +       int ungetch(int ch);
          +       int has_key(int ch);
          +
          +
          +
          +

          DESCRIPTION

          +       The getch, wgetch, mvgetch and mvwgetch, routines  read  a
          +       character  from the window.  In no-delay mode, if no input
          +       is waiting, the value ERR is returned.  In delay mode, the
          +       program  waits until the system passes text through to the
          +       program.  Depending on the  setting  of  cbreak,  this  is
          +       after one character (cbreak mode), or after the first new-
          +       line (nocbreak mode).  In  half-delay  mode,  the  program
          +       waits  until a character is typed or the specified timeout
          +       has been reached.
          +
          +       Unless noecho has been set, then the character  will  also
          +       be echoed into the designated window according to the fol-
          +       lowing rules: If the character is the current erase  char-
          +       acter,  left  arrow, or backspace, the cursor is moved one
          +       space to the left and that screen position is erased as if
          +       delch  had  been  called.   If  the character value is any
          +       other KEY_ define, the user is alerted with a  beep  call.
          +       Otherwise the character is simply output to the screen.
          +
          +       If the window is not a pad, and it has been moved or modi-
          +       fied since the last call to  wrefresh,  wrefresh  will  be
          +       called before another character is read.
          +
          +       If  keypad  is  TRUE,  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
          +       <curses.h> as macros with  values  outside  the  range  of
          +       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.
          +
          +       When a character that could be the beginning of a function
          +       key is received (which,  on  modern  terminals,  means  an
          +       escape  character), curses sets a timer.  If the remainder
          +       of the sequence does not come  in  within  the  designated
          +       time,  the  character  is  passed  through; otherwise, the
          +       function key value is returned.   For  this  reason,  many
          +       terminals  experience  a  delay  between  the  time a user
          +       presses the escape key and the escape is returned  to  the
          +       program.
          +
          +       The ungetch routine places ch back onto the input queue to
          +       be returned by the next call to wgetch.  Note  that  there
          +       is, in effect, just one input queue for all windows.
          +
          +
          +   Function Keys
          +       The  following function keys, defined in <curses.h>, might
          +       be returned by getch if keypad  has  been  enabled.   Note
          +       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
          +
          +       Keypad is arranged like this:
          +
          +                         +-----+------+-------+
          +                         | A1  |  up  |  A3   |
          +                         +-----+------+-------+
          +                         |left |  B2  | right |
          +                         +-----+------+-------+
          +                         | C1  | down |  C3   |
          +                         +-----+------+-------+
          +       The has_key routine takes a key value from the above list,
          +       and returns TRUE or FALSE according as the current  termi-
          +       nal type recognizes a key with that value.
          +
          +
          +
          +
          +

          RETURN VALUE

          +       All  routines  return  the integer ERR upon failure and an
          +       integer value other than ERR (OK in the case of ungetch())
          +       upon successful completion.
          +
          +
          +
          +

          NOTES

          +       Use of the escape key by a programmer for a single charac-
          +       ter function is discouraged, as it will cause a  delay  of
          +       up to one second while the keypad code looks for a follow-
          +       ing function-key sequence.
          +
          +       When using getch, wgetch, mvgetch, or  mvwgetch,  nocbreak
          +       mode (nocbreak) and echo mode (echo) 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.
          +
          +       Note that getch, mvgetch, and mvwgetch may be macros.
          +
          +       Historically, the set of keypad macros was largely defined
          +       by  the  extremely  function-key-rich keyboard of the AT&T
          +       7300, aka 3B1, aka Safari 4.   Modern  personal  computers
          +       usually  have  only a small subset of these.  IBM PC-style
          +       consoles  typically  support  little  more  than   KEY_UP,
          +       KEY_DOWN,    KEY_LEFT,   KEY_RIGHT,   KEY_HOME,   KEY_END,
          +       KEY_NPAGE, KEY_PPAGE, and function keys 1 through 12.  The
          +       Ins key is usually mapped to KEY_IC.
          +
          +
          +
          +

          PORTABILITY

          +       The  *get* functions are described in the XSI Curses stan-
          +       dard, Issue 4.  They  read  single-byte  characters  only.
          +       The  standard  specifies  that they return ERR on failure,
          +       but specifies no error conditions.
          +
          +       The echo behavior of these functions on input of  KEY_  or
          +       backspace  characters  was not specified in the SVr4 docu-
          +       mentation.  This  description  is  adopted  from  the  XSI
          +       Curses standard.
          +
          +       The  behavior of getch and friends in the presence of han-
          +       dled 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
          +       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.
          +
          +       Programmers concerned about portability should be prepared
          +       for  either  of  two  cases:  (a)  signal receipt does not
          +       interrupt getch; (b) signal receipt interrupts  getch  and
          +       causes  it  to  return ERR with errno set to EINTR.  Under
          +       the ncurses implementation, handled signals  never  inter-
          +       rupt getch.
          +
          +       The  has_key  function is unique to ncurses.  We recommend
          +       that  any  code  using  it  be  conditionalized   on   the
          +       NCURSES_VERSION feature macro.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),        curs_inopts(3x),        curs_mouse(3x),
          +       curs_move(3x), curs_refresh(3x).  resizeterm(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_getstr.3x.html b/doc/html/man/curs_getstr.3x.html new file mode 100644 index 00000000..19c8ce16 --- /dev/null +++ b/doc/html/man/curs_getstr.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       getstr,  getnstr,  wgetstr, wgetnstr, mvgetstr, mvgetnstr,
          +       mvwgetstr, mvwgetnstr  -  accept  character  strings  from
          +       curses terminal keyboard
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int getstr(char *str);
          +       int getnstr(char *str, int n);
          +       int wgetstr(WINDOW *win, char *str);
          +       int wgetnstr(WINDOW *win, char *str, int n);
          +       int mvgetstr(int y, int x, char *str);
          +       int mvwgetstr(WINDOW *win, int y, int x, char *str);
          +       int mvgetnstr(int y, int x, char *str, int n);
          +       int mvwgetnstr(WINDOW *, int y, int x, char *str, int n);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function getstr is equivalent to a series of calls to
          +       getch, until a newline or carriage return is received (the
          +       terminating  character  is  not  included  in the returned
          +       string).  The  resulting  value  is  placed  in  the  area
          +       pointed to by the character pointer str.
          +
          +       wgetnstr  reads  at  most  n characters, thus preventing a
          +       possible overflow of the input  buffer.   Any  attempt  to
          +       enter  more characters (other than the terminating newline
          +       or carriage return) causes a  beep.   Function  keys  also
          +       cause  a beep and are ignored.  The getnstr function reads
          +       from the stdscr default window.
          +
          +       The user's erase and kill characters are interpreted.   If
          +       keypad   mode   is   on   for  the  window,  KEY_LEFT  and
          +       KEY_BACKSPACE are both considered equivalent to the user's
          +       kill character.
          +
          +       Characters  input are echoed only if echo is currently on.
          +       In that case, backspace is echoed as deletion of the  pre-
          +       vious character (typically a left motion).
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon failure and an OK
          +       (SVr4 specifies only "an integer value  other  than  ERR")
          +       upon successful completion.
          +
          +
          +
          +

          NOTES

          +       Note that getstr, mvgetstr, and mvwgetstr may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  They  read  single-byte  characters  only.   The
          +       standard  specifies  that  they return ERR on failure, but
          +       the  single  error  condition  EOVERFLOW  associated  with
          +       extended-level  conformance  is  not yet returned (the XSI
          +       curses support for multi-byte characters is not  yet  pre-
          +       sent).
          +
          +       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
          +       lied.   In  fact,  the  `character'  value appended to the
          +       string by those implementations was  predictable  but  not
          +       useful  (being,  in  fact, the low-order eight bits of the
          +       key's KEY_ value).
          +
          +       The functions getnstr, mvgetnstr, and mvwgetnstr were pre-
          +       sent but not documented in SVr4.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_getch(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_getyx.3x.html b/doc/html/man/curs_getyx.3x.html new file mode 100644 index 00000000..562d7106 --- /dev/null +++ b/doc/html/man/curs_getyx.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       getyx,  getparyx,  getbegyx,  getmaxyx - get curses cursor
          +       and window coordinates
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       void getyx(WINDOW *win, int y, int x);
          +       void getparyx(WINDOW *win, int y, int x);
          +       void getbegyx(WINDOW *win, int y, int x);
          +       void getmaxyx(WINDOW *win, int y, int x);
          +
          +
          +
          +

          DESCRIPTION

          +       The getyx macro places the current cursor position of  the
          +       given window in the two integer variables y and x.
          +
          +       If  win  is  a  subwindow,  the  getparyx macro places the
          +       beginning coordinates of the  subwindow  relative  to  the
          +       parent  window into two integer variables y and x.  Other-
          +       wise, -1 is placed into y and x.
          +
          +       Like getyx, the getbegyx and  getmaxyx  macros  store  the
          +       current  beginning  coordinates  and size of the specified
          +       window.
          +
          +
          +
          +

          RETURN VALUE

          +       The return values of these  macros  are  undefined  (i.e.,
          +       they  should not be used as the right-hand side of assign-
          +       ment statements).
          +
          +
          +
          +

          NOTES

          +       All of these interfaces are macros and  that  "&"  is  not
          +       necessary before the variables y and x.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_inch.3x.html b/doc/html/man/curs_inch.3x.html new file mode 100644 index 00000000..2c4b22a5 --- /dev/null +++ b/doc/html/man/curs_inch.3x.html @@ -0,0 +1,78 @@ + + +
          +
          +
          +
          +

          NAME

          +       inch,  winch,  mvinch,  mvwinch  -  get  a  character  and
          +       attributes from a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       chtype inch(void);
          +       chtype winch(WINDOW *win);
          +       chtype mvinch(int y, int x);
          +       chtype mvwinch(WINDOW *win, int y, int x);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines return the character, of  type  chtype,  at
          +       the   current  position  in  the  named  window.   If  any
          +       attributes are set for that  position,  their  values  are
          +       OR'ed  into  the  value  returned.   Constants  defined in
          +       <curses.h> can be used with the & (logical  AND)  operator
          +       to extract the character or attributes alone.
          +
          +
          +   Attributes
          +       The  following  bit-masks  may  be  AND-ed with characters
          +       returned by winch.
          +
          +       A_CHARTEXT     Bit-mask to extract character
          +       A_ATTRIBUTES   Bit-mask to extract attributes
          +       A_COLOR        Bit-mask to extract color-pair field information
          +
          +
          +
          +

          NOTES

          +       Note that all of these routines may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue 4.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_inchstr.3x.html b/doc/html/man/curs_inchstr.3x.html new file mode 100644 index 00000000..5688c02a --- /dev/null +++ b/doc/html/man/curs_inchstr.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       inchstr,   inchnstr,   winchstr,   winchnstr,   mvinchstr,
          +       mvinchnstr, mvwinchstr, mvwinchnstr  -  get  a  string  of
          +       characters (and attributes) from a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int inchstr(chtype *chstr);
          +       int inchnstr(chtype *chstr, int n);
          +       int winchstr(WINDOW *win, chtype *chstr);
          +       int winchnstr(WINDOW *win, chtype *chstr, int n);
          +       int mvinchstr(int y, int x, chtype *chstr);
          +       int mvinchnstr(int y, int x, chtype *chstr, int n);
          +       int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
          +       int  mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr,
          +       int n);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines return a NULL-terminated  array  of  chtype
          +       quantities, starting at the current cursor position in the
          +       named window and ending at the right margin of the window.
          +       The  four  functions with n as the last argument, return a
          +       leading substring at most n characters long (exclusive  of
          +       the  trailing (chtype)0).  Constants defined in <curses.h>
          +       can be used with the & (logical AND) operator  to  extract
          +       the  character or the attribute alone from any position in
          +       the chstr [see curs_inch(3x)].
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon  failure  and  an
          +       integer  value  other  than ERR upon successful completion
          +       (the number of  characters  retrieved,  exclusive  of  the
          +       trailing 0).
          +
          +
          +
          +

          NOTES

          +       Note  that  all  routines  except winchnstr may be macros.
          +       SVr4 does not document whether the result string is 0-ter-
          +       minated; it does not document whether a length limit argu-
          +       ment includes any trailing 0; and it does not document the
          +       meaning of the return value.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  It is no more specific than the SVr4  documenta-
          +       tion on the trailing 0.  It does specify that the success-
          +       ful return of the functions is OK.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_inch(3x).
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html new file mode 100644 index 00000000..81be73b9 --- /dev/null +++ b/doc/html/man/curs_initscr.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       initscr,  newterm, endwin, isendwin, set_term, delscreen -
          +       curses screen initialization and manipulation routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       WINDOW *initscr(void);
          +       int endwin(void);
          +       bool isendwin(void);
          +       SCREEN  *newterm(const  char  *type,  FILE  *outfd,   FILE
          +       *infd);
          +       SCREEN *set_term(SCREEN *new);
          +       void delscreen(SCREEN* sp);
          +
          +
          +
          +

          DESCRIPTION

          +       initscr  is normally the first curses routine to call when
          +       initializing a program.  A few special routines  sometimes
          +       need  to  be called before it; these are slk_init, filter,
          +       ripoffline, use_env.  For multiple-terminal  applications,
          +       newterm may be called before initscr.
          +
          +       The initscr code determines the terminal type and initial-
          +       izes all curses data structures.  initscr also causes  the
          +       first  call  to  refresh  to  clear the screen.  If errors
          +       occur, initscr writes  an  appropriate  error  message  to
          +       standard error and exits; otherwise, a pointer is returned
          +       to stdscr.
          +
          +       A program that outputs to more than  one  terminal  should
          +       use  the  newterm  routine  for  each  terminal instead of
          +       initscr.  A program that needs to inspect capabilities, so
          +       it can continue to run in a line-oriented mode if the ter-
          +       minal cannot support a screen-oriented program, would also
          +       use  newterm.   The  routine newterm should be called once
          +       for each terminal.  It returns a variable of type SCREEN *
          +       which  should  be  saved  as a reference to that terminal.
          +       The arguments are the type of the terminal to be  used  in
          +       place of $TERM, a file pointer for output to the terminal,
          +       and another file pointer for input from the  terminal  (if
          +       type  is NULL, $TERM will be used).  The program must also
          +       call endwin for each terminal being  used  before  exiting
          +       from  curses.  If newterm is called more than once for the
          +       same terminal, the first terminal referred to must be  the
          +       last one for which endwin is called.
          +
          +       A  program  should  always  call  endwin before exiting or
          +       escaping  from  curses  mode  temporarily.   This  routine
          +       restores  tty  modes,  moves the cursor to the lower left-
          +       hand corner of the screen and resets the terminal into the
          +       proper non-visual mode.  Calling refresh or doupdate after
          +       a temporary escape causes the  program  to  resume  visual
          +       mode.
          +
          +       The  isendwin  routine  returns  TRUE  if  endwin has been
          +       called without any subsequent calls to wrefresh, and FALSE
          +       otherwise.
          +
          +       The  set_term  routine is used to switch between different
          +       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.
          +
          +       The delscreen routine frees storage  associated  with  the
          +       SCREEN  data  structure.   The  endwin routine does not do
          +       this, so delscreen should be called after endwin if a par-
          +       ticular SCREEN is no longer needed.
          +
          +
          +
          +

          RETURN VALUE

          +       endwin  returns  the  integer ERR upon failure and OK upon
          +       successful completion.
          +
          +       Routines that return pointers always return NULL on error.
          +
          +
          +
          +

          NOTES

          +       Note that initscr and newterm may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  It specifies that portable applications must not
          +       call initscr more than once.
          +
          +       Old versions of curses, e.g., BSD 4.4, may have returned a
          +       null pointer from  initscr  when  an  error  is  detected,
          +       rather  than  exiting.   It is safe but redundant to check
          +       the return value of initscr in XSI Curses.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),       curs_kernel(3x),       curs_refresh(3x),
          +       curs_slk(3x), curs_util(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html new file mode 100644 index 00000000..13ec59ce --- /dev/null +++ b/doc/html/man/curs_inopts.3x.html @@ -0,0 +1,242 @@ + + +
          +
          +
          +
          +

          NAME

          +       cbreak, nocbreak, echo, noecho, halfdelay, intrflush, key-
          +       pad, meta,  nodelay,  notimeout,  raw,  noraw,  noqiflush,
          +       qiflush,  timeout,  wtimeout,  typeahead  -  curses  input
          +       options
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int cbreak(void);
          +       int nocbreak(void);
          +       int echo(void);
          +       int noecho(void);
          +       int halfdelay(int tenths);
          +       int intrflush(WINDOW *win, bool bf);
          +       int keypad(WINDOW *win, bool bf);
          +       int meta(WINDOW *win, bool bf);
          +       int nodelay(WINDOW *win, bool bf);
          +       int raw(void);
          +       int noraw(void);
          +       void noqiflush(void);
          +       void qiflush(void);
          +       int notimeout(WINDOW *win, bool bf);
          +       void timeout(int delay);
          +       void wtimeout(WINDOW *win, int delay);
          +       int typeahead(int fd);
          +
          +
          +
          +

          DESCRIPTION

          +       Normally, the tty driver buffers typed characters until  a
          +       newline  or  carriage return is typed.  The cbreak routine
          +       disables line buffering and erase/kill  character-process-
          +       ing  (interrupt  and  flow  control  characters  are unaf-
          +       fected), making characters typed by the  user  immediately
          +       available  to  the  program.  The nocbreak routine returns
          +       the terminal to normal (cooked) mode.
          +
          +       Initially the terminal may or may not be in  cbreak  mode,
          +       as the mode is inherited; therefore, a program should call
          +       cbreak or nocbreak explicitly.  Most interactive  programs
          +       using  curses set the cbreak mode.  Note that cbreak over-
          +       rides raw.  [See curs_getch(3x) for a  discussion  of  how
          +       these routines interact with echo and noecho.]
          +
          +       The  echo  and  noecho routines control whether characters
          +       typed by the user are echoed by getch as they  are  typed.
          +       Echoing  by  the  tty  driver is always disabled, but ini-
          +       tially getch is in echo  mode,  so  characters  typed  are
          +       echoed.  Authors of most interactive programs prefer to do
          +       their own echoing in a controlled area of the  screen,  or
          +       not  to  echo  at  all, so they disable echoing by calling
          +       noecho.  [See curs_getch(3x) for a discussion of how these
          +       routines interact with cbreak and nocbreak.]
          +
          +       The  halfdelay  routine is used for half-delay mode, which
          +       is similar to cbreak mode in that characters typed by  the
          +       user  are  immediately available to the program.  However,
          +       after blocking  for  tenths  tenths  of  seconds,  ERR  is
          +       returned  if  nothing has been typed.  The value of tenths
          +       must be a number between 1 and 255.  Use nocbreak to leave
          +       half-delay mode.
          +
          +       If  the intrflush option is enabled, (bf is TRUE), when an
          +       interrupt key  is  pressed  on  the  keyboard  (interrupt,
          +       break,  quit)  all  output in the tty driver queue will be
          +       flushed, giving the  effect  of  faster  response  to  the
          +       interrupt,  but  causing  curses to have the wrong idea of
          +       what is on the  screen.   Disabling  (bf  is  FALSE),  the
          +       option  prevents the flush.  The default for the option is
          +       inherited from the tty driver settings.  The window  argu-
          +       ment is ignored.
          +
          +       The  keypad option enables the keypad of the user's termi-
          +       nal.  If enabled (bf is TRUE), the user can press a  func-
          +       tion  key (such as an arrow key) and wgetch returns a sin-
          +       gle value representing the function key, as  in  KEY_LEFT.
          +       If  disabled (bf is FALSE), curses does not treat function
          +       keys specially and the program has to interpret the escape
          +       sequences  itself.   If  the keypad in the terminal can be
          +       turned on  (made  to  transmit)  and  off  (made  to  work
          +       locally),  turning on this option causes the terminal key-
          +       pad to be turned on when wgetch is  called.   The  default
          +       value for keypad is false.
          +
          +       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 meta(win, TRUE); this is equivalent,  under  POSIX,
          +       to  setting the CS8 flag on the terminal.  To force 7 bits
          +       to be returned, invoke meta(win, FALSE); this  is  equiva-
          +       lent,  under  POSIX, to setting the CS8 flag on the termi-
          +       nal.  The window argument, win, is always ignored.  If the
          +       terminfo capabilities smm (meta_on) and rmm (meta_off) are
          +       defined for the terminal, smm is sent to the terminal when
          +       meta(win,  TRUE)  is called and rmm is sent when meta(win,
          +       FALSE) is called.
          +
          +       The nodelay option causes getch to be a non-blocking call.
          +       If  no input is ready, getch returns ERR.  If disabled (bf
          +       is FALSE), getch waits until a key is pressed.
          +
          +       While interpreting an input escape sequence, wgetch sets a
          +       timer  while  waiting  for the next character.  If notime-
          +       out(win, TRUE) is called,  then  wgetch  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.
          +
          +       The  raw and noraw routines place the terminal into or out
          +       of raw mode.  Raw mode is similar to cbreak mode, in  that
          +       characters  typed  are  immediately  passed through to the
          +       user program.  The differences are that in raw  mode,  the
          +       interrupt,  quit, suspend, and flow control characters are
          +       all passed through uninterpreted, instead of generating  a
          +       signal.   The  behavior  of the BREAK key depends on other
          +       bits in the tty driver that are not set by curses.
          +
          +       When the noqiflush routine is used, normal flush of  input
          +       and  output queues associated with the INTR, QUIT and SUSP
          +       characters will not be done [see termio(7)].  When qiflush
          +       is  called,  the queues will be flushed when these control
          +       characters are read.  You may want to call noqiflush()  in
          +       a  signal handler if you want output to continue as though
          +       the interrupt had not occurred, after the handler exits.
          +
          +       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
          +       input).   If delay is zero, then non-blocking read is used
          +       (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
          +       additional capability of being  able  to  block  for  only
          +       delay milliseconds (where delay is positive).
          +
          +       The  curses 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 refresh or  doupdate
          +       is  called again.  This allows faster response to commands
          +       typed in advance.  Normally, the input FILE pointer passed
          +       to  newterm,  or  stdin in the case that initscr was used,
          +       will be used to do this typeahead checking.  The typeahead
          +       routine  specifies  that  the  file descriptor fd is to be
          +       used to check for typeahead instead.  If fd is -1, then no
          +       typeahead checking is done.
          +
          +
          +
          +

          RETURN VALUE

          +       All  routines that return an integer return ERR upon fail-
          +       ure and OK (SVr4 specifies only "an  integer  value  other
          +       than  ERR")  upon  successful completion, unless otherwise
          +       noted in the preceding routine descriptions.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue 4.
          +
          +       The  ncurses  library obeys the XPG4 standard and the his-
          +       torical 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 raw
          +       call turned it off as a side-effect.  For  best  portabil-
          +       ity,  set echo or noecho explicitly just after initializa-
          +       tion, even if your program remains in cooked mode.
          +
          +
          +
          +

          NOTES

          +       Note that echo, noecho, halfdelay, intrflush, meta,  node-
          +       lay,  notimeout, noqiflush, qiflush, timeout, and wtimeout
          +       may be macros.
          +
          +       The noraw and nocbreak calls follow historical practice in
          +       that  they  attempt  to  restore to normal (`cooked') mode
          +       from raw and cbreak modes respectively.  Mixing  raw/noraw
          +       and  cbreak/nocbreak  calls  leads  to  tty driver control
          +       states that are hard to predict or understand; it  is  not
          +       recommended.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_getch(3x), curs_initscr(3x), termio(7)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_insch.3x.html b/doc/html/man/curs_insch.3x.html new file mode 100644 index 00000000..5a1610b5 --- /dev/null +++ b/doc/html/man/curs_insch.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       insch,  winsch,  mvinsch,  mvwinsch  -  insert a character
          +       before cursor in a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int insch(chtype ch);
          +       int winsch(WINDOW *win, chtype ch);
          +       int mvinsch(int y, int x, chtype ch);
          +       int mvwinsch(WINDOW *win, int y, int x, chtype ch);
          +
          +
          +
          +

          DESCRIPTION

          +       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.
          +       The insertion operation does not change the  cursor  posi-
          +       tion.
          +
          +
          +
          +

          RETURN VALUE

          +       All  routines that return an integer return ERR upon fail-
          +       ure and OK (SVr4 specifies only "an  integer  value  other
          +       than  ERR")  upon  successful completion, unless otherwise
          +       noted in the preceding routine descriptions.
          +
          +
          +
          +

          NOTES

          +       These routines do not necessarily imply use of a  hardware
          +       insert character feature.
          +
          +       Note that insch, mvinsch, and mvwinsch may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_insstr.3x.html b/doc/html/man/curs_insstr.3x.html new file mode 100644 index 00000000..2349cbc2 --- /dev/null +++ b/doc/html/man/curs_insstr.3x.html @@ -0,0 +1,135 @@ + + +
          +
          +
          +
          +

          NAME

          +       insstr,  insnstr,  winsstr, winsnstr, mvinsstr, mvinsnstr,
          +       mvwinsstr, mvwinsnstr - insert string before cursor  in  a
          +       curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       int insstr(const char *str);
          +       int insnstr(const char *str, int n);
          +       int winsstr(WINDOW *win, const char *str);
          +       int winsnstr(WINDOW *win, const char *str, int n);
          +       int mvinsstr(int y, int x, const char *str);
          +       int mvinsnstr(int y, int x, const char *str, int n);
          +       int mvwinsstr(WINDOW *win, int y, int x, const char *str);
          +       int mvwinsnstr(WINDOW *win, int y, int x, const char *str,
          +       int n);
          +
          +
          +
          +

          DESCRIPTION

          +       These  routines insert a character string (as many charac-
          +       ters as will fit on the line) before the  character  under
          +       the cursor.  All characters to the right of the cursor are
          +       shifted right, with the possibility of the rightmost char-
          +       acters  on  the line being lost.  The cursor position does
          +       not change (after moving to y, x, if specified). The  four
          +       routines with n as the last argument insert a leading sub-
          +       string of at most n characters.  If n<=0, then the  entire
          +       string is inserted.
          +
          +       If  a  character in str is a tab, newline, carriage return
          +       or backspace, the cursor is moved appropriately within the
          +       window.   A  newline  also  does a clrtoeol before moving.
          +       Tabs are considered to be at every eighth  column.   If  a
          +       character in str is another control character, it is drawn
          +       in the ^X notation.  Calling winch after adding a  control
          +       character (and moving to it, if necessary) does not return
          +       the control character, but instead returns a character  in
          +       the ^-representation of the control character.
          +
          +
          +
          +

          RETURN VALUE

          +       All  routines that return an integer return ERR upon fail-
          +       ure and OK (SVr4 specifies only "an  integer  value  other
          +       than  ERR")  upon  successful completion, unless otherwise
          +       noted in the preceding routine descriptions.
          +
          +
          +
          +

          NOTES

          +       Note that all but winsnstr may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue  4,  which  adds  const qualifiers to the arguments.
          +       The XSI Curses error  conditions  EILSEQ  and  EILOVERFLOW
          +       associated  with  extended-level  conformance  are not yet
          +       detected (this implementation does not  yet  support  XPG4
          +       multi-byte characters).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_clear(3x), curs_inch(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_instr.3x.html b/doc/html/man/curs_instr.3x.html new file mode 100644 index 00000000..30746395 --- /dev/null +++ b/doc/html/man/curs_instr.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       instr,  innstr, winstr, winnstr, mvinstr, mvinnstr, mvwin-
          +       str, mvwinnstr - get a string of characters from a  curses
          +       window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int instr(char *str);
          +       int innstr(char *str, int n);
          +       int winstr(WINDOW *win, char *str);
          +       int winnstr(WINDOW *win, char *str, int n);
          +       int mvinstr(int y, int x, char *str);
          +       int mvinnstr(int y, int x, char *str, int n);
          +       int mvwinstr(WINDOW *win, int y, int x, char *str);
          +       int  mvwinnstr(WINDOW  *win,  int y, int x, char *str, int
          +       n);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines return  a  string  of  characters  in  str,
          +       extracted  starting  at the current cursor position in the
          +       named window.  Attributes are stripped  from  the  charac-
          +       ters.   The  four  functions  with  n as the last argument
          +       return a leading  substring  at  most  n  characters  long
          +       (exclusive of the trailing NUL).
          +
          +
          +
          +

          RETURN VALUE

          +       All  of the functions return ERR upon failure, or the num-
          +       ber of characters actually read into the string.
          +
          +
          +
          +

          NOTES

          +       Note that all routines except winnstr may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       The XSI Curses error  conditions  EILSEQ  and  EILOVERFLOW
          +       associated  with  extended-level  conformance  are not yet
          +       detected (this implementation does not  yet  support  XPG4
          +       multi-byte  characters).  SVr4 does not document whether a
          +       length limit includes or excludes the trailing NUL.
          +
          +       The ncurses library extends the XSI description by  allow-
          +       ing  a  negative value for n.  In this case, the functions
          +       return the string ending at the right margin.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_kernel.3x.html b/doc/html/man/curs_kernel.3x.html new file mode 100644 index 00000000..094f396e --- /dev/null +++ b/doc/html/man/curs_kernel.3x.html @@ -0,0 +1,188 @@ + + +
          +
          +
          +
          +

          NAME

          +       def_prog_mode,       def_shell_mode,      reset_prog_mode,
          +       reset_shell_mode, resetty, savetty, getsyx, setsyx, ripof-
          +       fline, curs_set, napms - low-level curses routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int def_prog_mode(void);
          +       int def_shell_mode(void);
          +       int reset_prog_mode(void);
          +       int reset_shell_mode(void);
          +       int resetty(void);
          +       int savetty(void);
          +       void getsyx(int y, int x);
          +       void setsyx(int y, int x);
          +       int ripoffline(int line, int (*init)(WINDOW *, int));
          +       int curs_set(int visibility);
          +       int napms(int ms);
          +
          +
          +
          +

          DESCRIPTION

          +       The  following  routines  give low-level access to various
          +       curses capabilities.  Theses routines typically  are  used
          +       inside library routines.
          +
          +       The  def_prog_mode  and  def_shell_mode  routines save the
          +       current terminal modes as the  "program"  (in  curses)  or
          +       "shell"   (not   in   curses)   state   for   use  by  the
          +       reset_prog_mode and reset_shell_mode  routines.   This  is
          +       done  automatically  by  initscr.   There is one such save
          +       area for each screen context allocated by newterm().
          +
          +       The reset_prog_mode and reset_shell_mode routines  restore
          +       the  terminal  to "program" (in curses) or "shell" (out of
          +       curses) state.  These are  done  automatically  by  endwin
          +       and,  after  an  endwin, by doupdate, so they normally are
          +       not called.
          +
          +       The resetty and savetty  routines  save  and  restore  the
          +       state  of  the  terminal modes.  savetty saves the current
          +       state in a buffer and resetty restores the state  to  what
          +       it was at the last call to savetty.
          +
          +       The  getsyx routine returns the current coordinates of the
          +       virtual screen cursor in y and x.  If leaveok is currently
          +       TRUE,  then -1,-1 is returned.  If lines have been removed
          +       from the top of the screen,  using  ripoffline,  y  and  x
          +       include  these  lines;  therefore,  y and x should be used
          +       only as arguments for setsyx.
          +
          +       The setsyx routine sets the virtual screen cursor to y, x.
          +       If y and x are both -1, then leaveok is set.  The two rou-
          +       tines getsyx and setsyx are  designed  to  be  used  by  a
          +       library routine, which manipulates curses windows but does
          +       not want to change the current position of  the  program's
          +       cursor.   The  library  routine  would  call getsyx at the
          +       beginning, do its manipulation of its own  windows,  do  a
          +       wnoutrefresh  on  its  windows, call setsyx, and then call
          +       doupdate.
          +
          +       The ripoffline routine provides access to the same  facil-
          +       ity  that  slk_init  [see curs_slk(3x)] uses to reduce the
          +       size of the screen.   ripoffline  must  be  called  before
          +       initscr or newterm is called.  If line is positive, a line
          +       is removed from the top of stdscr; if line is negative,  a
          +       line is removed from the bottom.  When this is done inside
          +       initscr, the routine init (supplied by the user) is called
          +       with  two arguments: a window pointer to the one-line win-
          +       dow that has been allocated and an integer with the number
          +       of columns in the window.  Inside this initialization rou-
          +       tine, the integer variables LINES  and  COLS  (defined  in
          +       <curses.h>) are not guaranteed to be accurate and wrefresh
          +       or doupdate must not be called.  It is allowable  to  call
          +       wnoutrefresh during the initialization routine.
          +
          +       ripoffline  can  be called up to five times before calling
          +       initscr or newterm.
          +
          +       The curs_set routine sets  the  cursor  state  is  set  to
          +       invisible, normal, or very visible for visibility equal to
          +       0, 1, or 2 respectively.  If  the  terminal  supports  the
          +       visibility   requested,   the  previous  cursor  state  is
          +       returned; otherwise, ERR is returned.
          +
          +       The napms routine is used to sleep for ms milliseconds.
          +
          +
          +
          +

          RETURN VALUE

          +       Except for curs_set,  these  routines  always  return  OK.
          +       curs_set  returns the previous cursor state, or ERR if the
          +       requested visibility is not supported.
          +
          +
          +
          +

          NOTES

          +       Note that getsyx is a macro, so & is not necessary  before
          +       the variables y and x.
          +
          +       Older  SVr4  man  pages  warn  that  the  return  value of
          +       curs_set "is currently  incorrect".   This  implementation
          +       gets  it  right, but it may be unwise to count on the cor-
          +       rectness of the return value anywhere else.
          +
          +       Both ncurses and SVr4 will  call  curs_set  in  endwin  if
          +       curs_set  has  been  called  to make the cursor other than
          +       normal, i.e., either visible or very visible.  There is no
          +       way  for  ncurses to determine the initial cursor state to
          +       restore that.
          +
          +
          +
          +

          PORTABILITY

          +       The functions setsyx and getsyx are not described  in  the
          +       XSI  Curses standard, Issue 4.  All other functions are as
          +       described in XSI Curses.
          +
          +       The SVr4 documentation describes setsyx and getsyx as hav-
          +       ing  return  type  int.  This  is  misleading, as they are
          +       macros with no documented semantics for the return  value.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),       curs_initscr(3x),      curs_outopts(3x),
          +       curs_refresh(3x), curs_scr_dump(3x), curs_slk(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_mouse.3x.html b/doc/html/man/curs_mouse.3x.html new file mode 100644 index 00000000..6e1ca87a --- /dev/null +++ b/doc/html/man/curs_mouse.3x.html @@ -0,0 +1,242 @@ + + +
          +
          +
          +
          +

          NAME

          +       getmouse,  ungetmouse,  mousemask,  wenclose, mouse_trafo,
          +       wmouse_trafo,  mouseinterval  -  mouse  interface  through
          +       curses
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       typedef unsigned long mmask_t;
          +
          +       typedef struct
          +       {
          +           short id;         /* ID to distinguish multiple devices */
          +           int x, y, z;      /* event coordinates */
          +           mmask_t bstate;   /* button state bits */
          +       }
          +       MEVENT;
          +       int getmouse(MEVENT *event);
          +       int ungetmouse(MEVENT *event);
          +       mmask_t mousemask(mmask_t newmask, mmask_t *oldmask);
          +       bool wenclose(WINDOW *win, int y, int x);
          +       bool mouse_trafo(int* pY, int* pX, bool to_screen);
          +       bool wmouse_trafo(const WINDOW* win, int* pY, int* pX,
          +            bool to_screen);
          +       int mouseinterval(int erval);
          +
          +
          +
          +

          DESCRIPTION

          +       These  functions provide an interface to mouse events from
          +       ncurses(3x).  Mouse events are  represented  by  KEY_MOUSE
          +       pseudo-key values in the wgetch input stream.
          +
          +       To  make mouse events visible, use the mousemask function.
          +       This will  set  the  mouse  events  to  be  reported.   By
          +       default,  no mouse events are reported.  The function will
          +       return a mask to indicate which  of  the  specified  mouse
          +       events  can be reported; on complete failure it returns 0.
          +       If oldmask is non-NULL, this function fills the  indicated
          +       location  with  the  previous  value of the given window's
          +       mouse event mask.
          +
          +       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.
          +
          +       Here are the mouse event type masks:
          +
          +       Name                     Description
          +       ---------------------------------------------------------------------
          +       BUTTON1_PRESSED          mouse button 1 down
          +       BUTTON1_RELEASED         mouse button 1 up
          +       BUTTON1_CLICKED          mouse button 1 clicked
          +       BUTTON1_DOUBLE_CLICKED   mouse button 1 double clicked
          +       BUTTON1_TRIPLE_CLICKED   mouse button 1 triple clicked
          +
          +       BUTTON2_PRESSED          mouse button 2 down
          +       BUTTON2_RELEASED         mouse button 2 up
          +       BUTTON2_CLICKED          mouse button 2 clicked
          +       BUTTON2_DOUBLE_CLICKED   mouse button 2 double clicked
          +       BUTTON2_TRIPLE_CLICKED   mouse button 2 triple clicked
          +       BUTTON3_PRESSED          mouse button 3 down
          +       BUTTON3_RELEASED         mouse button 3 up
          +       BUTTON3_CLICKED          mouse button 3 clicked
          +       BUTTON3_DOUBLE_CLICKED   mouse button 3 double clicked
          +       BUTTON3_TRIPLE_CLICKED   mouse button 3 triple clicked
          +       BUTTON4_PRESSED          mouse button 4 down
          +       BUTTON4_RELEASED         mouse button 4 up
          +       BUTTON4_CLICKED          mouse button 4 clicked
          +       BUTTON4_DOUBLE_CLICKED   mouse button 4 double clicked
          +       BUTTON4_TRIPLE_CLICKED   mouse button 4 triple clicked
          +       BUTTON_SHIFT             shift was down during button state change
          +       BUTTON_CTRL              control was down during button state change
          +       BUTTON_ALT               alt was down during button state change
          +       ALL_MOUSE_EVENTS         report all button state changes
          +       REPORT_MOUSE_POSITION    report mouse movement
          +
          +       Once a class of mouse events have been made visible  in  a
          +       window,  calling  the  wgetch  function on that window may
          +       return KEY_MOUSE as an indicator that a  mouse  event  has
          +       been queued.  To read the event data and pop the event off
          +       the queue, call getmouse.  This function will return OK if
          +       a mouse event is actually visible in the given window, ERR
          +       otherwise.  When getmouse returns OK, the  data  deposited
          +       as  y  and  x  in  the event structure coordinates will be
          +       screen-relative character-cell coordinates.  The  returned
          +       state  mask  will have exactly one bit set to indicate the
          +       event type.
          +
          +       The ungetmouse function behaves  analogously  to  ungetch.
          +       It  pushes  a  KEY_MOUSE  event  onto the input queue, and
          +       associates with  that  event  the  given  state  data  and
          +       screen-relative character-cell coordinates.
          +
          +       The  wenclose  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 other-
          +       wise.  It is useful for determining  what  subset  of  the
          +       screen windows enclose the location of a mouse event.
          +
          +       The wmouse_trafo function transforms a given pair of coor-
          +       dinates from stdscr-relative coordinates  to  screen-rela-
          +       tive  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 to_screen is TRUE, the pointers pY, pX  must
          +       reference  the coordinates of a location inside the window
          +       win. They are converted to screen-relative coordinates and
          +       returned  through the pointers. If the conversion was suc-
          +       cessful, the function returns TRUE. If one of the  parame-
          +       ters  was  NULL  or the location is not inside the window,
          +       FALSE is returned. If to_screen is FALSE, the pointers pY,
          +       pX  must  reference  screen-relative coordinates. They are
          +       converted to stdscr-relative coordinates if the window win
          +       encloses  this  point.  In  this case the function returns
          +       TRUE. If one of the parameters is NULL or the point is not
          +       inside  the window, FALSE is returned. Please notice, that
          +       the referenced coordinates are only replaced by  the  con-
          +       verted coordinates if the transformation was successful.
          +
          +       The mouseinterval function sets the maximum time (in thou-
          +       sands of a second)  that  can  elapse  between  press  and
          +       release  events  in  order  for them to be recognized as a
          +       click.  This function returns the previous interval value.
          +       The default is one fifth of a second.
          +
          +       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 get-
          +       str that expects a linefeed for input-loop termination.
          +
          +
          +
          +
          +

          RETURN VALUE

          +       getmouse, ungetmouse and mouseinterval return the  integer
          +       ERR  upon failure or OK upon successful completion. mouse-
          +       mask returns the mask of reportable events.  wenclose  and
          +       wmouse_trafo are boolean functions returning TRUE or FALSE
          +       depending on their test result.
          +
          +
          +
          +

          PORTABILITY

          +       These calls were designed for  ncurses(3x),  and  are  not
          +       found in SVr4 curses, 4.4BSD curses, or any other previous
          +       version of curses.
          +
          +       The feature macro NCURSES_MOUSE_VERSION 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 NCURSES_MOUSE_VERSION will be incre-
          +       mented.
          +
          +       The order of the MEVENT structure members is  not  guaran-
          +       teed.   Additional fields may be added to the structure in
          +       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).
          +
          +       The z member in the event structure is not presently used.
          +       It is intended for use with touch screens  (which  may  be
          +       pressure-sensitive)   or   with   3D-mice/trackballs/power
          +       gloves.
          +
          +
          +
          +

          BUGS

          +       Mouse events under xterm will not in fact be ignored  dur-
          +       ing  cooked mode, if they have been enabled by wmousemask.
          +       Instead, the xterm mouse report sequence  will  appear  in
          +       the string read.
          +
          +       Mouse events under xterm will not be detected correctly in
          +       a window with its keypad bit off, since  they  are  inter-
          +       preted  as  a  variety  of  function  key.   Your terminfo
          +       description must have kmous set to "\E[M"  (the  beginning
          +       of the response from xterm for mouse clicks).
          +
          +       Because  there  are  no  standard  terminal responses that
          +       would serve to identify terminals which support the  xterm
          +       mouse  protocol,  ncurses  assumes  that  if your $DISPLAY
          +       environment variable is set, and kmous is defined  in  the
          +       terminal  description,  then  the  terminal may send mouse
          +       events.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_move.3x.html b/doc/html/man/curs_move.3x.html new file mode 100644 index 00000000..7a73e487 --- /dev/null +++ b/doc/html/man/curs_move.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       move, wmove - move curses window cursor
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int move(int y, int x);
          +       int wmove(WINDOW *win, int y, int x);
          +
          +
          +
          +

          DESCRIPTION

          +       These  routines move the cursor associated with the window
          +       to line y and column x.  This routine does  not  move  the
          +       physical  cursor  of the terminal until refresh is called.
          +       The position specified is relative to the upper  left-hand
          +       corner of the window, which is (0,0).
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return ERR upon failure and OK (SVr4 speci-
          +       fies only "an integer value other than ERR") upon success-
          +       ful completion.
          +
          +
          +
          +

          NOTES

          +       Note that move may be a macro.
          +
          +
          +
          +

          PORTABILITY

          +       These  functions are described in the XSI Curses standard,
          +       Issue 4.  The standard specifies that if (y,x) is within a
          +       multi-column  character,  the cursor is moved to the first
          +       column of that  character;  however,  this  implementation
          +       does  not  yet  support  the extended-level XSI multi-byte
          +       characters.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_refresh(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_outopts.3x.html b/doc/html/man/curs_outopts.3x.html new file mode 100644 index 00000000..a7a0a456 --- /dev/null +++ b/doc/html/man/curs_outopts.3x.html @@ -0,0 +1,188 @@ + + +
          +
          +
          +
          +

          NAME

          +       clearok,   idlok,   idcok   immedok,  leaveok,  setscrreg,
          +       wsetscrreg, scrollok, nl, nonl - curses output options
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int clearok(WINDOW *win, bool bf);
          +       int idlok(WINDOW *win, bool bf);
          +       void idcok(WINDOW *win, bool bf);
          +       void immedok(WINDOW *win, bool bf);
          +       int leaveok(WINDOW *win, bool bf);
          +       int setscrreg(int top, int bot);
          +       int wsetscrreg(WINDOW *win, int top, int bot);
          +       int scrollok(WINDOW *win, bool bf);
          +       int nl(void);
          +       int nonl(void);
          +
          +
          +
          +

          DESCRIPTION

          +       These routines set options that change the style of output
          +       within  curses.   All  options are initially FALSE, unless
          +       otherwise stated.  It  is  not  necessary  to  turn  these
          +       options off before calling endwin.
          +
          +       If  clearok is called with TRUE as argument, the next call
          +       to wrefresh with this window will clear  the  screen  com-
          +       pletely  and  redraw the entire screen from scratch.  This
          +       is useful when the contents of the screen  are  uncertain,
          +       or  in  some  cases for a more pleasing visual effect.  If
          +       the win argument to clearok is the global variable curscr,
          +       the  next  call  to  wrefresh  with  any window causes the
          +       screen to be cleared and repainted from scratch.
          +
          +       If idlok is called with TRUE as  second  argument,  curses
          +       considers using the hardware insert/delete line feature of
          +       terminals so equipped.  Calling idlok with FALSE as second
          +       argument  disables  use  of  line  insertion and deletion.
          +       This option should be  enabled  only  if  the  application
          +       needs  insert/delete  line, for example, for a screen edi-
          +       tor.  It is disabled by default because insert/delete line
          +       tends  to  be  visually annoying when used in applications
          +       where it isn't really needed.  If insert/delete line  can-
          +       not  be  used,  curses redraws the changed portions of all
          +       lines.
          +
          +       If idcok is called with FALSE as second  argument,  curses
          +       no longer considers using the hardware insert/delete char-
          +       acter feature of terminals so equipped.  Use of  character
          +       insert/delete  is  enabled by default.  Calling idcok with
          +       TRUE as second argument re-enables use of character inser-
          +       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-
          +       fresh.  However, it may degrade performance  considerably,
          +       due  to  repeated  calls  to  wrefresh.  It is disabled by
          +       default.
          +
          +       Normally, the hardware cursor is left at the  location  of
          +       the  window  cursor  being  refreshed.  The leaveok option
          +       allows the cursor to be left wherever the  update  happens
          +       to leave it.  It is useful for applications where the cur-
          +       sor is not used, since it  reduces  the  need  for  cursor
          +       motions.   If  possible, the cursor is made invisible when
          +       this option is enabled.
          +
          +       The setscrreg and wsetscrreg routines allow  the  applica-
          +       tion  programmer  to  set a software scrolling region in a
          +       window.  top and bot are the line numbers of the  top  and
          +       bottom margin of the scrolling region.  (Line 0 is the top
          +       line of the window.)  If  this  option  and  scrollok  are
          +       enabled,  an  attempt  to  move off the bottom margin line
          +       causes all lines in the scrolling  region  to  scroll  one
          +       line in the direction of the first line.  Only the text of
          +       the window is scrolled.  (Note that this has nothing to do
          +       with  the use of a physical scrolling region capability in
          +       the terminal, like that in the VT100.  If idlok is enabled
          +       and   the  terminal  has  either  a  scrolling  region  or
          +       insert/delete line capability, they will probably be  used
          +       by the output routines.)
          +
          +       The  scrollok option controls what happens when the cursor
          +       of a window is  moved  off  the  edge  of  the  window  or
          +       scrolling  region,  either as a result of a newline action
          +       on the bottom line, or typing the last  character  of  the
          +       last line.  If disabled, (bf is FALSE), the cursor is left
          +       on the bottom line.  If enabled, (bf is TRUE), the  window
          +       is  scrolled  up  one  line (Note that in order to get the
          +       physical scrolling effect on the terminal, it is also nec-
          +       essary to call idlok).
          +
          +       The  nl  and  nonl routines control whether the underlying
          +       display device translates the return key into  newline  on
          +       input,  and  whether it translates newline into return and
          +       line-feed on output (in either case, the call  addch('\n')
          +       does the equivalent of return and line feed on the virtual
          +       screen).  Initially, these translations do occur.  If  you
          +       disable  them using nonl, curses will be able to make bet-
          +       ter use of the line-feed capability, resulting  in  faster
          +       cursor  motion.   Also, curses will then be able to detect
          +       the return key.
          +
          +
          +
          +

          RETURN VALUE

          +       The functions setscrreg and wsetscrreg return OK upon suc-
          +       cess  and ERR upon failure. All other routines that return
          +       an integer always return OK.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are described in the XSI Curses  standard,
          +       Issue 4.
          +
          +       The  XSI  Curses  standard is ambiguous on the question of
          +       whether raw() should disable the  CRLF  translations  con-
          +       trolled by nl() and nonl().  BSD curses did turn off these
          +       translations; AT&T curses (at least as late as  SVr1)  did
          +       not.   We choose to do so, on the theory that a programmer
          +       requesting raw input wants a clean (ideally  8-bit  clean)
          +       connection that the operating system does not mess with.
          +
          +       Some  historic  curses  implementations had, as an undocu-
          +       mented feature,  the  ability  to  do  the  equivalent  of
          +       clearok(...,  1)  by saying touchwin(stdscr) or clear(std-
          +       scr).  This will not work under ncurses.
          +
          +       Earlier System V  curses  implementations  specified  that
          +       with  scrollok enabled, any window modification triggering
          +       a scroll also forced a physical refresh.  XSI Curses  does
          +       not  require this, and ncurses avoids doing it in order to
          +       perform better vertical-motion  optimization  at  wrefresh
          +       time.
          +
          +       The  XSI  Curses standard does not mention that the cursor
          +       should be made invisible  as  a  side-effect  of  leaveok.
          +       SVr4  curses  documentation  does  this, but the code does
          +       not.  Use curs_set to make the cursor invisible.
          +
          +
          +
          +

          NOTES

          +       Note that clearok, leaveok, scrollok, idcok, nl, nonl  and
          +       setscrreg may be macros.
          +
          +       The immedok routine is useful for windows that are used as
          +       terminal emulators.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),        curs_addch(3x),         curs_clear(3x),
          +       curs_initscr(3x), curs_scroll(3x), curs_refresh(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_overlay.3x.html b/doc/html/man/curs_overlay.3x.html new file mode 100644 index 00000000..d2af67a8 --- /dev/null +++ b/doc/html/man/curs_overlay.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       overlay, overwrite, copywin - overlay and manipulate over-
          +       lapped curses windows
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int overlay(const WINDOW *srcwin, WINDOW *dstwin);
          +       int overwrite(const WINDOW *srcwin, WINDOW *dstwin);
          +       int copywin(WINDOW *srcwin, WINDOW *dstwin, int sminrow,
          +             int smincol, int dminrow, int dmincol, int dmaxrow,
          +             int dmaxcol, int overlay);
          +
          +
          +
          +

          DESCRIPTION

          +       The overlay and overwrite routines overlay srcwin  on  top
          +       of  dstwin.   scrwin and dstwin are not required to be the
          +       same size; only text where  the  two  windows  overlap  is
          +       copied.  The difference is that overlay is non-destructive
          +       (blanks are not copied) whereas overwrite is  destructive.
          +
          +       The  copywin  routine provides a finer granularity of con-
          +       trol over the overlay and overwrite routines.  Like in the
          +       prefresh routine, a rectangle is specified in the destina-
          +       tion window, (dminrow, dmincol)  and  (dmaxrow,  dmaxcol),
          +       and  the  upper-left-corner coordinates of the source win-
          +       dow, (sminrow, smincol).  If the argument overlay is true,
          +       then copying is non-destructive, as in overlay.
          +
          +
          +
          +

          RETURN VALUE

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

          NOTES

          +       Note that overlay and overwrite may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       The XSI Curses standard, Issue 4 describes these functions
          +       (adding the const qualifiers).  It further specifies their
          +       behavior  in  the  presence  of characters with multi-byte
          +       renditions (not yet supported in this implementation).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_pad(3x), curs_refresh(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_pad.3x.html b/doc/html/man/curs_pad.3x.html new file mode 100644 index 00000000..6172c577 --- /dev/null +++ b/doc/html/man/curs_pad.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       newpad, subpad, prefresh, pnoutrefresh, pechochar - create
          +       and display curses pads
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       WINDOW *newpad(int nlines, int ncols);
          +       WINDOW *subpad(WINDOW *orig, int nlines, int ncols,
          +             int begin_y, int begin_x);
          +       int prefresh(WINDOW *pad, int pminrow, int pmincol,
          +             int sminrow, int smincol, int smaxrow, int smaxcol);
          +       int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol,
          +             int sminrow, int smincol, int smaxrow, int smaxcol);
          +       int pechochar(WINDOW *pad, chtype ch);
          +
          +
          +
          +

          DESCRIPTION

          +       The newpad routine creates and returns a pointer to a  new
          +       pad data structure with the given number of lines, nlines,
          +       and columns, ncols.  A pad is like a window,  except  that
          +       it is not restricted by the screen size, and is not neces-
          +       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-
          +       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
          +       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.
          +
          +       The subpad routine creates and returns a pointer to a sub-
          +       window within a  pad  with  the  given  number  of  lines,
          +       nlines,  and  columns,  ncols.   Unlike subwin, which uses
          +       screen coordinates, the window is  at  position  (begin_x,
          +       begin_y)  on the pad.  The window is made in the middle of
          +       the window orig, so that changes made to one window affect
          +       both  windows.   During  the  use of this routine, it will
          +       often be necessary to call touchwin or touchline  on  orig
          +       before calling prefresh.
          +
          +       The  prefresh  and  pnoutrefresh routines are analogous to
          +       wrefresh and wnoutrefresh 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.
          +       pminrow  and pmincol specify the upper left-hand corner of
          +       the rectangle to be displayed in the pad.  sminrow,  smin-
          +       col, smaxrow, and smaxcol specify the edges of the rectan-
          +       gle to be displayed on the screen.  The  lower  right-hand
          +       corner of the rectangle to be displayed in the pad is cal-
          +       culated 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  pminrow,  pmincol,  sminrow,  or  smincol  are
          +       treated as if they were zero.
          +
          +       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
          +       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
          +       instead  of  their equivalents.  In the case of pechochar,
          +       the last location of the pad on the screen is  reused  for
          +       the arguments to prefresh.
          +
          +
          +
          +

          RETURN VALUE

          +       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
          +       set errno to ENOMEM.
          +
          +
          +
          +

          NOTES

          +       Note that pechochar may be a macro.
          +
          +
          +
          +

          PORTABILITY

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

          SEE ALSO

          +       curses(3x),        curs_refresh(3x),       curs_touch(3x),
          +       curs_addch(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/curs_print.3x.html b/doc/html/man/curs_print.3x.html similarity index 54% rename from Ada95/html/man/curs_print.3x.html rename to doc/html/man/curs_print.3x.html index e3dc345a..1319ba6d 100644 --- a/Ada95/html/man/curs_print.3x.html +++ b/doc/html/man/curs_print.3x.html @@ -1,23 +1,27 @@
          -       mcprint - ship binary data to printer
          +
          +
          +
          +

          NAME

          +       mcprint - ship binary data to printer
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <curses.h>
           
          -       int mcprint(char *data, int len);
          +       int mcprint(char *data, int len);
           
           
           

          DESCRIPTION

          -       This  function  uses the mc5p or mc4 and mc5 capabilities,
          +       This  function  uses the mc5p or mc4 and mc5 capabilities,
                  if they are present, to  ship  given  data  to  a  printer
                  attached to the terminal.
           
          -       Note  that  the mcprint code has no way to do flow control
          +       Note  that  the mcprint code has no way to do flow control
                  with the printer or to know how  much  buffering  it  has.
                  Your  application  is  responsible for keeping the rate of
                  writes to the printer below its continuous throughput rate
          @@ -30,9 +34,9 @@
           
           

          RETURN VALUE

          -       The  mcprint  function  returns ERR if the write operation
          +       The  mcprint  function  returns ERR if the write operation
                  aborted for some reason.  In this case, errno will contain
          -       either  an  error  associated  with write(2) or one of the
          +       either  an  error  associated  with write(2) or one of the
                  following:
           
                  ENODEV
          @@ -42,29 +46,35 @@
                       Couldn't allocate sufficient  memory  to  buffer  the
                       printer write.
           
          -            When mcprint succeeds, it returns the number of char-
          +            When mcprint succeeds, it returns the number of char-
                       acters actually sent to the printer.
           
           
           

          PORTABILITY

          -       The mcprint call was designed for ncurses(3X), and is  not
          +       The mcprint call was designed for ncurses(3x), and is  not
                  found in SVr4 curses, 4.4BSD curses, or any other previous
                  version of curses.
           
           
           

          BUGS

          -       Padding in the mc5p, mc4 and mc5 capabilities will not  be
          +       Padding in the mc5p, mc4 and mc5 capabilities will not  be
                  interpreted.
           
           
           

          SEE ALSO

          -       curses(3X)
          +       curses(3x)
          +
           
           
           
           
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/curs_printw.3x.html b/doc/html/man/curs_printw.3x.html new file mode 100644 index 00000000..95424b3a --- /dev/null +++ b/doc/html/man/curs_printw.3x.html @@ -0,0 +1,78 @@ + + +
          +
          +
          +
          +

          NAME

          +       printw,  wprintw, mvprintw, mvwprintw, vwprintw, vw_printw
          +       - print formatted output in curses windows
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int printw(char *fmt [, arg] ...);
          +       int wprintw(WINDOW *win, char *fmt [, arg] ...);
          +       int mvprintw(int y, int x, char *fmt [, arg] ...);
          +       int mvwprintw(WINDOW *win, int y, int x,
          +             char *fmt [, arg] ...);
          +
          +       #include <varargs.h>
          +       int vwprintw(WINDOW *win, char *fmt, varglist);
          +       int vw_printw(WINDOW *win, char *fmt, varglist);
          +
          +
          +
          +

          DESCRIPTION

          +       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   routine  is  analogous  to  vprintf  [see
          +       printf(3S)] and performs a wprintw using a variable  argu-
          +       ment  list.  The third argument is a va_list, a pointer to
          +       a list of arguments, as defined in <varargs.h>.
          +
          +
          +
          +

          RETURN VALUE

          +       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
          +       <stdarg.h> interface.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), printf(3S), vprintf(3S)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_refresh.3x.html b/doc/html/man/curs_refresh.3x.html new file mode 100644 index 00000000..a0c616c8 --- /dev/null +++ b/doc/html/man/curs_refresh.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       refresh, wrefresh, wnoutrefresh, doupdate, redrawwin, wre-
          +       drawln - refresh curses windows and lines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int refresh(void);
          +       int wrefresh(WINDOW *win);
          +       int wnoutrefresh(WINDOW *win);
          +       int doupdate(void);
          +       int redrawwin(WINDOW *win);
          +       int wredrawln(WINDOW *win, int beg_line, int num_lines);
          +
          +
          +
          +

          DESCRIPTION

          +       The refresh and wrefresh  routines  (or  wnoutrefresh  and
          +       doupdate)  must be called to get actual output to the ter-
          +       minal, as other routines  merely  manipulate  data  struc-
          +       tures.   The  routine  wrefresh copies the named window to
          +       the physical terminal screen, taking into account what  is
          +       already  there  in order to do optimizations.  The refresh
          +       routine is the same, using stdscr as the  default  window.
          +       Unless  leaveok  has  been enabled, the physical cursor of
          +       the terminal is left at the location  of  the  cursor  for
          +       that window.
          +
          +       The  wnoutrefresh  and  doupdate  routines  allow multiple
          +       updates with more  efficiency  than  wrefresh  alone.   In
          +       addition  to  all  the window structures, curses keeps two
          +       data structures representing the terminal screen: a physi-
          +       cal screen, describing what is actually on the screen, and
          +       a virtual screen, describing what the programmer wants  to
          +       have on the screen.
          +
          +       The  routine wrefresh works by first calling wnoutrefresh,
          +       which copies the named window to the virtual  screen,  and
          +       then  calling  doupdate, which compares the virtual screen
          +       to the physical screen and does the actual update.  If the
          +       programmer  wishes  to  output  several windows at once, a
          +       series of calls to wrefresh results in  alternating  calls
          +       to  wnoutrefresh  and  doupdate, causing several bursts of
          +       output to the screen.  By first calling  wnoutrefresh  for
          +       each  window,  it  is then possible to call doupdate once,
          +       resulting in only one burst of output,  with  fewer  total
          +       characters transmitted and less CPU time used.  If the win
          +       argument to wrefresh is the global  variable  curscr,  the
          +       screen  is immediately cleared and repainted from scratch.
          +
          +       The phrase "copies the named window to the virtual screen"
          +       above  is  ambiguous.   What  actually happens is that all
          +       touched (changed) lines in the window are  copied  to  the
          +       virtual  screen.   This affects programs that use overlap-
          +       ping windows; it means that if two  windows  overlap,  you
          +       can  refresh  them  in either order and the overlap region
          +       will be modified only when it is explicitly changed.  (But
          +       see  the  section on PORTABILITY below for a warning about
          +       exploiting this behavior.)
          +
          +       The wredrawln routine indicates to curses that some screen
          +       lines  are corrupted and should be thrown away before any-
          +       thing is written over  them.   It  touches  the  indicated
          +       lines  (marking  them  changed).   The routine redrawwin()
          +       touches the entire window.
          +
          +
          +
          +

          RETURN VALUE

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

          NOTES

          +       Note that refresh and redrawwin may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       The XSI Curses standard, Issue  4  describes  these  func-
          +       tions.
          +
          +       Whether  wnoutrefresh()  copies  to the virtual screen the
          +       entire contents of a window or just its  changed  portions
          +       has never been well-documented in historic curses versions
          +       (including SVr4).  It might be unwise to  rely  on  either
          +       behavior  in  programs  that  might have to be linked with
          +       other curses implementations.   Instead,  you  can  do  an
          +       explicit  touchwin()  before  the  wnoutrefresh()  call to
          +       guarantee an entire-contents copy anywhere.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_outopts(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_scanw.3x.html b/doc/html/man/curs_scanw.3x.html new file mode 100644 index 00000000..8ac48ad1 --- /dev/null +++ b/doc/html/man/curs_scanw.3x.html @@ -0,0 +1,78 @@ + + +
          +
          +
          +
          +

          NAME

          +       scanw, wscanw, mvscanw, mvwscanw, vwscanw, vw_scanw - con-
          +       vert formatted input from a curses widow
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int scanw(char *fmt [, arg] ...);
          +       int wscanw(WINDOW *win, char *fmt [, arg] ...);
          +       int mvscanw(int y, int x, char *fmt [, arg] ...);
          +       int mvwscanw(WINDOW *win, int y, int x,
          +             char *fmt [, arg] ...);
          +       int vw_scanw(WINDOW *win, char *fmt, va_list varglist);
          +       int vwscanw(WINDOW *win, char *fmt, va_list varglist);
          +
          +
          +
          +

          DESCRIPTION

          +       The scanw, wscanw and mvscanw routines  are  analogous  to
          +       scanf [see scanf(3S)].  The effect of these routines is as
          +       though wgetstr were called on the window, and the  result-
          +       ing line used as input for sscanf(3).  Fields which do not
          +       map to a variable in the fmt field are lost.
          +
          +       The vwscanw routine is similar to vwprintw in that it per-
          +       forms  a wscanw using a variable argument list.  The third
          +       argument is a va_list, a pointer to a list  of  arguments,
          +       as defined in <varargs.h>.
          +
          +
          +
          +

          RETURN VALUE

          +       vwscanw returns ERR on failure and an integer equal to the
          +       number of fields scanned on success.
          +
          +       Applications may use the  return  value  from  the  scanw,
          +       wscanw,  mvscanw  and  mvwscanw  routines to determine the
          +       number of fields which were mapped in the call.
          +
          +
          +
          +

          PORTABILITY

          +       The XSI Curses standard, Issue  4  describes  these  func-
          +       tions.   The  function  vwscanw is marked TO BE WITHDRAWN,
          +       and is to be replaced by a  function  vw_scanw  using  the
          +       <stdarg.h> interface.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_getstr(3x), curs_printw(3x), scanf(3S)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_scr_dump.3x.html b/doc/html/man/curs_scr_dump.3x.html new file mode 100644 index 00000000..7931102d --- /dev/null +++ b/doc/html/man/curs_scr_dump.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       scr_dump,  scr_restore, scr_init, scr_set - read (write) a
          +       curses screen from (to) a file
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int scr_dump(const char *filename);
          +       int scr_restore(const char *filename);
          +       int scr_init(const char *filename);
          +       int scr_set(const char *filename);
          +
          +
          +
          +

          DESCRIPTION

          +       The scr_dump routine dumps the  current  contents  of  the
          +       virtual screen to the file filename.
          +
          +       The  scr_restore  routine  sets  the virtual screen to the
          +       contents of filename, which must have been  written  using
          +       scr_dump.   The  next call to doupdate restores the screen
          +       to the way it looked in the dump file.
          +
          +       The scr_init routine reads in the contents of filename and
          +       uses  them  to initialize the curses data structures about
          +       what the terminal currently has on  its  screen.   If  the
          +       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
          +       filename is what is currently on the screen, and also what
          +       the program wants on the screen.  This can be  thought  of
          +       as a screen inheritance function.
          +
          +       To  read (write) a window from (to) a file, use the getwin
          +       and putwin routines [see curs_util(3x)].
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon  failure  and  OK
          +       upon success.
          +
          +
          +
          +

          NOTES

          +       Note  that  scr_init,  scr_set,  and  scr_restore  may  be
          +       macros.
          +
          +
          +
          +

          PORTABILITY

          +       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 old" but don't define "old".
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),       curs_initscr(3x),      curs_refresh(3x),
          +       curs_util(3x), system(3S)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_scroll.3x.html b/doc/html/man/curs_scroll.3x.html new file mode 100644 index 00000000..fb2abac9 --- /dev/null +++ b/doc/html/man/curs_scroll.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       scroll, scrl, wscrl - scroll a curses window
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int scroll(WINDOW *win);
          +       int scrl(int n);
          +       int wscrl(WINDOW *win, int n);
          +
          +
          +
          +

          DESCRIPTION

          +       The  scroll  routine scrolls the window up one line.  This
          +       involves moving the lines in the  window  data  structure.
          +       As  an optimization, if the scrolling region of the window
          +       is the entire screen, the physical screen may be  scrolled
          +       at the same time.
          +
          +       For  positive  n,  the  scrl and wscrl routines scroll the
          +       window up n lines (line i+n becomes i);  otherwise  scroll
          +       the  window  down n lines.  This involves moving the lines
          +       in the window character image structure.  The current cur-
          +       sor position is not changed.
          +
          +       For these functions to work, scrolling must be enabled via
          +       scrollok.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return ERR upon failure, and OK (SVr4  only
          +       specifies "an integer value other than ERR") upon success-
          +       ful completion.
          +
          +
          +
          +

          NOTES

          +       Note that scrl and scroll may be macros.
          +
          +       The SVr4 documentation says that the optimization of phys-
          +       ically  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, in order to leave open the possibility of
          +       smarter  optimization  of  multiple  scroll actions on the
          +       next update.
          +
          +       Neither the SVr4 nor the XSI documentation specify whether
          +       the current attribute or current color-pair of blanks gen-
          +       erated by the  scroll  function  is  zeroed.   Under  this
          +       implementation it is.
          +
          +
          +
          +

          PORTABILITY

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

          SEE ALSO

          +       curses(3x), curs_outopts(3x)
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_slk.3x.html b/doc/html/man/curs_slk.3x.html new file mode 100644 index 00000000..cf77d62d --- /dev/null +++ b/doc/html/man/curs_slk.3x.html @@ -0,0 +1,188 @@ + + +
          +
          +
          +
          +

          NAME

          +       slk_init,     slk_set,    slk_refresh,    slk_noutrefresh,
          +       slk_label, slk_clear, slk_restore, slk_touch,  slk_attron,
          +       slk_attrset,   slk_attroff,   slk_attr_on,   slk_attr_set,
          +       slk_attr_off, slk_attr slk_color - curses soft label  rou-
          +       tines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int slk_init(int fmt);
          +       int slk_set(int labnum, const char *label, int fmt);
          +       int slk_refresh(void);
          +       int slk_noutrefresh(void);
          +       char *slk_label(int labnum);
          +       int slk_clear(void);
          +       int slk_restore(void);
          +       int slk_touch(void);
          +       int slk_attron(const chtype attrs);
          +       int slk_attroff(const chtype attrs);
          +       int slk_attrset(const chtype attrs);
          +       int slk_attr_on(attr_t attrs, void* opts);
          +       int slk_attr_off(const attr_t attrs, void * opts);
          +       int slk_attr_set(const attr_t attrs,
          +            short color_pair_number, void* opts);
          +       attr_t slk_attr(void);
          +       int slk_color(short color_pair_number);
          +
          +
          +
          +

          DESCRIPTION

          +       The slk* functions manipulate the set of soft function-key
          +       labels that exist on many terminals.  For those  terminals
          +       that do not have soft labels, curses takes over the bottom
          +       line of stdscr, reducing the size of stdscr and the  vari-
          +       able  LINES.  curses standardizes on eight labels of up to
          +       eight characters each. In addition to  this,  the  ncurses
          +       implementation  supports  a  mode  where  it  simulates 12
          +       labels of up to five characters each. This is most  common
          +       for  todays  PC  like  enduser  devices.  Please note that
          +       ncurses simulates this mode by taking over up to two lines
          +       at  the  bottom  of  the screen, it doesn't try to use any
          +       hardware support for this mode.
          +
          +       The slk_init routine must  be  called  before  initscr  or
          +       newterm is called.  If initscr eventually uses a line from
          +       stdscr to emulate the soft labels, then fmt determines how
          +       the  labels  are arranged on the screen.  Setting fmt to 0
          +       indicates a 3-2-3 arrangement of the labels, 1 indicates a
          +       4-4 arrangement and 2 indicates the PC like 4-4-4 mode. If
          +       fmt is set to 3, it is again the PC like 4-4-4  mode,  but
          +       in  addition  an index line is generated, helping the user
          +       to identify the key numbers easily.
          +
          +       The slk_set routine requires labnum to be a label  number,
          +       from 1 to 8 (resp. 12); label 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. fmt is either 0, 1, or 2,  indicating  whether  the
          +       label  is  to be left-justified, centered, or right-justi-
          +       fied, respectively, within the label.
          +
          +       The slk_refresh and slk_noutrefresh routines correspond to
          +       the wrefresh and wnoutrefresh routines.
          +
          +       The  slk_label routine returns the current label for label
          +       number labnum, with leading and trailing blanks  stripped.
          +
          +       The  slk_clear  routine  clears  the  soft labels from the
          +       screen.
          +
          +       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
          +       output the next time a slk_noutrefresh is performed.
          +
          +       The slk_attron, slk_attrset, slk_attroff and slk_attr rou-
          +       tines correspond to attron, attrset, attroff and attr_get.
          +       They have an effect only if soft labels are  simulated  on
          +       the  bottom line of the screen.  The default highlight for
          +       soft keys is A_STANDOUT (as in System V curses, which does
          +       not document this fact).
          +
          +       The  slk_color routine corresponds to color_set. It has an
          +       effect only if soft labels are  simulated  on  the  bottom
          +       line of the screen.
          +
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return ERR upon failure and OK (SVr4 speci-
          +       fies only "an integer value other than ERR") upon success-
          +       ful  completion.  slk_attr  returns the attribute used for
          +       the soft keys.
          +
          +       slk_label returns NULL on error.
          +
          +
          +
          +

          NOTES

          +       Most applications would use slk_noutrefresh because a wre-
          +       fresh is likely to follow soon.
          +
          +
          +
          +

          PORTABILITY

          +       The  XSI  Curses  standard, Issue 4, describes these func-
          +       tions.  It changes the argument  type  of  the  attribute-
          +       manipulation     functions     slk_attron,    slk_attroff,
          +       slk_attrset to be attr_t, and adds const  qualifiers.  The
          +       format  codes  2  and  3  for  slk_init() and the function
          +       slk_attr are specific to ncurses.
          +
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x),        curs_attr(3x),        curs_initscr(3x),
          +       curs_refresh(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_termattrs.3x.html b/doc/html/man/curs_termattrs.3x.html new file mode 100644 index 00000000..21191777 --- /dev/null +++ b/doc/html/man/curs_termattrs.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       baudrate,  erasechar,  has_ic, has_il, killchar, longname,
          +       termattrs, termname - curses environment query routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int baudrate(void);
          +       char erasechar(void);
          +       bool has_ic(void);
          +       bool has_il(void);
          +       char killchar(void);
          +       char *longname(void);
          +       attr_t termattrs(void);
          +       char *termname(void);
          +
          +
          +
          +

          DESCRIPTION

          +       The baudrate routine returns the output speed of the  ter-
          +       minal.   The  number  returned  is in bits per second, for
          +       example 9600, and is an integer.
          +
          +       The erasechar routine returns  the  user's  current  erase
          +       character.
          +
          +       The has_ic routine is true if the terminal has insert- and
          +       delete- character capabilities.
          +
          +       The has_il 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
          +       scrollok.
          +
          +       The killchar routine returns the user's current line  kill
          +       character.
          +
          +       The  longname  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 charac-
          +       ters.  It is defined only after the  call  to  initscr  or
          +       newterm.   The area is overwritten by each call to newterm
          +       and is not restored by set_term, so the  value  should  be
          +       saved  between calls to newterm if longname is going to be
          +       used with multiple terminals.
          +
          +       If a given terminal doesn't support a video attribute that
          +       an  application  program is trying to use, curses may sub-
          +       stitute a different video attribute for it.  The termattrs
          +       function returns a logical OR of all video attributes sup-
          +       ported by the terminal.  This information is useful when a
          +       curses  program needs complete control over the appearance
          +       of the screen.
          +
          +       The  termname   routine   returns   the   value   of   the
          +       environmental  variable TERM (truncated to 14 characters).
          +
          +
          +
          +

          RETURN VALUE

          +       longname and termname return NULL on error.
          +
          +       Routines that return an integer return  ERR  upon  failure
          +       and  OK  (SVr4 only specifies "an integer value other than
          +       ERR") upon successful completion.
          +
          +
          +
          +

          NOTES

          +       Note that termattrs may be a macro.
          +
          +
          +
          +

          PORTABILITY

          +       The XSI Curses standard, Issue  4  describes  these  func-
          +       tions.  It changes the return type of termattrs to the new
          +       type attr_t.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_initscr(3x), curs_outopts(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_termcap.3x.html b/doc/html/man/curs_termcap.3x.html new file mode 100644 index 00000000..a301dd18 --- /dev/null +++ b/doc/html/man/curs_termcap.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs - direct
          +       curses interface to the terminfo capability database
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       #include <term.h>
          +       int tgetent(const char *bp, char *name);
          +       int tgetflag(const char *id);
          +       int tgetnum(const char *id);
          +       char *tgetstr(const char *id, char **area);
          +       char *tgoto(const char *cap, int col, int row);
          +       int tputs(const char *str, int affcnt, int (*putc)(int));
          +
          +
          +
          +

          DESCRIPTION

          +       These routines are included as a conversion aid  for  pro-
          +       grams  that use the termcap library.  Their parameters are
          +       the same and the routines are emulated using the  terminfo
          +       database.   Thus, they can only be used to query the capa-
          +       bilities of entries for which a terminfo  entry  has  been
          +       compiled.
          +
          +       The  tgetent routine loads the entry for name.  It returns
          +       1 on success, 0 if there is no such entry, and -1  if  the
          +       terminfo  database  could  not  be  found.   The emulation
          +       ignores the buffer pointer bp.
          +
          +       The tgetflag routine gets the boolean  entry  for  id,  or
          +       zero if it is not available.
          +
          +       The  tgetnum  routine gets the numeric entry for id, or -1
          +       if it is not available.
          +
          +       The tgetstr routine returns the string entry  for  id,  or
          +       zero  if  it  is  not  available.  Use tputs to output the
          +       returned string.  The return value will also be copied  to
          +       the  buffer pointed to by area, and the area value will be
          +       updated to point past the null ending this value.
          +
          +       The tgoto routine instantiates  the  parameters  into  the
          +       given  capability.   The output from this routine is to be
          +       passed to tputs.
          +
          +       The tputs routine is described  on  the  curs_terminfo(3x)
          +       manual page.  It can retrieve capabilities by either term-
          +       cap or terminfo name.
          +
          +
          +
          +
          +

          RETURN VALUE

          +       Except where explicitly noted,  routines  that  return  an
          +       integer  return  ERR upon failure and OK (SVr4 only speci-
          +       fies "an integer value other than  ERR")  upon  successful
          +       completion.
          +
          +       Routines that return pointers return NULL on error.
          +
          +
          +
          +

          BUGS

          +       If you call tgetstr to fetch ca or any other parameterized
          +       string, be aware that it  will  be  returned  in  terminfo
          +       notation,  not  the older and not-quite-compatible termcap
          +       notation.  This won't cause problems if all you do with it
          +       is  call tgoto or tparm, which both expand terminfo-style.
          +
          +       Because terminfo conventions for representing  padding  in
          +       string  capabilities  differ  from termcap's, tputs("50");
          +       will put out a literal "50" rather than  busy-waiting  for
          +       50 milliseconds.  Cope with it.
          +
          +
          +
          +

          PORTABILITY

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

          SEE ALSO

          +       curses(3x), terminfo(5), putc(3S).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_terminfo.3x.html b/doc/html/man/curs_terminfo.3x.html new file mode 100644 index 00000000..8a53cbca --- /dev/null +++ b/doc/html/man/curs_terminfo.3x.html @@ -0,0 +1,296 @@ + + +
          +
          +
          +
          +

          NAME

          +       setupterm, setterm, set_curterm, del_curterm, restartterm,
          +       tparm, tputs, putp, vidputs,  vidattr,  mvcur,  tigetflag,
          +       tigetnum,   tigetstr   -  curses  interfaces  to  terminfo
          +       database
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       #include <term.h>
          +
          +       int setupterm(const char *term, int fildes, int *errret);
          +       int setterm(const char *term);
          +       TERMINAL *set_curterm(TERMINAL *nterm);
          +       int del_curterm(TERMINAL *oterm);
          +       int  restartterm(const  char  *term,   int   fildes,   int
          +       *errret);
          +       char *tparm(const char *str, ...);
          +       int tputs(const char *str, int affcnt, int (*putc)(int));
          +       int putp(const char *str);
          +       int vidputs(chtype attrs, int (*putc)(char));
          +       int vidattr(chtype attrs);
          +       int mvcur(int oldrow, int oldcol, int newrow, int newcol);
          +       int tigetflag(const char *capname);
          +       int tigetnum(const char *capname);
          +       char *tigetstr(const char *capname);
          +
          +
          +
          +

          DESCRIPTION

          +       These low-level routines must be called by  programs  that
          +       have to deal directly with the terminfo database to handle
          +       certain terminal capabilities, such as  programming  func-
          +       tion  keys.   For all other functionality, curses routines
          +       are more suitable and their use is recommended.
          +
          +       Initially,  setupterm  should  be   called.    Note   that
          +       setupterm  is automatically called by initscr and newterm.
          +       This  defines  the  set  of  terminal-dependent  variables
          +       [listed in terminfo(5)].  The terminfo variables lines and
          +       columns  are  initialized  by  setupterm  as  follows:  If
          +       use_env(FALSE)  has  been  called,  values  for  lines and
          +       columns specified in terminfo are used.  Otherwise, if the
          +       environment  variables LINES and COLUMNS exist, their val-
          +       ues are used.  If these environment variables do not exist
          +       and the program is running in a window, the current window
          +       size is used.  Otherwise, if the environment variables  do
          +       not  exist,  the values for lines and columns specified in
          +       the terminfo database are used.
          +
          +       The header files curses.h and term.h  should  be  included
          +       (in  this order) to get the definitions for these strings,
          +       numbers,  and  flags.   Parameterized  strings  should  be
          +       passed  through  tparm  to instantiate them.  All terminfo
          +       strings [including the output of tparm] should be  printed
          +       with  tputs or putp.  Call the reset_shell_mode to restore
          +       the  tty  modes  before  exiting  [see   curs_kernel(3x)].
          +       Programs   which   use  cursor  addressing  should  output
          +       enter_ca_mode upon startup and should output  exit_ca_mode
          +       before  exiting.   Programs  desiring shell escapes should
          +       call
          +
          +       reset_shell_mode and output exit_ca_mode before the  shell
          +       is   called  and  should  output  enter_ca_mode  and  call
          +       reset_prog_mode after returning from the shell.
          +
          +       The setupterm routine reads in the terminfo database, ini-
          +       tializing the terminfo structures, but does not set up the
          +       output virtualization structures used by curses.  The ter-
          +       minal  type is the character string term; if term is null,
          +       the environment variable TERM is used.  All output  is  to
          +       file  descriptor  fildes  which is initialized for output.
          +       If errret is not null, then setupterm returns  OK  or  ERR
          +       and  stores  a  status  value in the integer pointed to by
          +       errret.  A return value of OK combined with status of 1 in
          +       errret is normal.  If ERR is returned, examine errret:
          +
          +              1    means that the terminal is hardcopy, cannot be
          +                   used for curses applications.
          +
          +              0    means that the terminal could not be found, or
          +                   that  it  is a generic type, having too little
          +                   information for curses applications to run.
          +
          +              -1   means that the terminfo database could not  be
          +                   found.
          +
          +       If  errret is null, setupterm prints an error message upon
          +       finding an error and exits.  Thus, the simplest call is:
          +
          +             setupterm((char *)0, 1, (int *)0);,
          +
          +       which uses all the defaults and sends the output  to  std-
          +       out.
          +
          +       The  setterm  routine is being replaced by setupterm.  The
          +       call:
          +
          +             setupterm(term, 1, (int *)0)
          +
          +       provides the same  functionality  as  setterm(term).   The
          +       setterm  routine  is  included here for BSD compatibility,
          +       and is not recommended for new programs.
          +
          +       The set_curterm routine  sets  the  variable  cur_term  to
          +       nterm, and makes all of the terminfo boolean, numeric, and
          +       string variables use the values from  nterm.   It  returns
          +       the old value of cur_term.
          +
          +       The  del_curterm  routine  frees  the  space pointed to by
          +       oterm and makes it available for further use.  If oterm is
          +       the  same  as  cur_term, references to any of the terminfo
          +       boolean, numeric,  and  string  variables  thereafter  may
          +       refer  to invalid memory locations until another setupterm
          +       has been called.
          +
          +       The  restartterm  routine  is  similar  to  setupterm  and
          +       initscr,  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 mem-
          +       ory  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.
          +
          +       The tparm routine instantiates the string str with parame-
          +       ters pi.  A pointer is returned to the result of str  with
          +       the parameters applied.
          +
          +       The  tputs  routine  applies  padding  information  to the
          +       string str and outputs it.  The str  must  be  a  terminfo
          +       string  variable  or the return value from tparm, tgetstr,
          +       or tgoto.  affcnt is the number of lines affected, or 1 if
          +       not  applicable.   putc is a putchar-like routine to which
          +       the characters are passed, one at a time.
          +
          +       The putp routine calls tputs(str, 1, putchar).  Note  that
          +       the  output  of  putp  always  goes  to stdout, not to the
          +       fildes specified in setupterm.
          +
          +       The vidputs routine displays the string on the terminal in
          +       the  video  attribute mode attrs, which is any combination
          +       of the attributes listed in  curses(3x).   The  characters
          +       are passed to the putchar-like routine putc.
          +
          +       The  vidattr  routine  is like the vidputs routine, except
          +       that it outputs through putchar.
          +
          +       The mvcur routine provides low-level  cursor  motion.   It
          +       takes   effect   immediately  (rather  than  at  the  next
          +       refresh).
          +
          +       The tigetflag, tigetnum and tigetstr routines  return  the
          +       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
          +       from the terminal description.
          +
          +       The tigetnum routine returns the value -2  if  capname  is
          +       not  a  numeric  capability,  or  -1  if it is canceled or
          +       absent from the terminal description.
          +
          +       The tigetstr routine  returns  the  value  (char  *)-1  if
          +       capname is not a string capability, or 0 if it is canceled
          +       or absent from the terminal description.
          +
          +       The capname for each capability is given in the table col-
          +       umn  entitled  capname code in the capabilities section of
          +       terminfo(5).
          +
          +       char *boolnames, *boolcodes, *boolfnames
          +
          +       char *numnames, *numcodes, *numfnames
          +
          +       char *strnames, *strcodes, *strfnames
          +
          +       These null-terminated arrays  contain  the  capnames,  the
          +       termcap  codes, and the full C names, for each of the ter-
          +       minfo variables.
          +
          +
          +
          +

          RETURN VALUE

          +       Routines that return an integer return  ERR  upon  failure
          +       and  OK  (SVr4 only specifies "an integer value other than
          +       ERR") upon successful completion, unless  otherwise  noted
          +       in the preceding routine descriptions.
          +
          +       Routines that return pointers always return NULL on error.
          +
          +
          +
          +

          NOTES

          +       The setupterm routine should be used in place of  setterm.
          +       It  may be useful when you want to test for terminal capa-
          +       bilities without committing to the allocation  of  storage
          +       involved in initscr.
          +
          +       Note that vidattr and vidputs may be macros.
          +
          +
          +
          +

          PORTABILITY

          +       The  function  setterm  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.
          +
          +       In  System V Release 4, set_curterm has an int return type
          +       and returns OK or ERR.  We have chosen  to  implement  the
          +       XSI Curses semantics.
          +
          +       In System V Release 4, the third argument of tputs has the
          +       type int (*putc)(char).
          +
          +       The XSI Curses standard prototypes tparm with a fixed num-
          +       ber of parameters, rather than a variable argument list.
          +
          +       XSI  notes  that after calling mvcur, the curses state may
          +       not match the actual terminal state, and that an  applica-
          +       tion  should  touch and refresh the window before resuming
          +       normal curses calls.  Both ncurses and System V Release  4
          +       curses  implement mvcur using the SCREEN data allocated in
          +       either initscr or newterm.  So though it is documented  as
          +       a  terminfo  function,  mvcur  is really a curses function
          +       which is not well specified.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_initscr(3x), curs_kernel(3x),  curs_term-
          +       cap(3x), putc(3S), terminfo(5)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_touch.3x.html b/doc/html/man/curs_touch.3x.html new file mode 100644 index 00000000..198fc852 --- /dev/null +++ b/doc/html/man/curs_touch.3x.html @@ -0,0 +1,135 @@ + + +
          +
          +
          +
          +

          NAME

          +       touchwin, touchline, untouchwin, wtouchln, is_linetouched,
          +       is_wintouched - curses refresh control routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       int touchwin(WINDOW *win);
          +       int touchline(WINDOW *win, int start, int count);
          +       int untouchwin(WINDOW *win);
          +       int wtouchln(WINDOW *win, int y, int n, int changed);
          +       bool is_linetouched(WINDOW *win, int line);
          +       bool is_wintouched(WINDOW *win);
          +
          +
          +
          +

          DESCRIPTION

          +       The touchwin and touchline routines throw away  all  opti-
          +       mization  information about which parts of the window have
          +       been touched, by pretending that  the  entire  window  has
          +       been  drawn  on.   This  is sometimes necessary when using
          +       overlapping windows, since a change to one window  affects
          +       the other window, but the records of which lines have been
          +       changed in the other window do  not  reflect  the  change.
          +       The  routine touchline only pretends that count lines have
          +       been changed, beginning with line start.
          +
          +       The untouchwin routine marks all lines in  the  window  as
          +       unchanged since the last call to wrefresh.
          +
          +       The wtouchln routine makes n lines in the window, starting
          +       at line y, look as if they have (changed=1)  or  have  not
          +       (changed=0)  been changed since the last call to wrefresh.
          +
          +       The is_linetouched and is_wintouched routines return  TRUE
          +       if  the  specified line/window was modified since the last
          +       call to wrefresh; otherwise they return FALSE.   In  addi-
          +       tion,  is_linetouched returns ERR if line is not valid for
          +       the given window.
          +
          +
          +
          +

          RETURN VALUE

          +       All routines return the integer ERR upon  failure  and  an
          +       integer  value  other than ERR upon successful completion,
          +       unless otherwise noted in the preceding  routine  descrip-
          +       tions.
          +
          +
          +
          +

          PORTABILITY

          +       The  XSI  Curses  standard,  Issue 4 describes these func-
          +       tions.
          +
          +       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(std-
          +       scr).  This will not work under ncurses.
          +
          +
          +
          +

          NOTES

          +       Note that all routines except wtouchln may be macros.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_refresh(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_trace.3x.html b/doc/html/man/curs_trace.3x.html new file mode 100644 index 00000000..82804268 --- /dev/null +++ b/doc/html/man/curs_trace.3x.html @@ -0,0 +1,132 @@ + + +
          +
          +
          +
          +

          NAME

          +       _tracef,      _tracedump,     _traceattr,     _traceattr2,
          +       _nc_tracebits,  _tracechar,  _tracechtype,  _tracechtype2,
          +       _tracemouse, trace - curses debugging routines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +       void _tracef(const char *format, ...);
          +       void _tracedump(const char *label, WINDOW *win);
          +       char *_traceattr(attr_t attr);
          +       char *_traceattr2(int buffer, chtype ch);
          +       char *_nc_tracebits(void);
          +       char *_tracechar(const unsigned char ch);
          +       char *_tracechtype(chtype ch);
          +       char *_tracechtype2(int buffer, chtype ch);
          +       char *_tracemouse(const MEVENT *event);
          +       void trace(const unsigned int param);
          +
          +
          +
          +

          DESCRIPTION

          +       The  trace  routines  are  used  for debugging the ncurses
          +       libraries, as well as applications which use  the  ncurses
          +       libraries.   These  functions  are normally available only
          +       with the debugging library libncurses_g.a, but may be com-
          +       piled into any model (shared, static, profile) by defining
          +       the symbol TRACE.
          +
          +       The principal parts of this interface are the  trace  rou-
          +       tine which selectively enables different tracing features,
          +       and the _tracef routine which writes formatted data to the
          +       trace file.
          +
          +       Calling  trace  with  a  nonzero  parameter opens the file
          +       trace in the current directory for output.  The  parameter
          +       is formed by OR'ing values from the list of TRACE_xxx def-
          +       initions in <curses.h>.  These include:
          +
          +       TRACE_DISABLE
          +            turn off tracing.
          +
          +       TRACE_TIMES
          +            trace user and system times of updates.
          +
          +       TRACE_TPUTS
          +            trace tputs calls.
          +
          +       TRACE_UPDATE
          +            trace update actions, old & new screens.
          +
          +       TRACE_MOVE
          +            trace cursor movement and scrolling.
          +
          +       TRACE_CHARPUT
          +            trace all character outputs.
          +
          +       TRACE_ORDINARY
          +            trace all update actions.  The  old  and  new  screen
          +            contents  are  written  to  the  trace  file for each
          +            refresh.
          +
          +       TRACE_CALLS
          +            trace all curses calls.  The parameters for each call
          +            are traced, as well as return values.
          +
          +       TRACE_VIRTPUT
          +            trace virtual character puts, i.e., calls to addch.
          +
          +       TRACE_IEVENT
          +            trace low-level input processing, including timeouts.
          +
          +       TRACE_BITS
          +            trace state of TTY control bits.
          +
          +       TRACE_ICALLS
          +            trace internal/nested calls.
          +
          +       TRACE_CCALLS
          +            trace per-character calls.
          +
          +       TRACE_DATABASE
          +            trace read/write of terminfo/termcap data.
          +
          +       TRACE_MAXIMUM
          +            maximum trace level,  enables  all  of  the  separate
          +            trace features.
          +
          +            Some  tracing features are enabled whenever the trace
          +            parameter is nonzero.  Some  features  overlap.   The
          +            specific names are used as a guideline.
          +
          +
          +
          +

          RETURN VALUE

          +       Routines  which  return a value are designed to be used as
          +       parameters to the _tracef routine.
          +
          +
          +
          +

          PORTABILITY

          +       These functions are not part of the XSI  interface.   Some
          +       other  curses  implementations  are known to have similar,
          +       undocumented features, but they are  not  compatible  with
          +       ncurses.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_util.3x.html b/doc/html/man/curs_util.3x.html new file mode 100644 index 00000000..5fc178cc --- /dev/null +++ b/doc/html/man/curs_util.3x.html @@ -0,0 +1,134 @@ + + +
          +
          +
          +
          +

          NAME

          +       unctrl,   keyname,   filter,   use_env,   putwin,  getwin,
          +       delay_output, flushinp - miscellaneous curses utility rou-
          +       tines
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       char *unctrl(chtype c);
          +       char *keyname(int c);
          +       void filter(void);
          +       void use_env(char bool);
          +       int putwin(WINDOW *win, FILE *filep);
          +       WINDOW *getwin(FILE *filep);
          +       int delay_output(int ms);
          +       int flushinp(void);
          +
          +
          +
          +

          DESCRIPTION

          +       The  unctrl macro expands to a character string which is a
          +       printable representation  of  the  character  c.   Control
          +       characters  are  displayed  in  the ^X notation.  Printing
          +       characters are displayed as is.
          +
          +       The keyname routine returns a character string correspond-
          +       ing to the key c.
          +
          +       The filter routine, if used, must be called before initscr
          +       or newterm are called.  The effect is that,  during  those
          +       calls,  LINES  is  set  to 1; the capabilities clear, cup,
          +       cud, cud1, cuu1, cuu,  vpa  are  disabled;  and  the  home
          +       string is set to the value of cr.
          +
          +       The  use_env routine, if used, is called before initscr or
          +       newterm are called.  When called with FALSE  as  an  argu-
          +       ment,  the  values  of  lines and columns specified in the
          +       terminfo database will be used, even if environment  vari-
          +       ables  LINES  and COLUMNS (used by default) are set, or if
          +       curses is running in  a  window  (in  which  case  default
          +       behavior  would  be  to  use  the window size if LINES and
          +       COLUMNS are not set).
          +
          +       The putwin routine writes all data associated with  window
          +       win into the file to which filep points.  This information
          +       can be later retrieved using the getwin function.
          +
          +       The getwin routine reads window related data stored in the
          +       file  by putwin.  The routine then creates and initializes
          +       a new window using that data.  It returns a pointer to the
          +       new window.
          +
          +       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.
          +       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
          +       integer value other than ERR") upon successful completion.
          +
          +       flushinp always returns OK.
          +
          +       Routines that return pointers return NULL on error.
          +
          +
          +
          +

          PORTABILITY

          +       The  XSI  Curses  standard,  Issue 4 describes these func-
          +       tions.
          +
          +       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
          +       describe the disabling of cuu).
          +
          +
          +
          +

          NOTES

          +       Note  that  unctrl  is  a macro, which is defined in <unc-
          +       trl.h>.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), curs_initscr(3x), curs_scr_dump(3x).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/curs_window.3x.html b/doc/html/man/curs_window.3x.html new file mode 100644 index 00000000..1fae384f --- /dev/null +++ b/doc/html/man/curs_window.3x.html @@ -0,0 +1,190 @@ + + +
          +
          +
          +
          +

          NAME

          +       newwin,  delwin,  mvwin, subwin, derwin, mvderwin, dupwin,
          +       wsyncup, syncok, wcursyncup,  wsyncdown  -  create  curses
          +       windows
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       WINDOW *newwin(int nlines, int ncols, int begin_y,
          +             int begin_x);
          +       int delwin(WINDOW *win);
          +       int mvwin(WINDOW *win, int y, int x);
          +       WINDOW *subwin(WINDOW *orig, int nlines, int ncols,
          +             int begin_y, int begin_x);
          +       WINDOW *derwin(WINDOW *orig, int nlines, int ncols,
          +             int begin_y, int begin_x);
          +       int mvderwin(WINDOW *win, int par_y, int par_x);
          +       WINDOW *dupwin(WINDOW *win);
          +       void wsyncup(WINDOW *win);
          +       int syncok(WINDOW *win, bool bf);
          +       void wcursyncup(WINDOW *win);
          +       void wsyncdown(WINDOW *win);
          +
          +
          +
          +

          DESCRIPTION

          +       Calling newwin creates and returns a pointer to a new win-
          +       dow with the given number of lines and columns.  The upper
          +       left-hand  corner of the window is at line begin_y, column
          +       begin_x.  If either nlines or ncols is zero, they  default
          +       to  LINES - begin_y and COLS - begin_x.  A new full-screen
          +       window is created by calling newwin(0,0,0,0).
          +
          +       Calling delwin deletes the named window, freeing all  mem-
          +       ory  associated  with  it  (it does not actually erase the
          +       window's screen image).  Subwindows must be deleted before
          +       the main window can be deleted.
          +
          +       Calling mvwin moves the window so that the upper left-hand
          +       corner is at position (x, y).  If the move would cause the
          +       window to be off the screen, it is an error and the window
          +       is not moved.  Moving subwindows is allowed, but should be
          +       avoided.
          +
          +       Calling subwin creates and returns a pointer to a new win-
          +       dow with the given number of lines, nlines,  and  columns,
          +       ncols.   The  window  is at position (begin_y, begin_x) on
          +       the screen.  (This position is relative to the screen, and
          +       not to the window orig.)  The window is made in the middle
          +       of the window orig, so that changes  made  to  one  window
          +       will  affect  both  windows.   The subwindow shares memory
          +       with the window orig.  When using this routine, it is nec-
          +       essary  to call touchwin or touchline on orig before call-
          +       ing wrefresh on the subwindow.
          +
          +       Calling derwin is the same as calling subwin, except  that
          +       begin_y and begin_x are relative to the origin of the win-
          +       dow orig rather than the screen.  There is  no  difference
          +       between the subwindows and the derived windows.
          +
          +       Calling  mvderwin  moves  a  derived window (or subwindow)
          +       inside its parent window.  The screen-relative  parameters
          +       of  the  window  are not changed.  This routine is used to
          +       display different parts of the parent window at  the  same
          +       physical position on the screen.
          +
          +       Calling  dupwin  creates  an exact duplicate of the window
          +       win.
          +
          +       Calling wsyncup touches all locations in ancestors of  win
          +       that  are changed in win.  If syncok is called with second
          +       argument TRUE then wsyncup is called  automatically  when-
          +       ever there is a change in the window.
          +
          +       The  wsyncdown  routine  touches each location in win that
          +       has been touched in any of  its  ancestor  windows.   This
          +       routine  is  called by wrefresh, so it should almost never
          +       be necessary to call it manually.
          +
          +       The routine wcursyncup updates the current cursor position
          +       of  all the ancestors of the window to reflect the current
          +       cursor position of the window.
          +
          +
          +
          +

          RETURN VALUE

          +       Routines that return an integer  return  the  integer  ERR
          +       upon failure and OK (SVr4 only specifies "an integer value
          +       other than ERR") upon successful completion.
          +
          +       delwin returns the integer ERR upon failure  and  OK  upon
          +       successful completion.
          +
          +       Routines that return pointers return NULL on error.
          +
          +
          +
          +

          NOTES

          +       If  many small changes are made to the window, the wsyncup
          +       option could degrade performance.
          +
          +       Note that syncok may be a macro.
          +
          +
          +
          +

          BUGS

          +       The subwindow functions (subwin, derwin,  mvderwin,  wsyn-
          +       cup,  wsyncdown,  wcursyncup,  syncok)  are  flaky, incom-
          +       pletely implemented, and not well tested.
          +
          +       The System V curses documentation is  very  unclear  about
          +       what wsyncup and wsyncdown 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  curses  implementation,  is  pat-
          +       terned  on the XPG4 curses standard.  The weaker XPG4 spec
          +       may result in slower updates.
          +
          +
          +
          +

          PORTABILITY

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

          SEE ALSO

          +       curses(3x), curs_refresh(3x), curs_touch(3x)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/define_key.3x.html b/doc/html/man/define_key.3x.html similarity index 72% rename from Ada95/html/man/define_key.3x.html rename to doc/html/man/define_key.3x.html index 2e18202b..7e914c7e 100644 --- a/Ada95/html/man/define_key.3x.html +++ b/doc/html/man/define_key.3x.html @@ -1,14 +1,18 @@
          -       define_key - define a keycode
          +
          +
          +
          +

          NAME

          +       define_key - define a keycode
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <curses.h>
           
          -       int define_key(char *definition, int keycode);
          +       int define_key(char *definition, int keycode);
           
           
           
          @@ -41,7 +45,7 @@

          SEE ALSO

          -       keyok(3X).
          +       keyok(3x).
           
           
           
          @@ -65,6 +69,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/dft_fgbg.3x.html b/doc/html/man/dft_fgbg.3x.html new file mode 100644 index 00000000..8d5bf7b6 --- /dev/null +++ b/doc/html/man/dft_fgbg.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       dft_fgbg:  use_default_colors, assume_default_colors - use
          +       terminal's default colors
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int use_default_colors(void);
          +       int assume_default_colors(int fg, int bg);
          +
          +
          +
          +

          DESCRIPTION

          +       The use_default_colors() and assume_default_colors() func-
          +       tions are extensions to the curses library.  They are used
          +       with terminals that support ISO 6429 color, or equivalent.
          +       These terminals allow the application to reset color to an
          +       unspecified default value (e.g., with SGR 39 or SGR 49).
          +
          +       Applications that paint  a  colored  background  over  the
          +       whole  screen  do not take advantage of SGR 39 and SGR 49.
          +       Some applications are designed to work  with  the  default
          +       background,  using  colors  only  for  text.  For example,
          +       there are several implementations of the ls program  which
          +       use  colors to denote different file types or permissions.
          +       These "color ls" programs do not  necessarily  modify  the
          +       background  color, typically using only the setaf terminfo
          +       capability  to  set  the  foreground  color.   Full-screen
          +       applications  that  use default colors can achieve similar
          +       visual effects.
          +
          +       The first function, use_default_colors() tells the  curses
          +       library  to  assign terminal default foreground/background
          +       colors to color number  -1.  So  init_pair(x,COLOR_RED,-1)
          +       will  initialize  pair  x as red on default background and
          +       init_pair(x,-1,COLOR_BLUE)  will  initialize  pair  x   as
          +       default foreground on blue.
          +
          +       The  other,  assume_default_colors() is a refinement which
          +       tells which colors to paint for color pair 0.  This  func-
          +       tion  recognizes  a special color number -1, which denotes
          +       the default terminal color.
          +
          +       The following are equivalent:
          +              use_default_colors();
          +              assume_default_colors(-1,-1);
          +
          +       These are ncurses extensions.  For other curses  implemen-
          +       tations,  color  number -1 does not mean anything, just as
          +       for ncurses before a successful call  of  use_default_col-
          +       ors() or assume_default_colors().
          +
          +       Other  curses  implementations do not allow an application
          +       to modify color pair 0.  They assume that  the  background
          +       is COLOR_BLACK, but do not ensure that the color pair 0 is
          +       painted to match the assumption.  If your application does
          +       not use either use_default_colors() or assume_default_col-
          +       ors() ncurses will paint a white  foreground  (text)  with
          +       black background for color pair 0.
          +
          +
          +
          +

          RETURN VALUE

          +       These functions return the integer ERR upon failure and OK
          +       on success.  They will fail if either  the  terminal  does
          +       not  support  the orig_pair or orig_colors capability.  If
          +       the initialize_pair capability is found,  this  causes  an
          +       error as well.
          +
          +
          +
          +

          NOTES

          +       Associated with this extension, the init_pair(3x) function
          +       accepts negative arguments to specify  default  foreground
          +       or background colors.
          +
          +
          +
          +

          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

          +       curs_color(3x), ded(1).
          +
          +
          +
          +

          AUTHOR

          +       Thomas Dickey (from an analysis of  the  requirements  for
          +       color xterm for XFree86 3.1.2C, February 1996).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html new file mode 100644 index 00000000..a15a7126 --- /dev/null +++ b/doc/html/man/form.3x.html @@ -0,0 +1,245 @@ + + +
          +
          +
          +
          +

          NAME

          +       form - curses extension for programming forms
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +
          +
          +
          +

          DESCRIPTION

          +       The  form library provides terminal-independent facilities
          +       for composing form screens  on  character-cell  terminals.
          +       The  library  includes:  field  routines, which create and
          +       modify form fields; and form routines, which group  fields
          +       into forms, display forms on the screen, and handle inter-
          +       action with the user.
          +
          +       The form library uses the curses libraries, and  a  curses
          +       initialization  routine  such  as  initscr  must be called
          +       before using any of these  functions.   To  use  the  form
          +       library, link with the options -lform -lcurses.
          +
          +
          +   Current Default Values for Field Attributes
          +       The  form  library  maintains  a  default  value for field
          +       attributes.  You can get or set this  default  by  calling
          +       the  appropriate  set_  or  retrieval  routine with a NULL
          +       field pointer.  Changing this default with a set_ function
          +       affects  future  field  creations, but does not change the
          +       rendering of fields already created.
          +
          +
          +   Routine Name Index
          +       The following table lists each form routine and  the  name
          +       of the manual page on which it is described.
          +
          +       curses Routine Name    Manual Page Name
          +       -------------------------------------------------
          +       current_field          form_page(3x)
          +       data_ahead             form_data(3x)
          +       data_behind            form_data(3x)
          +       dup_field              form_field_new(3x)
          +       dynamic_fieldinfo      form_field_info(3x)
          +       field_arg              form_field_validation(3x)
          +       field_back             form_field_attributes(3x)
          +       field_buffer           form_field_buffer(3x)
          +       field_count            form_field(3x)
          +       field_fore             form_field_attributes(3x)
          +       field_index            form_page(3x)
          +       field_info             form_field_info(3x)
          +       field_init             form_hook(3x)
          +       field_just             form_field_just(3x)
          +       field_opts             form_field_opts(3x)
          +       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)
          +       field_userptr          form_field_userptr(3x)
          +       form_driver            form_driver(3x)
          +       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)
          +       form_request_by_name   form_requestname(3x)
          +       form_request_name      form_requestname(3x)
          +       form_sub               form_win(3x)
          +       form_term              form_hook(3x)
          +       form_userptr           form_userptr(3x)
          +       form_win               form_win(3x)
          +       free_field             form_field_new(3x)
          +       free_form              form_new(3x)
          +       link_field             form_field_new(3x)
          +       link_fieldtype         form_fieldtype(3x)
          +       move_field             form_field(3x)
          +       new_field              form_field_new(3x)
          +       new_form               form_new(3x)
          +       new_page               form_new_page(3x)
          +       pos_form_cursor        form_cursor(3x)
          +       post_form              form_post(3x)
          +       scale_form             form_win(3x)
          +       set_current_field      form_page(3x)
          +       set_field_back         form_field_attributes(3x)
          +       set_field_buffer       form_field_buffer(3x)
          +       set_field_fore         form_field_attributes(3x)
          +       set_field_init         form_hook(3x)
          +       set_field_just         form_field_just(3x)
          +       set_field_opts         form_field_opts(3x)
          +       set_field_pad          form_field_attributes(3x)
          +       set_field_status       form_field_buffer(3x)
          +       set_field_term         form_hook(3x)
          +       set_field_type         form_field_validation(3x)
          +       set_field_userptr      form_field_userptr(3x)
          +       set_fieldtype_arg      form_fieldtype(3x)
          +       set_fieldtype_choice   form_fieldtype(3x)
          +       set_form_fields        form_field(3x)
          +       set_form_init          form_hook(3x)
          +       set_form_opts          form_field_opts(3x)
          +       set_form_page          form_page(3x)
          +       set_form_sub           form_win(3x)
          +       set_form_term          form_hook(3x)
          +       set_form_userptr       form_userptr(3x)
          +       set_form_win           form_win(3x)
          +       set_max_field          form_field_buffer(3x)
          +       set_new_page           form_new_page(3x)
          +       unpost_form            form_post(3x)
          +
          +
          +
          +

          RETURN VALUE

          +       Routines  that return pointers return NULL on error.  Rou-
          +       tines that return an integer return one of  the  following
          +       error codes:
          +
          +       E_OK The routine succeeded.
          +
          +       E_CONNECTED
          +            The field is already connected to a form.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +       E_POSTED
          +            The form is already posted.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_NO_ROOM
          +            Form is too large for its window.
          +
          +       E_NOT_POSTED
          +            The form has not been posted.
          +
          +       E_UNKNOWN_COMMAND
          +            The form driver code saw an unknown request code.
          +
          +       E_INVALID_FIELD
          +            Contents of a field are not valid.
          +
          +       E_NOT_CONNECTED
          +            No fields are connected to the form.
          +
          +       E_REQUEST_DENIED
          +            The form driver could not process the request.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)  and  3x  pages  whose  names begin "form_" for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       files <curses.h> and <eti.h>.
          +
          +       In  your  library  list,  libform.a should be before libn-
          +       curses.a; that is, you want to say `-lform -lncurses', not
          +       the  other  way  around (which would give you a link error
          +       using GNU ld(1) and many other linkers).
          +
          +
          +
          +

          PORTABILITY

          +       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 ncurses
          +       by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/form_cursor.3x.html b/doc/html/man/form_cursor.3x.html similarity index 50% rename from Ada95/html/man/form_cursor.3x.html rename to doc/html/man/form_cursor.3x.html index fbfbac86..b99b8241 100644 --- a/Ada95/html/man/form_cursor.3x.html +++ b/doc/html/man/form_cursor.3x.html @@ -1,20 +1,24 @@
          -       form_cursor - position a form window cursor
          +
          +
          +
          +

          NAME

          +       form_cursor - position a form window cursor
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int pos_form_cursor(FORM *form);
           
           
           

          DESCRIPTION

          -       The  function  pos_form_cursor  restores the cursor to the
          +       The  function  pos_form_cursor  restores the cursor to the
                  position required for the forms driver  to  continue  pro-
          -       cessing  requests.   This  is useful after curses routines
          +       cessing  requests.   This  is useful after curses routines
                  have been called to do screen-painting in  response  to  a
                  form operation.
           
          @@ -23,28 +27,28 @@
           

          RETURN VALUE

                  This routine returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine  detected  an incorrect or out-of-range argu-
                       ment.
           
          -       E_NOT_POSTED
          +       E_NOT_POSTED
                       The form has not been posted.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ +
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_data.3x.html b/doc/html/man/form_data.3x.html similarity index 52% rename from Ada95/html/man/form_data.3x.html rename to doc/html/man/form_data.3x.html index d07992cc..502495ed 100644 --- a/Ada95/html/man/form_data.3x.html +++ b/doc/html/man/form_data.3x.html @@ -1,36 +1,40 @@
          -       form_data - test for off-screen data in given forms
          +
          +
          +
          +

          NAME

          +       form_data - test for off-screen data in given forms
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  bool data_ahead(const FORM *form);
                  bool data_behind(const FORM *form);
           
           
           

          DESCRIPTION

          -       The  function data_ahead tests whether there is off-screen
          +       The  function data_ahead tests whether there is off-screen
                  data ahead in the given form.   It  returns  TRUE  (1)  or
                  FALSE (0).
           
          -       The function data_behind tests whether there is off-screen
          +       The function data_behind tests whether there is off-screen
                  data behind in the given form.  It  returns  TRUE  (1)  or
                  FALSE (0).
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -63,8 +67,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_driver.3x.html b/doc/html/man/form_driver.3x.html similarity index 78% rename from Ada95/html/man/form_driver.3x.html rename to doc/html/man/form_driver.3x.html index c3c2a623..36a27aa8 100644 --- a/Ada95/html/man/form_driver.3x.html +++ b/doc/html/man/form_driver.3x.html @@ -1,19 +1,23 @@
          -       form_driver - command-processing loop of the form system
          +
          +
          +
          +

          NAME

          +       form_driver - command-processing loop of the form system
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int form_driver(FORM *form, int c);
           
           
           

          DESCRIPTION

                  Once a form has been posted (displayed), you should funnel
          -       input events to it through form_driver.  This routine  has
          +       input events to it through form_driver.  This routine  has
                  two  major input cases; either the input is a form naviga-
                  tion request or it's a  printable  ASCII  character.   The
                  form driver requests are as follows:
          @@ -57,6 +61,8 @@
           
                  REQ_LEFT_FIELD
                       Move left to a field.
          +
          +       REQ_RIGHT_FIELD
                       Move right to a field.
           
                  REQ_UP_FIELD
          @@ -109,6 +115,8 @@
                       Move down in the field.
           
           
          +
          +       REQ_NEW_LINE
                       Insert or overlay a new line.
           
                  REQ_INS_CHAR
          @@ -161,6 +169,9 @@
                       Scroll the field forward half a page.
           
                  REQ_SCR_BHPAGE
          +            Scroll the field backward half a page.
          +
          +       REQ_SCR_FCHAR
                       Scroll the field forward a character.
           
                  REQ_SCR_BCHAR
          @@ -194,50 +205,52 @@
                  that request is executed.
           
                  If the second argument is neither printable ASCII nor  one
          -       of  the above pre-defined form requests, the drive assumes
          +       of the above pre-defined form requests, the driver assumes
                  it  is  an  application-specific   command   and   returns
          -       E_UNKNOWN_COMMAND.  Application-defined commands should be
          -       defined relative to  MAX_COMMAND,  the  maximum  value  of
          +       E_UNKNOWN_COMMAND.  Application-defined commands should be
          +       defined relative to  MAX_COMMAND,  the  maximum  value  of
                  these pre-defined requests.
           
           
           

          RETURN VALUE

          -       form_driver return one of the following error codes:
          +       form_driver return one of the following error codes:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine  detected  an incorrect or out-of-range argu-
                       ment.
           
          -       E_BAD_STATE
          +       E_BAD_STATE
          +            Routine  was  called  from   an   initialization   or
          +            termination function.
           
          -       E_NOT_POSTED
          +       E_NOT_POSTED
                       The form has not been posted.
           
          -       E_UNKNOWN_COMMAND
          +       E_UNKNOWN_COMMAND
                       The form driver code saw an unknown request code.
           
          -       E_INVALID_FIELD
          +       E_INVALID_FIELD
                       Contents of field is invalid.
           
          -       E_REQUEST_DENIED
          +       E_REQUEST_DENIED
                       The form driver could not process the request.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       files .
          +       The header file <form.h> automatically includes the header
          +       files <curses.h>.
           
           
           
          @@ -273,8 +286,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/form_field.3x.html b/doc/html/man/form_field.3x.html new file mode 100644 index 00000000..2f14eafb --- /dev/null +++ b/doc/html/man/form_field.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_field - make and break connections between fields and
          +       forms
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_form_fields(FORM *form, FIELD **fields);
          +       FIELD **form_fields(const FORM *form);
          +       int field_count(const FORM *form);
          +       int move_field(FIELD *field, int frow, int fcol);
          +
          +
          +
          +

          DESCRIPTION

          +       The function set_form_fields  changes  the  field  pointer
          +       array  of the given form.  The array must be terminated by
          +       a NULL.
          +
          +       The function form_fields returns the field  array  of  the
          +       given form.
          +
          +       The  function  field_count  returns the count of fields in
          +       form.
          +
          +       The function move_field move the given field  (which  must
          +       be disconnected) to a specified location on the screen.
          +
          +
          +
          +

          RETURN VALUES

          +       The function form_fields returns NULL on error.
          +
          +       The  function  field_count returns ERR (the general curses
          +       error return value) on error.
          +
          +       The functions set_form_fields and move_field return one of
          +       the following codes on error:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +       E_POSTED
          +            The form is already posted.
          +
          +       E_CONNECTED
          +            The field is already connected to a form.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       These  routines  emulate the System V forms library.  They
          +       were not supported on Version 7 or BSD versions.
          +
          +       The  SVr4  forms  library  documentation   specifies   the
          +       field_count error value as -1 (which is the value of ERR).
          +
          +
          +
          +

          AUTHORS

          +       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_field_attributes.3x.html b/doc/html/man/form_field_attributes.3x.html new file mode 100644 index 00000000..9e11aaf5 --- /dev/null +++ b/doc/html/man/form_field_attributes.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_field_attributes  -  color  and attribute control for
          +       form fields
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_field_fore(FIELD *field, chtype attr);
          +       chtype field_fore(const FIELD *field);
          +       int set_field_back(FIELD *field, chtype attr);
          +       chtype field_back(const FIELD *field);
          +       int set_field_pad(FIELD *field, int pad);
          +       chtype field_pad(const FIELD *field);
          +
          +
          +
          +

          DESCRIPTION

          +       The function set_field_fore sets the foreground  attribute
          +       of  field. This is the highlight used to display the field
          +       contents.  The function field_fore returns the  foreground
          +       attribute.  The default is A_STANDOUT.
          +
          +       The  function set_field_back sets the background attribute
          +       of form. This is the highlight used to display the  extent
          +       fields  in  the form.  The function field_back returns the
          +       background attribute.  The default is A_NORMAL.
          +
          +       The function set_field_pad sets the character used to fill
          +       the  field.   The  function  field_pad  returns  the given
          +       form's pad character.  The default is a blank.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)  and  3x  pages  whose  names begin "form_" for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_field_buffer.3x.html b/doc/html/man/form_field_buffer.3x.html new file mode 100644 index 00000000..a4f3dcda --- /dev/null +++ b/doc/html/man/form_field_buffer.3x.html @@ -0,0 +1,137 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_field_buffer - field buffer control
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int  set_field_buffer(FIELD  *field,  int  buf, const char
          +       *value);
          +       char *field_buffer(const FIELD *field, int buffer);
          +       int set_field_status(FIELD *field, bool status);
          +       bool field_status(const FIELD *field);
          +       int set_max_field(FIELD *field, int max);
          +
          +
          +
          +

          DESCRIPTION

          +       The function set_field_buffer sets the numbered buffer  of
          +       the  given  field  to contain a given string.  Buffer 0 is
          +       the displayed value of the field; other  numbered  buffers
          +       may be allocated by applications through the nbuf argument
          +       of (see form_field_new(3x)) but are not manipulated by the
          +       forms  library.   The  function  field_buffer  returns the
          +       address of the buffer.  Please note that this  buffer  has
          +       always  the  length  of the buffer, that means that it may
          +       typically contain trailing spaces. If you entered  leading
          +       spaces  the  buffer may also contain them. If you want the
          +       raw data, you must write your own routine that copies  the
          +       value out of the buffer and removes the leading and trail-
          +       ing spaces. Please note also, that  subsequent  operations
          +       on  the  form  will  probably  change  the  content of the
          +       buffer. So don't use it  for  long  term  storage  of  the
          +       entered form data.
          +
          +       The  function  set_field_status sets the associated status
          +       flag of field; field_status gets the current  value.   The
          +       status  flag  is set to a nonzero value whenever the field
          +       changes.
          +
          +       The function set_max_field sets the  maximum  size  for  a
          +       dynamic  field.   An  argument  of 0 turns off any maximum
          +       size threshold for that field.
          +
          +
          +
          +

          RETURN VALUE

          +       The field_buffer function returns NULL on error.
          +
          +       The field_status function returns TRUE or FALSE.
          +
          +       The remaining routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)  and  3x  pages  whose  names begin "form_" for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/form_field_info.3x.html b/doc/html/man/form_field_info.3x.html similarity index 56% rename from Ada95/html/man/form_field_info.3x.html rename to doc/html/man/form_field_info.3x.html index a13d3ada..40ef3a2d 100644 --- a/Ada95/html/man/form_field_info.3x.html +++ b/doc/html/man/form_field_info.3x.html @@ -1,12 +1,16 @@
          -       form_field_info - retrieve field characteristics
          +
          +
          +
          +

          NAME

          +       form_field_info - retrieve field characteristics
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int field_info(const FIELD *field, int *rows, int *cols,
                                int *frow, int *fcol, int *nrow, int *nbuf);
                  int dynamic_field_info(const FIELD *field, int *rows,  int
          @@ -15,43 +19,43 @@
           
           

          DESCRIPTION

          -       The  function  field_info  returns  the  sizes  and  other
          +       The  function  field_info  returns  the  sizes  and  other
                  attributes passed in to the field at  its  creation  time.
                  The  attributes are: height, width, row of upper-left cor-
                  ner, column of upper-left corner, number off-screen  rows,
                  and number of working buffers.
           
          -       The function dynamic_field_info returns the actual size of
          +       The function dynamic_field_info returns the actual size of
                  the field, and its maximum possible size.   If  the  field
                  has  no  size  limit,  the location addressed by the third
                  argument will be set to 0.  (A field can be  made  dynamic
          -       by turning off the O_STATIC).
          +       by turning off the O_STATIC).
           
           
           

          RETURN VALUE

                  These routines return one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine  detected  an incorrect or out-of-range argu-
                       ment.
           
           
           

          SEE ALSO

          -       curses(3X) and 3X pages  whose  names  begin  "form_"  for
          +       curses(3x) and 3x pages  whose  names  begin  "form_"  for
                  detailed descriptions of the entry points.
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -59,14 +63,20 @@ These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. + A null (zero pointer) is accepted for any of the return + values, to ignore that value. Not all implementations + allow this, e.g., Solaris 2.7 does not. +

          AUTHORS

                  Juergen  Pfeifer.   Manual  pages  and  adaptation for new
                  curses by Eric S. Raymond.
          -
          -
          -
           
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/form_field_just.3x.html b/doc/html/man/form_field_just.3x.html new file mode 100644 index 00000000..1643c449 --- /dev/null +++ b/doc/html/man/form_field_just.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_field_just - retrieve field characteristics
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_field_just(FIELD *field, int justification);
          +       int field_just(const FIELD *field);
          +
          +
          +
          +

          DESCRIPTION

          +       The   function   set_field_just   sets  the  justification
          +       attribute of a field; field_just returns a field's  justi-
          +       fication attribute.  The attribute may be one of NO_JUSTI-
          +       FICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or  JUSTIFY_CENTER.
          +
          +
          +
          +
          +

          RETURN VALUE

          +       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:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)  and  3x  pages  whose  names begin "form_" for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/form_field_new.3x.html b/doc/html/man/form_field_new.3x.html similarity index 56% rename from Ada95/html/man/form_field_new.3x.html rename to doc/html/man/form_field_new.3x.html index f581e77c..f6dd76a1 100644 --- a/Ada95/html/man/form_field_new.3x.html +++ b/doc/html/man/form_field_new.3x.html @@ -1,12 +1,16 @@
          -       form_field_new - create and destroy form fields
          +
          +
          +
          +

          NAME

          +       form_field_new - create and destroy form fields
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  FIELD *new_field(int height, int width,
                                   int toprow, int leftcol,
                                   int offscreen, int nbuffers);
          @@ -17,57 +21,61 @@
           
           

          DESCRIPTION

          -       The  function new_field allocates a new field and initial-
          +       The  function new_field allocates a new field and initial-
                  izes it from the parameters given: height, width,  row  of
                  upper-left  corner,  column  of  upper-left corner, number
                  off-screen rows, and number of additional working buffers.
           
          -       The  function  dup_field duplicates a field at a new loca-
          +       The  function  dup_field duplicates a field at a new loca-
                  tion.  Most attributes (including current contents,  size,
                  validation  type, buffer count, growth threshold, justifi-
                  cation, foreground, background,  pad  character,  options,
                  and  user pointer) are copied.  Field status and the field
                  page bit are not copied.
           
          -       The function link_field acts like dup_field, but  the  new
          +       The function link_field acts like dup_field, but  the  new
                  field  shares  buffers with its parent.  Attribute data is
                  separate.
           
          -       The function free_field  de-allocates  storage  associated
          +       The function free_field  de-allocates  storage  associated
                  with a field.
           
           
           

          RETURN VALUE

          -       The function, new_field, dup_field, link_field return NULL
          +       The function, new_field, dup_field, link_field return NULL
                  on error.
           
          -       The function free_field returns one of the following:
          +       The function free_field returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

                  These routines emulate the System V forms  library.   They
                  were not supported on Version 7 or BSD versions.
           
                  It  may be unwise to count on the set of attributes copied
          -       by  dup_field(3X)  being  portable;  the  System  V  forms
          +       by  dup_field(3x)  being  portable;  the  System  V  forms
                  library  documents  are  not  very  explicit  on what gets
                  copied and was not.
           
          @@ -115,8 +123,14 @@
           
           
           
          +
           
           
           
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_field_opts.3x.html b/doc/html/man/form_field_opts.3x.html similarity index 65% rename from Ada95/html/man/form_field_opts.3x.html rename to doc/html/man/form_field_opts.3x.html index 5eabb112..576dcad8 100644 --- a/Ada95/html/man/form_field_opts.3x.html +++ b/doc/html/man/form_field_opts.3x.html @@ -1,12 +1,16 @@
          -       form_field_opts - set and get field options
          +
          +
          +
          +

          NAME

          +       form_field_opts - set and get field options
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int set_field_opts(FIELD *field, OPTIONS opts);
                  int field_opts_on(FIELD *field, OPTIONS opts);
                  int field_opts_off(FIELD *field, OPTIONS opts);
          @@ -15,17 +19,17 @@
           
           

          DESCRIPTION

          -       The  function  set_field_opts  sets  all the given field's
          +       The  function  set_field_opts  sets  all the given field's
                  option bits (field  option  bits  may  be  logically-OR'ed
                  together).
           
          -       The function field_opts_on turns on the given option bits,
          +       The function field_opts_on turns on the given option bits,
                  and leaves others alone.
           
          -       The function field_opts_off turns  off  the  given  option
          +       The function field_opts_off turns  off  the  given  option
                  bits, and leaves others alone.
           
          -       The function field_opts returns the field's current option
          +       The function field_opts returns the field's current option
                  bits.
           
                  The following options are defined (all are on by default):
          @@ -57,6 +61,8 @@
                  O_AUTOSKIP
                       Skip to the next field when this one fills
           
          +
          +       O_NULLOK
                       Allow a blank field.
           
                  O_STATIC
          @@ -68,25 +74,25 @@
           
           

          RETURN VALUE

          -       Except for field_opts, each routine  returns  one  of  the
          +       Except for field_opts, each routine  returns  one  of  the
                  following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_CURRENT
          +       E_CURRENT
                       The field is the current field.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
          -       NOTES  The header file  automatically includes the
          -              header file .
          +       NOTES  The header file <form.h> automatically includes the
          +              header file <curses.h>.
           
           
           
          @@ -117,6 +123,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_field_userptr.3x.html b/doc/html/man/form_field_userptr.3x.html similarity index 53% rename from Ada95/html/man/form_field_userptr.3x.html rename to doc/html/man/form_field_userptr.3x.html index 5c626dd7..46977c9f 100644 --- a/Ada95/html/man/form_field_userptr.3x.html +++ b/doc/html/man/form_field_userptr.3x.html @@ -1,13 +1,17 @@
          -       form_field_userptr  -  associate  application  data with a
          +
          +
          +
          +

          NAME

          +       form_field_userptr  -  associate  application  data with a
                  form field
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int set_field_userptr(FIELD *field, void*userptr);
                  void *field_userptr(const FIELD *field);
           
          @@ -21,24 +25,24 @@
           
           

          RETURN VALUE

          -       The  function  field_userptr  returns  NULL  on error. The
          -       function set_field_userptr returns one of the following:
          +       The  function  field_userptr  returns  NULL  on error. The
          +       function set_field_userptr returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_field_validation.3x.html b/doc/html/man/form_field_validation.3x.html similarity index 54% rename from Ada95/html/man/form_field_validation.3x.html rename to doc/html/man/form_field_validation.3x.html index 34f39b45..34ae0dc7 100644 --- a/Ada95/html/man/form_field_validation.3x.html +++ b/doc/html/man/form_field_validation.3x.html @@ -1,12 +1,16 @@
          -       form_field_validation - data type validation for fields
          +
          +
          +
          +

          NAME

          +       form_field_validation - data type validation for fields
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int set_field_type(FIELD *field, FIELDTYPE *type, ...);
                  FIELDTYPE *field_type(const FIELD *field);
                  void *field_arg(const FIELD *field);
          @@ -14,23 +18,23 @@
           
           

          DESCRIPTION

          -       The  function  set_field_type  declares  a data type for a
          +       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:
           
                  TYPE_ALNUM
          -            Alphanumeric  data.  Requires a third int argument, a
          +            Alphanumeric  data.  Requires a third int argument, a
                       minimum field width.
           
                  TYPE_ALPHA
          -            Character data.  Requires a  third  int  argument,  a
          +            Character data.  Requires a  third  int  argument,  a
                       minimum field width.
           
                  TYPE_ENUM
                       Accept one of a specified set of strings.  Requires a
          -            third (char **) argument pointing to a string list; a
          -            fourth  int flag argument to enable case-sensitivity;
          -            and a fifth int flag argument  specifying  whether  a
          +            third (char **) argument pointing to a string list; a
          +            fourth  int flag argument to enable case-sensitivity;
          +            and a fifth int flag argument  specifying  whether  a
                       partial  match  must be a unique one (if this flag is
                       off, a prefix matches the first of any  set  of  more
                       than  one  list  elements  with  that prefix). Please
          @@ -40,35 +44,37 @@
                       on the stack.
           
                  TYPE_INTEGER
          -            Integer  data,  parsable  to  an  integer by atoi(3).
          -            Requires a third int argument controlling the  preci-
          -            sion,  a  fourth  long  argument constraining minimum
          -            value, and a fifth long constraining  maximum  value.
          +            Integer  data,  parsable  to  an  integer by atoi(3).
          +            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
          +            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.
          +            the precision handling see printf's man-page.
           
                  TYPE_NUMERIC
                       Numeric  data  (may  have  a   decimal-point   part).
          -            Requires  a third int argument controlling the preci-
          -            sion, a fourth double argument  constraining  minimum
          -            value, and a fifth double constraining maximum value.
          +            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
          +            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
          +            printf  format  specification ".*f", where the '*' is
                       replaced by the precision argument.  For  details  of
          -            the precision handling see printf's man-page.
          +            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
          +            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-
          +            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
          @@ -89,34 +95,36 @@
                       implementations.
           
                       It is possible to set up new programmer-defined field
          -            types.  See the form_fieldtype(3X) manual page.
          +            types.  See the form_fieldtype(3x) manual page.
           
           
           

          RETURN VALUE

          -       The  functions  field_type  and  field_arg  return NULL on
          -       error. The function set_field_type returns one of the fol-
          +       The  functions  field_type  and  field_arg  return NULL on
          +       error. The function set_field_type returns one of the fol-
                  lowing:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           

          PORTABILITY

          +       These routines emulate the System V forms  library.   They
          +       were not supported on Version 7 or BSD versions.
           
           
           
          @@ -169,8 +177,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_fieldtype.3x.html b/doc/html/man/form_fieldtype.3x.html similarity index 61% rename from Ada95/html/man/form_fieldtype.3x.html rename to doc/html/man/form_fieldtype.3x.html index f70a9400..dec43a35 100644 --- a/Ada95/html/man/form_fieldtype.3x.html +++ b/doc/html/man/form_fieldtype.3x.html @@ -1,12 +1,16 @@
          -       form_fieldtype - define validation-field types
          +
          +
          +
          +

          NAME

          +       form_fieldtype - define validation-field types
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  FIELDTYPE *new_fieldtype(
                      bool (* const field_check)(FIELD *, const void *),
                      bool (* const char_check)(int, const void *));
          @@ -26,8 +30,8 @@
           
           

          DESCRIPTION

          -       The function new_fieldtype creates a new field type usable
          -       for data validation.  You supply it  with  field_check,  a
          +       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
          @@ -35,30 +39,32 @@
                  argument  is an argument-block structure, about which more
                  below.
           
          -       You also supply new_fieldtype with char_check, a  function
          +       You also supply new_fieldtype with char_check, a  function
                  to  validate input characters as they are entered; it will
                  be passed the character to be checked and a pointer to  an
                  argument-block structure.
           
          -       The  function free_fieldtype frees the space allocated for
          +       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
          +       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
          +       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
          +       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
          +       this case it is assumed,  that  mak_arg  doesn't  allocate
                  memory  but simply loads the argument into a single scalar
                  value.
           
          +       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-
          +       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
                  take the field pointer and an argument-block structure  as
          @@ -72,31 +78,31 @@
                  The  integer-valued  routines  return one of the following
                  codes on error:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
          -       E_CONNECTED
          +       E_CONNECTED
                       The field is already connected to a form.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
          -       All of the (char *) arguments of  these  functions  should
          -       actually  be (void *).  The type has been left uncorrected
          +       All of the (char *) arguments of  these  functions  should
          +       actually  be (void *).  The type has been left uncorrected
                  for strict compatibility with System V.
           
           
          @@ -119,6 +125,12 @@
           
           
           
          +
           
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/form_hook.3x.html b/doc/html/man/form_hook.3x.html new file mode 100644 index 00000000..87628aa2 --- /dev/null +++ b/doc/html/man/form_hook.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_hook - set hooks for automatic invocation by applica-
          +       tions
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_field_init(FORM *form, void (*func)(FORM *));
          +       void (*)(FORM *) field_init(const FORM *form);
          +       int set_field_term(FORM *form, void (*func)(FORM *));
          +       void (*)(FORM *) field_term(const FORM *form);
          +       int set_form_init(FORM *form, void (*func)(FORM *));
          +       void (*)(FORM *) form_init(const FORM *form);
          +       int set_form_term(FORM *form, void (*func)(FORM *));
          +       void (*)(FORM *) form_term(const FORM *form);
          +
          +
          +
          +

          DESCRIPTION

          +       These functions make it possible to set hook functions  to
          +       be called at various points in the automatic processing of
          +       input event codes by form_driver.
          +
          +       The function set_field_init sets a hook to  be  called  at
          +       form-post  time  and  each time the selected field changes
          +       (after the change).  field_init returns the current  field
          +       init hook, if any (NULL if there is no such hook).
          +
          +       The  function  set_field_term  sets a hook to be called at
          +       form-unpost time and each time the selected field  changes
          +       (before the change).  field_term returns the current field
          +       term hook, if any (NULL if there is no such hook).
          +
          +       The function set_form_init sets a hook  to  be  called  at
          +       form-post  time  and  just  after a page change once it is
          +       posted.  form_init returns the current form init hook,  if
          +       any (NULL if there is no such hook).
          +
          +       The  function  set_form_term  sets  a hook to be called at
          +       form-unpost time and just before a page change once it  is
          +       posted.   form_init returns the current form term hook, if
          +       any (NULL if there is no such hook).
          +
          +
          +
          +

          RETURN VALUE

          +       Routines that return pointers return NULL on error.  Other
          +       routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_new.3x.html b/doc/html/man/form_new.3x.html new file mode 100644 index 00000000..7b0d91bb --- /dev/null +++ b/doc/html/man/form_new.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_new - create and destroy forms
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       FORM *new_form(FIELD **fields);
          +       int free_form(FORM *form);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  new_form  creates a new form connected to a
          +       specified field pointer array (which must  be  NULL-termi-
          +       nated).
          +
          +       The  function  free_form  disconnects  form from its field
          +       array and frees the storage allocated for the form.
          +
          +
          +
          +

          RETURN VALUE

          +       The function new_form returns NULL on error.
          +
          +       The function free_form returns one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_POSTED
          +            The form has already been posted.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_new_page.3x.html b/doc/html/man/form_new_page.3x.html new file mode 100644 index 00000000..1a8d4ea8 --- /dev/null +++ b/doc/html/man/form_new_page.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_new_page - form pagination functions
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_new_page(FIELD *field, bool new_page_flag);
          +       bool new_page(const FIELD *field);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_new_page  sets or resets a flag marking
          +       the given field as the beginning of  a  new  page  on  its
          +       form.
          +
          +       The  function  new_page  is  a  predicate which tests if a
          +       given field marks a page beginning on its form.
          +
          +
          +
          +

          RETURN VALUE

          +       The function new_page returns TRUE or FALSE.
          +
          +       The function set_new_page return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_CONNECTED
          +            The given field is already connected to a form.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x) and 3x pages  whose  names  begin  "form_"  for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_opts.3x.html b/doc/html/man/form_opts.3x.html new file mode 100644 index 00000000..5ae1cc4a --- /dev/null +++ b/doc/html/man/form_opts.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_opts - set and get form options
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_form_opts(FORM *form, OPTIONS opts);
          +       int form_opts_on(FORM *form, OPTIONS opts);
          +       int form_opts_off(FORM *form, OPTIONS opts);
          +       OPTIONS form_opts(const FORM *form);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_form_opts  sets  all  the  given form's
          +       option bits  (form  option  bits  may  be  logically-OR'ed
          +       together).
          +
          +       The  function form_opts_on turns on the given option bits,
          +       and leaves others alone.
          +
          +       The function form_opts_off  turns  off  the  given  option
          +       bits, and leaves others alone.
          +
          +       The  function  form_opts returns the form's current option
          +       bits.
          +
          +       The following options are defined (all are on by default):
          +
          +       O_NL_OVERLOAD
          +            Overload  the  REQ_NEW_LINE  forms  driver request so
          +            that calling it at the end of a  field  goes  to  the
          +            next field.
          +
          +       O_BS_OVERLOAD
          +            Overload  the  REQ_DEL_PREV  forms  driver request so
          +            that calling it at the beginning of a field  goes  to
          +            the previous field.
          +
          +
          +
          +

          RETURN VALUE

          +       Except for form_opts, each routine returns one of the fol-
          +       lowing:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_page.3x.html b/doc/html/man/form_page.3x.html new file mode 100644 index 00000000..874bda87 --- /dev/null +++ b/doc/html/man/form_page.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_page - set and get form page number
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int set_current_field(FORM *form, FIELD *field);
          +       FIELD *current_field(const FORM *);
          +       int set_form_page(FORM *form, int n);
          +       int form_page(const FORM *form);
          +       int field_index(const FIELD *field);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_current field sets the current field of
          +       the given form; current_field returns the current field of
          +       the given form.
          +
          +       The  function  set_form_page  sets  the form's page number
          +       (goes to page n of the form).
          +
          +       The function form_page returns  the  form's  current  page
          +       number.
          +
          +       The function field_index returns the index of the field in
          +       the field array of the form it is connected to. It returns
          +       ERR  if  the  argument is the null pointer or the field is
          +       not connected.
          +
          +
          +
          +

          RETURN VALUE

          +       Except for form_page, each routine returns one of the fol-
          +       lowing:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_INVALID_FIELD
          +            Contents of a field are not valid.
          +
          +       E_REQUEST_DENIED
          +            The form driver could not process the request.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/form_post.3x.html b/doc/html/man/form_post.3x.html new file mode 100644 index 00000000..e52967e8 --- /dev/null +++ b/doc/html/man/form_post.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       form_post  -  write or erase forms from associated subwin-
          +       dows
          +
          +
          +
          +

          SYNOPSIS

          +       #include <form.h>
          +       int post_form(FORM *form);
          +       int unpost_form(FORM *form);
          +
          +
          +
          +

          DESCRIPTION

          +       The function post_form displays a form to  its  associated
          +       subwindow.   To trigger physical display of the subwindow,
          +       use  refresh  or  some  equivalent  curses  routine   (the
          +       implicit  doupdate  triggered  by  an curses input request
          +       will do).
          +
          +       The function unpost_form erases form from  its  associated
          +       subwindow.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +       E_POSTED
          +            The form has already been posted.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_NO_ROOM
          +            Form is too large for its window.
          +
          +       E_NOT_POSTED
          +            The form has not been posted.
          +
          +       E_NOT_CONNECTED
          +            No items are connected to the form.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), form(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/form_requestname.3x.html b/doc/html/man/form_requestname.3x.html similarity index 50% rename from Ada95/html/man/form_requestname.3x.html rename to doc/html/man/form_requestname.3x.html index f37efdc4..dcf5065e 100644 --- a/Ada95/html/man/form_requestname.3x.html +++ b/doc/html/man/form_requestname.3x.html @@ -1,41 +1,45 @@
          -       form_requestname - handle printable form request names
          +
          +
          +
          +

          NAME

          +       form_requestname - handle printable form request names
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  const char *form_request_name(int request);
                  int form_request_by_name(const char *name);
           
           
           

          DESCRIPTION

          -       The  function form_request_name returns the printable name
          +       The  function form_request_name returns the printable name
                  of a form request code.
          -       The function form_request_by_name searches  in  the  name-
          +       The function form_request_by_name searches  in  the  name-
                  table  for  a  request with the given name and returns its
                  request code. Otherwise E_NO_MATCH is returned.
           
           
           

          RETURN VALUE

          -       form_request_name returns NULL on error and sets errno  to
          -       E_BAD_ARGUMENT.
          -       form_request_by_name returns E_NO_MATCH on error.
          +       form_request_name returns NULL on error and sets errno  to
          +       E_BAD_ARGUMENT.
          +       form_request_by_name returns E_NO_MATCH on error.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_userptr.3x.html b/doc/html/man/form_userptr.3x.html similarity index 54% rename from Ada95/html/man/form_userptr.3x.html rename to doc/html/man/form_userptr.3x.html index 49dbc78c..4ac76f8b 100644 --- a/Ada95/html/man/form_userptr.3x.html +++ b/doc/html/man/form_userptr.3x.html @@ -1,12 +1,16 @@
          -       form_userptr - associate application data with a form item
          +
          +
          +
          +

          NAME

          +       form_userptr - associate application data with a form item
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int set_form_userptr(FORM *form, void *userptr);
                  void* form_userptr(const FORM *form);
           
          @@ -21,24 +25,24 @@
           
           

          RETURN VALUE

          -       The  function  form_userptr  returns  NULL  on error.  The
          -       function set_form_userptr returns one of the following:
          +       The  function  form_userptr  returns  NULL  on error.  The
          +       function set_form_userptr returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/form_win.3x.html b/doc/html/man/form_win.3x.html similarity index 54% rename from Ada95/html/man/form_win.3x.html rename to doc/html/man/form_win.3x.html index fdb60b7c..4f73a641 100644 --- a/Ada95/html/man/form_win.3x.html +++ b/doc/html/man/form_win.3x.html @@ -1,13 +1,17 @@
          -       form_win  - make and break form window and subwindow asso-
          +
          +
          +
          +

          NAME

          +       form_win  - make and break form window and subwindow asso-
                  ciations
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <form.h>
                  int set_form_win(FORM *form, WINDOW *win);
                  WINDOW *form_win(const FORM *form);
                  int set_form_sub(FORM *form, WINDOW *sub);
          @@ -17,52 +21,56 @@
           
           

          DESCRIPTION

          -       Every  form has an associated pair of curses windows.  The
          +       Every  form has an associated pair of curses windows.  The
                  form window displays any title and border associated  with
                  the  window;  the form subwindow displays the items of the
                  form that are currently available for selection.
           
                  The first four functions get and set those windows.  It is
                  not necessary to set either window; by default, the driver
          -       code uses stdscr for both.
          +       code uses stdscr for both.
           
          -       In the set_ functions, window argument of NULL is  treated
          -       as  though  it  were  stsdcr.   A form argument of NULL is
          +       In the set_ functions, window argument of NULL is  treated
          +       as  though  it  were  stsdcr.   A form argument of NULL is
                  treated as a request to change  the  system  default  form
                  window or subwindow.
           
          -       The  function scale_form returns the minimum size required
          -       for the subwindow of form.
          +       The  function scale_form returns the minimum size required
          +       for the subwindow of form.
           
           
           

          RETURN VALUE

          -       Routines that return pointers return NULL on error.   Rou-
          +       Routines that return pointers return NULL on error.   Rou-
                  tines  that  return an integer return one of the following
                  error codes:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
          -       E_POSTED
          +       E_POSTED
                       The form has already been posted.
           
          -       E_NOT_CONNECTED
          +       E_NOT_CONNECTED
                       No items are connected to the form.
           
           
           

          SEE ALSO

          -       curses(3X), form(3X).
          +       curses(3x), form(3x).
          +
           
          -       The header file  automatically includes the header
          -       file .
          +
          +
          +

          NOTES

          +       The header file <form.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -115,8 +123,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html new file mode 100644 index 00000000..78c02edf --- /dev/null +++ b/doc/html/man/infocmp.1m.html @@ -0,0 +1,406 @@ + + +
          +
          +
          +
          +

          NAME

          +       infocmp - compare or print out terminfo descriptions
          +
          +
          +
          +

          SYNOPSIS

          +       infocmp [-dceEGgnpqrILCuV1] [-v n] [-s d| i| l| c]
          +             [-w width] [-A directory] [-B directory]
          +             [termname...]
          +
          +
          +
          +

          DESCRIPTION

          +       infocmp  can  be  used  to compare a binary terminfo entry
          +       with other terminfo entries, rewrite a  terminfo  descrip-
          +       tion  to  take  advantage  of  the use= terminfo field, or
          +       print out a terminfo  description  from  the  binary  file
          +       (term) in a variety of formats.  In all cases, the boolean
          +       fields will be printed  first,  followed  by  the  numeric
          +       fields, followed by the string fields.
          +
          +   Default Options
          +       If  no options are specified and zero or one termnames are
          +       specified, the -I option will be assumed.   If  more  than
          +       one  termname is specified, the -d option will be assumed.
          +
          +   Comparison Options [-d] [-c] [-n]
          +       infocmp compares the terminfo  description  of  the  first
          +       terminal  termname  with each of the descriptions given by
          +       the entries for the  other  terminal's  termnames.   If  a
          +       capability  is  defined for only one of the terminals, the
          +       value returned will depend on the type of the  capability:
          +       F  for  boolean  variables,  -1 for integer variables, and
          +       NULL for string variables.
          +
          +       The -d 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  dif-
          +       ferent people, for the same or similar terminals.
          +
          +       The  -c  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 -u option is worth using.
          +
          +       The -n option produces a list of each capability  that  is
          +       in neither entry.  If no termnames are given, the environ-
          +       ment variable TERM will be used for both of the termnames.
          +       This  can  be used as a quick check to see if anything was
          +       left out of a description.
          +
          +   Source Listing Options [-I] [-L] [-C] [-r]
          +       The -I, -L, and -C options will produce a  source  listing
          +       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
          +
          +       If  no  termnames are given, the environment variable TERM
          +       will be used for the terminal name.
          +
          +       The source produced by the -C option may be used  directly
          +       as  a termcap entry, but not all parameterized strings can
          +       be changed to the termcap format.  infocmp will attempt to
          +       convert  most  of  the parameterized information, and any-
          +       thing not converted will be plainly marked in  the  output
          +       and commented out.  These should be edited by hand.
          +
          +       All  padding  information  for  strings  will be collected
          +       together and placed at the beginning of the  string  where
          +       termcap  expects  it.  Mandatory padding (padding informa-
          +       tion with a trailing '/') will become optional.
          +
          +       All termcap variables no longer supported by terminfo, but
          +       which are derivable from other terminfo variables, will be
          +       output.  Not all terminfo capabilities will be translated;
          +       only  those variables which were part of termcap will nor-
          +       mally be output.  Specifying the -r option will  take  off
          +       this  restriction,  allowing all capabilities to be output
          +       in termcap form.
          +
          +       Note that because padding is collected to the beginning of
          +       the  capability,  not all capabilities are output.  Manda-
          +       tory padding is not supported.   Because  termcap  strings
          +       are  not as flexible, it is not always possible to convert
          +       a terminfo string capability into  an  equivalent  termcap
          +       format.   A subsequent conversion of the termcap file back
          +       into terminfo format will not  necessarily  reproduce  the
          +       original terminfo source.
          +
          +       Some  common  terminfo  parameter sequences, their termcap
          +       equivalents, and some terminal types which  commonly  have
          +       such sequences, are:
          +
          +     terminfo                    termcap   Representative Terminals
          +     ---------------------------------------------------------------
          +     %p1%c                       %.        adm
          +     %p1%d                       %d        hp, ANSI standard, vt100
          +     %p1%'x'%+%c                 %+x       concept
          +     %i                          %iq       ANSI standard, vt100
          +     %p1%?%'x'%>%t%p1%'y'%+%;    %>xy      concept
          +     %p2 is printed before %p1   %r        hp
          +
          +   Use= Option [-u]
          +       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  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
          +       description.  Or, if two similar terminals exist, but were
          +       coded at different times or by different  people  so  that
          +       each description is a full description, using infocmp will
          +       show what can be done to change one description to be rel-
          +       ative to the other.
          +
          +       A capability will get printed with an at-sign (@) if it no
          +       longer exists in the first termname, but one of the  other
          +       termname  entries contains a value for it.  A capability's
          +       value gets printed if the value in the first  termname  is
          +       not  found in any of the other termname entries, or if the
          +       first of the other termname entries that has this capabil-
          +       ity  gives  a different value for the capability than that
          +       in the first termname.
          +
          +       The order of the other termname  entries  is  significant.
          +       Since  the terminfo compiler tic does a left-to-right scan
          +       of the capabilities, specifying two use= entries that con-
          +       tain differing entries for the same capabilities will pro-
          +       duce different results depending on  the  order  that  the
          +       entries  are  given in.  infocmp will flag any such incon-
          +       sistencies between the other termname entries as they  are
          +       found.
          +
          +       Alternatively,  specifying a capability after a use= entry
          +       that contains that capability will cause the second speci-
          +       fication  to  be  ignored.   Using  infocmp  to recreate a
          +       description can be a useful check to make sure that every-
          +       thing  was  specified  correctly  in  the  original source
          +       description.
          +
          +       Another error  that  does  not  cause  incorrect  compiled
          +       files,  but will slow down the compilation time, is speci-
          +       fying extra use= fields  that  are  superfluous.   infocmp
          +       will  flag  any  other  termname use= fields that were not
          +       needed.
          +
          +   Changing Databases [-A directory] [-B directory]
          +       The location of the compiled terminfo  database  is  taken
          +       from  the environment variable TERMINFO .  If the variable
          +       is not defined, or the terminal is not found in that loca-
          +       tion, the system terminfo database, in @DATADIR@/terminfo,
          +       will be used.  The options -A and -B may be used to  over-
          +       ride  this  location.  The -A option will set TERMINFO for
          +       the first termname and the -B option will set TERMINFO for
          +       the other termnames.  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.
          +
          +   Other  Options  [-s d|i|l|c] [-1FTVefip] [-Rsubset] [-v n] [-w
          +       width]
          +       The -s option sorts the fields within each type  according
          +       to the argument below:
          +
          +       d    leave fields in the order that they are stored in the
          +            terminfo database.
          +
          +       i    sort by terminfo name.
          +
          +       l    sort by the long C variable name.
          +
          +       c    sort by the termcap name.
          +
          +            If the -s option is not given, the fields printed out
          +            will  be  sorted  alphabetically by the terminfo name
          +            within each type, except in the case of the -C or the
          +            -L options, which cause the sorting to be done by the
          +            termcap name or the long  C  variable  name,  respec-
          +            tively.
          +
          +       -1   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.
          +
          +       -F   compare  terminfo  files.  This assumes that two fol-
          +            lowing  arguments  are  filenames.   The  files   are
          +            searched  for  pairwise matches between entries, with
          +            two entries considered to match if any of their names
          +            do.   The  report  printed  to  standard output lists
          +            entries with  no  matches  in  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  dif-
          +            ferences, but resolution can be forced by also speci-
          +            fying -r.
          +
          +       -G   Display constant literals in decimal form rather than
          +            their character equivalents.
          +
          +       -a   tells  infocmp  to  retain commented-out capabilities
          +            rather than discarding them.  Capabilities  are  com-
          +            mented by prefixing them with a period.
          +
          +       -q   Make  the comparison listing shorter by omitting sub-
          +            headings, and using "-" for absent capabilities,  "@"
          +            for canceled rather than "NULL".
          +
          +       -Rsubset
          +            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 that have their own extensions incompati-
          +            ble with SVr4/XSI.  Available  terminfo  subsets  are
          +            "SVr1",  "Ultrix",  "HP",  and "AIX"; see terminfo(5)
          +            for details.  You can also choose  the  subset  "BSD"
          +            which  selects only capabilities with termcap equiva-
          +            lents recognized by 4.4BSD.
          +
          +       -T   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).
          +
          +       -V   prints out the version of the program in use on stan-
          +            dard error and exits.
          +
          +       -e   Dump the capabilities of the given terminal  as  a  C
          +            initializer  for  a  TERMTYPE structure (the terminal
          +            capability structure in the <term.h>).   This  option
          +            is  useful  for  preparing  versions  of  the  curses
          +            library hardwired for a given terminal type.
          +
          +       -E   Dump  the  capabilities  of  the  given  terminal  as
          +            tables,  needed  in  the C initializer for a TERMTYPE
          +            structure (the terminal capability structure  in  the
          +            <term.h>).   This option is useful for preparing ver-
          +            sions of the curses library  hardwired  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.
          +
          +            Before  ncurses  5.0, the split between the -e and -E
          +            options was not  needed;  but  support  for  extended
          +            names required making the arrays of terminal capabil-
          +            ities separate from the TERMTYPE structure.
          +
          +       -f   Display  complex  terminfo  strings   which   contain
          +            if/then/else/endif expressions indented for readabil-
          +            ity.
          +
          +       -g   Display constant character literals  in  quoted  form
          +            rather than their decimal equivalents.
          +
          +       -i   Analyze the initialization (is1, is2, is3), and reset
          +            (rs1, rs2, rs3), strings  in  the  entry.   For  each
          +            string,  the code tries to analyze it into actions in
          +            terms of the other capabilities in the entry, certain
          +            X3.64/ISO  6429/ECMA-48 capabilities, and certain DEC
          +            VT-series private modes (the set of  recognized  spe-
          +            cial  sequences  has  been  selected for completeness
          +            over the existing terminfo  database).   Each  report
          +            line  consists  of the capability name, followed by a
          +            colon and space, followed by a printable expansion of
          +            the  capability  string with sections matching recog-
          +            nized   actions    translated    into    {}-bracketed
          +            descriptions.  Here is a list of the DEC/ANSI special
          +            sequences recognized:
          +
          +                  Action        Meaning
          +                  -----------------------------------------
          +                  RIS           full reset
          +                  SC            save cursor
          +                  RC            restore cursor
          +                  LL            home-down
          +                  RSR           reset scroll region
          +
          +                  ISO DEC G0    enable DEC graphics for G0
          +                  ISO UK G0     enable UK chars for G0
          +                  ISO US G0     enable US chars for G0
          +                  ISO DEC G1    enable DEC graphics for G1
          +                  ISO UK G1     enable UK chars for G1
          +                  ISO US G1     enable US chars for G1
          +
          +                  DECPAM        application keypad mode
          +                  DECPNM        normal keypad mode
          +                  DECANSI       enter ANSI mode
          +
          +                  DEC[+-]CKM    application cursor keys
          +                  DEC[+-]ANM    set VT52 mode
          +                  DEC[+-]COLM   132-column mode
          +                  DEC[+-]SCLM   smooth scroll
          +                  DEC[+-]SCNM   reverse video mode
          +                  DEC[+-]OM     origin mode
          +                  DEC[+-]AWM    wraparound mode
          +                  DEC[+-]ARM    auto-repeat mode
          +
          +            It also recognizes  a  SGR  action  corresponding  to
          +            ANSI/ISO  6429/ECMA  Set Graphics Rendition, with the
          +            values NORMAL, BOLD, UNDERLINE, BLINK,  and  REVERSE.
          +            All  but NORMAL may be prefixed with `+' (turn on) or
          +            `-' (turn off).
          +
          +            An  SGR0  designates  an  empty  highlight   sequence
          +            (equivalent to {SGR:NORMAL}).
          +
          +       -p   Ignore padding specifications when comparing strings.
          +
          +       -v n prints out tracing information on standard  error  as
          +            the  program runs.  Higher values of n induce greater
          +            verbosity.
          +
          +       -w width
          +            changes the output to width characters.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo  Compiled     terminal      description
          +                           database.
          +
          +
          +
          +
          +

          EXTENSIONS

          +       The  -E,  -F,  -G,  -R, -T, -a, -e, -f, -g, -i, -p, and -q
          +       options are not supported in SVr4 curses.
          +
          +       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.
          +
          +
          +
          +

          BUGS

          +       The -F option of infocmp(1m) should be a toe(1m) mode.
          +
          +
          +
          +

          SEE ALSO

          +       infocmp(1m),    captoinfo(1m),   infotocap(1m),   tic(1m),
          +       toe(1m), curses(3x), terminfo(5).
          +
          +
          +
          +

          AUTHOR

          +       Eric S.  Raymond  <esr@snark.thyrsus.com>  and  Thomas  E.
          +       Dickey <dickey@herndon4.his.com>
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html new file mode 100644 index 00000000..7194e0ae --- /dev/null +++ b/doc/html/man/infotocap.1m.html @@ -0,0 +1,78 @@ + + +
          +
          +
          +
          +

          NAME

          +       infotocap  - convert a terminfo description into a termcap
          +       description
          +
          +
          +
          +

          SYNOPSIS

          +       infotocap [-vn width]  [-V] [-1] [-w width] file . . .
          +
          +
          +
          +

          DESCRIPTION

          +       infotocap looks in file for  terminfo  descriptions.   For
          +       each one found, an equivalent termcap description is writ-
          +       ten to standard output.   Terminfo  use  capabilities  are
          +       translated directly to termcap tc capabilities.
          +
          +       -v   print  out  tracing  information on standard error as
          +            the program runs.
          +
          +       -V   print out the version of the program in use on  stan-
          +            dard error and exit.
          +
          +       -1   cause  the fields to print out one to a line.  Other-
          +            wise, the fields will be printed several to a line to
          +            a maximum width of 60 characters.
          +
          +       -w   change the output to width characters.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo  Compiled      terminal     description
          +                           database.
          +
          +
          +
          +

          NOTES

          +       This utility is actually a link to tic(1m), running in  -C
          +       mode.  You can use other tic options such as -f and  -x.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), tic(1m), infocmp(1m), terminfo(5)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/keybound.3x.html b/doc/html/man/keybound.3x.html new file mode 100644 index 00000000..11af1ac3 --- /dev/null +++ b/doc/html/man/keybound.3x.html @@ -0,0 +1,80 @@ + + +
          +
          +
          +
          +

          NAME

          +       keybound - return definition of keycode
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +       int keybound(int keycode, int count);
          +
          +
          +
          +

          DESCRIPTION

          +       This is an extension to the curses library.  It permits an
          +       application to determine the string which  is  defined  in
          +       the terminfo for specific keycodes.
          +
          +
          +
          +

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

          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), keyok(3x).
          +
          +
          +
          +

          AUTHOR

          +       Thomas Dickey.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/keyok.3x.html b/doc/html/man/keyok.3x.html similarity index 61% rename from Ada95/html/man/keyok.3x.html rename to doc/html/man/keyok.3x.html index ba188ece..1dbe4551 100644 --- a/Ada95/html/man/keyok.3x.html +++ b/doc/html/man/keyok.3x.html @@ -1,21 +1,25 @@
          -       keyok - enable or disable a keycode
          +
          +
          +
          +

          NAME

          +       keyok - enable or disable a keycode
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <curses.h>
           
          -       int keyok(int keycode, bool enable);
          +       int keyok(int keycode, bool enable);
           
           
           

          DESCRIPTION

                  This is an extension to the curses library.  It permits an
                  application to disable specific keycodes, rather than  use
          -       the  keypad  function  to disable all keycodes.  Keys that
          +       the  keypad  function  to disable all keycodes.  Keys that
                  have been disabled can be reenabled.
           
           
          @@ -23,7 +27,7 @@
           

          RETURN VALUE

                  The keycode  must  be  greater  than  zero,  else  ERR  is
                  returned.   If  it  does  not correspond to a defined key,
          -       then ERR is returned.  If the enable  parameter  is  true,
          +       then ERR is returned.  If the enable  parameter  is  true,
                  then  the  key  must  have  been disabled, and vice versa.
                  Otherwise, the function returns OK.
           
          @@ -38,7 +42,7 @@
           
           

          SEE ALSO

          -       define_key(3X).
          +       define_key(3x).
           
           
           
          @@ -63,8 +67,14 @@ +
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html new file mode 100644 index 00000000..74fe0b7f --- /dev/null +++ b/doc/html/man/menu.3x.html @@ -0,0 +1,244 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu - curses extension for programming menus
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +
          +
          +
          +

          DESCRIPTION

          +       The  menu library provides terminal-independent facilities
          +       for composing menu systems  on  character-cell  terminals.
          +       The library includes: item routines, which create and mod-
          +       ify menu items; and menu routines, which group items  into
          +       menus, display menus on the screen, and handle interaction
          +       with the user.
          +
          +       The menu library uses the curses libraries, and  a  curses
          +       initialization  routine  such  as  initscr  must be called
          +       before using any of these  functions.   To  use  the  menu
          +       library, link with the options -lmenu -lcurses.
          +
          +
          +   Current Default Values for Item Attributes
          +       The  menu  library  maintains  a  default  value  for item
          +       attributes.  You can get or set this  default  by  calling
          +       the  appropriate  get_  or  set_  routine with a NULL item
          +       pointer.  Changing  this  default  with  a  set_  function
          +       affects  future  item  creations,  but does not change the
          +       rendering of items already created.
          +
          +
          +   Routine Name Index
          +       The following table lists each menu routine and  the  name
          +       of the manual page on which it is described.
          +
          +       curses Routine Name    Manual Page Name
          +       --------------------------------------------
          +       current_item           mitem_current(3x)
          +       free_item              mitem_new(3x)
          +       free_menu              menu_new(3x)
          +       item_count             menu_items(3x)
          +       item_description       mitem_name(3x)
          +       item_index             mitem_current(3x)
          +       item_init              menu_hook(3x)
          +       item_name              mitem_name(3x)
          +       item_opts              mitem_opts(3x)
          +       item_opts_off          mitem_opts(3x)
          +       item_opts_on           mitem_opts(3x)
          +       item_term              menu_hook(3x)
          +       item_userptr           mitem_userptr(3x)
          +       item_value             mitem_value(3x)
          +       item_visible           mitem_visible(3x)
          +       menu_back              menu_attribs(3x)
          +       menu_driver            menu_driver(3x)
          +       menu_fore              menu_attribs(3x)
          +
          +       menu_format            menu_format(3x)
          +       menu_grey              menu_attribs(3x)
          +       menu_init              menu_hook(3x)
          +       menu_items             menu_items(3x)
          +       menu_mark              menu_mark(3x)
          +       menu_opts              menu_opts(3x)
          +       menu_opts_off          menu_opts(3x)
          +       menu_opts_on           menu_opts(3x)
          +       menu_pad               menu_attribs(3x)
          +       menu_pattern           menu_pattern(3x)
          +       menu_request_by_name   menu_requestname(3x)
          +       menu_request_name      menu_requestname(3x)
          +       menu_spacing           menu_spacing(3x)
          +       menu_sub               menu_win(3x)
          +       menu_term              menu_hook(3x)
          +       menu_userptr           menu_userptr(3x)
          +       menu_win               menu_win(3x)
          +       new_item               mitem_new(3x)
          +       new_menu               menu_new(3x)
          +       pos_menu_cursor        menu_cursor(3x)
          +       post_menu              menu_post(3x)
          +       scale_menu             menu_win(3x)
          +       set_current_item       mitem_current(3x)
          +       set_item_init          menu_hook(3x)
          +       set_item_opts          mitem_opts(3x)
          +       set_item_term          menu_hook(3x)
          +       set_item_userptr       mitem_userptr(3x)
          +       set_item_value         mitem_value(3x)
          +       set_menu_back          menu_attribs(3x)
          +       set_menu_fore          menu_attribs(3x)
          +       set_menu_format        menu_format(3x)
          +       set_menu_grey          menu_attribs(3x)
          +       set_menu_init          menu_hook(3x)
          +       set_menu_items         menu_items(3x)
          +       set_menu_mark          menu_mark(3x)
          +       set_menu_opts          mitem_opts(3x)
          +       set_menu_pad           menu_attribs(3x)
          +       set_menu_pattern       menu_pattern(3x)
          +       set_menu_spacing       menu_spacing(3x)
          +       set_menu_sub           menu_win(3x)
          +       set_menu_term          menu_hook(3x)
          +       set_menu_userptr       menu_userptr(3x)
          +       set_menu_win           menu_win(3x)
          +       set_top_row            mitem_current(3x)
          +       top_row                mitem_current(3x)
          +       unpost_menu            menu_post(3x)
          +
          +
          +
          +

          RETURN VALUE

          +       Routines  that return pointers return NULL on error.  Rou-
          +       tines that return an integer return one of  the  following
          +       error codes:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +       E_POSTED
          +            The menu is already posted.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_NO_ROOM
          +            Menu is too large for its window.
          +
          +       E_NOT_POSTED
          +            The menu has not been posted.
          +
          +       E_UNKNOWN_COMMAND
          +            The menu driver code saw an unknown request code.
          +
          +       E_NO_MATCH
          +            Character failed to match.
          +
          +       E_NOT_SELECTABLE
          +            The designated item cannot be selected.
          +
          +       E_NOT_CONNECTED
          +            No items are connected to the menu.
          +
          +       E_REQUEST_DENIED
          +            The menu driver could not process the request.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)  and  3x  pages  whose  names begin "menu_" for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       files <curses.h> and <eti.h>.
          +
          +       In  your  library  list,  libmenu.a should be before libn-
          +       curses.a; that is, you want to say `-lmenu -lncurses', not
          +       the  other  way  around (which would give you a link error
          +       using GNU ld(1) and many other linkers).
          +
          +
          +
          +

          PORTABILITY

          +       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 ncurses
          +       by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_attribs.3x.html b/doc/html/man/menu_attribs.3x.html new file mode 100644 index 00000000..d6e82b0a --- /dev/null +++ b/doc/html/man/menu_attribs.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_attributes - color and attribute control for menus
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_menu_fore(MENU *menu, chtype attr);
          +       chtype menu_fore(const MENU *menu);
          +       int set_menu_back(MENU *menu, chtype attr);
          +       chtype menu_back(const MENU *menu);
          +       int set_menu_grey(MENU *menu, chtype attr);
          +       chtype menu_grey(const MENU *menu);
          +       int set_menu_pad(MENU *menu, int pad);
          +       int menu_pad(const MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_menu_fore sets the foreground attribute
          +       of menu. This is the  highlight  used  for  selected  menu
          +       items.   menu_fore  returns the foreground attribute.  The
          +       default is A_STANDOUT.
          +
          +       The function set_menu_back sets the  background  attribute
          +       of  menu.  This  is the highlight used for selectable (but
          +       not  currently  selected)  menu   items.    The   function
          +       menu_back  returns  the background attribute.  The default
          +       is A_NORMAL.
          +
          +       The function set_menu_grey  sets  the  grey  attribute  of
          +       menu.  This  is  the highlight used for un-selectable menu
          +       items in menus that permit more than one  selection.   The
          +       function   menu_grey  returns  the  grey  attribute.   The
          +       default is A_UNDERLINE.
          +
          +       The function set_menu_pad sets the character used to  fill
          +       the space between the name and description parts of a menu
          +       item.  menu_pad returns the given  menu's  pad  character.
          +       The default is a blank.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x) and 3x pages  whose  names  begin  "menu_"  for
          +       detailed descriptions of the entry points.
          +
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/menu_cursor.3x.html b/doc/html/man/menu_cursor.3x.html similarity index 50% rename from Ada95/html/man/menu_cursor.3x.html rename to doc/html/man/menu_cursor.3x.html index 71bd279e..aed8af81 100644 --- a/Ada95/html/man/menu_cursor.3x.html +++ b/doc/html/man/menu_cursor.3x.html @@ -1,20 +1,24 @@
          -       menu_cursor - position a menu's cursor
          +
          +
          +
          +

          NAME

          +       menu_cursor - position a menu's cursor
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int pos_menu_cursor(const MENU *menu);
           
           
           

          DESCRIPTION

          -       The  function  pos_menu_cursor  restores the cursor to the
          +       The  function  pos_menu_cursor  restores the cursor to the
                  current position associated with the menu's selected item.
          -       This  is  useful after curses routines have been called to
          +       This  is  useful after curses routines have been called to
                  do screen-painting in response to a menu select.
           
           
          @@ -22,28 +26,28 @@
           

          RETURN VALUE

                  This routine returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
          -       E_NOT_POSTED
          +       E_NOT_POSTED
                       The menu has not been posted.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ +
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/menu_driver.3x.html b/doc/html/man/menu_driver.3x.html similarity index 74% rename from Ada95/html/man/menu_driver.3x.html rename to doc/html/man/menu_driver.3x.html index 40c11f8a..48ea272f 100644 --- a/Ada95/html/man/menu_driver.3x.html +++ b/doc/html/man/menu_driver.3x.html @@ -1,19 +1,23 @@
          -       menu_driver - command-processing loop of the menu system
          +
          +
          +
          +

          NAME

          +       menu_driver - command-processing loop of the menu system
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int menu_driver(MENU *menu, int c);
           
           
           

          DESCRIPTION

                  Once a menu has been posted (displayed), you should funnel
          -       input events to it through menu_driver.  This routine  has
          +       input events to it through menu_driver.  This routine  has
                  three  major input cases; either the input is a menu navi-
                  gation request, it's a printable ASCII character or it  is
                  the  KEY_MOUSE special key associated with an mouse event.
          @@ -57,6 +61,8 @@
           
                  REQ_TOGGLE_ITEM
                       Select/deselect an item.
          +
          +       REQ_CLEAR_PATTERN
                       Clear the menu pattern buffer.
           
                  REQ_BACK_PATTERN
          @@ -72,7 +78,7 @@
                  If the second argument is a printable ASCII character, the
                  code appends it to the pattern buffer and attempts to move
                  to the next item matching the new pattern.  If there is no
          -       such match, menu_driver returns E_NO_MATCH and deletes the
          +       such match, menu_driver returns E_NO_MATCH and deletes the
                  appended character from the buffer.
           
                  If the second argument is one  of  the  above  pre-defined
          @@ -92,60 +98,64 @@
                  you click at an item inside the display area of the  menu,
                  the menu cursor is positioned to that item. If you double-
                  click at  an  item  a  REQ_TOGGLE_ITEM  is  generated  and
          -       E_UNKNOWN_COMMAND  is  returned.  This  return value makes
          +       E_UNKNOWN_COMMAND  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 pur-
                  pose of this return value to signal  that  an  application
                  specific command should be executed. If a translation into
          -       a request was done, menu_driver returns the result of this
          +       a request was done, menu_driver 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
          -       E_REQUEST_DENIED is returned.
          +       E_REQUEST_DENIED is returned.
           
                  If  the second argument is neither printable ASCII nor one
                  of the above pre-defined menu requests or  KEY_MOUSE,  the
                  drive  assumes  it  is an application-specific command and
          -       returns E_UNKNOWN_COMMAND.   Application-defined  commands
          -       should  be  defined  relative  to MAX_COMMAND, the maximum
          +       returns E_UNKNOWN_COMMAND.   Application-defined  commands
          +       should  be  defined  relative  to MAX_COMMAND, the maximum
                  value of these pre-defined requests.
           
          -       menu_driver return one of the following error codes:
           
          -       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +
          +

          RETURN VALUE

          +       menu_driver return one of the following error codes:
           
          -       E_BAD_ARGUMENT
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
          -       E_BAD_STATE
          +       E_BAD_STATE
                       Routine was called from an initialization or termina-
                       tion function.
           
          -       E_NOT_POSTED
          +       E_NOT_POSTED
                       The menu has not been posted.
           
          -       E_UNKNOWN_COMMAND
          +       E_UNKNOWN_COMMAND
                       The menu driver code saw an unknown request code.
           
          -       E_NO_MATCH
          +       E_NO_MATCH
                       Character failed to match.
           
          -       E_REQUEST_DENIED
          +       E_REQUEST_DENIED
                       The menu driver could not process the request.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       files .
          +       The header file <menu.h> automatically includes the header
          +       files <curses.h>.
           
           
           
          @@ -169,6 +179,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/menu_format.3x.html b/doc/html/man/menu_format.3x.html new file mode 100644 index 00000000..8702733b --- /dev/null +++ b/doc/html/man/menu_format.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_format - set and get menu sizes
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_menu_format(MENU *menu, int rows, int cols);
          +       int menu_format(const MENU *menu, int *rows, int *cols);
          +
          +
          +
          +

          DESCRIPTION

          +       The function set_menu_format sets the maximum display size
          +       of the given menu.  If this size is too small  to  display
          +       all  menu items, the menu will be made scrollable. If this
          +       size is larger than the menus subwindow and the  subwindow
          +       is  too  small to display all menu items, post_menu() will
          +       fail.
          +
          +       The  default  format  is  16  rows,  1  column.    Calling
          +       set_menu_format  with a null menu pointer will change this
          +       default.  A zero row or column argument to set_menu_format
          +       is  interpreted  as  a  request  not to change the current
          +       value.
          +
          +       The function menu_format  returns  the  maximum-size  con-
          +       straints  for the given menu into the storage addressed by
          +       rows and cols.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines returns one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_POSTED
          +            The menu is already posted.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_hook.3x.html b/doc/html/man/menu_hook.3x.html new file mode 100644 index 00000000..59519cd4 --- /dev/null +++ b/doc/html/man/menu_hook.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_hook - set hooks for automatic invocation by applica-
          +       tions
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_item_init(MENU *menu, void (*func)(MENU *));
          +       void (*)(MENU *) item_init(const MENU *menu);
          +       int set_item_term(MENU *menu, void (*func)(MENU *));
          +       void (*)(MENU *) item_term(const MENU *menu);
          +       int set_menu_init(MENU *menu, void (*func)(MENU *));
          +       void (*)(MENU *) menu_init(const MENU *menu);
          +       int set_menu_term(MENU *menu, void (*func)(MENU *));
          +       void (*)(MENU *) menu_term(const MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       These functions make it possible to set hook functions  to
          +       be called at various points in the automatic processing of
          +       input event codes by menu_driver.
          +
          +       The function set_item_init sets a hook  to  be  called  at
          +       menu-post  time  and  each  time the selected item changes
          +       (after the change).  item_init returns  the  current  item
          +       init hook, if any (NULL if there is no such hook).
          +
          +       The  function  set_item_term  sets  a hook to be called at
          +       menu-unpost time and each time the selected  item  changes
          +       (before  the  change).  item_term returns the current item
          +       term hook, if any (NULL if there is no such hook).
          +
          +       The function set_menu_init sets a hook  to  be  called  at
          +       menu-post  time  and  just  after  the top row on the menu
          +       changes once it is posted.  menu_init returns the  current
          +       menu init hook, if any (NULL if there is no such hook).
          +
          +       The  function  set_menu_term  sets  a hook to be called at
          +       menu-unpost time and just before the top row on  the  menu
          +       changes  once it is posted.  menu_term returns the current
          +       menu term hook, if any (NULL if there is no such hook).
          +
          +
          +
          +

          RETURN VALUE

          +       Routines that return pointers return NULL on error.  Other
          +       routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_items.3x.html b/doc/html/man/menu_items.3x.html new file mode 100644 index 00000000..d2bde33d --- /dev/null +++ b/doc/html/man/menu_items.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_items  - make and break connections between items and
          +       menus
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_menu_items(MENU *menu, ITEM **items);
          +       ITEM **menu_items(const MENU *menu);
          +       int item_count(const MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       The function set_menu_items changes the item pointer array
          +       of  the  given  menu.   The  array must be terminated by a
          +       NULL.
          +
          +       The function menu_items returns  the  item  array  of  the
          +       given menu.
          +
          +       The  function  item_count  returns  the  count of items in
          +       menu.
          +
          +
          +
          +

          RETURN VALUES

          +       The function menu_items returns NULL on error.
          +
          +       The function item_count returns ERR  (the  general  curses
          +       error return value) on error.
          +
          +       The  function  set_menu_items returns one of the following
          +       codes on error:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_POSTED
          +            The menu is already posted.
          +
          +       E_NOT_CONNECTED
          +            No items are connected to the menu.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       These routines emulate the System V  menu  library.   They
          +       were not supported on Version 7 or BSD versions.
          +
          +       The   SVr4   menu   library  documentation  specifies  the
          +       item_count error value as -1 (which is the value of  ERR).
          +
          +
          +
          +

          AUTHORS

          +       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_mark.3x.html b/doc/html/man/menu_mark.3x.html new file mode 100644 index 00000000..f2eeac90 --- /dev/null +++ b/doc/html/man/menu_mark.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_mark - get and set the menu mark string
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_menu_mark(MENU *menu, const char *mark);
          +       const char *menu_mark(const MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       In  order  to make menu selections visible on older termi-
          +       nals without highlighting or color  capability,  the  menu
          +       library  marks  selected  items  in  a  menu with a prefix
          +       string.
          +
          +       The function set_menu_mark sets the mark  string  for  the
          +       given  menu.   Calling set_menu_mark with a null menu item
          +       will abolish the mark  string.   Note  that  changing  the
          +       length  of  the  mark  string for a menu while the menu is
          +       posted is likely to produce unhelpful behavior.
          +
          +       The default string is "-" (a dash). Calling  set_menu_mark
          +       with a NULL menu argument will change this default.
          +
          +       The  function menu_mark returns the menu's mark string (or
          +       NULL if there is none).
          +
          +
          +
          +

          RETURN VALUE

          +       The function menu_mark returns NULL on error.   The  func-
          +       tion set_menu_mark may return the following error codes:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine  detected  an incorrect or out-of-range argu-
          +            ment.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_new.3x.html b/doc/html/man/menu_new.3x.html new file mode 100644 index 00000000..33e39ad9 --- /dev/null +++ b/doc/html/man/menu_new.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_new - create and destroy menus
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       MENU *new_menu(ITEM **items);
          +       int free_menu(MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  new_menu  creates a new menu connected to a
          +       specified item pointer array (which  must  be  NULL-termi-
          +       nated).
          +
          +       The  function  free_menu  disconnects  menu  from its item
          +       array and frees the storage allocated for the menu.
          +
          +
          +
          +

          RETURN VALUE

          +       The function new_menu returns NULL on error.
          +
          +       The function free_menu returns one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_POSTED
          +            The menu has already been posted.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/menu_opts.3x.html b/doc/html/man/menu_opts.3x.html similarity index 60% rename from Ada95/html/man/menu_opts.3x.html rename to doc/html/man/menu_opts.3x.html index 8de4b8a2..5730121f 100644 --- a/Ada95/html/man/menu_opts.3x.html +++ b/doc/html/man/menu_opts.3x.html @@ -1,12 +1,16 @@
          -       menu_opts - set and get menu options
          +
          +
          +
          +

          NAME

          +       menu_opts - set and get menu options
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int set_menu_opts(MENU *menu, OPTIONS opts);
                  int menu_opts_on(MENU *menu, OPTIONS opts);
                  int menu_opts_off(MENU *menu, OPTIONS opts);
          @@ -15,17 +19,17 @@
           
           

          DESCRIPTION

          -       The  function  set_menu_opts  sets  all  the  given menu's
          +       The  function  set_menu_opts  sets  all  the  given menu's
                  option bits  (menu  option  bits  may  be  logically-OR'ed
                  together).
           
          -       The  function menu_opts_on turns on the given option bits,
          +       The  function menu_opts_on turns on the given option bits,
                  and leaves others alone.
           
          -       The function menu_opts_off  turns  off  the  given  option
          +       The function menu_opts_off  turns  off  the  given  option
                  bits, and leaves others alone.
           
          -       The  function  menu_opts returns the menu's current option
          +       The  function  menu_opts returns the menu's current option
                  bits.
           
                  The following options are defined (all are on by default):
          @@ -54,26 +58,28 @@
           
           

          RETURN VALUE

          -       Except for menu_opts, each routine returns one of the fol-
          +       Except for menu_opts, each routine returns one of the fol-
                  lowing:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -            System error occurred (see errno).
           
          -       E_POSTED
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_POSTED
                       The menu is already posted.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -117,8 +123,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/menu_pattern.3x.html b/doc/html/man/menu_pattern.3x.html new file mode 100644 index 00000000..2db0a3af --- /dev/null +++ b/doc/html/man/menu_pattern.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_pattern - get and set a menu's pattern buffer
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_menu_pattern(MENU *menu, const char *pattern);
          +       char *menu_pattern(const MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       Every  menu  has  an  associated pattern match buffer.  As
          +       input events that are printable ASCII characters come  in,
          +       they  are  appended  to this match buffer and tested for a
          +       match, as described in menu_driver(3x).
          +
          +       The function set_menu_pattern sets the pattern buffer  for
          +       the  given menu and tries to find the first matching item.
          +       If it succeeds, that item becomes  current;  if  not,  the
          +       current item does not change.
          +
          +       The  function  menu_pattern  returns the pattern buffer of
          +       the given menu.
          +
          +
          +
          +

          RETURN VALUE

          +       The function menu_pattern  returns  NULL  on  error.   The
          +       function  set_menu_pattern  may return the following error
          +       codes:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_NO_MATCH
          +            Character failed to match.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/menu_post.3x.html b/doc/html/man/menu_post.3x.html new file mode 100644 index 00000000..ca734478 --- /dev/null +++ b/doc/html/man/menu_post.3x.html @@ -0,0 +1,136 @@ + + +
          +
          +
          +
          +

          NAME

          +       menu_post  -  write or erase menus from associated subwin-
          +       dows
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int post_menu(MENU *menu);
          +       int unpost_menu(MENU *menu);
          +
          +
          +
          +

          DESCRIPTION

          +       The function post_menu displays a menu to  its  associated
          +       subwindow.   To trigger physical display of the subwindow,
          +       use  refresh  or  some  equivalent  curses  routine   (the
          +       implicit  doupdate  triggered  by  an curses input request
          +       will do). post_menu resets the  selection  status  of  all
          +       items.
          +
          +       The  function  unpost_menu erases menu from its associated
          +       subwindow.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines return one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_POSTED
          +            The menu has already been posted.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_NO_ROOM
          +            Menu is too large for its window. You should consider
          +            to use set_menu_format() to solve the problem.
          +
          +       E_NOT_POSTED
          +            The menu has not been posted.
          +
          +       E_NOT_CONNECTED
          +            No items are connected to the menu.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/menu_requestname.3x.html b/doc/html/man/menu_requestname.3x.html similarity index 50% rename from Ada95/html/man/menu_requestname.3x.html rename to doc/html/man/menu_requestname.3x.html index dd8f26e5..388d1fe2 100644 --- a/Ada95/html/man/menu_requestname.3x.html +++ b/doc/html/man/menu_requestname.3x.html @@ -1,41 +1,45 @@
          -       menu_requestname - handle printable menu request names
          +
          +
          +
          +

          NAME

          +       menu_requestname - handle printable menu request names
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  const char *menu_request_name(int request);
                  int menu_request_by_name(const char *name);
           
           
           

          DESCRIPTION

          -       The  function menu_request_name returns the printable name
          +       The  function menu_request_name returns the printable name
                  of a menu request code.
          -       The function menu_request_by_name searches  in  the  name-
          +       The function menu_request_by_name searches  in  the  name-
                  table  for  a  request with the given name and returns its
                  request code. Otherwise E_NO_MATCH is returned.
           
           
           

          RETURN VALUE

          -       menu_request_name returns NULL on error and sets errno  to
          -       E_BAD_ARGUMENT.
          -       menu_request_by_name returns E_NO_MATCH on error.
          +       menu_request_name returns NULL on error and sets errno  to
          +       E_BAD_ARGUMENT.
          +       menu_request_by_name returns E_NO_MATCH on error.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/menu_spacing.3x.html b/doc/html/man/menu_spacing.3x.html similarity index 58% rename from Ada95/html/man/menu_spacing.3x.html rename to doc/html/man/menu_spacing.3x.html index 8ed19c22..ba2cd1cd 100644 --- a/Ada95/html/man/menu_spacing.3x.html +++ b/doc/html/man/menu_spacing.3x.html @@ -1,12 +1,16 @@
          -       menu_spacing - Control spacing between menu items.
          +
          +
          +
          +

          NAME

          +       menu_spacing - Control spacing between menu items.
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int set_menu_spacing(MENU *menu,
                                       int spc_description
                                       int spc_rows,
          @@ -19,41 +23,41 @@
           
           

          DESCRIPTION

          -       The  function  set_menu_spacing  sets the spacing informa-
          -       tions for the menu.  spc_description controls  the  number
          +       The  function  set_menu_spacing  sets the spacing informa-
          +       tions for the menu.  spc_description controls  the  number
                  of spaces between an item name and an item description. It
          -       must not be larger than TABSIZE. The menu system  puts  in
          +       must not be larger than TABSIZE. The menu system  puts  in
                  the  middle  of  this  spacing area the pad character. The
          -       remaining parts are filled with spaces.  spc_rows controls
          +       remaining parts are filled with spaces.  spc_rows controls
                  the  number of rows that are used for an item. It must not
                  be larger than 3. The menu system inserts then blank lines
                  between  item rows, these lines will contain the pad char-
          -       acter in the appropriate positions.  spc_columns  controls
          +       acter in the appropriate positions.  spc_columns  controls
                  the number of blanks between columns of items. It must not
                  be larger than TABSIZE.  A value of 0 for all the  spacing
                  values  resets  them to the default, which is 1 for all of
                  them.
          -       The function menu_spacing passes back the spacing info for
          +       The function menu_spacing passes back the spacing info for
                  the menu. If a pointer is NULL, this specific info is sim-
                  ply not returned.
           
           
           

          RETURN VALUE

          -       Both routines return E_OK on success. set_menu_spacing may
          -       return  E_POSTED  if the menu is posted, or E_BAD_ARGUMENT
          +       Both routines return E_OK on success. set_menu_spacing may
          +       return  E_POSTED  if the menu is posted, or E_BAD_ARGUMENT
                  if one of the spacing values is out of range.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@

          AUTHORS

                  Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
          +       curses by Eric S. Raymond.
           
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/menu_userptr.3x.html b/doc/html/man/menu_userptr.3x.html similarity index 57% rename from Ada95/html/man/menu_userptr.3x.html rename to doc/html/man/menu_userptr.3x.html index 606907b2..5eebdb8f 100644 --- a/Ada95/html/man/menu_userptr.3x.html +++ b/doc/html/man/menu_userptr.3x.html @@ -1,12 +1,16 @@
          -       menu_userptr - associate application data with a menu item
          +
          +
          +
          +

          NAME

          +       menu_userptr - associate application data with a menu item
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int set_menu_userptr(MENU *menu, void *userptr);
                  void *menu_userptr(const MENU *menu);
           
          @@ -21,24 +25,24 @@
           
           

          RETURN VALUE

          -       Except  for  menu_userptr  (which  returns NULL on error),
          +       Except  for  menu_userptr  (which  returns NULL on error),
                  each function returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/Ada95/html/man/menu_win.3x.html b/doc/html/man/menu_win.3x.html similarity index 54% rename from Ada95/html/man/menu_win.3x.html rename to doc/html/man/menu_win.3x.html index 50b879a6..c2fb72a6 100644 --- a/Ada95/html/man/menu_win.3x.html +++ b/doc/html/man/menu_win.3x.html @@ -1,13 +1,17 @@
          -       menu_win  - make and break menu window and subwindow asso-
          +
          +
          +
          +

          NAME

          +       menu_win  - make and break menu window and subwindow asso-
                  ciations
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int set_menu_win(MENU *menu, WINDOW *win);
                  WINDOW *menu_win(const MENU *menu);
                  int set_menu_sub(MENU *menu, WINDOW *sub);
          @@ -17,52 +21,56 @@
           
           

          DESCRIPTION

          -       Every  menu has an associated pair of curses windows.  The
          +       Every  menu has an associated pair of curses windows.  The
                  menu window displays any title and border associated  with
                  the  window;  the menu subwindow displays the items of the
                  menu that are currently available for selection.
           
                  The first four functions get and set those windows.  It is
                  not necessary to set either window; by default, the driver
          -       code uses stdscr for both.
          +       code uses stdscr for both.
           
          -       In the set_ functions, window argument of NULL is  treated
          -       as  though  it  were  stsdcr.   A menu argument of NULL is
          +       In the set_ functions, window argument of NULL is  treated
          +       as  though  it  were  stsdcr.   A menu argument of NULL is
                  treated as a request to change  the  system  default  menu
                  window or subwindow.
           
          -       The  function scale_menu returns the minimum size required
          -       for the subwindow of menu.
          +       The  function scale_menu returns the minimum size required
          +       for the subwindow of menu.
           
           
           

          RETURN VALUE

          -       Routines that return pointers return NULL on error.   Rou-
          +       Routines that return pointers return NULL on error.   Rou-
                  tines  that  return an integer return one of the following
                  error codes:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine detected an incorrect or  out-of-range  argu-
                       ment.
           
          -       E_POSTED
          +       E_POSTED
                       The menu has already been posted.
           
          -       E_NOT_CONNECTED
          +       E_NOT_CONNECTED
                       No items are connected to the menu.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
          +
           
          -       The header file  automatically includes the header
          -       file .
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -115,8 +123,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/mitem_current.3x.html b/doc/html/man/mitem_current.3x.html new file mode 100644 index 00000000..ab74dffb --- /dev/null +++ b/doc/html/man/mitem_current.3x.html @@ -0,0 +1,137 @@ + + +
          +
          +
          +
          +

          NAME

          +       mitem_current - set and get current_menu_item
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_current_item(MENU *menu, const ITEM *item);
          +       ITEM *current_item(const MENU *menu);
          +       int set_top_row(MENU *menu, int row);
          +       int top_row(const MENU *menu);
          +       int item_index(const ITEM *item);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_current_item sets the current item (the
          +       item on  which  the  menu  cursor  is  positioned).   cur-
          +       rent_item  returns  a  pointer  to the current item in the
          +       given menu.
          +
          +       The function set_top_row sets the top row of the  menu  to
          +       show  the  given  row  (the top row is initially 0, and is
          +       reset to this value whenever the O_ROWMAJOR option is tog-
          +       gled).   The  item  leftmost on the given row becomes cur-
          +       rent.  The function top_row returns the number of the  top
          +       menu row being displayed.
          +
          +       The function item_index returns the (zero-origin) index of
          +       item in the menu's item pointer list.
          +
          +
          +
          +

          RETURN VALUE

          +       current_item returns NULL on error.
          +
          +       top_row and item_index  return  ERR  (the  general  curses
          +       error value) on error.
          +
          +       set_current_item and set_top_row return one of the follow-
          +       ing:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_BAD_ARGUMENT
          +            Routine detected an incorrect or  out-of-range  argu-
          +            ment.
          +
          +       E_BAD_STATE
          +            Routine was called from an initialization or termina-
          +            tion function.
          +
          +       E_NOT_CONNECTED
          +            No items are connected to the menu.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       These  routines  emulate  the System V menu library.  They
          +       were not supported on Version 7 or BSD versions.
          +
          +       The SVr4 menu library documentation specifies the  top_row
          +       and  index_item  error  value as -1 (which is the value of
          +       ERR).
          +
          +
          +
          +

          AUTHORS

          +       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/mitem_name.3x.html b/doc/html/man/mitem_name.3x.html new file mode 100644 index 00000000..803f966d --- /dev/null +++ b/doc/html/man/mitem_name.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       mitem_name - get menu item name and description fields
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       const char *item_name(const ITEM *item);
          +       const char *item_description(const ITEM *item);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function item_name returns the name part of the given
          +       item.
          +       The function item_description returns the description part
          +       of the given item.
          +
          +
          +
          +

          RETURN VALUE

          +       These routines returns NULL on error.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/mitem_new.3x.html b/doc/html/man/mitem_new.3x.html similarity index 52% rename from Ada95/html/man/mitem_new.3x.html rename to doc/html/man/mitem_new.3x.html index 0c8e2a14..9918f6cf 100644 --- a/Ada95/html/man/mitem_new.3x.html +++ b/doc/html/man/mitem_new.3x.html @@ -1,26 +1,30 @@
          -       mitem_new - create and destroy menu items
          +
          +
          +
          +

          NAME

          +       mitem_new - create and destroy menu items
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  ITEM *new_item(const char *name, const char *description);
                  int free_item(ITEM *item);
           
           
           

          DESCRIPTION

          -       The function new_item allocates a new item and initializes
          -       it  from  the name and description pointers. Please notice
          +       The function new_item allocates a new item and initializes
          +       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.
          -       The function free_item de-allocates an item. Please notice
          +       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
                  item.
          @@ -28,32 +32,32 @@
           
           

          RETURN VALUE

          -       The function new_item returns NULL on error.
          +       The function new_item returns NULL on error.
           
          -       The function free_item returns one of the following:
          +       The function free_item returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
          -       E_BAD_ARGUMENT
          +       E_BAD_ARGUMENT
                       Routine  detected  an incorrect or out-of-range argu-
                       ment.
           
          -       E_CONNECTED
          +       E_CONNECTED
                       Item is connected to a menu.
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/mitem_opts.3x.html b/doc/html/man/mitem_opts.3x.html new file mode 100644 index 00000000..17abe429 --- /dev/null +++ b/doc/html/man/mitem_opts.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       mitem_opts - set and get menu item options
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_item_opts(ITEM *item, OPTIONS opts);
          +       int item_opts_on(ITEM *item, OPTIONS opts);
          +       int item_opts_off(ITEM *item, OPTIONS opts);
          +       OPTIONS item_opts(const ITEM *item);
          +
          +
          +
          +

          DESCRIPTION

          +       The  function  set_item_opts  sets  all  the  given item's
          +       option bits  (menu  option  bits  may  be  logically-OR'ed
          +       together).
          +
          +       The  function item_opts_on turns on the given option bits,
          +       and leaves others alone.
          +
          +       The function item_opts_off  turns  off  the  given  option
          +       bits, and leaves others alone.
          +
          +       The  function  item_opts returns the item's current option
          +       bits.
          +
          +       There is only one defined option bit  mask,  O_SELECTABLE.
          +       When this is on, the item may be selected during menu pro-
          +       cessing.  This option defaults to on.
          +
          +
          +
          +

          RETURN VALUE

          +       Except for item_opts, each routine returns one of the fol-
          +       lowing:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/mitem_userptr.3x.html b/doc/html/man/mitem_userptr.3x.html similarity index 57% rename from Ada95/html/man/mitem_userptr.3x.html rename to doc/html/man/mitem_userptr.3x.html index 4d1616b6..7d7c5618 100644 --- a/Ada95/html/man/mitem_userptr.3x.html +++ b/doc/html/man/mitem_userptr.3x.html @@ -1,13 +1,17 @@
          -       mitem_userptr  -  associate  application  data with a menu
          +
          +
          +
          +

          NAME

          +       mitem_userptr  -  associate  application  data with a menu
                  item
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  int set_item_userptr(ITEM *item, void *userptr);
                  void *item_userptr(const ITEM *item);
           
          @@ -21,24 +25,24 @@
           
           

          RETURN VALUE

          -       Except  for  item_userptr  (which  returns NULL on error),
          +       Except  for  item_userptr  (which  returns NULL on error),
                  each function returns one of the following:
           
          -       E_OK The routine succeeded.
          +       E_OK The routine succeeded.
           
          -       E_SYSTEM_ERROR
          -            System error occurred (see errno).
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
           
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -67,6 +71,12 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/mitem_value.3x.html b/doc/html/man/mitem_value.3x.html new file mode 100644 index 00000000..a83ece25 --- /dev/null +++ b/doc/html/man/mitem_value.3x.html @@ -0,0 +1,82 @@ + + +
          +
          +
          +
          +

          NAME

          +       mitem_value - set and get menu item values
          +
          +
          +
          +

          SYNOPSIS

          +       #include <menu.h>
          +       int set_item_value(ITEM *item, bool value);
          +       bool item_value(const ITEM *item);
          +
          +
          +
          +

          DESCRIPTION

          +       If  you  turn  off  the menu option O_ONEVALUE (e.g., with
          +       set_menu_opts or menu_opts_off;  see  menu_opts(3x)),  the
          +       menu becomes multi-valued; that is, more than one item may
          +       simultaneously be selected.
          +
          +       In a multi_valued menu, you  can  used  set_item_value  to
          +       select the given menu item (second argument TRUE) or dese-
          +       lect it (second argument FALSE).
          +
          +
          +
          +

          RETURN VALUE

          +       The function set_item_value returns one of the following:
          +
          +       E_OK The routine succeeded.
          +
          +       E_SYSTEM_ERROR
          +            System error occurred (see errno).
          +
          +       E_REQUEST_DENIED
          +            The menu driver could not process the request.
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), menu(3x).
          +
          +
          +
          +

          NOTES

          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
          +
          +
          +
          +

          PORTABILITY

          +       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
          +       curses by Eric S. Raymond.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/mitem_visible.3x.html b/doc/html/man/mitem_visible.3x.html similarity index 59% rename from Ada95/html/man/mitem_visible.3x.html rename to doc/html/man/mitem_visible.3x.html index 86c4090a..bc105a0a 100644 --- a/Ada95/html/man/mitem_visible.3x.html +++ b/doc/html/man/mitem_visible.3x.html @@ -1,12 +1,16 @@
          -       mitem_visible - check visibility of a menu item
          +
          +
          +
          +

          NAME

          +       mitem_visible - check visibility of a menu item
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <menu.h>
                  bool item_visible(const ITEM *item);
           
           
          @@ -20,13 +24,13 @@
           
           

          SEE ALSO

          -       curses(3X), menu(3X).
          +       curses(3x), menu(3x).
           
           
           

          NOTES

          -       The header file  automatically includes the header
          -       file .
          +       The header file <menu.h> automatically includes the header
          +       file <curses.h>.
           
           
           
          @@ -63,8 +67,14 @@ + +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html new file mode 100644 index 00000000..24ba4e7a --- /dev/null +++ b/doc/html/man/ncurses.3x.html @@ -0,0 +1,898 @@ + + +
          +
          +
          +
          +

          NAME

          +       ncurses - CRT screen handling and optimization package
          +
          +
          +
          +

          SYNOPSIS

          +       #include <curses.h>
          +
          +
          +
          +

          DESCRIPTION

          +       The  ncurses  library  routines  give the user a terminal-
          +       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 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 direc-
          +       tory) that describe curses actions.
          +
          +       The  ncurses  package supports: overall screen, window and
          +       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 exiting.  To get character-at-a-time
          +       input without echoing (most interactive,  screen  oriented
          +       programs  want  this),  the  following  sequence should be
          +       used:
          +
          +             initscr(); cbreak(); noecho();
          +
          +       Most programs would additionally use the sequence:
          +
          +             nonl();
          +             intrflush(stdscr, FALSE);
          +             keypad(stdscr, TRUE);
          +
          +       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
          +       for doing this.  [See terminfo(5) for further details.]
          +
          +       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
          +       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
          +       each character.
          +
          +       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  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
          +       information read by terminfo.  This would effect a program
          +       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 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
          +
          +             @DATADIR@/terminfo/a/att4424.
          +
          +       (The a is copied from the first letter of att4424 to avoid
          +       creation of huge directories.)  However,  if  TERMINFO  is
          +       set to $HOME/myterms, curses first checks
          +
          +             $HOME/myterms/a/att4424,
          +
          +       and if that fails, it then checks
          +
          +             @DATADIR@/terminfo/a/att4424.
          +
          +       This  is useful for developing experimental definitions or
          +       when write permission in @DATADIR@/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 val-
          +       ues 1 and 0, respectively.
          +
          +       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
          +       curscr can be used in only a few routines.
          +
          +
          +   Routine and Argument Names
          +       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
          +       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
          +       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.
          +
          +       Option setting routines require a Boolean flag bf with the
          +       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
          +       XPG4 or present in SVr4.
          +
          +               curses Routine Name     Manual Page Name
          +               -------------------------------------------
          +               COLOR_PAIR              curs_color(3x)
          +               PAIR_NUMBER             curs_attr(3x)
          +               _nc_tracebits           curs_trace(3x)*
          +               _traceattr              curs_trace(3x)*
          +               _traceattr2             curs_trace(3x)*
          +               _tracechar              curs_trace(3x)*
          +               _tracechtype            curs_trace(3x)*
          +               _tracechtype2           curs_trace(3x)*
          +               _tracedump              curs_trace(3x)*
          +               _tracef                 curs_trace(3x)*
          +               _tracemouse             curs_trace(3x)*
          +               addch                   curs_addch(3x)
          +               addchnstr               curs_addchstr(3x)
          +               addchstr                curs_addchstr(3x)
          +               addnstr                 curs_addstr(3x)
          +               addstr                  curs_addstr(3x)
          +               assume_default_colors   dft_fgbg(3x)*
          +               attr_get                curs_attr(3x)
          +               attr_off                curs_attr(3x)
          +               attr_on                 curs_attr(3x)
          +               attr_set                curs_attr(3x)
          +               attroff                 curs_attr(3x)
          +               attron                  curs_attr(3x)
          +               attrset                 curs_attr(3x)
          +               baudrate                curs_termattrs(3x)
          +               beep                    curs_beep(3x)
          +               bkgd                    curs_bkgd(3x)
          +               bkgdset                 curs_bkgd(3x)
          +               border                  curs_border(3x)
          +               box                     curs_border(3x)
          +               can_change_color        curs_color(3x)
          +               cbreak                  curs_inopts(3x)
          +               chgat                   curs_attr(3x)
          +               clear                   curs_clear(3x)
          +               clearok                 curs_outopts(3x)
          +
          +               clrtobot                curs_clear(3x)
          +               clrtoeol                curs_clear(3x)
          +               color_content           curs_color(3x)
          +               color_set               curs_attr(3x)
          +               copywin                 curs_overlay(3x)
          +               curs_set                curs_kernel(3x)
          +               curses_version          curs_extend(3x)*
          +               def_prog_mode           curs_kernel(3x)
          +               def_shell_mode          curs_kernel(3x)
          +               define_key              define_key(3x)*
          +               del_curterm             curs_terminfo(3x)
          +               delay_output            curs_util(3x)
          +               delch                   curs_delch(3x)
          +               deleteln                curs_deleteln(3x)
          +               delscreen               curs_initscr(3x)
          +               delwin                  curs_window(3x)
          +               derwin                  curs_window(3x)
          +               doupdate                curs_refresh(3x)
          +               dupwin                  curs_window(3x)
          +               echo                    curs_inopts(3x)
          +               echochar                curs_addch(3x)
          +               endwin                  curs_initscr(3x)
          +               erase                   curs_clear(3x)
          +               erasechar               curs_termattrs(3x)
          +               filter                  curs_util(3x)
          +               flash                   curs_beep(3x)
          +               flushinp                curs_util(3x)
          +               getbegyx                curs_getyx(3x)
          +               getbkgd                 curs_bkgd(3x)
          +               getch                   curs_getch(3x)
          +               getmaxyx                curs_getyx(3x)
          +               getmouse                curs_mouse(3x)*
          +               getnstr                 curs_getstr(3x)
          +               getparyx                curs_getyx(3x)
          +               getstr                  curs_getstr(3x)
          +               getsyx                  curs_kernel(3x)
          +               getwin                  curs_util(3x)
          +               getyx                   curs_getyx(3x)
          +               halfdelay               curs_inopts(3x)
          +               has_colors              curs_color(3x)
          +               has_ic                  curs_termattrs(3x)
          +               has_il                  curs_termattrs(3x)
          +               has_key                 curs_getch(3x)*
          +               hline                   curs_border(3x)
          +               idcok                   curs_outopts(3x)
          +               idlok                   curs_outopts(3x)
          +               immedok                 curs_outopts(3x)
          +               inch                    curs_inch(3x)
          +               inchnstr                curs_inchstr(3x)
          +               inchstr                 curs_inchstr(3x)
          +               init_color              curs_color(3x)
          +               init_pair               curs_color(3x)
          +               initscr                 curs_initscr(3x)
          +
          +               innstr                  curs_instr(3x)
          +               insch                   curs_insch(3x)
          +               insdelln                curs_deleteln(3x)
          +               insertln                curs_deleteln(3x)
          +               insnstr                 curs_insstr(3x)
          +               insstr                  curs_insstr(3x)
          +               instr                   curs_instr(3x)
          +               intrflush               curs_inopts(3x)
          +               is_linetouched          curs_touch(3x)
          +               is_wintouched           curs_touch(3x)
          +               isendwin                curs_initscr(3x)
          +               keybound                keybound(3x)*
          +               keyname                 curs_util(3x)
          +               keyok                   keyok(3x)*
          +               keypad                  curs_inopts(3x)
          +               killchar                curs_termattrs(3x)
          +               leaveok                 curs_outopts(3x)
          +               longname                curs_termattrs(3x)
          +               mcprint                 curs_print(3x)*
          +               meta                    curs_inopts(3x)
          +               mouse_trafo             curs_mouse(3x)*
          +               mouseinterval           curs_mouse(3x)*
          +               mousemask               curs_mouse(3x)*
          +               move                    curs_move(3x)
          +               mvaddch                 curs_addch(3x)
          +               mvaddchnstr             curs_addchstr(3x)
          +               mvaddchstr              curs_addchstr(3x)
          +               mvaddnstr               curs_addstr(3x)
          +               mvaddstr                curs_addstr(3x)
          +               mvchgat                 curs_attr(3x)
          +               mvcur                   curs_terminfo(3x)
          +               mvdelch                 curs_delch(3x)
          +               mvderwin                curs_window(3x)
          +               mvgetch                 curs_getch(3x)
          +               mvgetnstr               curs_getstr(3x)
          +               mvgetstr                curs_getstr(3x)
          +               mvhline                 curs_border(3x)
          +               mvinch                  curs_inch(3x)
          +               mvinchnstr              curs_inchstr(3x)
          +               mvinchstr               curs_inchstr(3x)
          +               mvinnstr                curs_instr(3x)
          +               mvinsch                 curs_insch(3x)
          +               mvinsnstr               curs_insstr(3x)
          +               mvinsstr                curs_insstr(3x)
          +               mvinstr                 curs_instr(3x)
          +               mvprintw                curs_printw(3x)
          +               mvscanw                 curs_scanw(3x)
          +               mvvline                 curs_border(3x)
          +               mvwaddch                curs_addch(3x)
          +               mvwaddchnstr            curs_addchstr(3x)
          +               mvwaddchstr             curs_addchstr(3x)
          +               mvwaddnstr              curs_addstr(3x)
          +               mvwaddstr               curs_addstr(3x)
          +
          +               mvwchgat                curs_attr(3x)
          +               mvwdelch                curs_delch(3x)
          +               mvwgetch                curs_getch(3x)
          +               mvwgetnstr              curs_getstr(3x)
          +               mvwgetstr               curs_getstr(3x)
          +               mvwhline                curs_border(3x)
          +               mvwin                   curs_window(3x)
          +               mvwinch                 curs_inch(3x)
          +               mvwinchnstr             curs_inchstr(3x)
          +               mvwinchstr              curs_inchstr(3x)
          +               mvwinnstr               curs_instr(3x)
          +               mvwinsch                curs_insch(3x)
          +               mvwinsnstr              curs_insstr(3x)
          +               mvwinsstr               curs_insstr(3x)
          +               mvwinstr                curs_instr(3x)
          +               mvwprintw               curs_printw(3x)
          +               mvwscanw                curs_scanw(3x)
          +               mvwvline                curs_border(3x)
          +               napms                   curs_kernel(3x)
          +               newpad                  curs_pad(3x)
          +               newterm                 curs_initscr(3x)
          +               newwin                  curs_window(3x)
          +               nl                      curs_outopts(3x)
          +               nocbreak                curs_inopts(3x)
          +               nodelay                 curs_inopts(3x)
          +               noecho                  curs_inopts(3x)
          +               nonl                    curs_outopts(3x)
          +               noqiflush               curs_inopts(3x)
          +               noraw                   curs_inopts(3x)
          +               notimeout               curs_inopts(3x)
          +               overlay                 curs_overlay(3x)
          +               overwrite               curs_overlay(3x)
          +               pair_content            curs_color(3x)
          +               pechochar               curs_pad(3x)
          +               pnoutrefresh            curs_pad(3x)
          +               prefresh                curs_pad(3x)
          +               printw                  curs_printw(3x)
          +               putp                    curs_terminfo(3x)
          +               putwin                  curs_util(3x)
          +               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)
          +               resetty                 curs_kernel(3x)
          +               resizeterm              resizeterm(3x)*
          +               restartterm             curs_terminfo(3x)
          +               ripoffline              curs_kernel(3x)
          +               savetty                 curs_kernel(3x)
          +               scanw                   curs_scanw(3x)
          +               scr_dump                curs_scr_dump(3x)
          +               scr_init                curs_scr_dump(3x)
          +
          +               scr_restore             curs_scr_dump(3x)
          +               scr_set                 curs_scr_dump(3x)
          +               scrl                    curs_scroll(3x)
          +               scroll                  curs_scroll(3x)
          +               scrollok                curs_outopts(3x)
          +               set_curterm             curs_terminfo(3x)
          +               set_term                curs_initscr(3x)
          +               setscrreg               curs_outopts(3x)
          +               setsyx                  curs_kernel(3x)
          +               setterm                 curs_terminfo(3x)
          +               setupterm               curs_terminfo(3x)
          +               slk_attr                curs_slk(3x)*
          +               slk_attr_off            curs_slk(3x)
          +               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)
          +               slk_color               curs_slk(3x)
          +               slk_init                curs_slk(3x)
          +               slk_label               curs_slk(3x)
          +               slk_noutrefresh         curs_slk(3x)
          +               slk_refresh             curs_slk(3x)
          +               slk_restore             curs_slk(3x)
          +               slk_set                 curs_slk(3x)
          +               slk_touch               curs_slk(3x)
          +               standend                curs_attr(3x)
          +               standout                curs_attr(3x)
          +               start_color             curs_color(3x)
          +               subpad                  curs_pad(3x)
          +               subwin                  curs_window(3x)
          +               syncok                  curs_window(3x)
          +               termattrs               curs_termattrs(3x)
          +               termname                curs_termattrs(3x)
          +               tgetent                 curs_termcap(3x)
          +               tgetflag                curs_termcap(3x)
          +               tgetnum                 curs_termcap(3x)
          +               tgetstr                 curs_termcap(3x)
          +               tgoto                   curs_termcap(3x)
          +               tigetflag               curs_terminfo(3x)
          +               tigetnum                curs_terminfo(3x)
          +               tigetstr                curs_terminfo(3x)
          +               timeout                 curs_inopts(3x)
          +               touchline               curs_touch(3x)
          +               touchwin                curs_touch(3x)
          +               tparm                   curs_terminfo(3x)
          +               tputs                   curs_termcap(3x)
          +               tputs                   curs_terminfo(3x)
          +               trace                   curs_trace(3x)*
          +               typeahead               curs_inopts(3x)
          +               unctrl                  curs_util(3x)
          +               ungetch                 curs_getch(3x)
          +
          +               ungetmouse              curs_mouse(3x)*
          +               untouchwin              curs_touch(3x)
          +               use_default_colors      dft_fgbg(3x)*
          +               use_env                 curs_util(3x)
          +               use_extended_names      curs_extend(3x)*
          +               vidattr                 curs_terminfo(3x)
          +               vidputs                 curs_terminfo(3x)
          +               vline                   curs_border(3x)
          +               vw_printw               curs_printw(3x)
          +               vw_scanw                curs_scanw(3x)
          +               vwprintw                curs_printw(3x)
          +               vwscanw                 curs_scanw(3x)
          +               waddch                  curs_addch(3x)
          +               waddchnstr              curs_addchstr(3x)
          +               waddchstr               curs_addchstr(3x)
          +               waddnstr                curs_addstr(3x)
          +               waddstr                 curs_addstr(3x)
          +               wattr_get               curs_attr(3x)
          +               wattr_off               curs_attr(3x)
          +               wattr_on                curs_attr(3x)
          +               wattr_set               curs_attr(3x)
          +               wattroff                curs_attr(3x)
          +               wattron                 curs_attr(3x)
          +               wattrset                curs_attr(3x)
          +               wbkgd                   curs_bkgd(3x)
          +               wbkgdset                curs_bkgd(3x)
          +               wborder                 curs_border(3x)
          +               wchgat                  curs_attr(3x)
          +               wclear                  curs_clear(3x)
          +               wclrtobot               curs_clear(3x)
          +               wclrtoeol               curs_clear(3x)
          +               wcolor_set              curs_attr(3x)
          +               wcursyncup              curs_window(3x)
          +               wdelch                  curs_delch(3x)
          +               wdeleteln               curs_deleteln(3x)
          +               wechochar               curs_addch(3x)
          +               wenclose                curs_mouse(3x)*
          +               werase                  curs_clear(3x)
          +               wgetch                  curs_getch(3x)
          +               wgetnstr                curs_getstr(3x)
          +               wgetstr                 curs_getstr(3x)
          +               whline                  curs_border(3x)
          +               winch                   curs_inch(3x)
          +               winchnstr               curs_inchstr(3x)
          +               winchstr                curs_inchstr(3x)
          +               winnstr                 curs_instr(3x)
          +               winsch                  curs_insch(3x)
          +               winsdelln               curs_deleteln(3x)
          +               winsertln               curs_deleteln(3x)
          +               winsnstr                curs_insstr(3x)
          +               winsstr                 curs_insstr(3x)
          +               winstr                  curs_instr(3x)
          +               wmouse_trafo            curs_mouse(3x)*
          +
          +               wmove                   curs_move(3x)
          +               wnoutrefresh            curs_refresh(3x)
          +               wprintw                 curs_printw(3x)
          +               wredrawln               curs_refresh(3x)
          +               wrefresh                curs_refresh(3x)
          +               wresize                 wresize(3x)*
          +               wscanw                  curs_scanw(3x)
          +               wscrl                   curs_scroll(3x)
          +               wsetscrreg              curs_outopts(3x)
          +               wstandend               curs_attr(3x)
          +               wstandout               curs_attr(3x)
          +               wsyncdown               curs_window(3x)
          +               wsyncup                 curs_window(3x)
          +               wtimeout                curs_inopts(3x)
          +               wtouchln                curs_touch(3x)
          +               wvline                  curs_border(3x)
          +
          +
          +
          +

          RETURN VALUE

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

          ENVIRONMENT

          +       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
          +            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 ter-
          +            minfo entries provide this feature.
          +
          +       COLUMNS
          +            Specify  the  width  of  the  screen  in  characters.
          +            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
          +            terminfo database (i.e., the cols capability).
          +
          +            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.
          +
          +            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, lines and cols should not be specified
          +            in a terminal description for terminals which are run
          +            as emulations.
          +
          +            Use the use_env function to disable this feature.
          +
          +       ESCDELAY
          +            Specifies  the total time, in milliseconds, for which
          +            ncurses will await  a  character  sequence,  e.g.,  a
          +            function  key.  The default value, 1000 milliseconds,
          +            is enough for most uses.  However, it is made a 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
          +            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.
          +
          +            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
          +            well as the individual clicks.
          +
          +       HOME Tells  ncurses where your home directory is.  That is
          +            where  it  may  read  and  write  auxiliary  terminal
          +            descriptions:
          +
          +            $HOME/.termcap
          +            $HOME/.terminfo
          +
          +       LINES
          +            Like  COLUMNS,  specify  the  height of the screen in
          +            characters.  See COLUMNS for a detailed  description.
          +
          +
          +       MOUSE_BUTTONS_123
          +            This applies only to the OS/2 EMX port.  It specifies
          +            the order of buttons on the mouse.   OS/2  numbers  a
          +            3-button mouse inconsistently from other platforms:
          +
          +            1 = left
          +            2 = right
          +            3 = middle.
          +
          +            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, ncurses uses
          +            132.
          +
          +       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 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., tim-
          +            ing.  Unless a hardware terminal is interfaced into a
          +            terminal concentrator (which does flow  control),  it
          +            (or  your application) must manage dataflow, prevent-
          +            ing 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.
          +
          +            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.
          +
          +            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 flash.
          +
          +       NCURSES_NO_SETBUF
          +            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.
          +
          +       NCURSES_TRACE
          +            During  initialization, the ncurses debugging library
          +            checks the NCURSES_TRACE symbol.  If it  is  defined,
          +            to a numeric value, ncurses calls the trace function,
          +            using that value as the argument.
          +
          +            The argument values, which are defined  in  curses.h,
          +            provide  several  types of information.  When running
          +            with traces enabled, your application will write  the
          +            file trace to the current directory.
          +
          +       TERM Denotes  your  terminal  type.  Each terminal type is
          +            distinct, though many are similar.
          +
          +       TERMCAP
          +            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.
          +
          +            The   TERMCAP   symbol  contains  either  a  terminal
          +            description (with newlines stripped out), or  a  file
          +            name  telling  where  the  information denoted by the
          +            TERM symbol  exists.   In  either  case,  setting  it
          +            directs  ncurses  to  ignore the usual place for this
          +            information, e.g., /etc/termcap.
          +
          +       TERMINFO
          +            Overrides the directory in which ncurses searches for
          +            your terminal description.  This is the simplest, but
          +            not the only way to change the list  of  directories.
          +            The complete list of directories in order follows:
          +
          +            -  the last directory to which ncurses wrote, if any,
          +               is searched first.
          +
          +            -  the directory specified by the TERMINFO symbol
          +
          +            -  $HOME/.terminfo
          +
          +            -  directories listed in the TERMINFO_DIRS symbol
          +
          +            -  one or more directories whose names are configured
          +               and  compiled  into  the  ncurses  library,  e.g.,
          +               @DATADIR@/terminfo
          +
          +       TERMINFO_DIRS
          +            Specifies a list of directories to search for  termi-
          +            nal  descriptions.   The  list is separated by colons
          +            (i.e., ":").  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 file-
          +            names  separated  by  colons  (i.e.,  ":").   If  the
          +            TERMPATH  symbol  is  not  set,  ncurses looks in the
          +            files   /etc/termcap,   /usr/share/misc/termcap   and
          +            $HOME/.termcap, in that order.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/tabset
          +            directory  containing  initialization  files  for the
          +            terminal capability database @DATADIR@/terminfo  ter-
          +            minal capability database
          +
          +
          +
          +

          SEE ALSO

          +       terminfo(5)  and  3x  pages  whose names begin "curs_" for
          +       detailed routine descriptions.
          +
          +
          +
          +

          EXTENSIONS

          +       The  ncurses  library  can  be  compiled  with  an  option
          +       (-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
          +       the curs_mouse(3x) manual page for details.
          +
          +       The ncurses library includes facilities for responding  to
          +       window  resizing  events,  e.g., when running in an xterm.
          +       See the resizeterm(3x) and wresize(3x)  manual  pages  for
          +       details.   In addition, the library may be configured with
          +       a SIGWINCH handler.
          +
          +       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.
          +
          +       The ncurses library can exploit the capabilities of termi-
          +       nals  which  implement the ISO-6429 SGR 39 and SGR 49 con-
          +       trols, 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  col-
          +       ored  text  on  a  background  whose color is set indepen-
          +       dently, providing better  control  over  color  contrasts.
          +       See the use_default_colors(3x) manual page for details.
          +
          +       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: add_wch, add_wchnstr, add_wchstr,  addnw-
          +       str,  addwstr,  bkgrnd,  bkgrndset,  border_set,  box_set,
          +       echo_wchar,  erasewchar,  get_wch,  get_wstr,   getbkgrnd,
          +       getcchar,   getn_wstr,   getwchtype,   hline_set,  in_wch,
          +       in_wchnstr,  in_wchstr,   innwstr,   ins_nwstr,   ins_wch,
          +       ins_wstr,  inwchnstr,  inwchstr,  inwstr,  key_name, kill-
          +       wchar, mvadd_wch, mvadd_wchnstr, mvadd_wchstr, mvaddnwstr,
          +       mvaddwstr,   mvget_wch,   mvget_wstr,   mvgetn_wstr,  mvh-
          +       line_set,  mvin_wch,  mvinnwstr,  mvins_nwstr,  mvins_wch,
          +       mvins_wstr, mvinwchnstr, mvinwchstr, mvinwchstr, mvinwstr,
          +       mvvline_set,  mvwadd_wch,  mvwadd_wchnstr,  mvwadd_wchstr,
          +       mvwaddnwstr,     mvwaddwstr,     mvwget_ch,    mvwget_wch,
          +       mvwget_wstr,   mvwgetn_wstr,   mvwhline_set,    mvwin_wch,
          +       mvwin_wchnstr,   mvwin_wchstr,  mvwinnwstr,  mvwins_nwstr,
          +       mvwins_wch, mvwins_wstr, mvwinwchnstr.   mvwinwstr,  mvwv-
          +       line_set,  pecho_wchar,  setcchar,  slk_wset,  term_attrs,
          +       unget_wch,  vhline_set,  vid_attr,  vid_puts,   vline_set,
          +       wadd_wch,  wadd_wchnstr, wadd_wchstr, waddnwstr, waddwstr,
          +       waddwstr, wbkgrnd,  wbkgrndset,  wbkgrndset,  wborder_set,
          +       wecho_wchar, wecho_wchar, wget_wch, wget_wstr, wgetbkgrnd,
          +       wgetn_wstr, whline_set, win_wch, win_wchnstr,  win_wchstr,
          +       winnwstr,  wins_nwstr,  wins_wch,  wins_wstr,  winwchnstr,
          +       winwchstr, winwstr, wunctrl, wvline_set,
          +
          +       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.
          +
          +       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, 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
          +       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 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.
          +
          +       In  the  XSI  standard  and  SVr4 manual pages, many entry
          +       points have prototype arguments of the for char *const (or
          +       cchar_t  *const,  or  wchar_t  *const,  or  void  *const).
          +       Depending on one's interpretation of the ANSI  C  standard
          +       (see  section  3.5.4.1), these declarations are either (a)
          +       meaningless, or (b) meaningless and illegal.  The declara-
          +       tion const char *x is a modifiable pointer to unmodifiable
          +       data, but char *const x' is  an  unmodifiable  pointer  to
          +       modifiable  data.  Given that C passes arguments by value,
          +       <type> *const as a formal type is at best  dubious.   Some
          +       compilers  choke  on  the  prototypes.  Therefore, in this
          +       implementation, they have been changed to const  <type>  *
          +       globally.
          +
          +
          +
          +

          NOTES

          +       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 fea-
          +       ture of AT&T System V Release 3 curses.
          +
          +
          +
          +

          AUTHORS

          +       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
          +       Based on pcurses by Pavel Curtis.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html new file mode 100644 index 00000000..a07930d5 --- /dev/null +++ b/doc/html/man/panel.3x.html @@ -0,0 +1,194 @@ + + +
          +
          +
          +
          +

          NAME

          +       panel - panel stack extension for curses
          +
          +
          +
          +

          SYNOPSIS

          +       #include <panel.h>
          +
          +       cc [flags] sourcefiles -lpanel -lncurses
          +
          +       PANEL *new_panel(WINDOW *win)
          +       int bottom_panel(PANEL *pan)
          +       int top_panel(PANEL *pan)
          +       int show_panel(PANEL *pan)
          +       void update_panels();
          +       int hide_panel(PANEL *pan)
          +       WINDOW *panel_window(const PANEL *pan)
          +       int replace_panel(PANEL *pan, WINDOW *window)
          +       int move_panel(PANEL *pan, int starty, int startx)
          +       int panel_hidden(const PANEL *pan)
          +       PANEL *panel_above(const PANEL *pan)
          +       PANEL *panel_below(const PANEL *pan)
          +       int set_panel_userptr(PANEL *pan, const void *ptr)
          +       const void *panel_userptr(const PANEL *pan)
          +       int del_panel(PANEL *pan)
          +
          +
          +
          +

          DESCRIPTION

          +       Panels  are  curses(3x)  windows with the added feature of
          +       depth.  Panel functions allow the use of  stacked  windows
          +       and  ensure  the  proper  portions  of each window and the
          +       curses stdscr window are hidden or displayed  when  panels
          +       are  added,  moved,  modified or removed.  The set of cur-
          +       rently visible panels is the stack of panels.  The  stdscr
          +       window  is  beneath all panels, and is not considered part
          +       of the stack.
          +
          +       A window is associated with every panel.  The  panel  rou-
          +       tines  enable you to create, move, hides, and show panels,
          +       as well as position a panel at any desired location in the
          +       stack.
          +
          +       Panel routines are a functional layer added to curses(3x),
          +       make only high-level curses calls, and work anywhere  ter-
          +       minfo curses does.
          +
          +
          +
          +

          FUNCTIONS

          +       new_panel(win)
          +              allocates   a   PANEL structure, associates it with
          +              win, places the panel  on  the  top  of  the  stack
          +              (causes   it  to   be   displayed  above  any other
          +              panel) and returns a pointer to the new panel.
          +
          +       void update_panels()
          +              refreshes the virtual screen to reflect  the  rela-
          +              tions between the panels in the stack, but does not
          +              call doupdate() to  refresh  the  physical  screen.
          +              Use this function and not wrefresh or wnoutrefresh.
          +              update_panels() may be called more than once before
          +              a  call  to doupdate(), but doupdate() is the func-
          +              tion responsible for updating the physical  screen.
          +
          +       del_panel(pan)
          +              removes the given panel from the  stack and deallo-
          +              cates the PANEL structure (but not  its  associated
          +              window).
          +
          +       hide_panel(pan)
          +              removes  the  given  panel from the panel stack and
          +              thus hides it from view. The PANEL structure is not
          +              lost, merely removed from the stack.
          +
          +       show_panel(pan)
          +              makes  a  hidden panel visible by placing it on top
          +              of the panels in the panel stack. See COMPATIBILITY
          +              below.
          +
          +       top_panel(pan)
          +              puts  the  given visible panel on top of all panels
          +              in the stack.  See COMPATIBILITY below.
          +
          +       bottom_panel(pan)
          +              puts panel at the bottom of all panels.
          +
          +       move_panel(pan,starty,startx)
          +              moves the given panel window so that its upper-left
          +              corner  is  at  starty, startx.  It does not change
          +              the position of the panel in the stack.  Be sure to
          +              use  this  function,  not  mvwin(), to move a panel
          +              window.
          +
          +       replace_panel(pan,window)
          +              replaces the current window of  panel  with  window
          +              (useful, for example if you want to resize a panel;
          +              if you're using ncurses, you can call replace_panel
          +              on  the output of wresize(3x)).  It does not change
          +              the position of the panel in the stack.
          +
          +       panel_above(pan)
          +              returns a pointer to the panel above pan.   If  the
          +              panel  argument is (PANEL *)0, it returns a pointer
          +              to the bottom panel in the stack.
          +
          +       panel_below(pan)
          +              returns a pointer to the panel just below pan.   If
          +              the  panel  argument  is  (PANEL  *)0, it returns a
          +              pointer to the top panel in the stack.
          +
          +       set_panel_userptr(pan,ptr)
          +              sets the panel's user pointer.
          +
          +       panel_userptr(pan)
          +              returns the user pointer for a given panel.
          +
          +       panel_window(pan)
          +              returns a pointer to the window of the given panel.
          +
          +
          +
          +

          DIAGNOSTICS

          +       Each  routine  that  returns  a pointer returns NULL if an
          +       error occurs. Each  routine  that  returns  an  int  value
          +       returns OK if it executes successfully and ERR if not.
          +
          +
          +
          +

          COMPATIBILITY

          +       Reasonable  care  has been taken to  ensure  compatibility
          +       with  the  native  panel  facility  introduced  in  SVr3.2
          +       (inspection of the SVr4 manual pages suggests the program-
          +       ming interface is unchanged).  The PANEL  data  structures
          +       are  merely   similar. The  programmer is cautioned not to
          +       directly use PANEL fields.
          +
          +       The functions show_panel() and top_panel()  are  identical
          +       in  this  implementation,  and work equally well with dis-
          +       played or hidden panels.  In the native System V implemen-
          +       tation, show_panel() is intended for making a hidden panel
          +       visible (at the top  of  the  stack)  and  top_panel()  is
          +       intended  for  making an already-visible panel move to the
          +       top of the stack. You are cautioned  to  use  the  correct
          +       function   to   ensure  compatibility  with  native  panel
          +       libraries.
          +
          +
          +
          +

          NOTE

          +       In your library list, libpanel.a should  be  before  libn-
          +       curses.a;  that  is,  you want to say `-lpanel -lncurses',
          +       not the other way around (which  would  give  you  a  link
          +       error using GNU ld(1) and some other linkers).
          +
          +
          +
          +

          FILES

          +       panel.h interface for the panels library
          +
          +       libpanel.a the panels library itself
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x)
          +
          +
          +
          +

          AUTHOR

          +       Originally   written   by   Warren  Tucker  <wht@n4hgf.mt-
          +       park.ga.us>, primarily to assist  in  porting  u386mon  to
          +       systems  without  a native panels library.  Repackaged for
          +       ncurses by Zeyd ben-Halim.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/resizeterm.3x.html b/doc/html/man/resizeterm.3x.html similarity index 62% rename from Ada95/html/man/resizeterm.3x.html rename to doc/html/man/resizeterm.3x.html index 7b6e7df0..712dee10 100644 --- a/Ada95/html/man/resizeterm.3x.html +++ b/doc/html/man/resizeterm.3x.html @@ -1,25 +1,29 @@
          -       resizeterm - change the curses terminal size
          +
          +
          +
          +

          NAME

          +       resizeterm - change the curses terminal size
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <curses.h>
           
          -       int resizeterm(int lines, int columns);
          +       int resizeterm(int lines, int columns);
           
           
           

          DESCRIPTION

                  This  is  an extension to the curses library.  It provides
          -       callers with a hook into the ncurses data to  resize  win-
          +       callers with a hook into the ncurses data to  resize  win-
                  dows, primarily for use by programs running in an X Window
          -       terminal (e.g., xterm).  The function  resizeterm  resizes
          +       terminal (e.g., xterm).  The function  resizeterm  resizes
                  the  standard  and current windows to the specified dimen-
                  sions, and adjusts other  bookkeeping  data  used  by  the
          -       ncurses library that record the window dimensions.
          +       ncurses library that record the window dimensions.
           
                  When  resizing  the  windows, the function blank-fills the
                  areas that are extended. The  calling  application  should
          @@ -33,7 +37,7 @@
           
           

          RETURN VALUE

          -       The function returns the integer ERR upon failure  and  OK
          +       The function returns the integer ERR upon failure  and  OK
                  on success.  It will fail if either of the dimensions less
                  than or equal  to  zero,  or  if  an  error  occurs  while
                  (re)allocating memory for the windows.
          @@ -43,12 +47,12 @@
           

          NOTES

                  While  this  function  is intended to be used to support a
                  signal handler (i.e., for SIGWINCH), care should be  taken
          -       to  avoid invoking it in a context where malloc or realloc
          +       to  avoid invoking it in a context where malloc or realloc
                  may have been interrupted, since it uses those  functions.
           
                  If  ncurses  is configured to supply its own SIGWINCH han-
          -       dler, the resizeterm function ungetch's a KEY_RESIZE which
          -       will  be  read on the next call to getch.  This is used to
          +       dler, the resizeterm function ungetch's a KEY_RESIZE which
          +       will  be  read on the next call to getch.  This is used to
                  alert an application that the screen size has changed, and
                  that  it should repaint special features such as pads that
                  cannot be done automatically.
          @@ -56,7 +60,7 @@
           
           

          SEE ALSO

          -       wresize(3X).
          +       wresize(3x).
           
           
           
          @@ -65,6 +69,12 @@ for BSD curses). +
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/doc/html/man/term.5.html b/doc/html/man/term.5.html new file mode 100644 index 00000000..8995219c --- /dev/null +++ b/doc/html/man/term.5.html @@ -0,0 +1,184 @@ + + +
          +
          +
          +
          +

          NAME

          +       term - format of compiled term file.
          +
          +
          +
          +

          SYNOPSIS

          +       term
          +
          +
          +
          +

          DESCRIPTION

          +       Compiled terminfo descriptions are placed under the direc-
          +       tory @DATADIR@/terminfo.   In  order  to  avoid  a  linear
          +       search of a huge UNIX system directory, a two-level scheme
          +       is used: /c/name where name is the name of  the  terminal,
          +       and  c  is the first character of name.  Thus, act4 can be
          +       found in the file @DATADIR@/terminfo/a/act4.  Synonyms for
          +       the same terminal are implemented by multiple links to the
          +       same compiled file.
          +
          +       The format has been chosen so that it will be the same  on
          +       all  hardware.   An  8 or more bit byte is assumed, but no
          +       assumptions about byte  ordering  or  sign  extension  are
          +       made.
          +
          +       The  compiled  file  is  created with the tic program, and
          +       read by the routine setupterm.  The file is  divided  into
          +       six parts: the header, terminal names, boolean flags, num-
          +       bers, strings, and string table.
          +
          +       The header section begins the file.  This section contains
          +       six  short  integers in the format described below.  These
          +       integers are (1) the magic number (octal  0432);  (2)  the
          +       size,  in  bytes,  of the names section; (3) the number of
          +       bytes in the boolean section;  (4)  the  number  of  short
          +       integers in the numbers section; (5) the number of offsets
          +       (short integers) in the strings section; (6) the size,  in
          +       bytes, of the string table.
          +
          +       Short  integers  are stored in two 8-bit bytes.  The first
          +       byte contains the least significant 8 bits of  the  value,
          +       and  the second byte contains the most significant 8 bits.
          +       (Thus, the value represented  is  256*second+first.)   The
          +       value -1 is represented by the two bytes 0377, 0377; other
          +       negative values are illegal. This  value  generally  means
          +       that  the  corresponding  capability  is missing from this
          +       terminal.  Note that this format corresponds to the  hard-
          +       ware  of  the  VAX  and  PDP-11  (that  is,  little-endian
          +       machines).  Machines where this does not correspond to the
          +       hardware  must  read the integers as two bytes and compute
          +       the little-endian value.
          +
          +       The terminal names section comes next.   It  contains  the
          +       first  line of the terminfo description, listing the vari-
          +       ous names for the terminal, separated by the  `|'  charac-
          +       ter.   The section is terminated with an ASCII NUL charac-
          +       ter.
          +
          +       The boolean flags have one byte for each flag.  This  byte
          +       is  either  0  or 1 as the flag is present or absent.  The
          +       capabilities are in the same order as the file <term.h>.
          +
          +       Between the boolean section and the number section, a null
          +       byte  will  be  inserted, if necessary, to ensure that the
          +       number section begins on an even byte (this is a relic  of
          +       the   PDP-11's   word-addressed  architecture,  originally
          +       designed in to avoid IOT traps  induced  by  addressing  a
          +       word  on  an  odd  byte boundary).  All short integers are
          +       aligned on a short word boundary.
          +
          +       The numbers section is similar to the flags section.  Each
          +       capability  takes up two bytes, and is stored as a little-
          +       endian short integer.  If the value represented is -1, the
          +       capability is taken to be missing.
          +
          +       The  strings  section is also similar.  Each capability is
          +       stored as a short integer, in the format above.   A  value
          +       of  -1  means  the  capability is missing.  Otherwise, the
          +       value is taken as an offset  from  the  beginning  of  the
          +       string table.  Special characters in ^X or \c notation are
          +       stored in their interpreted form, not the printing  repre-
          +       sentation.  Padding information $<nn> and parameter infor-
          +       mation %x are stored intact in uninterpreted form.
          +
          +       The final section is the string table.   It  contains  all
          +       the values of string capabilities referenced in the string
          +       section.  Each string is null terminated.
          +
          +       Note that it is possible for setupterm to expect a differ-
          +       ent  set  of capabilities than are actually present in the
          +       file.  Either the database may  have  been  updated  since
          +       setupterm has been recompiled (resulting in extra unrecog-
          +       nized entries in the file) or the program  may  have  been
          +       recompiled  more  recently  than  the database was updated
          +       (resulting in missing  entries).   The  routine  setupterm
          +       must  be prepared for both possibilities - this is why the
          +       numbers and sizes are included.   Also,  new  capabilities
          +       must  always  be added at the end of the lists of boolean,
          +       number, and string capabilities.
          +
          +       Despite the consistent use of  little-endian  for  numbers
          +       and  the  otherwise self-describing format, it is not wise
          +       to count on portability of binary terminfo entries between
          +       commercial  UNIX  versions.  The problem is that there are
          +       at least three versions of terminfo (under HP-UX, AIX, and
          +       OSF/1)  which  diverged from System V terminfo after SVr1,
          +       and have added extension capabilities to the string  table
          +       that  (in the binary format) collide with System V and XSI
          +       Curses extensions.  See terminfo(5) for  detailed  discus-
          +       sion of terminfo source compatibility issues.
          +
          +       As  an  example, here is a hex dump of the description for
          +       the Lear-Siegler ADM-3, a  popular  though  rather  stupid
          +       early terminal:
          +
          +       adm3a|lsi adm3a,
          +               am,
          +               cols#80, lines#24,
          +               bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
          +               cuf1=^L, cup==%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
          +               home=^^, ind=^J,
          +
          +       0000  1a 01 10 00 02 00 03 00  82 00 31 00 61 64 6d 33  ........ ..1.adm3
          +       0010  61 7c 6c 73 69 20 61 64  6d 33 61 00 00 01 50 00  a|lsi ad m3a...P.
          +       0020  ff ff 18 00 ff ff 00 00  02 00 ff ff ff ff 04 00  ........ ........
          +       0030  ff ff ff ff ff ff ff ff  0a 00 25 00 27 00 ff ff  ........ ..%.'...
          +       0040  29 00 ff ff ff ff 2b 00  ff ff 2d 00 ff ff ff ff  ).....+. ..-.....
          +       0050  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0060  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00c0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00d0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00e0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       00f0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
          +       0120  ff ff ff ff ff ff 2f 00  07 00 0d 00 1a 24 3c 31  ....../. .....$<1
          +       0130  3e 00 1b 3d 25 70 31 25  7b 33 32 7d 25 2b 25 63  >..=%p1% {32}%+%c
          +       0140  25 70 32 25 7b 33 32 7d  25 2b 25 63 00 0a 00 1e  %p2%{32} %+%c....
          +       0150  00 08 00 0c 00 0b 00 0a  00                       ........ .
          +
          +
          +       Some  limitations:  total  compiled  entries cannot exceed
          +       4096 bytes.  The name field cannot exceed 128 bytes.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo/*/*   compiled terminal capability data
          +       base
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), terminfo(5).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/term.7.html b/doc/html/man/term.7.html new file mode 100644 index 00000000..24ac436e --- /dev/null +++ b/doc/html/man/term.7.html @@ -0,0 +1,239 @@ + + +
          +
          +
          +
          +

          NAME

          +       term - conventions for naming terminal types
          +
          +
          +
          +

          DESCRIPTION

          +       The  environment variable TERM should normally contain the
          +       type name of the terminal, console or display-device  type
          +       you  are  using.   This  information  is  critical for all
          +       screen-oriented  programs,  including  your   editor   and
          +       mailer.
          +
          +       A  default  TERM  value will be set on a per-line basis by
          +       either /etc/inittab (Linux and  System-V-like  UNIXes)  or
          +       /etc/ttys  (BSD  UNIXes).  This will nearly always suffice
          +       for workstation and microcomputer consoles.
          +
          +       If you use a dialup line, the type of device  attached  to
          +       it  may vary.  Older UNIX systems pre-set a very dumb ter-
          +       minal type like `dumb' or `dialup' on dialup lines.  Newer
          +       ones may pre-set `vt100', reflecting the prevalence of DEC
          +       VT100-compatible terminals  and  personal-computer  emula-
          +       tors.
          +
          +       Modern  telnets  pass  your TERM environment variable from
          +       the local side to the remote one.  There can  be  problems
          +       if  the  remote terminfo or termcap entry for your type is
          +       not compatible with yours, but this situation is rare  and
          +       can  almost  always  be  avoided  by  explicitly exporting
          +       `vt100' (assuming you are in fact using  a  VT100-superset
          +       console, terminal, or terminal emulator.)
          +
          +       In any case, you are free to override the system TERM set-
          +       ting to your taste in your  shell  profile.   The  tset(1)
          +       utility  may  be  of  assistance; you can give it a set of
          +       rules for deducing or requesting a terminal type based  on
          +       the tty device and baud rate.
          +
          +       Setting your own TERM value may also be useful if you have
          +       created a custom  entry  incorporating  options  (such  as
          +       visual  bell  or reverse-video) which you wish to override
          +       the system default type for your line.
          +
          +       Terminal type descriptions are stored as files of capabil-
          +       ity  data underneath @DATADIR@/terminfo.  To browse a list
          +       of all terminal names recognized by the system, do
          +
          +            toe | more
          +
          +       from your shell.  These capability files are in  a  binary
          +       format optimized for retrieval speed (unlike the old text-
          +       based termcap format they replace); to examine  an  entry,
          +       you  must  use  the infocmp(1) command.  Invoke it as fol-
          +       lows:
          +
          +            infocmp entry-name
          +
          +       where entry-name is the name of the type you wish to exam-
          +       ine  (and the name of its capability file the subdirectory
          +       of @DATADIR@/terminfo named for its first  letter).   This
          +       command  dumps  a  capability  file  in  the  text  format
          +       described by terminfo(5).
          +
          +       The first line of  a  terminfo(5)  description  gives  the
          +       names by which terminfo knows a terminal, separated by `|'
          +       (pipe-bar) characters with the last name field  terminated
          +       by  a  comma.   The first name field is the type's primary
          +       name, and is the one to use when setting TERM.   The  last
          +       name  field  (if  distinct  from  the first) is actually a
          +       description of the terminal type (it may  contain  blanks;
          +       the others must be single words).  Name fields between the
          +       first and last (if present) are aliases for the  terminal,
          +       usually historical names retained for compatibility.
          +
          +       There are some conventions for how to choose terminal pri-
          +       mary names that help keep  them  informative  and  unique.
          +       Here is a step-by-step guide to naming terminals that also
          +       explains how to parse them:
          +
          +       First, choose a root name.  The root  will  consist  of  a
          +       lower-case  letter followed by up to seven lower-case let-
          +       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,
          +       and  choosing  names with special characters could someday
          +       make life difficult for users of a future port).  The  dot
          +       (.)  character  is  relatively safe as long as there is at
          +       most one per root name; some historical terminfo names use
          +       it.
          +
          +       The  root  name for a terminal or workstation console type
          +       should almost always begin with a vendor prefix  (such  as
          +       hp  for Hewlett-Packard, wy for Wyse, or att for AT&T ter-
          +       minals), or a common name of the terminal line (vt for the
          +       VT  series of terminals from DEC, or sun for Sun Microsys-
          +       tems workstation consoles, or regent for the  ADDS  Regent
          +       series.   You  can list the terminfo tree to see what pre-
          +       fixes are already in common use.   The  root  name  prefix
          +       should  be  followed  when  appropriate by a model number;
          +       thus vt100, hp2621, wy50.
          +
          +       The root name for a PC-Unix console type should be the  OS
          +       name,  i.e.  linux, bsdos, freebsd, netbsd.  It should not
          +       be console or any other generic that might cause confusion
          +       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
          +       (i.e. versaterm, ctrm).
          +
          +       Following the root name, you may add any reasonable number
          +       of hyphen-separated feature suffixes.
          +
          +       2p   Has two pages of memory.  Likewise 4p, 8p, etc.
          +
          +       mc   Magic-cookie.   Some  terminals (notably older Wyses)
          +            can only support one attribute  without  magic-cookie
          +            lossage.   Their  base  entry  is usually paired with
          +            another that has this suffix and uses  magic  cookies
          +            to support multiple attributes.
          +
          +       -am  Enable auto-margin (right-margin wraparound)
          +
          +       -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
          +
          +       -nl  No labels - suppress soft labels
          +
          +       -nsl No status line - suppress status line
          +
          +       -pp  Has a printer port which is used.
          +
          +       -rv  Terminal in reverse video mode (black on white)
          +
          +       -s   Enable status line.
          +
          +       -vb  Use visible bell (flash) rather than beep.
          +
          +       -w   Wide; terminal is in 132 column mode.
          +
          +       Conventionally,   if  your  terminal  type  is  a  variant
          +       intended to specify a line height, that suffix  should  go
          +       first.  So, for a hypothetical FuBarCo model 2317 terminal
          +       in 30-line mode with reverse video,  best  form  would  be
          +       fubar-30-rv (rather than, say, `fubar-rv-30').
          +
          +       Terminal types that are written not as standalone entries,
          +       but rather as components to be plugged into other  entries
          +       via  use capabilities, are distinguished by using embedded
          +       plus signs rather than dashes.
          +
          +       Commands which use a  terminal  type  to  control  display
          +       often  accept  a  -T  option  that accepts a terminal name
          +       argument.  Such programs should  fall  back  on  the  TERM
          +       environment variable when no -T option is specified.
          +
          +
          +
          +

          PORTABILITY

          +       For  maximum  compatibility  with  older  System V UNIXes,
          +       names and aliases should be unique  within  the  first  14
          +       characters.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo/?/*
          +            compiled terminal capability data base
          +
          +       /etc/inittab
          +            tty line initialization (AT&T-like UNIXes).
          +
          +       /etc/ttys
          +            tty line initialization (BSD-like UNIXes).
          +
          +
          +
          +

          SEE ALSO

          +       curses(3x), terminfo(5), term(5).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html new file mode 100644 index 00000000..59a79d59 --- /dev/null +++ b/doc/html/man/terminfo.5.html @@ -0,0 +1,2188 @@ + + +
          +
          +
          +
          +

          NAME

          +       terminfo - terminal capability data base
          +
          +
          +
          +

          SYNOPSIS

          +       @DATADIR@/terminfo/*/*
          +
          +
          +
          +

          DESCRIPTION

          +       Terminfo  is  a  data  base  describing terminals, used by
          +       screen-oriented programs  such  as  nvi(1),  rogue(1)  and
          +       libraries  such  as curses(3x).  Terminfo describes termi-
          +       nals by giving a set of capabilities which they  have,  by
          +       specifying how to perform screen operations, and by speci-
          +       fying padding requirements and initialization sequences.
          +
          +       Entries in terminfo consist of a sequence of `,' separated
          +       fields  (embedded  commas may be escaped with a  backslash
          +       or notated as \072).  White space after the `,'  separator
          +       is  ignored.   The first entry for each terminal gives the
          +       names which are known for the terminal, separated  by  `|'
          +       characters.   The  first  name  given  is  the most common
          +       abbreviation for the terminal, the last name given  should
          +       be  a  long  name  fully identifying the terminal, and all
          +       others are understood as synonyms for the  terminal  name.
          +       All names but the last should be in lower case and contain
          +       no blanks; the last name may well contain upper  case  and
          +       blanks for readability.
          +
          +       Terminal names (except for the last, verbose entry) should
          +       be chosen using the following conventions.  The particular
          +       piece  of  hardware  making  up the terminal should have a
          +       root name, thus ``hp2621''.  This name should not  contain
          +       hyphens.  Modes that the hardware can be in, or user pref-
          +       erences, should be indicated by appending a hyphen  and  a
          +       mode  suffix.   Thus,  a vt100 in 132 column mode would be
          +       vt100-w.  The following suffixes should be used where pos-
          +       sible:
          +
          +      Suffix                  Meaning                   Example
          +      -nn      Number of lines on the screen            aaa-60
          +      -np      Number of pages of memory                c100-4p
          +      -am      With automargins (usually the default)   vt100-am
          +      -m       Mono mode; suppress color                ansi-m
          +      -mc      Magic cookie; spaces when highlighting   wy30-mc
          +      -na      No arrow keys (leave them in local)      c100-na
          +      -nam     Without automatic margins                vt100-nam
          +      -nl      No status line                           att4415-nl
          +      -ns      No status line                           hp2626-ns
          +      -rv      Reverse video                            c100-rv
          +      -s       Enable status line                       vt100-s
          +      -vb      Use visible bell instead of beep         wy370-vb
          +      -w       Wide mode (> 80 columns, usually 132)    vt100-w
          +
          +       For  more  on terminal naming conventions, see the term(7)
          +       manual page.
          +
          +   Capabilities
          +       The following is a  complete  table  of  the  capabilities
          +       included  in a terminfo description block and available to
          +       terminfo-using code.  In each line of the table,
          +
          +       The variable is the name by which the programmer  (at  the
          +       terminfo level) accesses the capability.
          +
          +       The  capname  is  the  short  name used in the text of the
          +       database, and is used by a person updating  the  database.
          +       Whenever  possible,  capnames are chosen to be the same as
          +       or similar to the ANSI X3.64-1979 standard (now superseded
          +       by  ECMA-48,  which uses identical or very similar names).
          +       Semantics are also intended to match those of the specifi-
          +       cation.
          +
          +       The  termcap code is the old termcap capability name (some
          +       capabilities are new, and have names which termcap did not
          +       originate).
          +
          +       Capability  names have no hard length limit, but an infor-
          +       mal limit of 5 characters has been adopted  to  keep  them
          +       short  and  to  allow  the tabs in the source file Caps to
          +       line up nicely.
          +
          +       Finally, the description  field  attempts  to  convey  the
          +       semantics  of  the capability.  You may find some codes in
          +       the description field:
          +
          +       (P)    indicates that padding may be specified
          +
          +       #[1-9] in the description field indicates that the  string
          +              is passed through tparm with parms as given (#i).
          +
          +       (P*)   indicates  that  padding  may vary in proportion to
          +              the number of lines affected
          +
          +       (#i)   indicates the ith parameter.
          +
          +
          +       These are the boolean capabilities:
          +
          +               Variable          Cap-  TCap      Description
          +               Booleans          name  Code
          +       auto_left_margin          bw    bw    cub1 wraps from col-
          +                                             umn 0 to last column
          +       auto_right_margin         am    am    terminal has auto-
          +                                             matic margins
          +       back_color_erase          bce   ut    screen erased with
          +                                             background color
          +       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
          +                                             for hpa/mhpa caps
          +       cpi_changes_res           cpix  YF    changing character
          +                                             pitch changes reso-
          +                                             lution
          +       cr_cancels_micro_mode     crxm  YB    using cr turns off
          +                                             micro mode
          +       dest_tabs_magic_smso      xt    xt    tabs destructive,
          +                                             magic so char
          +                                             (t1061)
          +       eat_newline_glitch        xenl  xn    newline ignored
          +                                             after 80 cols (con-
          +                                             cept)
          +       erase_overstrike          eo    eo    can erase over-
          +                                             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
          +                                             (i.e., sets 8th-bit)
          +       has_print_wheel           daisy YC    printer needs opera-
          +                                             tor to change char-
          +                                             acter set
          +       has_status_line           hs    hs    has extra status
          +                                             line
          +       hue_lightness_saturation  hls   hl    terminal uses only
          +                                             HLS color notation
          +                                             (Tektronix)
          +       insert_null_glitch        in    in    insert mode distin-
          +                                             guishes nulls
          +       lpi_changes_res           lpix  YG    changing line pitch
          +                                             changes resolution
          +       memory_above              da    da    display may be
          +                                             retained above the
          +                                             screen
          +       memory_below              db    db    display may be
          +                                             retained below the
          +                                             screen
          +       move_insert_mode          mir   mi    safe to move while
          +                                             in insert mode
          +       move_standout_mode        msgr  ms    safe to move while
          +                                             in standout mode
          +       needs_xon_xoff            nxon  nx    padding won't work,
          +                                             xon/xoff required
          +       no_esc_ctlc               xsb   xb    beehive (f1=escape,
          +                                             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
          +                                             reverse rmcup
          +       over_strike               os    os    terminal can over-
          +                                             strike
          +       prtr_silent               mc5i  5i    printer won't echo
          +                                             on screen
          +       row_addr_glitch           xvpa  YD    only positive motion
          +                                             for vpa/mvpa caps
          +       semi_auto_right_margin    sam   YE    printing in last
          +                                             column causes cr
          +       status_line_esc_ok        eslok es    escape can be used
          +                                             on the status line
          +       tilde_glitch              hz    hz    can't print ~'s
          +                                             (hazeltine)
          +       transparent_underline     ul    ul    underline character
          +                                             overstrikes
          +       xon_xoff                  xon   xo    terminal uses
          +                                             xon/xoff handshaking
          +
          +       These are the numeric capabilities:
          +
          +            Variable         Cap-     TCap       Description
          +             Numeric         name     Code
          +       columns               cols     co     number of columns in
          +                                             a line
          +       init_tabs             it       it     tabs initially every
          +                                             # spaces
          +       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 >
          +                                             line. 0 means varies
          +       magic_cookie_glitch   xmc      sg     number of blank
          +                                             characters left by
          +                                             smso or rmso
          +       max_attributes        ma       ma     maximum combined
          +                                             attributes terminal
          +                                             can handle
          +       max_colors            colors   Co     maximum number of
          +                                             colors on screen
          +       max_pairs             pairs    pa     maximum number of
          +                                             color-pairs on the
          +                                             screen
          +       maximum_windows       wnum     MW     maximum number of
          +                                             defineable windows
          +       no_color_video        ncv      NC     video attributes
          +                                             that can't be used
          +                                             with colors
          +       num_labels            nlab     Nl     number of labels on
          +                                             screen
          +
          +
          +       padding_baud_rate     pb       pb     lowest baud rate
          +                                             where padding needed
          +       virtual_terminal      vt       vt     virtual terminal
          +                                             number (CB/unix)
          +       width_status_line     wsl      ws     number of columns in
          +                                             status line
          +
          +       The following numeric  capabilities  are  present  in  the
          +       SVr4.0  term  structure, but are not yet documented in the
          +       man page.  They came in with SVr4's printer support.
          +
          +             Variable         Cap-    TCap       Description
          +             Numeric          name    Code
          +       bit_image_entwining    bitwin  Yo     number of passes for
          +                                             each bit-image row
          +       bit_image_type         bitype  Yp     type of bit-image
          +                                             device
          +       buffer_capacity        bufsz   Ya     numbers of bytes
          +                                             buffered before
          +                                             printing
          +       buttons                btns    BT     number of buttons on
          +                                             mouse
          +       dot_horz_spacing       spinh   Yc     spacing of dots hor-
          +                                             izontally in dots
          +                                             per inch
          +       dot_vert_spacing       spinv   Yb     spacing of pins ver-
          +                                             tically in pins per
          +                                             inch
          +       max_micro_address      maddr   Yd     maximum value in
          +                                             micro_..._address
          +       max_micro_jump         mjump   Ye     maximum value in
          +                                             parm_..._micro
          +       micro_col_size         mcs     Yf     character step size
          +                                             when in micro mode
          +       micro_line_size        mls     Yg     line step size when
          +                                             in micro mode
          +       number_of_pins         npins   Yh     numbers of pins in
          +                                             print-head
          +       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
          +       output_res_line        orl     Yj     vertical resolution
          +                                             in units per line
          +       output_res_vert_inch   orvi    Yl     vertical resolution
          +                                             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
          +
          +       These are the string capabilities:
          +
          +               Variable          Cap-   TCap     Description
          +                String           name   Code
          +       acs_chars                 acsc   ac   graphics charset
          +                                             pairs, based on
          +                                             vt100
          +       back_tab                  cbt    bt   back tab (P)
          +       bell                      bel    bl   audible signal
          +                                             (bell) (P)
          +       carriage_return           cr     cr   carriage return (P*)
          +                                             (P*)
          +       change_char_pitch         cpi    ZA   Change number of
          +                                             characters per inch
          +       change_line_pitch         lpi    ZB   Change number of
          +                                             lines per inch
          +       change_res_horz           chr    ZC   Change horizontal
          +                                             resolution
          +       change_res_vert           cvr    ZD   Change vertical res-
          +                                             olution
          +       change_scroll_region      csr    cs   change region to
          +                                             line #1 to line #2
          +                                             (P)
          +       char_padding              rmp    rP   like ip but when in
          +                                             insert mode
          +       clear_all_tabs            tbc    ct   clear all tab stops
          +                                             (P)
          +       clear_margins             mgc    MC   clear right and left
          +                                             soft margins
          +       clear_screen              clear  cl   clear screen and
          +                                             home cursor (P*)
          +       clr_bol                   el1    cb   Clear to beginning
          +                                             of line
          +       clr_eol                   el     ce   clear to end of line
          +                                             (P)
          +       clr_eos                   ed     cd   clear to end of
          +                                             screen (P*)
          +       column_address            hpa    ch   horizontal position
          +                                             #1, absolute (P)
          +       command_character         cmdch  CC   terminal settable
          +                                             cmd character in
          +                                             prototype !?
          +       create_window             cwin   CW   define a window #1
          +                                             from #2,#3 to #4,#5
          +       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
          +       cursor_normal             cnorm  ve   make cursor appear
          +                                             normal (undo
          +                                             civis/cvvis)
          +       cursor_right              cuf1   nd   non-destructive
          +                                             space (move right
          +                                             one space)
          +       cursor_to_ll              ll     ll   last line, first
          +                                             column (if no cup)
          +       cursor_up                 cuu1   up   up one line
          +       cursor_visible            cvvis  vs   make cursor very
          +                                             visible
          +       define_char               defc   ZE   Define a character
          +       delete_character          dch1   dc   delete character
          +                                             (P*)
          +       delete_line               dl1    dl   delete line (P*)
          +       dial_phone                dial   DI   dial number #1
          +       dis_status_line           dsl    ds   disable status line
          +       display_clock             dclk   DK   display clock at
          +                                             (#1,#2)
          +       down_half_line            hd     hd   half a line down
          +       ena_acs                   enacs  eA   enable alternate
          +                                             char set
          +       enter_alt_charset_mode    smacs  as   start alternate
          +                                             character set (P)
          +       enter_am_mode             smam   SA   turn on automatic
          +                                             margins
          +       enter_blink_mode          blink  mb   turn on blinking
          +       enter_bold_mode           bold   md   turn on bold (extra
          +                                             bright) mode
          +       enter_ca_mode             smcup  ti   string to start pro-
          +                                             grams using cup
          +       enter_delete_mode         smdc   dm   enter delete mode
          +       enter_dim_mode            dim    mh   turn on half-bright
          +                                             mode
          +       enter_doublewide_mode     swidm  ZF   Enter double-wide
          +                                             mode
          +       enter_draft_quality       sdrfq  ZG   Enter draft-quality
          +                                             mode
          +       enter_insert_mode         smir   im   enter insert mode
          +       enter_italics_mode        sitm   ZH   Enter italic mode
          +       enter_leftward_mode       slm    ZI   Start leftward car-
          +                                             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
          +       enter_protected_mode      prot   mp   turn on protected
          +                                             mode
          +       enter_reverse_mode        rev    mr   turn on reverse
          +                                             video mode
          +
          +       enter_secure_mode         invis  mk   turn on blank mode
          +                                             (characters invisi-
          +                                             ble)
          +       enter_shadow_mode         sshm   ZM   Enter shadow-print
          +                                             mode
          +       enter_standout_mode       smso   so   begin standout mode
          +       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
          +       enter_xon_mode            smxon  SX   turn on xon/xoff
          +                                             handshaking
          +       erase_chars               ech    ec   erase #1 characters
          +                                             (P)
          +       exit_alt_charset_mode     rmacs  ae   end alternate char-
          +                                             acter set (P)
          +       exit_am_mode              rmam   RA   turn off automatic
          +                                             margins
          +       exit_attribute_mode       sgr0   me   turn off all
          +                                             attributes
          +       exit_ca_mode              rmcup  te   strings to end pro-
          +                                             grams using cup
          +       exit_delete_mode          rmdc   ed   end delete mode
          +       exit_doublewide_mode      rwidm  ZQ   End double-wide mode
          +       exit_insert_mode          rmir   ei   exit insert mode
          +       exit_italics_mode         ritm   ZR   End italic mode
          +       exit_leftward_mode        rlm    ZS   End left-motion mode
          +       exit_micro_mode           rmicm  ZT   End micro-motion
          +                                             mode
          +       exit_shadow_mode          rshm   ZU   End shadow-print
          +                                             mode
          +       exit_standout_mode        rmso   se   exit standout mode
          +       exit_subscript_mode       rsubm  ZV   End subscript mode
          +       exit_superscript_mode     rsupm  ZW   End superscript mode
          +       exit_underline_mode       rmul   ue   exit underline mode
          +       exit_upward_mode          rum    ZX   End reverse charac-
          +                                             ter motion
          +       exit_xon_mode             rmxon  RX   turn off xon/xoff
          +                                             handshaking
          +       fixed_pause               pause  PA   pause for 2-3 sec-
          +                                             onds
          +       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
          +                                             line
          +       goto_window               wingo  WG   go to window #1
          +       hangup                    hup    HU   hang-up phone
          +
          +
          +       init_1string              is1    i1   initialization
          +                                             string
          +       init_2string              is2    is   initialization
          +                                             string
          +       init_3string              is3    i3   initialization
          +                                             string
          +       init_file                 if     if   name of initializa-
          +                                             tion file
          +       init_prog                 iprog  iP   path name of program
          +                                             for initialization
          +       initialize_color          initc  Ic   initialize color #1
          +                                             to (#2,#3,#4)
          +       initialize_pair           initp  Ip   Initialize color
          +                                             pair #1 to
          +                                             fg=(#2,#3,#4),
          +                                             bg=(#5,#6,#7)
          +       insert_character          ich1   ic   insert character (P)
          +       insert_line               il1    al   insert line (P*)
          +       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
          +       key_backspace             kbs    kb   backspace key
          +       key_beg                   kbeg   @1   begin key
          +       key_btab                  kcbt   kB   back-tab key
          +       key_c1                    kc1    K4   lower left of keypad
          +       key_c3                    kc3    K5   lower right of key-
          +                                             pad
          +       key_cancel                kcan   @2   cancel key
          +       key_catab                 ktbc   ka   clear-all-tabs key
          +       key_clear                 kclr   kC   clear-screen or
          +                                             erase key
          +       key_close                 kclo   @3   close key
          +       key_command               kcmd   @4   command key
          +       key_copy                  kcpy   @5   copy key
          +       key_create                kcrt   @6   create key
          +       key_ctab                  kctab  kt   clear-tab key
          +       key_dc                    kdch1  kD   delete-character key
          +       key_dl                    kdl1   kL   delete-line key
          +       key_down                  kcud1  kd   down-arrow key
          +       key_eic                   krmir  kM   sent by rmir or smir
          +                                             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-
          +                                             screen key
          +       key_exit                  kext   @9   exit key
          +       key_f0                    kf0    k0   F0 function key
          +       key_f1                    kf1    k1   F1 function key
          +
          +       key_f10                   kf10   k;   F10 function key
          +       key_f11                   kf11   F1   F11 function key
          +       key_f12                   kf12   F2   F12 function key
          +       key_f13                   kf13   F3   F13 function key
          +       key_f14                   kf14   F4   F14 function key
          +       key_f15                   kf15   F5   F15 function key
          +       key_f16                   kf16   F6   F16 function key
          +       key_f17                   kf17   F7   F17 function key
          +       key_f18                   kf18   F8   F18 function key
          +       key_f19                   kf19   F9   F19 function key
          +       key_f2                    kf2    k2   F2 function key
          +       key_f20                   kf20   FA   F20 function key
          +       key_f21                   kf21   FB   F21 function key
          +       key_f22                   kf22   FC   F22 function key
          +       key_f23                   kf23   FD   F23 function key
          +       key_f24                   kf24   FE   F24 function key
          +       key_f25                   kf25   FF   F25 function key
          +       key_f26                   kf26   FG   F26 function key
          +       key_f27                   kf27   FH   F27 function key
          +       key_f28                   kf28   FI   F28 function key
          +       key_f29                   kf29   FJ   F29 function key
          +       key_f3                    kf3    k3   F3 function key
          +       key_f30                   kf30   FK   F30 function key
          +       key_f31                   kf31   FL   F31 function key
          +       key_f32                   kf32   FM   F32 function key
          +       key_f33                   kf33   FN   F33 function key
          +       key_f34                   kf34   FO   F34 function key
          +       key_f35                   kf35   FP   F35 function key
          +       key_f36                   kf36   FQ   F36 function key
          +       key_f37                   kf37   FR   F37 function key
          +       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
          +       key_f43                   kf43   FX   F43 function key
          +       key_f44                   kf44   FY   F44 function key
          +       key_f45                   kf45   FZ   F45 function key
          +       key_f46                   kf46   Fa   F46 function key
          +       key_f47                   kf47   Fb   F47 function key
          +       key_f48                   kf48   Fc   F48 function key
          +       key_f49                   kf49   Fd   F49 function key
          +       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
          +       key_f55                   kf55   Fj   F55 function key
          +       key_f56                   kf56   Fk   F56 function key
          +       key_f57                   kf57   Fl   F57 function key
          +       key_f58                   kf58   Fm   F58 function key
          +
          +       key_f59                   kf59   Fn   F59 function key
          +       key_f6                    kf6    k6   F6 function key
          +       key_f60                   kf60   Fo   F60 function key
          +       key_f61                   kf61   Fp   F61 function key
          +       key_f62                   kf62   Fq   F62 function key
          +       key_f63                   kf63   Fr   F63 function key
          +       key_f7                    kf7    k7   F7 function key
          +       key_f8                    kf8    k8   F8 function key
          +       key_f9                    kf9    k9   F9 function key
          +       key_find                  kfnd   @0   find key
          +       key_help                  khlp   %1   help key
          +       key_home                  khome  kh   home key
          +       key_ic                    kich1  kI   insert-character key
          +       key_il                    kil1   kA   insert-line key
          +       key_left                  kcub1  kl   left-arrow key
          +       key_ll                    kll    kH   lower-left key (home
          +                                             down)
          +       key_mark                  kmrk   %2   mark key
          +       key_message               kmsg   %3   message key
          +       key_move                  kmov   %4   move key
          +       key_next                  knxt   %5   next key
          +       key_npage                 knp    kN   next-page key
          +       key_open                  kopn   %6   open key
          +       key_options               kopt   %7   options key
          +       key_ppage                 kpp    kP   previous-page key
          +       key_previous              kprv   %8   previous key
          +       key_print                 kprt   %9   print key
          +       key_redo                  krdo   %0   redo key
          +       key_reference             kref   &1   reference key
          +       key_refresh               krfr   &2   refresh key
          +       key_replace               krpl   &3   replace key
          +       key_restart               krst   &4   restart key
          +       key_resume                kres   &5   resume key
          +       key_right                 kcuf1  kr   right-arrow key
          +       key_save                  ksav   &6   save key
          +       key_sbeg                  kBEG   &9   shifted begin key
          +       key_scancel               kCAN   &0   shifted cancel key
          +       key_scommand              kCMD   *1   shifted command key
          +       key_scopy                 kCPY   *2   shifted copy key
          +       key_screate               kCRT   *3   shifted create key
          +       key_sdc                   kDC    *4   shifted delete-char-
          +                                             acter key
          +       key_sdl                   kDL    *5   shifted delete-line
          +                                             key
          +       key_select                kslt   *6   select 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
          +       key_sf                    kind   kF   scroll-forward key
          +       key_sfind                 kFND   *0   shifted find key
          +       key_shelp                 kHLP   #1   shifted help key
          +       key_shome                 kHOM   #2   shifted home key
          +
          +       key_sic                   kIC    #3   shifted insert-char-
          +                                             acter key
          +       key_sleft                 kLFT   #4   shifted left-arrow
          +                                             key
          +       key_smessage              kMSG   %a   shifted message key
          +       key_smove                 kMOV   %b   shifted move key
          +       key_snext                 kNXT   %c   shifted next key
          +       key_soptions              kOPT   %d   shifted options key
          +       key_sprevious             kPRV   %e   shifted previous key
          +       key_sprint                kPRT   %f   shifted print key
          +       key_sr                    kri    kR   scroll-backward key
          +       key_sredo                 kRDO   %g   shifted redo key
          +       key_sreplace              kRPL   %h   shifted replace key
          +       key_sright                kRIT   %i   shifted right-arrow
          +                                             key
          +       key_srsume                kRES   %j   shifted resume key
          +       key_ssave                 kSAV   !1   shifted save key
          +       key_ssuspend              kSPD   !2   shifted suspend key
          +       key_stab                  khts   kT   set-tab key
          +       key_sundo                 kUND   !3   shifted undo key
          +       key_suspend               kspd   &7   suspend key
          +       key_undo                  kund   &8   undo key
          +       key_up                    kcuu1  ku   up-arrow key
          +       keypad_local              rmkx   ke   leave 'key-
          +                                             board_transmit' mode
          +       keypad_xmit               smkx   ks   enter 'key-
          +                                             board_transmit' mode
          +       lab_f0                    lf0    l0   label on function
          +                                             key f0 if not f0
          +       lab_f1                    lf1    l1   label on function
          +                                             key f1 if not f1
          +       lab_f10                   lf10   la   label on function
          +                                             key f10 if not f10
          +       lab_f2                    lf2    l2   label on function
          +                                             key f2 if not f2
          +       lab_f3                    lf3    l3   label on function
          +                                             key f3 if not f3
          +       lab_f4                    lf4    l4   label on function
          +                                             key f4 if not f4
          +       lab_f5                    lf5    l5   label on function
          +                                             key f5 if not f5
          +       lab_f6                    lf6    l6   label on function
          +                                             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
          +                                             key f9 if not f9
          +       label_format              fln    Lf   label format
          +       label_off                 rmln   LF   turn off soft labels
          +       label_on                  smln   LO   turn on soft labels
          +       meta_off                  rmm    mo   turn off meta mode
          +
          +       meta_on                   smm    mm   turn on meta mode
          +                                             (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
          +                                             micro mode
          +       micro_right               mcuf1  Zb   Like cursor_right in
          +                                             micro mode
          +       micro_row_address         mvpa   Zc   Like row_address in
          +                                             micro mode
          +       micro_up                  mcuu1  Zd   Like cursor_up in
          +                                             micro mode
          +       newline                   nel    nw   newline (behave like
          +                                             cr followed by lf)
          +       order_of_pins             porder Ze   Match software bits
          +                                             to print-head pins
          +       orig_colors               oc     oc   Set all color pairs
          +                                             to the original ones
          +       orig_pair                 op     op   Set default pair to
          +                                             its original value
          +       pad_char                  pad    pc   padding char
          +                                             (instead of null)
          +       parm_dch                  dch    DC   delete #1 characters
          +                                             (P*)
          +       parm_delete_line          dl     DL   delete #1 lines (P*)
          +       parm_down_cursor          cud    DO   down #1 lines (P*)
          +       parm_down_micro           mcud   Zf   Like parm_down_cur-
          +                                             sor in micro mode
          +       parm_ich                  ich    IC   insert #1 characters
          +                                             (P*)
          +       parm_index                indn   SF   scroll forward #1
          +                                             lines (P)
          +       parm_insert_line          il     AL   insert #1 lines (P*)
          +       parm_left_cursor          cub    LE   move #1 characters
          +                                             to the left (P)
          +       parm_left_micro           mcub   Zg   Like parm_left_cur-
          +                                             sor in micro mode
          +       parm_right_cursor         cuf    RI   move #1 characters
          +                                             to the right (P*)
          +       parm_right_micro          mcuf   Zh   Like parm_right_cur-
          +                                             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
          +       pkey_key                  pfkey  pk   program function key
          +                                             #1 to type string #2
          +       pkey_local                pfloc  pl   program function key
          +                                             #1 to execute string
          +                                             #2
          +
          +       pkey_xmit                 pfx    px   program function key
          +                                             #1 to transmit
          +                                             string #2
          +       plab_norm                 pln    pn   program label #1 to
          +                                             show string #2
          +       print_screen              mc0    ps   print contents of
          +                                             screen
          +       prtr_non                  mc5p   pO   turn on printer for
          +                                             #1 bytes
          +       prtr_off                  mc4    pf   turn off printer
          +       prtr_on                   mc5    po   turn on printer
          +       pulse                     pulse  PU   select pulse dialing
          +       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
          +                                             (for ptys)
          +       reset_1string             rs1    r1   reset string
          +       reset_2string             rs2    r2   reset string
          +       reset_3string             rs3    r3   reset string
          +       reset_file                rf     rf   name of reset file
          +       restore_cursor            rc     rc   restore cursor to
          +                                             position of last
          +                                             save_cursor
          +       row_address               vpa    cv   vertical position #1
          +                                             absolute (P)
          +       save_cursor               sc     sc   save current cursor
          +                                             position (P)
          +       scroll_forward            ind    sf   scroll text up (P)
          +       scroll_reverse            ri     sr   scroll text down (P)
          +       select_char_set           scs    Zj   Select character set
          +       set_attributes            sgr    sa   define video
          +                                             attributes #1-#9
          +                                             (PG9)
          +       set_background            setb   Sb   Set background color
          +                                             #1
          +       set_bottom_margin         smgb   Zk   Set bottom margin at
          +                                             current line
          +       set_bottom_margin_parm    smgbp  Zl   Set bottom margin at
          +                                             line #1 or #2 lines
          +                                             from bottom
          +       set_clock                 sclk   SC   set clock, #1 hrs #2
          +                                             mins #3 secs
          +       set_color_pair            scp    sp   Set current color
          +                                             pair to #1
          +       set_foreground            setf   Sf   Set foreground color
          +                                             #1
          +       set_left_margin           smgl   ML   set left soft margin
          +                                             at current column
          +
          +
          +
          +       set_left_margin_parm      smglp  Zm   Set left (right)
          +                                             margin at column #1
          +                                             (#2)
          +       set_right_margin          smgr   MR   set right soft mar-
          +                                             gin at current col-
          +                                             umn
          +       set_right_margin_parm     smgrp  Zn   Set right margin at
          +                                             column #1
          +       set_tab                   hts    st   set a tab in every
          +                                             row, current columns
          +       set_top_margin            smgt   Zo   Set top margin at
          +                                             current line
          +       set_top_margin_parm       smgtp  Zp   Set top (bottom)
          +                                             margin at row #1
          +                                             (#2)
          +       set_window                wind   wi   current window is
          +                                             lines #1-#2 cols
          +                                             #3-#4
          +       start_bit_image           sbim   Zq   Start printing bit
          +                                             image graphics
          +       start_char_set_def        scsd   Zr   Start character set
          +                                             definition
          +       stop_bit_image            rbim   Zs   Stop printing bit
          +                                             image graphics
          +       stop_char_set_def         rcsd   Zt   End definition of
          +                                             character set
          +       subscript_characters      subcs  Zu   List of subscript-
          +                                             able characters
          +       superscript_characters    supcs  Zv   List of superscript-
          +                                             able characters
          +       tab                       ht     ta   tab to next 8-space
          +                                             hardware tab stop
          +       these_cause_cr            docr   Zw   Printing any of
          +                                             these characters
          +                                             causes CR
          +       to_status_line            tsl    ts   move to status line
          +       tone                      tone   TO   select touch tone
          +                                             dialing
          +       underline_char            uc     uc   underline char and
          +                                             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
          +       user4                     u4     u4   User string #4
          +       user5                     u5     u5   User string #5
          +       user6                     u6     u6   User string #6
          +       user7                     u7     u7   User string #7
          +       user8                     u8     u8   User string #8
          +       user9                     u9     u9   User string #9
          +       wait_tone                 wait   WA   wait for dial-tone
          +       xoff_character            xoffc  XF   XOFF character
          +
          +       xon_character             xonc   XN   XON character
          +       zero_motion               zerom  Zx   No motion for subse-
          +                                             quent character
          +
          +       The following  string  capabilities  are  present  in  the
          +       SVr4.0  term structure, but were originally not documented
          +       in the man page.
          +
          +               Variable          Cap-     TCap    Description
          +                String           name     Code
          +       alt_scancode_esc          scesa    S8   Alternate escape
          +                                               for scancode emu-
          +                                               lation
          +       bit_image_carriage_return bicr     Yv   Move to beginning
          +                                               of same row
          +       bit_image_newline         binel    Zz   Move to next row
          +                                               of the bit image
          +       bit_image_repeat          birep    Xy   Repeat bit image
          +                                               cell #1 #2 times
          +       char_set_names            csnm     Zy   List of character
          +                                               set names
          +       code_set_init             csin     ci   Init sequence for
          +                                               multiple codesets
          +       color_names               colornm  Yw   Give name for
          +                                               color #1
          +       define_bit_image_region   defbi    Yx   Define rectan-
          +                                               gualar bit image
          +                                               region
          +       device_type               devt     dv   Indicate lan-
          +                                               guage/codeset sup-
          +                                               port
          +       display_pc_char           dispc    S1   Display PC charac-
          +                                               ter
          +       end_bit_image_region      endbi    Yy   End a bit-image
          +                                               region
          +       enter_pc_charset_mode     smpch    S2   Enter PC character
          +                                               display mode
          +       enter_scancode_mode       smsc     S4   Enter PC scancode
          +                                               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
          +                                               button events
          +       key_mouse                 kmous    Km   Mouse event has
          +                                               occurred
          +       mouse_info                minfo    Mi   Mouse status
          +                                               information
          +       pc_term_options           pctrm    S6   PC terminal
          +                                               options
          +
          +
          +
          +       pkey_plab                 pfxl     xl   Program function
          +                                               key #1 to type
          +                                               string #2 and show
          +                                               string #3
          +       req_mouse_pos             reqmp    RQ   Request mouse
          +                                               position
          +       scancode_escape           scesc    S7   Escape for scan-
          +                                               code emulation
          +       set0_des_seq              s0ds     s0   Shift to code set
          +                                               0 (EUC set 0,
          +                                               ASCII)
          +       set1_des_seq              s1ds     s1   Shift to code set
          +                                               1
          +       set2_des_seq              s2ds     s2   Shift to code set
          +                                               2
          +       set3_des_seq              s3ds     s3   Shift to code set
          +                                               3
          +       set_a_background          setab    AB   Set background
          +                                               color using ANSI
          +                                               escape
          +       set_a_foreground          setaf    AF   Set foreground
          +                                               color using ANSI
          +                                               escape
          +       set_color_band            setcolor Yz   Change to ribbon
          +                                               color #1
          +       set_lr_margin             smglr    ML   Set both left and
          +                                               right margins to
          +                                               #1, #2
          +       set_page_length           slines   YZ   Set page length to
          +                                               #1 lines
          +       set_tb_margin             smgtb    MT   Sets both top and
          +                                               bottom margins to
          +                                               #1, #2
          +
          +        The XSI Curses  standard  added  these.   They  are  some
          +        post-4.1  versions  of System V curses, e.g., Solaris 2.5
          +        and IRIX 6.x.  The ncurses termcap  names  for  them  are
          +        invented; according to the XSI Curses standard, they have
          +        no termcap names.  If your compiled terminfo entries  use
          +        these,  they  may  not be binary-compatible with System V
          +        terminfo entries after SVr4.1; beware!
          +
          +                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
          +                                             mode
          +        enter_right_hl_mode      erhlm  Xr   Enter right high-
          +                                             light mode
          +
          +
          +        enter_top_hl_mode        ethlm  Xt   Enter top highlight
          +                                             mode
          +        enter_vertical_hl_mode   evhlm  Xv   Enter vertical high-
          +                                             light mode
          +        set_a_attributes         sgr1   sA   Define second set of
          +                                             video attributes
          +                                             #1-#6
          +        set_pglen_inch           slengthsL   YI Set page length
          +                                             to #1 hundredth of
          +                                             an inch
          +
          +
          +   A Sample Entry
          +       The following entry, describing an ANSI-standard terminal,
          +       is  representative  of  what a terminfo entry for a modern
          +       terminal typically looks like.
          +
          +     ansi|ansi/pc-term compatible with color,
          +             mc5i,
          +             colors#8, ncv#3, pairs#64,
          +             cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
          +             cuu=\E[%p1%dA, dch=\E[%p1%dP, dl=\E[%p1%dM,
          +             ech=\E[%p1%dX, el1=\E[1K, hpa=\E[%p1%dG, ht=\E[I,
          +             ich=\E[%p1%d@, il=\E[%p1%dL, indn=\E[%p1%dS, .indn=\E[%p1%dT,
          +             kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
          +             kcuf1=\E[C, kcuu1=\E[A, kf1=\E[M, kf10=\E[V,
          +             kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P,
          +             kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U,
          +             kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S,
          +             op=\E[37;40m, rep=%p1%c\E[%p2%{1}%-%db,
          +             rin=\E[%p1%dT, s0ds=\E(B, s1ds=\E)B, s2ds=\E*B,
          +             s3ds=\E+B, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
          +             setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
          +             setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
          +             sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;12%;m,
          +             sgr0=\E[0;10m, tbc=\E[2g, u6=\E[%d;%dR, u7=\E[6n,
          +             u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%p1%dd,
          +
          +       Entries may continue onto multiple lines by placing  white
          +       space  at  the  beginning  of  each line except the first.
          +       Comments may be included on lines  beginning  with  ``#''.
          +       Capabilities in terminfo are of three types: Boolean capa-
          +       bilities which indicate that the terminal has some partic-
          +       ular  feature, numeric capabilities giving the size of the
          +       terminal or the size  of  particular  delays,  and  string
          +       capabilities,  which  give a sequence which can be used to
          +       perform particular terminal operations.
          +
          +
          +   Types of Capabilities
          +       All capabilities have names.  For instance, the fact  that
          +       ANSI-standard  terminals  have automatic margins (i.e., an
          +       automatic return and line-feed when the end of a  line  is
          +       reached)  is  indicated  by  the capability am.  Hence the
          +       description of ansi includes am.  Numeric capabilities are
          +       followed  by  the character `#' and then a positive value.
          +       Thus cols, which indicates the number of columns the  ter-
          +       minal  has,  gives  the  value  `80' for ansi.  Values for
          +       numeric capabilities may be specified in decimal, octal or
          +       hexadecimal,  using the C programming language conventions
          +       (e.g., 255, 0377 and 0xff or 0xFF).
          +
          +       Finally, string valued capabilities, such as el (clear  to
          +       end of line sequence) are given by the two-character code,
          +       an `=', and then a string ending  at  the  next  following
          +       `,'.
          +
          +       A  number  of  escape sequences are provided in the string
          +       valued capabilities for easy encoding of characters there.
          +       Both  \E  and  \e map to an ESCAPE character, ^x maps to a
          +       control-x for any appropriate x, and the sequences  \n  \l
          +       \r  \t  \b  \f  \s give a newline, line-feed, return, tab,
          +       backspace, form-feed, and space.  Other escapes include \^
          +       for  ^, \\ for \, \, for comma, \: for :, and \0 for null.
          +       (\0 will produce \200, which does not terminate  a  string
          +       but behaves as a null character on most terminals, provid-
          +       ing CS7 is specified.  See stty(1).)  Finally,  characters
          +       may be given as three octal digits after a \.
          +
          +       A  delay  in  milliseconds may appear anywhere in a string
          +       capability, enclosed in $<..> brackets, as in  el=\EK$<5>,
          +       and  padding  characters  are supplied by tputs to provide
          +       this delay.  The delay must be a number with at  most  one
          +       decimal place of precision; it may be followed by suffixes
          +       `*' or '/' or both.  A  `*'  indicates  that  the  padding
          +       required  is  proportional to the number of lines affected
          +       by the  operation,  and  the  amount  given  is  the  per-
          +       affected-unit  padding  required.   (In the case of insert
          +       character,  the  factor  is  still  the  number  of  lines
          +       affected.)   Normally,  padding  is advisory if the device
          +       has the xon capability; it is used  for  cost  computation
          +       but  does not trigger delays.  A `/' suffix indicates that
          +       the padding is mandatory and forces a delay of  the  given
          +       number  of  milliseconds  even on devices for which xon is
          +       present to indicate flow control.
          +
          +       Sometimes individual capabilities must be  commented  out.
          +       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-
          +       piled description you are working on.  Only that directory
          +       is searched.
          +
          +       If  TERMINFO  is  not  set,  the  ncurses  version  of the
          +       terminfo reader code will instead look  in  the  directory
          +       $HOME/.terminfo  for  a compiled description.  If it fails
          +       to find one  there,  and  the  environment  variable  TER-
          +       MINFO_DIRS  is set, it will interpret the contents of that
          +       variable as a list of colon- separated directories  to  be
          +       searched  (an  empty  entry is interpreted as a command to
          +       search @DATADIR@/terminfo).  If no description is found in
          +       any of the TERMINFO_DIRS directories, the fetch fails.
          +
          +       If  neither  TERMINFO  nor  TERMINFO_DIRS is set, the last
          +       place  tried  will  be  the  system  terminfo   directory,
          +       @DATADIR@/terminfo.
          +
          +       (Neither  the  $HOME/.terminfo  lookups  nor TERMINFO_DIRS
          +       extensions  are  supported  under  stock  System  V   ter-
          +       minfo/curses.)
          +
          +
          +   Preparing Descriptions
          +       We  now  outline how to prepare descriptions of terminals.
          +       The most effective way to prepare a  terminal  description
          +       is  by  imitating the description of a similar terminal in
          +       terminfo and to build up a  description  gradually,  using
          +       partial descriptions with vi or some other screen-oriented
          +       program to check that they are correct.  Be aware  that  a
          +       very unusual terminal may expose deficiencies in the abil-
          +       ity of the terminfo file to describe it  or  bugs  in  the
          +       screen-handling code of the test program.
          +
          +       To  get the padding for insert line right (if the terminal
          +       manufacturer did not document it) a severe test is to edit
          +       a  large file at 9600 baud, delete 16 or so lines from the
          +       middle of the screen, then hit the `u' key  several  times
          +       quickly.   If the terminal messes up, more padding is usu-
          +       ally needed.  A similar test can be used for insert  char-
          +       acter.
          +
          +
          +   Basic Capabilities
          +       The  number  of  columns  on each line for the terminal is
          +       given by the cols numeric capability.  If the terminal  is
          +       a  CRT, then the number of lines on the screen is given by
          +       the lines capability.  If the terminal wraps around to the
          +       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  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
          +       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
          +       given, and never attempt to go up locally off the top.  In
          +       order  to  scroll text up, a program will go to the bottom
          +       left corner of the screen and send the 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
          +       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
          +       the screen.
          +
          +       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
          +       out of one or both of them.
          +
          +       These  capabilities  suffice  to  describe  hard-copy  and
          +       "glass-tty" terminals.  Thus  the  model  33  teletype  is
          +       described as
          +
          +     33|tty33|tty|model 33 teletype,
          +     bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
          +       while the Lear Siegler ADM-3 is described as
          +
          +     adm3|3|lsi adm3,
          +     am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
          +     ind=^J, lines#24,
          +
          +
          +   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
          +       given, using two parameters: the row and column to address
          +       to.  (Rows and columns are numbered from zero and refer to
          +       the physical screen visible to the user, not to any unseen
          +       memory.)  If  the  terminal  has  memory  relative  cursor
          +       addressing, that can be indicated by 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 % 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.
          +
          +       Binary operations are in postfix form with the operands in
          +       the  usual  order.   That  is,  to  get  x-5 one would use
          +       "%gx%{5}%-".  %P and %g variables  are  persistent  across
          +       escape-string evaluations.
          +
          +       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-
          +       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
          +       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
          +       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.
          +       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
          +       addressing to (0,0): to the top left corner of the screen,
          +       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
          +       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
          +       can be used in preference to cup.  If there are parameter-
          +       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
          +       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
          +       cursor addressing, a one screen-sized window must be fixed
          +       into  the terminal for cursor addressing to work properly.
          +       This is also used for the 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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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-
          +       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 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
          +       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
          +       as the parameterized string wind.  The four parameters are
          +       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
          +       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)
          +       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
          +       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
          +       for "insert null".  While these are two logically separate
          +       attributes  (one line vs. multi-line insert mode, and spe-
          +       cial treatment of untyped spaces) we have seen  no  termi-
          +       nals whose insert mode cannot be described with the single
          +       attribute.
          +
          +       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
          +       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
          +       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
          +       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
          +       appropriate (but not both).  If you have to write an entry
          +       to  be  used under new curses for a terminal old enough to
          +       need both, include the 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
          +       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
          +       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
          +       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
          +       (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
          +       for dch1 to work).
          +
          +       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-
          +       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,
          +       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
          +       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
          +       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,
          +       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
          +       corresponding separate attribute commands exist.
          +
          +       For example, the DEC vt220 supports most of the modes:
          +
          +           tparm parameter   attribute    escape sequence
          +
          +           none              none         \E[0m
          +           p1                standout     \E[0;1;7m
          +           p2                underline    \E[0;4m
          +           p3                reverse      \E[0;7m
          +           p4                blink        \E[0;5m
          +           p5                dim          not available
          +           p6                bold         \E[0;1m
          +           p7                invis        \E[0;8m
          +           p8                protect      not used
          +           p9                altcharset   ^O (off) ^N (on)
          +
          +       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
          +       \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,
          +       if either standout or reverse modes are turned on.
          +
          +       Writing out the above sequences, along with  their  depen-
          +       dencies yields
          +
          +         sequence    when to output     terminfo translation
          +
          +         \E[0       always              \E[0
          +         ;1         if p1 or p6         %?%p1%p6%|%t;1%;
          +         ;4         if p2               %?%p2%|%t;4%;
          +         ;5         if p4               %?%p4%|%t;5%;
          +         ;7         if p1 or p3         %?%p1%p3%|%t;7%;
          +         ;8         if p7               %?%p7%|%t;8%;
          +         m          always              m
          +         ^N or ^O   if p9 ^N, else ^O   %?%p9%t^N%e^O%;
          +
          +       Putting this all together into the sgr sequence gives:
          +
          +           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
          +       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
          +       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
          +       be given as flash; it must not move the cursor.
          +
          +       If  the  cursor  needs to be made more visible than normal
          +       when it is not on the bottom line (to make, for example, a
          +       non-blinking  underline  into  an  easier to find block or
          +       blinking underline) give this sequence as cvvis.  If there
          +       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
          +       the screen, specify the capability os.  If overstrikes are
          +       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 that
          +       it  is  not  possible to handle terminals where the keypad
          +       only works in local (this applies,  for  example,  to  the
          +       unshifted  HP  2621  keys).   If  the keypad can be set to
          +       transmit or not transmit, give these  codes  as  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  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
          +       be  specified  as  pln.   Each  of these strings takes two
          +       parameters: the function key number to program (from 0  to
          +       10)  and the string to program it with.  Function key num-
          +       bers out of this range may program  undefined  keys  in  a
          +       terminal  dependent  manner.   The  difference between the
          +       capabilities is that pfkey causes pressing the  given  key
          +       to  be the same as the user typing the given string; pfloc
          +       causes the string to be executed by the terminal in local;
          +       and  pfx  causes  the string to be transmitted to the com-
          +       puter.
          +
          +       The capabilities nlab, lw and lh define the number of pro-
          +       grammable  screen  labels  and their width and height.  If
          +       there are commands to turn the labels  on  and  off,  give
          +       them  in smln and rmln.  smln is normally output after one
          +       or more pln sequences to make sure that the change becomes
          +       visible.
          +
          +
          +   Tabs and Initialization
          +       If  the terminal has hardware tabs, the command to advance
          +       to the next tab stop can be given as ht  (usually  control
          +       I).   A  ``back-tab''  command which moves leftward to the
          +       preceding tab stop can be given as cbt.  By convention, if
          +       the  teletype  modes indicate that tabs are being expanded
          +       by the computer rather than being sent  to  the  terminal,
          +       programs  should  not  use ht or cbt even if they are pre-
          +       sent, since the user may not have the tab  stops  properly
          +       set.   If  the  terminal  has hardware tabs which are ini-
          +       tially set every n spaces when the terminal is powered up,
          +       the  numeric  parameter it is given, showing the number of
          +       spaces the tabs are set to.  This is normally used by  the
          +       tset  command  to  determine  whether  to set the mode for
          +       hardware tab expansion, and whether to set the tab  stops.
          +       If  the  terminal  has tab stops that can be saved in non-
          +       volatile memory, the terminfo description can assume  that
          +       they are properly set.
          +
          +       Other  capabilities include is1, is2, and is3, initializa-
          +       tion strings for the terminal, iprog, the path name  of  a
          +       program  to be run to initialize the terminal, and if, the
          +       name of a file  containing  long  initialization  strings.
          +       These  strings are expected to set the terminal into modes
          +       consistent with the  rest  of  the  terminfo  description.
          +       They are normally sent to the terminal, by the init option
          +       of the tput program, each time the  user  logs  in.   They
          +       will  be  printed  in the following order: run the program
          +       iprog; output is1; is2; set the margins using mgc, smgland
          +       smgr;  set  tabs using tbc and hts; print the file if; and
          +       finally output is3.
          +
          +       Most initialization is done with  is2.   Special  terminal
          +       modes can be set up without duplicating strings by putting
          +       the common sequences in is2 and special cases in  is1  and
          +       is3.   A pair of sequences that does a harder reset from a
          +       totally unknown state can be  analogously  given  as  rs1,
          +       rs2,  rf, and rs3, analogous to is2 and if.  These strings
          +       are output by the reset program, which is  used  when  the
          +       terminal  gets into a wedged state.  Commands are normally
          +       placed in rs1, rs2 rs3 and rf only if they produce  annoy-
          +       ing  effects on the screen and are not necessary when log-
          +       ging in.  For example, the command to set the  vt100  into
          +       80-column  mode  would  normally  be  part  of is2, but it
          +       causes an annoying glitch of the screen and  is  not  nor-
          +       mally  needed  since the terminal is usually already in 80
          +       column mode.
          +
          +       If there are commands to set and clear tab stops, they can
          +       be  given  as tbc (clear all tab stops) and hts (set a tab
          +       stop in the current column of every row).  If a more  com-
          +       plex  sequence  is  needed  to  set  the  tabs than can be
          +       described by this, the sequence can be placed  in  is2  or
          +       if.
          +
          +   Delays and Padding
          +       Many  older  and  slower  terminals  don't  support either
          +       XON/XOFF or DTR handshaking, including hard copy terminals
          +       and  some  very  archaic CRTs (including, for example, DEC
          +       VT100s).  These may require padding characters after  cer-
          +       tain cursor motions and screen changes.
          +
          +       If the terminal uses xon/xoff handshaking for flow control
          +       (that is, it automatically emits ^S back to the host  when
          +       its input buffers are close to full), set xon.  This capa-
          +       bility suppresses the emission of padding.  You  can  also
          +       set  it for memory-mapped console devices effectively that
          +       don't have a  speed  limit.   Padding  information  should
          +       still  be  included so that routines can make better deci-
          +       sions about relative costs, but actual pad characters will
          +       not be transmitted.
          +
          +       If  pb (padding baud rate) is given, padding is suppressed
          +       at baud rates below the value of pb.  If the entry has  no
          +       padding  baud rate, then whether padding is emitted or not
          +       is completely controlled by xon.
          +
          +       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.
          +
          +   Status Lines
          +       Some terminals have an extra `status line'  which  is  not
          +       normally  used  by  software  (and thus not counted in the
          +       terminal's lines capability).
          +
          +       The simplest case  is  a  status  line  which  is  cursor-
          +       addressable  but  not part of the main scrolling region on
          +       the screen; the Heathkit H19 has a  status  line  of  this
          +       kind,  as  would  a 24-line VT100 with a 23-line scrolling
          +       region set up on initialization.  This situation is  indi-
          +       cated by the hs capability.
          +
          +       Some terminals with status lines need special sequences to
          +       access the status line.   These  may  be  expressed  as  a
          +       string with single parameter tsl which takes the cursor to
          +       a given zero-origin column on the status line.  The  capa-
          +       bility fsl must return to the main-screen cursor positions
          +       before the last tsl.  You may need  to  embed  the  string
          +       values  of sc (save cursor) and rc (restore cursor) in tsl
          +       and fsl to accomplish this.
          +
          +       The status line is normally assumed to be the  same  width
          +       as  the width of the terminal.  If this is untrue, you can
          +       specify it with the numeric capability wsl.
          +
          +       A command to erase or blank the status line may be  speci-
          +       fied as dsl.
          +
          +       The   boolean   capability  eslok  specifies  that  escape
          +       sequences, tabs, etc. work ordinarily in the status  line.
          +
          +       The  ncurses  implementation does not yet use any of these
          +       capabilities.  They are documented here in case they  ever
          +       become important.
          +
          +
          +   Line Graphics
          +       Many  terminals  have  alternate character sets useful for
          +       forms-drawing.  Terminfo and curses build in  support  for
          +       the  drawing  characters supported by the VT100, with some
          +       characters from the AT&T  4410v1  added.   This  alternate
          +       character set may be specified by the acsc capability.
          +
          +                Glyph             ACS            Ascii      VT100
          +                 Name             Name           Default    Name
          +       UK pound sign              ACS_STERLING   f          }
          +       arrow pointing down        ACS_DARROW     v          .
          +       arrow pointing left        ACS_LARROW     <          ,
          +       arrow pointing right       ACS_RARROW     >          +
          +       arrow pointing up          ACS_UARROW     ^          -
          +       board of squares           ACS_BOARD      #          h
          +       bullet                     ACS_BULLET     o          ~
          +       checker board (stipple)    ACS_CKBOARD    :          a
          +
          +       degree symbol              ACS_DEGREE     \          f
          +       diamond                    ACS_DIAMOND    +          `
          +       greater-than-or-equal-to   ACS_GEQUAL     >          z
          +       greek pi                   ACS_PI         *          {
          +       horizontal line            ACS_HLINE      -          q
          +       lantern symbol             ACS_LANTERN    #          i
          +       large plus or crossover    ACS_PLUS       +          n
          +       less-than-or-equal-to      ACS_LEQUAL     <          y
          +       lower left corner          ACS_LLCORNER   +          m
          +       lower right corner         ACS_LRCORNER   +          j
          +       not-equal                  ACS_NEQUAL     !          |
          +       plus/minus                 ACS_PLMINUS    #          g
          +       scan line 1                ACS_S1         ~          o
          +       scan line 3                ACS_S3         -          p
          +       scan line 7                ACS_S7         -          r
          +       scan line 9                ACS_S9         _          s
          +       solid square block         ACS_BLOCK      #          0
          +       tee pointing down          ACS_TTEE       +          w
          +       tee pointing left          ACS_RTEE       +          u
          +       tee pointing right         ACS_LTEE       +          t
          +       tee pointing up            ACS_BTEE       +          v
          +       upper left corner          ACS_ULCORNER   +          l
          +       upper right corner         ACS_URCORNER   +          k
          +       vertical line              ACS_VLINE      |          x
          +
          +       The  best  way to define a new device's graphics set is to
          +       add a column to a copy of this table  for  your  terminal,
          +       giving   the   character   which   (when  emitted  between
          +       smacs/rmacs switches) will be rendered as the  correspond-
          +       ing  graphic.  Then read off the VT100/your terminal char-
          +       acter pairs right to left in sequence;  these  become  the
          +       ACSC string.
          +
          +
          +   Color Handling
          +       Most  color  terminals are either `Tektronix-like' or `HP-
          +       like'.  Tektronix-like terminals have a predefined set  of
          +       N  colors  (where N usually 8), and can set character-cell
          +       foreground and background characters independently, mixing
          +       them  into  N  * N color-pairs.  On HP-like terminals, the
          +       use must set each color pair up separately (foreground and
          +       background  are  not  independently  settable).   Up  to M
          +       color-pairs may be  set  up  from  2*M  different  colors.
          +       ANSI-compatible terminals are Tektronix-like.
          +
          +       Some basic color capabilities are independent of the color
          +       method.  The numeric capabilities colors and pairs specify
          +       the  maximum numbers of colors and color-pairs that can be
          +       displayed simultaneously.  The op (original  pair)  string
          +       resets  foreground  and background colors to their default
          +       values for the terminal.  The oc string resets all  colors
          +       or  color-pairs  to their default values for the terminal.
          +       Some terminals  (including  many  PC  terminal  emulators)
          +       erase  screen  areas  with  the  current  background color
          +       rather than the power-up default background; these  should
          +       have the boolean capability bce.
          +
          +       To  change the current foreground or background color on a
          +       Tektronix-type terminal, use setaf (set  ANSI  foreground)
          +       and  setab  (set ANSI background) or setf (set foreground)
          +       and setb (set background).  These take one parameter,  the
          +       color  number.   The  SVr4  documentation  describes  only
          +       setaf/setab; the XPG4 draft says  that  "If  the  terminal
          +       supports ANSI escape sequences to set background and fore-
          +       ground, they should be coded as setaf and  setab,  respec-
          +       tively.   If  the terminal supports other escape sequences
          +       to set background and foreground, they should be coded  as
          +       setf  and  setb, respectively.  The vidputs() function and
          +       the refresh functions use setaf  and  setab  if  they  are
          +       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.
          +
          +             Color       #define       Value       RGB
          +             black     COLOR_BLACK       0     0, 0, 0
          +             red       COLOR_RED         1     max,0,0
          +             green     COLOR_GREEN       2     0,max,0
          +             yellow    COLOR_YELLOW      3     max,max,0
          +             blue      COLOR_BLUE        4     0,0,max
          +             magenta   COLOR_MAGENTA     5     max,0,max
          +             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
          +       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,
          +       the initc capability will take a color number (0 to colors
          +       -  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
          +       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
          +       (Hue, Lightness, Saturation) depending on hls.
          +
          +       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
          +       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
          +                      A_BOLD         5     32
          +                      A_INVIS        6     64
          +                      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
          +       capability of 2.
          +
          +       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-
          +       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
          +       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
          +       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
          +       (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
          +       the same as `xxxxxxxxxx'.
          +
          +       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
          +       of the prototype character are replaced with the character
          +       in the environment variable.
          +
          +       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
          +       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
          +       will assume that the 8th bit is parity and it will usually
          +       be cleared.  If strings exist to turn this  ``meta  mode''
          +       on and off, they can be given as 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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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-
          +       eray_glitch.  This glitch is also taken to mean that it is
          +       not possible to position the cursor on top  of  a  ``magic
          +       cookie'', that to erase standout mode it is instead 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
          +       `no_esc_ctl_c'.
          +
          +       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
          +       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-
          +       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
          +       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
          +       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
          +       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
          +       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
          +       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
          +       exists in /etc/termcap, minus the backslash-newline pairs,
          +       which tgetent() strips out while reading it.  Some termcap
          +       libraries  strip  off  the final newline, too (GNU termcap
          +       does not).  Now suppose:
          +
          +       *    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
          +            wants,
          +
          +       *    and tgetent() is searching for a terminal  type  that
          +            either is the long entry, appears in the termcap file
          +            after the long entry, or doesn't appear in  the  file
          +            at  all  (so  that  tgetent() has to search the whole
          +            termcap file).
          +
          +       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-
          +       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,
          +       it will have this effect even for users of some other ter-
          +       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)
          +       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
          +       HP-UX and AIX) which diverged from System V terminfo after
          +       SVr1,  and have added extension capabilities to the string
          +       table that (in the binary format) collide  with  System  V
          +       and XSI Curses extensions.
          +
          +
          +
          +

          EXTENSIONS

          +       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,
          +       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
          +       to have msgr turned off.
          +
          +       The ncurses library handles insert-character  and  insert-
          +       character modes in a slightly non-standard way in order to
          +       get better update efficiency.  See the Insert/Delete Char-
          +       acter subsection above.
          +
          +       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
          +       information in the keyboard-input stream.
          +
          +       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
          +       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
          +       prtr_non.
          +
          +       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
          +       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
          +       extensions.
          +
          +       OSF  -- Supports both the SVr4 set and the AIX extensions.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo/?/*   files     containing     terminal
          +                                descriptions
          +
          +
          +
          +

          SEE ALSO

          +       tic(1m), curses(3x), printf(3S), term(5).
          +
          +
          +
          +

          AUTHORS

          +       Zeyd  M.  Ben-Halim,  Eric  S.  Raymond, Thomas E. Dickey.
          +       Based on pcurses by Pavel Curtis.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html new file mode 100644 index 00000000..a8d6e7d3 --- /dev/null +++ b/doc/html/man/tic.1m.html @@ -0,0 +1,296 @@ + + +
          +
          +
          +
          +

          NAME

          +       tic - the terminfo entry-description compiler
          +
          +
          +
          +

          SYNOPSIS

          +       tic  [-1CINRTacfrsx]  [-e  names] [-o dir] [-v[n]] [-w[n]]
          +       file
          +
          +
          +
          +

          DESCRIPTION

          +       The command tic translates a  terminfo  file  from  source
          +       format  into compiled format.  The compiled format is nec-
          +       essary for use with the library routines in ncurses(3x).
          +
          +       The results are normally placed  in  the  system  terminfo
          +       directory  @DATADIR@/terminfo.   There  are  two  ways  to
          +       change this behavior.
          +
          +       First, you may override the system default by setting  the
          +       variable  TERMINFO  in  your  shell environment to a valid
          +       (existing) directory name.
          +
          +       Secondly, if tic cannot get access  to  @DATADIR@/terminfo
          +       or  your  TERMINFO  directory,  it looks for the directory
          +       $HOME/.terminfo; if that directory exists,  the  entry  is
          +       placed there.
          +
          +       Libraries that read terminfo entries are expected to check
          +       for a TERMINFO directory first, look at $HOME/.terminfo if
          +       TERMINFO  is  not  set, and finally look in @DATADIR@/ter-
          +       minfo.
          +
          +       -a     tells  tic  to  retain  commented-out  capabilities
          +              rather than discarding them.  Capabilities are com-
          +              mented by prefixing them with a period.  This  sets
          +              the  -x option, because it treats the commented-out
          +              entries as user-defined names.
          +
          +       -c     tells tic to only check file for errors,  including
          +              syntax  problems and bad use links.  If you specify
          +              -C (-I) with this option, the code will print warn-
          +              ings 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.
          +
          +       -vn    specifies that (verbose) output be written to stan-
          +              dard  error   trace   information   showing   tic's
          +              progress.   The optional integer n is a number from
          +              1 to 10, inclusive, indicating the desired level of
          +              detail  of  information.   If  n  is  omitted,  the
          +              default level is 1.  If n is specified and  greater
          +              than 1, the level of detail is increased.
          +
          +       -odir  Write   compiled   entries   to   given  directory.
          +              Overrides the TERMINFO environment variable.
          +
          +       -wn    specifies the width of the output.
          +
          +       -1     restricts the output to a single column
          +
          +       -C     Force source translation to termcap format.   Note:
          +              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
          +              left  in  the  entry under their terminfo names but
          +              commented out with two preceding dots.
          +
          +       -G     Display constant literals in  decimal  form  rather
          +              than their character equivalents.
          +
          +       -I     Force source translation to terminfo format.
          +
          +       -L     Force  source  translation to terminfo format using
          +              the long C variable names listed in <term.h>
          +
          +       -N     Disable smart defaults.  Normally, when translating
          +              from termcap to terminfo, the compiler makes a num-
          +              ber of assumptions about  the  defaults  of  string
          +              capabilities  reset1_string,  carriage_return, cur-
          +              sor_left, cursor_down,  scroll_forward,  tab,  new-
          +              line,  key_backspace,  key_left, and key_down, then
          +              attempts to use obsolete  termcap  capabilities  to
          +              deduce correct values.  It also normally suppresses
          +              output of obsolete termcap capabilities such as bs.
          +              This  option forces a more literal translation that
          +              also preserves the obsolete capabilities.
          +
          +       -Rsubset
          +              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 don't  support
          +              the  full set of SVR4/XSI Curses terminfo; and out-
          +              right 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 terminfo(5) for details.
          +
          +       -T     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).
          +
          +       -r     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  up  to  version  1.3  or  BSD
          +              termcap  up to 4.3BSD) that doesn't handle multiple
          +              tc capabilities per entry.
          +
          +       -e     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 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:
          +              depending  on how tic was compiled, this option may
          +              require -I or -C.)
          +
          +       -f     Display  complex  terminfo  strings  which  contain
          +              if/then/else/endif  expressions  indented for read-
          +              ability.
          +
          +       -g     Display constant character literals in quoted  form
          +              rather than their decimal equivalents.
          +
          +       -s     Summarize the compile by showing the directory into
          +              which  entries  are  written,  and  the  number  of
          +              entries which are compiled.
          +
          +       -x     Treat  unknown  capabilities as user-defined.  That
          +              is, if you supply a capability name which tic  does
          +              not  recognize,  it  will  infer its type (boolean,
          +              number or string)  from  the  syntax  and  make  an
          +              extended table entry for that.
          +
          +       file   contains one or more terminfo terminal descriptions
          +              in source format [see terminfo(5)].  Each  descrip-
          +              tion  in  the  file describes the capabilities of a
          +              particular terminal.
          +
          +       The debug flag levels are as follows:
          +
          +       1      Names of files created and linked
          +
          +       2      Information related to the ``use'' facility
          +
          +       3      Statistics from the hashing algorithm
          +
          +       5      String-table memory allocations
          +
          +       7      Entries into the string-table
          +
          +       8      List of tokens encountered by scanner
          +
          +       9      All values computed in  construction  of  the  hash
          +              table
          +
          +       If n is not given, it is taken to be one.
          +
          +       All but one of the capabilities recognized by tic are doc-
          +       umented in terminfo(5).  The exception is the use capabil-
          +       ity.
          +
          +       When  a  use=entry-name  field is discovered in a terminal
          +       entry currently being compiled, tic reads  in  the  binary
          +       from  @DATADIR@/terminfo  to complete the entry.  (Entries
          +       created from file will be used first.  If the  environment
          +       variable  TERMINFO  is  set,  that  directory  is searched
          +       instead of @DATADIR@/terminfo.)  tic duplicates the  capa-
          +       bilities  in  entry-name  for  the current entry, with the
          +       exception  of  those  capabilities  that  explicitly   are
          +       defined in the current entry.
          +
          +       When    an   entry,   e.g.,   entry_name_1,   contains   a
          +       use=entry_name_2  field,  any  canceled  capabilities   in
          +       entry_name_2  must also appear in entry_name_1 before use=
          +       for these capabilities to be canceled in entry_name_1.
          +
          +       If the environment variable TERMINFO is set, the  compiled
          +       results are placed there instead of @DATADIR@/terminfo.
          +
          +       Total compiled entries cannot exceed 4096 bytes.  The name
          +       field cannot exceed 512 bytes.  Terminal  names  exceeding
          +       the  maximum  alias  length (32 characters on systems with
          +       long filenames, 14 characters otherwise) will be truncated
          +       to  the maximum alias length and a warning message will be
          +       printed.
          +
          +
          +
          +

          COMPATIBILITY

          +       There is some evidence that historic  tic  implementations
          +       treated  description  fields with no whitespace in them as
          +       additional aliases or short names.  This tic does  not  do
          +       that,  but  it  does  warn  when description fields may be
          +       treated that way and check them for dangerous  characters.
          +
          +
          +
          +

          EXTENSIONS

          +       Unlike the stock SVr4 tic command, this implementation can
          +       actually compile termcap sources.   In  fact,  entries  in
          +       terminfo  and  termcap  syntax  can  be  mixed in a single
          +       source file.  See terminfo(5)  for  the  list  of  termcap
          +       names taken to be equivalent to terminfo names.
          +
          +       The  SVr4  manual  pages  are  not clear on the resolution
          +       rules for use capabilities.  This  implementation  of  tic
          +       will find use targets anywhere in the source file, or any-
          +       where in the file tree rooted at TERMINFO (if TERMINFO  is
          +       defined),  or  in the user's $HOME/.terminfo directory (if
          +       it exists), or (finally) anywhere  in  the  system's  file
          +       tree of compiled entries.
          +
          +       The  error  messages from this tic have the same format as
          +       GNU C error messages, and can be  parsed  by  GNU  Emacs's
          +       compile facility.
          +       The -C, -G, -I, -N, -R, -T, -a, -e, -f, -g, -o, -r, -s and
          +       -x options are not supported under SVr4.  The 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-
          +       itly set to it.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo/?/*
          +            Compiled terminal description database.
          +
          +
          +
          +

          SEE ALSO

          +       infocmp(1m),    captoinfo(1m),   infotocap(1m),   toe(1m),
          +       curses(3x), terminfo(5).
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html new file mode 100644 index 00000000..3b017e3a --- /dev/null +++ b/doc/html/man/toe.1m.html @@ -0,0 +1,76 @@ + + +
          +
          +
          +
          +

          NAME

          +       toe - table of (terminfo) entries
          +
          +
          +
          +

          SYNOPSIS

          +       toe [-v[n]] [-huUV] file...
          +
          +
          +
          +

          DESCRIPTION

          +       With no options, toe 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.
          +
          +       There are other options intended for use by terminfo  file
          +       maintainers:
          +
          +       -u file
          +              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 termi-
          +              nal that has use capabilities, followed by a colon,
          +              followed  by the whitespace-separated primary names
          +              of all terminals which occur in those use capabili-
          +              ties, followed by a newline
          +
          +       -U file
          +              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,  fol-
          +              lowed  by a colon, followed by the whitespace-sepa-
          +              rated primary names of all terminals  which  depend
          +              on it, followed by a newline.
          +
          +       -vn    specifies that (verbose) output be written to stan-
          +              dard  error   trace   information   showing   toe's
          +              progress.   The optional integer n is a number from
          +              1 to 10, interpreted as for tic(1).
          +
          +       -V   prints out the version of the program in use on stan-
          +            dard error and exits.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo/?/*
          +            Compiled terminal description database.
          +
          +
          +
          +

          SEE ALSO

          +       tic(1m),    infocmp(1m),   captoinfo(1m),   infotocap(1m),
          +       curses(3x), terminfo(5).
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html new file mode 100644 index 00000000..606f7770 --- /dev/null +++ b/doc/html/man/tput.1.html @@ -0,0 +1,246 @@ + + +
          +
          +
          +
          +

          NAME

          +       tput - initialize a terminal or query terminfo database
          +
          +
          +
          +

          SYNOPSIS

          +       tput [-Ttype] capname [parms ... ]
          +       tput [-Ttype] init
          +       tput [-Ttype] reset
          +       tput [-Ttype] longname
          +       tput -S  <<
          +
          +
          +
          +

          DESCRIPTION

          +       The  tput  utility  uses the terminfo database to make the
          +       values of terminal-dependent capabilities and  information
          +       available to the shell (see sh(1)), to initialize or reset
          +       the terminal, or return the long  name  of  the  requested
          +       terminal  type.   tput  outputs  a string if the attribute
          +       (capability name) is of type string, or an integer if  the
          +       attribute is of type integer.  If the attribute is of type
          +       boolean, tput simply sets the exit code (0 for TRUE if the
          +       terminal  has the capability, 1 for FALSE if it does not),
          +       and produces no output.  Before using a value returned  on
          +       standard  output,  the user should test the exit code [$?,
          +       see sh(1)] to be sure it is 0.  (See the  EXIT  CODES  and
          +       DIAGNOSTICS  sections.)   For a complete list of capabili-
          +       ties and  the  capname  associated  with  each,  see  ter-
          +       minfo(5).
          +
          +       -Ttype indicates  the  type  of  terminal.   Normally this
          +              option is unnecessary, because the default is taken
          +              from the environment variable TERM.  If -T is spec-
          +              ified, then the shell variables LINES  and  COLUMNS
          +              will  be  ignored,and the operating system will not
          +              be queried for the actual screen size.
          +
          +       capname
          +              indicates the attribute from the terminfo database.
          +              When  termcap  support  is compiled in, the termcap
          +              name for the attribute is also accepted.
          +
          +       parms  If the attribute is a string that takes parameters,
          +              the  arguments  parms will be instantiated into the
          +              string.  An all numeric argument will be passed  to
          +              the attribute as a number.
          +
          +       -S     allows  more  than one capability per invocation of
          +              tput.  The capabilities must be passed to tput from
          +              the standard input instead of from the command line
          +              (see example).  Only one  capname  is  allowed  per
          +              line.   The  -S option changes the meaning of the 0
          +              and 1 boolean and string exit codes (see  the  EXIT
          +              CODES section).
          +
          +       init   If  the  terminfo  database is present and an entry
          +              for the user's terminal exists (see -Ttype, above),
          +              the  following will occur: (1) if present, the ter-
          +              minal's initialization strings will be output (is1,
          +              is2,  is3,  if,  iprog), (2) any delays (e.g., new-
          +              line) specified in the entry will be set in the tty
          +              driver, (3) tabs expansion will be turned on or off
          +              according to the specification in  the  entry,  and
          +              (4) if tabs are not expanded, standard tabs will be
          +              set (every 8 spaces).  If an entry does not contain
          +              the  information  needed  for any of the four above
          +              activities, that activity will silently be skipped.
          +
          +       reset  Instead  of putting out initialization strings, the
          +              terminal's reset strings will be output if  present
          +              (rs1,  rs2, rs3, rf).  If the reset strings are not
          +              present, but initialization strings are,  the  ini-
          +              tialization  strings  will  be  output.  Otherwise,
          +              reset acts identically to init.
          +
          +       longname
          +              If the terminfo database is present  and  an  entry
          +              for  the user's terminal exists (see -Ttype 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 terminfo database
          +              [see term(5)].
          +
          +
          +
          +

          EXAMPLES

          +       tput init
          +            Initialize the terminal according to the type of ter-
          +            minal in the environmental variable TERM.  This  com-
          +            mand  should be included in everyone's .profile after
          +            the environmental variable TERM has been exported, as
          +            illustrated on the profile(4) manual page.
          +
          +       tput -T5620 reset
          +            Reset  an  AT&T 5620 terminal, overriding the type of
          +            terminal in the environmental variable TERM.
          +
          +       tput cup 0 0
          +            Send the sequence to move the cursor to row 0, column
          +            0 (the upper left corner of the screen, usually known
          +            as the "home" cursor position).
          +
          +       tput clear
          +            Echo the clear-screen sequence for the current termi-
          +            nal.
          +
          +       tput cols
          +            Print the number of columns for the current terminal.
          +
          +       tput -T450 cols
          +            Print the number of columns for the 450 terminal.
          +
          +
          +       bold=`tput smso` offbold=`tput rmso`
          +            Set the shell variables bold, to begin stand-out mode
          +            sequence, and offbold, to end standout mode sequence,
          +            for the current terminal.  This might be followed  by
          +            a  prompt:  echo  "${bold}Please  type  in your name:
          +            ${offbold}\c"
          +
          +       tput hc
          +            Set exit code to indicate if the current terminal  is
          +            a hard copy terminal.
          +
          +       tput cup 23 4
          +            Send  the sequence to move the cursor to row 23, col-
          +            umn 4.
          +
          +       tput longname
          +            Print the long name from the  terminfo  database  for
          +            the  type  of terminal specified in the environmental
          +            variable TERM.
          +
          +       tput -S <<!
          +       > clear
          +       > cup 10 10
          +       > bold
          +       > !
          +
          +            This example shows tput processing several  capabili-
          +            ties  in  one  invocation.   This  example clears the
          +            screen, moves the cursor to position 10, 10 and turns
          +            on  bold (extra bright) mode.  The list is terminated
          +            by an exclamation mark (!) on a line by itself.
          +
          +
          +
          +

          FILES

          +       @DATADIR@/terminfo
          +              compiled terminal description database
          +
          +       /usr/include/curses.h
          +              curses(3x) header file
          +
          +       /usr/include/term.h
          +              terminfo header file
          +
          +       @DATADIR@/tabset/*
          +              tab settings for some terminals, in a format appro-
          +              priate   to  be  output  to  the  terminal  (escape
          +              sequences that set  margins  and  tabs);  for  more
          +              information, see the "Tabs and Initialization" sec-
          +              tion of terminfo(4)
          +
          +
          +
          +

          SEE ALSO

          +       clear(1), stty(1), tabs(5).   profile(5),  terminfo(4)  in
          +       the  System  Administrator's Reference Manual.  Chapter 10
          +       of the Programmer's Guide.
          +
          +
          +
          +

          EXIT CODES

          +       If capname is of type boolean, a value of  0  is  set  for
          +       TRUE and 1 for FALSE unless the -S option is used.
          +
          +       If  capname  is of type string, a value of 0 is set if the
          +       capname is defined for this terminal type  (the  value  of
          +       capname  is  returned on standard output); a value of 1 is
          +       set if capname is not defined for this  terminal  type  (a
          +       null value is returned on standard output).
          +
          +       If  capname is of type boolean or string and the -S option
          +       is used, a value of 0 is returned  to  indicate  that  all
          +       lines were successful.  No indication of which line failed
          +       can be given so exit code 1 will never appear.  Exit codes
          +       2, 3, and 4 retain their usual interpretation.
          +
          +       If capname is of type integer, a value of 0 is always set,
          +       whether or not capname is defined for this terminal  type.
          +       To determine if capname is defined for this terminal type,
          +       the user must test the value of standard output.  A  value
          +       of  -1 means that capname is not defined for this terminal
          +       type.
          +
          +       Any other exit code indicates an error; see  the  DIAGNOS-
          +       TICS section.
          +
          +
          +
          +

          DIAGNOSTICS

          +       tput prints the following error messages and sets the cor-
          +       responding exit codes.
          +
          +       exit code   error message
          +       0           (capname is a numeric variable that is not specified in the
          +                   terminfo(5) database for this terminal type, e.g.
          +                   tput -T450 lines and tput -T2621 xmc)
          +       1           no error message is printed, see the EXIT CODES section.
          +       2           usage error
          +       3           unknown terminal type or no terminfo database
          +       4           unknown terminfo capability capname
          +
          +
          +
          +

          PORTABILITY

          +       The longname and -S options, and  the  parameter-substitu-
          +       tion  features  used in the cup example, are not supported
          +       in BSD curses or in AT&T/USL curses before SVr4.
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html new file mode 100644 index 00000000..aebef36b --- /dev/null +++ b/doc/html/man/tset.1.html @@ -0,0 +1,303 @@ + + +
          +
          +
          +
          +

          NAME

          +       tset - terminal initialization
          +
          +
          +
          +

          SYNOPSIS

          +       tset  [-IQqrs]  [-]  [-e  ch] [-i ch] [-k ch] [-m mapping]
          +       [terminal]
          +       reset [-IQqrs] [-] [-e ch] [-i ch] [-k  ch]  [-m  mapping]
          +       [terminal]
          +
          +
          +
          +

          DESCRIPTION

          +       Tset  initializes  terminals.   Tset  first determines the
          +       type of terminal that you are using.   This  determination
          +       is done as follows, using the first terminal type found.
          +
          +       1. The terminal argument specified on the command line.
          +
          +       2. The value of the TERM environmental variable.
          +
          +       3.  (BSD  systems only.) The terminal type associated with
          +       the standard error output device in  the  /etc/ttys  file.
          +       (On Linux and System-V-like UNIXes, getty does this job by
          +       setting TERM  according  to  the  type  passed  to  it  by
          +       /etc/inittab.)
          +
          +       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
          +       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-
          +       firms the type, or, another type can be entered to specify
          +       a  new  type.  Once the terminal type has been determined,
          +       the terminfo entry for the terminal is retrieved.   If  no
          +       terminfo entry is found for the type, the user is prompted
          +       for another terminal type.
          +
          +       Once the terminfo entry is  retrieved,  the  window  size,
          +       backspace,  interrupt and line kill characters (among many
          +       other things) are set and the terminal and tab initializa-
          +       tion  strings  are  sent  to  the  standard  error output.
          +       Finally, if the erase, interrupt and line kill  characters
          +       have  changed,  or  are  not  set to their default values,
          +       their values are displayed to the standard error output.
          +
          +       When invoked as reset, tset sets cooked  and  echo  modes,
          +       turns  off cbreak and raw modes, turns on newline transla-
          +       tion and resets any  unset  special  characters  to  their
          +       default  values  before  doing the terminal initialization
          +       described above.  This is  useful  after  a  program  dies
          +       leaving  a  terminal  in an abnormal state.  Note, you may
          +       have to type
          +
          +           <LF>reset<LF>
          +
          +       (the line-feed character is normally control-J) to get the
          +       terminal to work, as carriage-return may no longer work in
          +       the abnormal state.  Also, the  terminal  will  often  not
          +       echo the command.
          +
          +       The options are as follows:
          +
          +       -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.
          +
          +       -I   Do  not  send  the  terminal  or  tab  initialization
          +            strings to the terminal.
          +
          +       -i   Set the interrupt character to ch.
          +
          +       -k   Set the line kill character to ch.
          +
          +       -m   Specify a mapping from a port  type  to  a  terminal.
          +            See below for more information.
          +
          +       -Q   Don't display any values for the erase, interrupt and
          +            line kill characters.
          +
          +       -r   Print the terminal type to the standard error output.
          +
          +       -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
          +       entered  as  actual characters or by using the `hat' nota-
          +       tion, i.e. control-h may be specified as ``^H'' or ``^h''.
          +
          +
          +
          +

          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.
          +
          +       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
          +       are  for  sh.   Note,  the  csh commands set and unset the
          +       shell variable noglob, leaving it  unset.   The  following
          +       line  in  the .login or .profile files will initialize the
          +       environment correctly:
          +
          +           eval `tset -s options ... `
          +
          +
          +
          +
          +

          TERMINAL TYPE MAPPING

          +       When the terminal is not hardwired into the system (or the
          +       current system information is incorrect) the terminal type
          +       derived from the /etc/ttys file or the TERM  environmental
          +       variable  is often something generic like network, dialup,
          +       or unknown.  When tset is used in a startup script  it  is
          +       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
          +       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.
          +
          +       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-
          +       ble mapping is used.
          +
          +       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-
          +       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
          +       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
          +       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
          +       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-
          +       tion marks (``!'').
          +
          +
          +
          +

          HISTORY

          +       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
          +       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-
          +       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
          +       tset via a link named `TSET` (or via any other name begin-
          +       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
          +       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
          +       and the terminal argument in some historic implementations
          +       of tset has been removed.
          +
          +
          +
          +

          ENVIRONMENT

          +       The tset command uses the SHELL and TERM environment vari-
          +       ables.
          +
          +
          +
          +

          FILES

          +       /etc/ttys
          +            system port name to terminal  type  mapping  database
          +            (BSD versions only).
          +
          +       @DATADIR@/terminfo
          +            terminal capability database
          +
          +
          +
          +

          SEE ALSO

          +       csh(1), sh(1), stty(1), tty(4), termcap(5), ttys(5), envi-
          +       ron(7)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +Man(1) output converted with +man2html +
          + + diff --git a/Ada95/html/man/wresize.3x.html b/doc/html/man/wresize.3x.html similarity index 52% rename from Ada95/html/man/wresize.3x.html rename to doc/html/man/wresize.3x.html index 95354f26..d2e2650b 100644 --- a/Ada95/html/man/wresize.3x.html +++ b/doc/html/man/wresize.3x.html @@ -1,29 +1,33 @@
          -       wresize - resize a curses window
          +
          +
          +
          +

          NAME

          +       wresize - resize a curses window
           
           
           

          SYNOPSIS

          -       #include 
          +       #include <curses.h>
           
          -       int wresize(WINDOW *win, int lines, int columns);
          +       int wresize(WINDOW *win, int lines, int columns);
           
           
           

          DESCRIPTION

          -       The  wresize  function  reallocates storage for an ncurses
          +       The  wresize  function  reallocates storage for an ncurses
                  window to adjust its dimensions to the  specified  values.
                  If either dimension is larger than the current values, the
                  window's data is filled with blanks that have the  current
          -       background  rendition  (as  set  by wbkgndset) merged into
          +       background  rendition  (as  set  by wbkgndset) merged into
                  them.
           
           
           

          RETURN VALUE

          -       The function returns the integer ERR upon failure  and  OK
          +       The function returns the integer ERR upon failure  and  OK
                  on success.  It will fail if either of the dimensions less
                  than or equal  to  zero,  or  if  an  error  occurs  while
                  (re)allocating memory for the window.
          @@ -33,14 +37,14 @@
           

          NOTES

                  The only restriction placed on the dimensions is that they
                  be greater than zero.  The dimensions are not compared  to
          -       curses   screen   dimensions  to  simplify  the  logic  of
          -       resizeterm.  The caller  must  ensure  that  the  window's
          +       curses   screen   dimensions  to  simplify  the  logic  of
          +       resizeterm.  The caller  must  ensure  that  the  window's
                  dimensions fit within the actual screen dimensions.
           
           
           

          SEE ALSO

          -       resizeterm(3X).
          +       resizeterm(3x).
           
           
           
          @@ -65,6 +69,12 @@ +
          +
          +
          +Man(1) output converted with +man2html +
          diff --git a/misc/ncurses-intro.html b/doc/html/ncurses-intro.html similarity index 96% rename from misc/ncurses-intro.html rename to doc/html/ncurses-intro.html index d01c65e6..05c756e0 100644 --- a/misc/ncurses-intro.html +++ b/doc/html/ncurses-intro.html @@ -1,6 +1,6 @@ @@ -169,7 +169,7 @@ API has the advantage of (a) back-portability to character-cell terminals, and (b) simplicity. For an application that does not require bit-mapped graphics and multiple fonts, an interface implementation using curses will typically be a great deal simpler and less expensive than one using an -X toolkit.

          +X toolkit.

          A Brief History of Curses

          @@ -186,19 +186,19 @@ extensions. Parameterized capabilities strings were introduced, making it possible to describe multiple video attributes, and colors and to handle far more unusual terminals than possible with termcap. In the later AT&T System V releases, curses evolved to use more facilities and offer -more capabilities, going far beyond BSD curses in power and flexibility.

          +more capabilities, going far beyond BSD curses in power and flexibility.

          Scope of This Document

          This document describes ncurses, a free implementation of the System V curses API with some clearly marked extensions. -It includes the following System V curses features:

          +It includes the following System V curses features:

          • Support for multiple screen highlights (BSD curses could only -handle one `standout' highlight, usually reverse-video).

            -

          • Support for line- and box-drawing using forms characters.

            -

          • Recognition of function keys on input.

            -

          • Color support.

            +handle one `standout' highlight, usually reverse-video). +

          • Support for line- and box-drawing using forms characters. +
          • Recognition of function keys on input. +
          • Color support.
          • Support for pads (windows of larger than screen size on which the screen or a subwindow defines a viewport).
          @@ -225,7 +225,7 @@ and wrote most of this introduction. wrote all of the menu and forms code as well as the Ada95 binding. Ongoing work is being done by -Thomas Dickey +Thomas Dickey and Jürgen Pfeifer. Florian La Roche @@ -244,7 +244,7 @@ their visibility in the natural way (handling window overlaps).

          Finally, this document describes in detail the menus and forms extension libraries, also cloned from System V, which support easy construction and sequences of menus and fill-in -forms.

          +forms.

          Terminology

          @@ -257,12 +257,12 @@ consistency:
          A data structure describing a sub-rectangle of the screen (possibly the entire screen). You can write to a window as though it were a miniature -screen, scrolling independently of other windows on the physical screen.

          +screen, scrolling independently of other windows on the physical screen.

          screens
          A subset of windows which are as large as the terminal screen, i.e., they start at the upper left hand corner and encompass the lower right hand corner. One -of these, stdscr, is automatically provided for the programmer.

          +of these, stdscr, is automatically provided for the programmer.

          terminal screen
          The package's idea of what the terminal display currently looks like, i.e., @@ -316,7 +316,7 @@ A given physical screen section may be within the scope of any number of overlapping windows. Also, changes can be made to windows in any order, without regard to motion efficiency. Then, at will, the programmer can effectively say ``make it look like this,'' and let the package implementation -determine the most efficient way to repaint the screen.

          +determine the most efficient way to repaint the screen.

          Standard Windows and Function Naming Conventions

          @@ -368,7 +368,7 @@ can be replaced by Note that the window description pointer (win) comes before the added (y, x) coordinates. If a function requires a window pointer, it is always the first -parameter passed.

          +parameter passed.

          Variables

          @@ -405,7 +405,7 @@ updating, reading, etc. is applied to stdscr. These instructions w work on any window, providing you change the function names and parameters as mentioned above.

          -Here is a sample program to motivate the discussion:

          +Here is a sample program to motivate the discussion:

           #include <curses.h>
          @@ -413,8 +413,11 @@ Here is a sample program to motivate the discussion: 

          static void finish(int sig); +int main(int argc, char *argv[]) { + int num = 0; + /* initialize your non-curses data structures here */ (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ @@ -423,28 +426,32 @@ main(int argc, char *argv[]) keypad(stdscr, TRUE); /* enable keyboard mapping */ (void) nonl(); /* tell curses not to do NL->CR/NL on output */ (void) cbreak(); /* take input chars one at a time, no wait for \n */ - (void) noecho(); /* don't echo input */ + (void) echo(); /* echo input - in color */ if (has_colors()) { start_color(); /* - * Simple color assignment, often all we need. + * Simple color assignment, often all we need. Color pair 0 cannot + * be redefined. This example uses the same value for the color + * pair as for the foreground color, though of course that is not + * necessary: */ - init_pair(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK); - init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK); - init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK); - init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK); - init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK); - init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK); - init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK); - init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK); + init_pair(1, COLOR_RED, COLOR_BLACK); + init_pair(2, COLOR_GREEN, COLOR_BLACK); + init_pair(3, COLOR_YELLOW, COLOR_BLACK); + init_pair(4, COLOR_BLUE, COLOR_BLACK); + init_pair(5, COLOR_CYAN, COLOR_BLACK); + init_pair(6, COLOR_MAGENTA, COLOR_BLACK); + init_pair(7, COLOR_WHITE, COLOR_BLACK); } for (;;) { int c = getch(); /* refresh, accept single keystroke of input */ + attrset(COLOR_PAIR(num % 8)); + num++; /* process the command keystroke */ } @@ -487,7 +494,7 @@ coordinates after updating it.

          You can create new windows of your own using the functions newwin(), derwin(), and subwin(). The routine delwin() will allow you to get rid of old windows. All the options described above can be -applied to any window.

          +applied to any window.

          Output

          @@ -515,7 +522,7 @@ to make it look like the entire window has been changed, thus making If you call wrefresh() with curscr as its argument, it will make the screen look like curscr thinks it looks like. This is useful for implementing a command which would redraw the screen in case it get messed -up.

          +up.

          Input

          @@ -539,7 +546,7 @@ watches the input stream for character sequences that correspond to arrow and function keys. These sequences are returned as pseudo-character values. The #define values returned are listed in the curses.h The mapping from sequences to #define values is determined by -key_ capabilities in the terminal's terminfo entry.

          +key_ capabilities in the terminal's terminfo entry.

          Using Forms Characters

          @@ -552,7 +559,7 @@ the prefix ACS_).

          The most useful of the ACS defines are the forms-drawing characters. You can use these to draw boxes and simple graphs on the screen. If the terminal does not have such characters, curses.h will map them to a -recognizable (though ugly) set of ASCII defaults.

          +recognizable (though ugly) set of ASCII defaults.

          Character Attributes and Color

          @@ -584,7 +591,7 @@ have been used as the first arguments of the init_pair() values.

          init_pair() that creates color-pair N, you can use COLOR_PAIR(N) as a highlight that invokes that particular color combination. Note that COLOR_PAIR(N), for constant N, -is itself a compile-time constant and can be used in initializers.

          +is itself a compile-time constant and can be used in initializers.

          Mouse Interfacing

          @@ -657,7 +664,7 @@ would normally accept from the keyboard. Two of the test games in the code that illustrates how this can be done.

          See the manual page curs_mouse(3X) for full details of the -mouse-interface functions.

          +mouse-interface functions.

          Finishing Up

          @@ -665,7 +672,7 @@ In order to clean up after the ncurses routines, the routine endwin() is provided. It restores tty modes to what they were when initscr() was first called, and moves the cursor down to the lower-left corner. Thus, anytime after the call to initscr, endwin() -should be called before exiting.

          +should be called before exiting.

          Function Descriptions

          @@ -684,14 +691,14 @@ occurs a message is written to standard error and the program exits. Otherwise it returns a pointer to stdscr. A few functions may be called before initscr (slk_init(), filter(), ripofflines(), use_env(), and, if you are using multiple -terminals, newterm().)

          +terminals, newterm().)

          endwin()
          Your program should always call endwin() before exiting or shelling out of the program. This function will restore tty modes, move the cursor to the lower left corner of the screen, reset the terminal into the proper non-visual mode. Calling refresh() or doupdate() after a temporary escape from the program will -restore the ncurses screen from before the escape.

          +restore the ncurses screen from before the escape.

          newterm(type, ofp, ifp)
          A program which outputs to more than one terminal should use newterm() instead of initscr(). newterm() should @@ -701,12 +708,12 @@ terminal. The arguments are the type of the terminal (a string) and FILE pointers for the output and input of the terminal. If type is NULL then the environment variable $TERM is used. endwin() should called once at wrapup time for each terminal -opened using this function.

          +opened using this function.

          set_term(new)
          This function is used to switch to a different terminal previously opened by newterm(). The screen reference for the new terminal is passed as the parameter. The previous terminal is returned by the -function. All other calls affect only the current terminal.

          +function. All other calls affect only the current terminal.

          delscreen(sp)
          The inverse of newterm(); deallocates the data structures associated with a given SCREEN reference. @@ -723,7 +730,7 @@ terminal screen, taking into account what is already there in order to do optimizations. refresh() does a refresh of stdscr(). Unless leaveok() has been enabled, the physical cursor of the terminal is left at the -location of the window's cursor.

          +location of the window's cursor.

          doupdate() and wnoutrefresh(win)
          These two functions allow multiple updates with more efficiency than wrefresh. To use them, it is important to understand how curses @@ -805,13 +812,13 @@ data dumped in them. There is a script called tracemunch included with the ncurses distribution that can alleviate this problem somewhat; it compacts long sequences of similar operations into more succinct single-line pseudo-operations. These pseudo-ops can be -distinguished by the fact that they are named in capital letters.

          +distinguished by the fact that they are named in capital letters.

          Hints, Tips, and Tricks

          The ncurses manual pages are a complete reference for this library. In the remainder of this document, we discuss various useful methods that -may not be obvious from the manual page descriptions.

          +may not be obvious from the manual page descriptions.

          Some Notes of Caution

          @@ -846,7 +853,7 @@ overlapping-windows facilities.

          Try to avoid using the global variables LINES and COLS. Use getmaxyx() on the stdscr context instead. Reason: your code may be ported to run in an environment with window resizes, -in which case several screens could be open with different sizes.

          +in which case several screens could be open with different sizes.

          Temporarily Leaving NCURSES Mode

          @@ -912,7 +919,7 @@ For each call, you will have to specify a terminal type and a pair of file pointers; each call will return a screen reference, and stdscr will be set to the last one allocated. You will switch between screens with the set_term call. Note that you will also have to call -def_shell_mode and def_prog_mode on each tty yourself.

          +def_shell_mode and def_prog_mode on each tty yourself.

          Testing for Terminal Capabilities

          @@ -927,14 +934,14 @@ test whether a given terminal type should be treated as `smart' (cursor-addressable) or `stupid'. The right way to test this is to see if the return value of tigetstr("cup") is non-NULL. Alternatively, you can include the term.h file and test the value of the -macro cursor_address.

          +macro cursor_address.

          Tuning for Speed

          Use the addchstr() family of functions for fast screen-painting of text when you know the text doesn't contain any control characters. Try to make attribute changes infrequent on your -screens. Don't use the immedok() option!

          +screens. Don't use the immedok() option!

          Special Features of NCURSES

          @@ -1012,7 +1019,7 @@ when you want a screen update, you do update_panels(), it will do all the necessary wnoutrfresh() calls for whatever panel stacking order you have defined. Then you can do one doupdate() and there will be a single burst of physical I/O that will do -all your updates.

          +all your updates.

          Background Erase

          @@ -1027,7 +1034,7 @@ is normal unless and until it is modified by the functions bkgdset()wbkgdset().

          This change in behavior conforms ncurses to System V Release 4 and -the XSI Curses standard.

          +the XSI Curses standard.

          XSI Curses Conformance

          @@ -1042,7 +1049,7 @@ One effect of XSI conformance is the change in behavior described under Also, ncurses meets the XSI requirement that every macro entry point have a corresponding function which may be linked (and will be prototype-checked) if the macro definition is disabled with -#undef.

          +#undef.

          The Panels Library

          @@ -1119,7 +1126,7 @@ Typically, you will want to call update_panels() and doupdate() just before accepting command input, once in each cycle of interaction with the user. If you call update_panels() after each and every panel write, you'll generate a lot of unnecessary refresh -activity and screen flicker.

          +activity and screen flicker.

          Panels, Input, and the Standard Screen

          @@ -1137,7 +1144,7 @@ Therefore, before requesting input from a panel window, you need to be sure that the panel is totally unobscured.

          There is presently no way to display changes to one obscured panel without -repainting all panels.

          +repainting all panels.

          Hiding Panels

          @@ -1148,7 +1155,7 @@ tests whether or not a panel is hidden.

          The panel_update code ignores hidden panels. You cannot do top_panel() or bottom_panel on a hidden panel(). -Other panels operations are applicable.

          +Other panels operations are applicable.

          Miscellaneous Other Facilities

          @@ -1160,7 +1167,7 @@ pointer, they return the panel above or below that panel. Handed Every panel has an associated user pointer, not used by the panel code, to which you can attach application data. See the man page documentation of set_panel_userptr() and panel_userptr for -details.

          +details.

          The Menu Library

          @@ -1171,7 +1178,7 @@ uniform but flexible interface.

          The menu library first appeared in AT&T System V. The version documented here is the menu code distributed -with ncurses.

          +with ncurses.

          Compiling With the menu Library

          @@ -1235,12 +1242,12 @@ predicate function. Your menu-processing code can use the function Menu items can be made unselectable using set_item_opts() or item_opts_off() with the O_SELECTABLE argument. This is the only option so far defined for menus, but it -is good practice to code as though other option bits might be on.

          +is good practice to code as though other option bits might be on.

          Menu Display

          The menu library calculates a minimum display size for your window, based -on the following variables:

          +on the following variables:

          • The number and maximum length of the menu items @@ -1280,7 +1287,7 @@ There are other menu display attributes including a select attribute, an attribute for selectable items, an attribute for unselectable items, and a pad character used to separate item name text from description text. These have reasonable defaults which the library allows you to -change (see the menu_attribs(3x) manual page.

            +change (see the menu_attribs(3x) manual page.

            Menu Windows

            @@ -1300,7 +1307,7 @@ functions in menu_win(3x).

            When you call menu_post(), you write the menu to its subwindow. When you call menu_unpost(), you erase the subwindow, However, neither of these actually modifies the screen. To -do that, call wrefresh() or some equivalent.

            +do that, call wrefresh() or some equivalent.

            Processing Menu Input

            @@ -1372,7 +1379,7 @@ wrapup time, and whenever the selected item changes. See Each item, and each menu, has an associated user pointer on which you can hang application data. See mitem_userptr(3x) and -menu_userptr(3x).

            +menu_userptr(3x).

            The Forms Library

            @@ -1381,7 +1388,7 @@ programming of on-screen forms for data entry and program control.

            The form library first appeared in AT&T System V. The version documented here is the form code distributed -with ncurses.

            +with ncurses.

            Compiling With the form Library

            @@ -1395,7 +1402,7 @@ and must be linked explicitly with the forms library using an -lform argument. Note that they must also link the ncurses library with -lncurses. Many linkers are two-pass and will accept either order, but it is still good practice -to put -lform first and -lncurses second.

            +to put -lform first and -lncurses second.

            Overview of Forms

            @@ -1446,11 +1453,11 @@ wherever possible.

            In forms programs, however, the `process user requests' is somewhat more complicated than for menus. Besides menu-like navigation operations, -the menu driver loop has to support field editing and data validation.

            +the menu driver loop has to support field editing and data validation.

            Creating and Freeing Fields and Forms

            -The basic function for creating fields is new_field():

            +The basic function for creating fields is new_field():

             FIELD *new_field(int height, int width,   /* new field size */
            @@ -1482,7 +1489,7 @@ The forms library allocates one working buffer per field; the size of
             each buffer is ((height + offscreen)*width + 1, one character
             for each position in the field plus a NUL terminator.  The sixth
             argument is the number of additional data buffers to allocate for the
            -field; your application can use them for its own purposes. 

            +field; your application can use them for its own purposes.

             FIELD *dup_field(FIELD *field,            /* field to copy */
            @@ -1492,7 +1499,7 @@ FIELD *dup_field(FIELD *field,            /* field to copy */
             The function dup_field() duplicates an existing field at a
             new location.  Size and buffering information are copied; some
             attribute flags and status bits are not (see the
            -form_field_new(3X) for details). 

            +form_field_new(3X) for details).

             FIELD *link_field(FIELD *field,           /* field to copy */
            @@ -1516,7 +1523,7 @@ As you might guess, all these field-allocations return NULL if
             the field allocation is not possible due to an out-of-memory error or
             out-of-bounds arguments. 

            -To connect fields to a form, use

            +To connect fields to a form, use

             FORM *new_form(FIELD **fields);
            @@ -1534,7 +1541,7 @@ note that any given field may only be connected to one form. 

            The functions free_field() and free_form are available to free field and form objects. It is an error to attempt to free a field connected to a form, but not vice-versa; thus, you will generally free -your form objects first.

            +your form objects first.

            Fetching and Changing Field Attributes

            @@ -1549,11 +1556,11 @@ When a field is created, the attributes not specified by the new_field function are copied from an invisible system default field. In attribute-setting and -fetching functions, the argument NULL is taken to mean this field. Changes to it persist -as defaults until your forms application terminates.

            +as defaults until your forms application terminates.

            Fetching Size and Location Data

            -You can retrieve field sizes and locations through:

            +You can retrieve field sizes and locations through:

             int field_info(FIELD *field,              /* field from which to fetch */
            @@ -1565,11 +1572,11 @@ int field_info(FIELD *field,              /* field from which to fetch */
             
             This function is a sort of inverse of new_field(); instead of
             setting size and location attributes of a new field, it fetches them
            -from an existing one.  

            +from an existing one.

            Changing the Field Location

            -It is possible to move a field's location on the screen:

            +It is possible to move a field's location on the screen:

             int move_field(FIELD *field,              /* field to alter */
            @@ -1581,7 +1588,7 @@ You can, of course. query the current location through field_info()
             

            The Justification Attribute

            One-line fields may be unjustified, justified right, justified left, -or centered. Here is how you manipulate this attribute:

            +or centered. Here is how you manipulate this attribute:

             int set_field_just(FIELD *field,          /* field to alter */
            @@ -1592,7 +1599,7 @@ int field_just(FIELD *field);             /* fetch mode of field */
             
             The mode values accepted and returned by this functions are
             preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT,
            -JUSTIFY_LEFT, or JUSTIFY_CENTER. 

            +JUSTIFY_LEFT, or JUSTIFY_CENTER.

            Field Display Attributes

            @@ -1603,7 +1610,7 @@ control pagination of the form.

            This group of four field attributes controls the visual appearance of the field on the screen, without affecting in any way the data -in the field buffer.

            +in the field buffer.

             int set_field_fore(FIELD *field,          /* field to alter */
            @@ -1632,7 +1639,7 @@ The attributes set and returned by the first four functions are normal
             A_BOLD, A_REVERSE etc).
             
             The page bit of a field controls whether it is displayed at the start of
            -a new form screen. 

            +a new form screen.

            Field Option Bits

            @@ -1708,13 +1715,13 @@ A field's options cannot be changed while the field is currently selected. However, options may be changed on posted fields that are not current.

            The option values are bit-masks and can be composed with logical-or in -the obvious way.

            +the obvious way.

            Field Status

            Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag can -be queried and set directly:

            +be queried and set directly:

             int set_field_status(FIELD *field,      /* field to alter */
            @@ -1736,7 +1743,7 @@ To guarantee that the returned status value reflects reality, call
             field_status() either (1) in the field's exit validation check
             routine, (2) from the field's or form's initialization or termination
             hooks, or (3) just after a REQ_VALIDATION request has been
            -processed by the forms driver. 

            +processed by the forms driver.

            Field User Pointer

            @@ -1757,7 +1764,7 @@ The (char *) type is retained for System V compatibility.)

            It is valid to set the user pointer of the default field (with a set_field_userptr() call passed a NULL field pointer.) When a new field is created, the default-field user pointer is copied -to initialize the new field's user pointer.

            +to initialize the new field's user pointer.

            Variable-Sized Fields

            @@ -1776,7 +1783,7 @@ dimensioned and located.

            Normally, a dynamic field is allowed to grow without limit. But it is possible to set an upper limit on the size of a dynamic field. You do -it with this function:

            +it with this function:

             int set_max_field(FIELD *field,     /* field to alter (may not be NULL) */
            @@ -1818,7 +1825,7 @@ is changed through a linked field. 

            The form library provides a rich set of pre-defined validation types, and gives you the capability to define custom ones of your own. You can examine and change field validation attributes with the following -functions:

            +functions:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1833,12 +1840,12 @@ with other field attributes, Also, doing set_field_type() with a
             NULL field default will change the system default for validation of
             newly-created fields. 

            -Here are the pre-defined validation types:

            +Here are the pre-defined validation types:

            TYPE_ALPHA

            This field type accepts alphabetic data; no blanks, no digits, no special -characters (this is checked at character-entry time). It is set up with:

            +characters (this is checked at character-entry time). It is set up with:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1849,12 +1856,12 @@ int set_field_type(FIELD *field,          /* field to alter */
             The width argument sets a minimum width of data.  Typically
             you'll want to set this to the field width; if it's greater than the
             field width, the validation check will always fail.  A minimum width
            -of zero makes field completion optional. 

            +of zero makes field completion optional.

            TYPE_ALNUM

            This field type accepts alphabetic data and digits; no blanks, no special -characters (this is checked at character-entry time). It is set up with:

            +characters (this is checked at character-entry time). It is set up with:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1865,13 +1872,13 @@ int set_field_type(FIELD *field,          /* field to alter */
             The width argument sets a minimum width of data.  As with
             TYPE_ALPHA, typically you'll want to set this to the field width; if it's
             greater than the field width, the validation check will always fail.  A
            -minimum width of zero makes field completion optional. 

            +minimum width of zero makes field completion optional.

            TYPE_ENUM

            This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal codes for U.S. -states). It is set up with:

            +states). It is set up with:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1896,11 +1903,11 @@ value.  But the checkunique argument, if true, requires prefix
             matches to be unique in order to be valid. 

            The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests -can be particularly useful with these fields.

            +can be particularly useful with these fields.

            TYPE_INTEGER

            -This field type accepts an integer. It is set up as follows:

            +This field type accepts an integer. It is set up as follows:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1921,7 +1928,7 @@ with the C library function atoi(3).
             
             

            TYPE_NUMERIC

            -This field type accepts a decimal number. It is set up as follows:

            +This field type accepts a decimal number. It is set up as follows:

             int set_field_type(FIELD *field,              /* field to alter */
            @@ -1945,7 +1952,7 @@ with the C library function atof(3).
             

            TYPE_REGEXP

            This field type accepts data matching a regular expression. It is set up -as follows:

            +as follows:

             int set_field_type(FIELD *field,          /* field to alter */
            @@ -1960,7 +1967,7 @@ The check for regular-expression match is performed on exit.
             
             The chief attribute of a field is its buffer contents.  When a form has
             been completed, your application usually needs to know the state of each
            -field buffer.  You can find this out with: 

            +field buffer. You can find this out with:

             char *field_buffer(FIELD *field,          /* field to query */
            @@ -1993,7 +2000,7 @@ To guarantee that the returned buffer value reflects on-screen reality,
             call field_buffer() either (1) in the field's exit validation
             check routine, (2) from the field's or form's initialization or termination
             hooks, or (3) just after a REQ_VALIDATION request has been processed
            -by the forms driver. 

            +by the forms driver.

            Attributes of Forms

            @@ -2002,7 +2009,7 @@ system default form structure. These defaults can be queried or set by of these functions using a form-pointer argument of NULL.

            The principal attribute of a form is its field list. You can query -and change this list with:

            +and change this list with:

             int set_form_fields(FORM *form,           /* form to alter */
            @@ -2024,7 +2031,7 @@ It may also be null, in which case the old fields are disconnected
             
             The field_count() function simply counts the number of fields
             connected to a given from.  It returns -1 if the form-pointer argument
            -is NULL. 

            +is NULL.

            Control of Form Display

            @@ -2055,7 +2062,7 @@ is where the current form page is actually displayed.

            In order to declare your own frame window for a form, you'll need to know the size of the form's bounding rectangle. You can get this -information with:

            +information with:

             int scale_form(FORM *form,                /* form to query */
            @@ -2084,7 +2091,7 @@ should be done on the frame window, not the form subwindow. 

            It is possible to check from your application whether all of a scrollable field is actually displayed within the menu subwindow. Use -these functions:

            +these functions:

             int data_ahead(FORM *form);               /* form to be queried */
            @@ -2100,21 +2107,21 @@ The function data_behind() returns TRUE if the first (upper
             left hand) character position is off-screen (not being displayed). 

            Finally, there is a function to restore the form window's cursor to the -value expected by the forms driver:

            +value expected by the forms driver:

             int pos_form_cursor(FORM *)               /* form to be queried */
             
            If your application changes the form window cursor, call this function before -handing control back to the forms driver in order to re-synchronize it.

            +handing control back to the forms driver in order to re-synchronize it.

            Input Processing in the Forms Driver

            The function form_driver() handles virtualized input requests for form navigation, editing, and validation requests, just as menu_driver does for menus (see the section on menu input handling).

            +HREF="#minput">menu input handling).

             int form_driver(FORM *form,               /* form to pass input to */
            @@ -2127,12 +2134,12 @@ entered in the currently-selected field), or a forms processing request. 

            The forms driver provides hooks (through input-validation and field-termination functions) with which your application code can check -that the input taken by the driver matched what was expected.

            +that the input taken by the driver matched what was expected.

            Page Navigation Requests

            These requests cause page-level moves through the form, -triggering display of a new form screen.

            +triggering display of a new form screen.

            REQ_NEXT_PAGE @@ -2147,11 +2154,11 @@ triggering display of a new form screen.

            These requests treat the list as cyclic; that is, REQ_NEXT_PAGE from the last page goes to the first, and REQ_PREV_PAGE from -the first page goes to the last.

            +the first page goes to the last.

            Inter-Field Navigation Requests

            -These requests handle navigation between fields on the same page.

            +These requests handle navigation between fields on the same page.

            REQ_NEXT_FIELD @@ -2162,7 +2169,6 @@ These requests handle navigation between fields on the same page.

            Move to the first field.
            REQ_LAST_FIELD
            Move to the last field. -

            REQ_SNEXT_FIELD
            Move to sorted next field.
            REQ_SPREV_FIELD @@ -2171,7 +2177,6 @@ These requests handle navigation between fields on the same page.

            Move to the sorted first field.
            REQ_SLAST_FIELD
            Move to the sorted last field. -

            REQ_LEFT_FIELD
            Move left to field.
            REQ_RIGHT_FIELD @@ -2203,12 +2208,12 @@ For example, suppose you have a multi-line field B, and two single-line fields A and C on the same line with B, with A to the left of B and C to the right of B. A REQ_MOVE_RIGHT from A will go to B only if A, B, and C all share the same first line; -otherwise it will skip over B to C.

            +otherwise it will skip over B to C.

            Intra-Field Navigation Requests

            These requests drive movement of the edit cursor within the currently -selected field.

            +selected field.

            REQ_NEXT_CHAR @@ -2243,7 +2248,7 @@ selected field.

            Each word is separated from the previous and next characters by whitespace. The commands to move to beginning and end of line or field -look for the first or last non-pad character in their ranges.

            +look for the first or last non-pad character in their ranges.

            Scrolling Requests

            @@ -2253,7 +2258,6 @@ multi-line fields scroll vertically. Most scrolling is triggered by editing and intra-field movement (the library scrolls the field to keep the cursor visible). It is possible to explicitly request scrolling with the following requests: -

            REQ_SCR_FLINE @@ -2283,7 +2287,7 @@ following requests:
            For scrolling purposes, a page of a field is the height -of its visible part.

            +of its visible part.

            Editing Requests

            @@ -2293,7 +2297,7 @@ is an insertion or a replacement depends on the field's edit mode (insertion is the default.

            The following requests support editing the field and changing the edit -mode:

            +mode:

            REQ_INS_MODE @@ -2359,13 +2363,13 @@ treated as a REQ_PREV_FIELD.

            If the disabled and the forms driver just returns E_REQUEST_DENIED.

            See Form Options for discussion of how to set -and clear the overload options.

            +and clear the overload options.

            Order Requests

            If the type of your field is ordered, and has associated functions for getting the next and previous values of the type from a given value, -there are requests that can fetch that value into the field buffer:

            +there are requests that can fetch that value into the field buffer:

            REQ_NEXT_CHOICE @@ -2377,19 +2381,19 @@ there are requests that can fetch that value into the field buffer:

            Of the built-in field types, only TYPE_ENUM has built-in successor and predecessor functions. When you define a field type of your own (see Custom Validation Types), you can associate -our own ordering functions.

            +our own ordering functions.

            Application Commands

            Form requests are represented as integers above the curses value greater than KEY_MAX and less than or equal to the constant MAX_COMMAND. If your input-virtualization routine returns a -value above MAX_COMMAND, the forms driver will ignore it.

            +value above MAX_COMMAND, the forms driver will ignore it.

            Field Change Hooks

            It is possible to set function hooks to be executed whenever the -current field or form changes. Here are the functions that support this:

            +current field or form changes. Here are the functions that support this:

             typedef void	(*HOOK)();       /* pointer to function returning void */
            @@ -2418,7 +2422,7 @@ HOOK field_term(FORM *form);     /* form to query */
             These functions allow you to either set or query four different hooks.
             In each of the set functions, the second argument should be the
             address of a hook function.  These functions differ only in the timing
            -of the hook call. 

            +of the hook call.

            form_init @@ -2429,7 +2433,7 @@ each page change operation. each field change
            field_term
            This hook is called just after field validation; that is, just before -the field is altered. It is also called when the form is unposted.

            +the field is altered. It is also called when the form is unposted.

            form_term
            This hook is called when the form is unposted; also, just before each page change operation. @@ -2449,7 +2453,7 @@ You can set a default hook for all fields by passing one of the set functions a NULL first argument.

            You can disable any of these hooks by (re)setting them to NULL, the default -value.

            +value.

            Field Change Commands

            @@ -2457,7 +2461,7 @@ Normally, navigation through the form will be driven by the user's input requests. But sometimes it is useful to be able to move the focus for editing and viewing under control of your application, or ask which field it currently is in. The following functions help you -accomplish this:

            +accomplish this:

             int set_current_field(FORM *form,         /* form to alter */
            @@ -2476,7 +2480,7 @@ in the given form's field array (the array passed to new_form() or
             The initial current field of a form is the first active field on the
             first page. The function set_form_fields() resets this.

            -It is also possible to move around by pages.

            +It is also possible to move around by pages.

             int set_form_page(FORM *form,             /* form to alter */
            @@ -2486,12 +2490,12 @@ int form_page(FORM *form);                /* return form's current page */
             
            The initial page of a newly-created form is 0. The function -set_form_fields() resets this.

            +set_form_fields() resets this.

            Form Options

            Like fields, forms may have control option bits. They can be changed -or queried with these functions:

            +or queried with these functions:

             int set_form_opts(FORM *form,             /* form to alter */
            @@ -2521,7 +2525,7 @@ these have no last line, so the circumstances for triggering a
             
            The option values are bit-masks and can be composed with logical-or in -the obvious way.

            +the obvious way.

            Custom Validation Types

            @@ -2530,12 +2534,12 @@ validation types of your own. Further, the optional additional arguments of set_field_type effectively allow you to parameterize validation types. Most of the complications in the validation-type interface have to do with the handling of the additional arguments within custom validation -functions.

            +functions.

            Union Types

            The simplest way to create a custom data type is to compose it from two -preexisting ones:

            +preexisting ones:

             FIELD *link_fieldtype(FIELDTYPE *type1,
            @@ -2551,19 +2555,19 @@ composite type expects all arguments for the first type, than all arguments
             for the second.  Order functions (see Order Requests)
             associated with the component types will work on the composite; what it does
             is check the validation function for the first type, then for the second, to
            -figure what type the buffer contents should be treated as. 

            +figure what type the buffer contents should be treated as.

            New Field Types

            To create a field type from scratch, you need to specify one or both of the -following things:

            +following things:

            • A character-validation function, to check each character as it is entered.
            • A field-validation function to be applied on exit from the field.
            -Here's how you do that:

            +Here's how you do that:

             typedef int	(*HOOK)();       /* pointer to function returning int */
             
            @@ -2589,7 +2593,7 @@ the operation succeeds; if it returns FALSE, the edit cursor stays in
             the field. 

            A character validator gets the character passed in as a first argument. -It too should return TRUE if the character is valid, FALSE otherwise.

            +It too should return TRUE if the character is valid, FALSE otherwise.

            Validation Function Arguments

            @@ -2606,7 +2610,7 @@ with the type. The forms driver will use these to synthesize a pile from the trailing arguments of each set_field_type() argument, and a pointer to the pile will be passed to the validation functions.

            -Here is how you make the association:

            +Here is how you make the association:

             typedef char	*(*PTRHOOK)();    /* pointer to function returning (char *) */
            @@ -2618,7 +2622,7 @@ int set_fieldtype_arg(FIELDTYPE *type,    /* type to alter */
                                   VOIDHOOK free_str); /* free structure storage */
             
            -Here is how the storage-management hooks are used:

            +Here is how the storage-management hooks are used:

            make_str @@ -2639,14 +2643,14 @@ storage of that pile. The make_str and copy_str functions may return NULL to signal allocation failure. The library routines will that call them will return error indication when this happens. Thus, your validation functions -should never see a NULL file pointer and need not check specially for it.

            +should never see a NULL file pointer and need not check specially for it.

            Order Functions For Custom Types

            Some custom field types are simply ordered in the same well-defined way that TYPE_ENUM is. For such types, it is possible to define successor and predecessor functions to support the REQ_NEXT_CHOICE -and REQ_PREV_CHOICE requests. Here's how:

            +and REQ_PREV_CHOICE requests. Here's how:

             typedef int	(*INTHOOK)();     /* pointer to function returning int */
            @@ -2661,7 +2665,7 @@ a field pointer, and a pile pointer (as for the validation functions).  They
             are expected to use the function field_buffer() to read the
             current value, and set_field_buffer() on buffer 0 to set the next
             or previous value.  Either hook may return TRUE to indicate success (a
            -legal next or previous value was set) or FALSE to indicate failure. 

            +legal next or previous value was set) or FALSE to indicate failure.

            Avoiding Problems

            diff --git a/misc/ncurses-intro.doc b/doc/ncurses-intro.doc similarity index 99% rename from misc/ncurses-intro.doc rename to doc/ncurses-intro.doc index e45ca353..669b0b39 100644 --- a/misc/ncurses-intro.doc +++ b/doc/ncurses-intro.doc @@ -153,7 +153,6 @@ Scope of This Document This document describes ncurses, a free implementation of the System V curses API with some clearly marked extensions. It includes the following System V curses features: - * Support for multiple screen highlights (BSD curses could only handle one `standout' highlight, usually reverse-video). * Support for line- and box-drawing using forms characters. @@ -336,14 +335,16 @@ Using the Library function names and parameters as mentioned above. Here is a sample program to motivate the discussion: - #include #include static void finish(int sig); +int main(int argc, char *argv[]) { + int num = 0; + /* initialize your non-curses data structures here */ (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ @@ -352,28 +353,32 @@ main(int argc, char *argv[]) keypad(stdscr, TRUE); /* enable keyboard mapping */ (void) nonl(); /* tell curses not to do NL->CR/NL on output */ (void) cbreak(); /* take input chars one at a time, no wait for \n */ - (void) noecho(); /* don't echo input */ + (void) echo(); /* echo input - in color */ if (has_colors()) { start_color(); /* - * Simple color assignment, often all we need. + * Simple color assignment, often all we need. Color pair 0 cannot + * be redefined. This example uses the same value for the color + * pair as for the foreground color, though of course that is not + * necessary: */ - init_pair(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK); - init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK); - init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK); - init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK); - init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK); - init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK); - init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK); - init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK); + init_pair(1, COLOR_RED, COLOR_BLACK); + init_pair(2, COLOR_GREEN, COLOR_BLACK); + init_pair(3, COLOR_YELLOW, COLOR_BLACK); + init_pair(4, COLOR_BLUE, COLOR_BLACK); + init_pair(5, COLOR_CYAN, COLOR_BLACK); + init_pair(6, COLOR_MAGENTA, COLOR_BLACK); + init_pair(7, COLOR_WHITE, COLOR_BLACK); } for (;;) { int c = getch(); /* refresh, accept single keystroke of input */ + attrset(COLOR_PAIR(num % 8)); + num++; /* process the command keystroke */ } @@ -1137,7 +1142,6 @@ Menu Display The menu library calculates a minimum display size for your window, based on the following variables: - * The number and maximum length of the menu items * Whether the O_ROWMAJOR option is enabled * Whether display of descriptions is enabled @@ -1330,7 +1334,6 @@ Overview of Forms Creating and Freeing Fields and Forms The basic function for creating fields is new_field(): - FIELD *new_field(int height, int width, /* new field size */ int top, int left, /* upper left corner */ int offscreen, /* number of offscreen rows */ @@ -1360,7 +1363,6 @@ FIELD *new_field(int height, int width, /* new field size */ position in the field plus a NUL terminator. The sixth argument is the number of additional data buffers to allocate for the field; your application can use them for its own purposes. - FIELD *dup_field(FIELD *field, /* field to copy */ int top, int left); /* location of new copy */ @@ -1368,7 +1370,6 @@ FIELD *dup_field(FIELD *field, /* field to copy */ location. Size and buffering information are copied; some attribute flags and status bits are not (see the form_field_new(3X) for details). - FIELD *link_field(FIELD *field, /* field to copy */ int top, int left); /* location of new copy */ @@ -1390,7 +1391,6 @@ FIELD *link_field(FIELD *field, /* field to copy */ out-of-bounds arguments. To connect fields to a form, use - FORM *new_form(FIELD **fields); This function expects to see a NULL-terminated array of field @@ -1425,7 +1425,6 @@ Fetching and Changing Field Attributes Fetching Size and Location Data You can retrieve field sizes and locations through: - int field_info(FIELD *field, /* field from which to fetch */ int *height, *int width, /* field size */ int *top, int *left, /* upper left corner */ @@ -1439,7 +1438,6 @@ int field_info(FIELD *field, /* field from which to fetch */ Changing the Field Location It is possible to move a field's location on the screen: - int move_field(FIELD *field, /* field to alter */ int top, int left); /* new upper-left corner */ @@ -1449,7 +1447,6 @@ int move_field(FIELD *field, /* field to alter */ One-line fields may be unjustified, justified right, justified left, or centered. Here is how you manipulate this attribute: - int set_field_just(FIELD *field, /* field to alter */ int justmode); /* mode to set */ @@ -1469,7 +1466,6 @@ int field_just(FIELD *field); /* fetch mode of field */ This group of four field attributes controls the visual appearance of the field on the screen, without affecting in any way the data in the field buffer. - int set_field_fore(FIELD *field, /* field to alter */ chtype attr); /* attribute to set */ @@ -1586,7 +1582,6 @@ Field Status Every field has a status flag, which is set to FALSE when the field is created and TRUE when the value in field buffer 0 changes. This flag can be queried and set directly: - int set_field_status(FIELD *field, /* field to alter */ int status); /* mode to set */ @@ -1641,7 +1636,6 @@ Variable-Sized Fields Normally, a dynamic field is allowed to grow without limit. But it is possible to set an upper limit on the size of a dynamic field. You do it with this function: - int set_max_field(FIELD *field, /* field to alter (may not be NULL) */ int max_size); /* upper limit on field size */ @@ -1680,7 +1674,6 @@ Field Validation and gives you the capability to define custom ones of your own. You can examine and change field validation attributes with the following functions: - int set_field_type(FIELD *field, /* field to alter */ FIELDTYPE *ftype, /* type to associate */ ...); /* additional arguments*/ @@ -1699,7 +1692,6 @@ FIELDTYPE *field_type(FIELD *field); /* field to query */ This field type accepts alphabetic data; no blanks, no digits, no special characters (this is checked at character-entry time). It is set up with: - int set_field_type(FIELD *field, /* field to alter */ TYPE_ALPHA, /* type to associate */ int width); /* maximum width of field */ @@ -1714,7 +1706,6 @@ int set_field_type(FIELD *field, /* field to alter */ This field type accepts alphabetic data and digits; no blanks, no special characters (this is checked at character-entry time). It is set up with: - int set_field_type(FIELD *field, /* field to alter */ TYPE_ALNUM, /* type to associate */ int width); /* maximum width of field */ @@ -1729,7 +1720,6 @@ int set_field_type(FIELD *field, /* field to alter */ This type allows you to restrict a field's values to be among a specified set of string values (for example, the two-letter postal codes for U.S. states). It is set up with: - int set_field_type(FIELD *field, /* field to alter */ TYPE_ENUM, /* type to associate */ char **valuelist; /* list of possible values */ @@ -1757,7 +1747,6 @@ int set_field_type(FIELD *field, /* field to alter */ TYPE_INTEGER This field type accepts an integer. It is set up as follows: - int set_field_type(FIELD *field, /* field to alter */ TYPE_INTEGER, /* type to associate */ int padding, /* # places to zero-pad to */ @@ -1776,7 +1765,6 @@ int set_field_type(FIELD *field, /* field to alter */ TYPE_NUMERIC This field type accepts a decimal number. It is set up as follows: - int set_field_type(FIELD *field, /* field to alter */ TYPE_NUMERIC, /* type to associate */ int padding, /* # places of precision */ @@ -1798,7 +1786,6 @@ int set_field_type(FIELD *field, /* field to alter */ This field type accepts data matching a regular expression. It is set up as follows: - int set_field_type(FIELD *field, /* field to alter */ TYPE_REGEXP, /* type to associate */ char *regexp); /* expression to match */ @@ -1811,7 +1798,6 @@ Direct Field Buffer Manipulation The chief attribute of a field is its buffer contents. When a form has been completed, your application usually needs to know the state of each field buffer. You can find this out with: - char *field_buffer(FIELD *field, /* field to query */ int bufindex); /* number of buffer to query */ @@ -1846,7 +1832,6 @@ Attributes of Forms The principal attribute of a form is its field list. You can query and change this list with: - int set_form_fields(FORM *form, /* form to alter */ FIELD **fields); /* fields to connect */ @@ -1895,7 +1880,6 @@ Control of Form Display In order to declare your own frame window for a form, you'll need to know the size of the form's bounding rectangle. You can get this information with: - int scale_form(FORM *form, /* form to query */ int *rows, /* form rows */ int *cols); /* form cols */ @@ -1919,7 +1903,6 @@ WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */ It is possible to check from your application whether all of a scrollable field is actually displayed within the menu subwindow. Use these functions: - int data_ahead(FORM *form); /* form to be queried */ int data_behind(FORM *form); /* form to be queried */ @@ -1933,7 +1916,6 @@ int data_behind(FORM *form); /* form to be queried */ Finally, there is a function to restore the form window's cursor to the value expected by the forms driver: - int pos_form_cursor(FORM *) /* form to be queried */ If your application changes the form window cursor, call this function @@ -1945,7 +1927,6 @@ Input Processing in the Forms Driver The function form_driver() handles virtualized input requests for form navigation, editing, and validation requests, just as menu_driver does for menus (see the section on menu input handling). - int form_driver(FORM *form, /* form to pass input to */ int request); /* form request code */ @@ -2255,7 +2236,6 @@ Field Change Hooks It is possible to set function hooks to be executed whenever the current field or form changes. Here are the functions that support this: - typedef void (*HOOK)(); /* pointer to function returning void */ int set_form_init(FORM *form, /* form to alter */ @@ -2320,7 +2300,6 @@ Field Change Commands focus for editing and viewing under control of your application, or ask which field it currently is in. The following functions help you accomplish this: - int set_current_field(FORM *form, /* form to alter */ FIELD *field); /* field to shift to */ @@ -2337,7 +2316,6 @@ int field_index(FORM *form, /* form to query */ first page. The function set_form_fields() resets this. It is also possible to move around by pages. - int set_form_page(FORM *form, /* form to alter */ int page); /* page to go to (0-origin) */ @@ -2350,7 +2328,6 @@ Form Options Like fields, forms may have control option bits. They can be changed or queried with these functions: - int set_form_opts(FORM *form, /* form to alter */ int attr); /* attribute to set */ @@ -2391,7 +2368,6 @@ Custom Validation Types The simplest way to create a custom data type is to compose it from two preexisting ones: - FIELD *link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2); @@ -2409,13 +2385,11 @@ FIELD *link_fieldtype(FIELDTYPE *type1, To create a field type from scratch, you need to specify one or both of the following things: - * A character-validation function, to check each character as it is entered. * A field-validation function to be applied on exit from the field. Here's how you do that: - typedef int (*HOOK)(); /* pointer to function returning int */ FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */ @@ -2457,7 +2431,6 @@ int free_fieldtype(FIELDTYPE *ftype); /* type to free */ and a pointer to the pile will be passed to the validation functions. Here is how you make the association: - typedef char *(*PTRHOOK)(); /* pointer to function returning (char *) */ typedef void (*VOIDHOOK)(); /* pointer to function returning void */ @@ -2497,7 +2470,6 @@ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ way that TYPE_ENUM is. For such types, it is possible to define successor and predecessor functions to support the REQ_NEXT_CHOICE and REQ_PREV_CHOICE requests. Here's how: - typedef int (*INTHOOK)(); /* pointer to function returning int */ int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */ diff --git a/form/Makefile.in b/form/Makefile.in index 79805305..dd65638a 100644 --- a/form/Makefile.in +++ b/form/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.25 1998/04/04 00:49:55 tom Exp $ +# $Id: Makefile.in,v 1.28 2000/05/28 01:40:18 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -64,6 +64,7 @@ LD = @LD@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ \ @@ -82,7 +83,7 @@ LINK = $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib -L$(libdir) -SHLIB_LIST = $(SHLIB_DIRS) -lncurses @SHLIB_LIST@ +SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ MK_SHARED_LIB = @MK_SHARED_LIB@ @@ -102,6 +103,7 @@ AUTO_SRC = \ ################################################################################ all \ +libs \ install :: $(AUTO_SRC) $(LIBRARIES) sources : $(AUTO_SRC) diff --git a/form/fty_enum.c b/form/fty_enum.c index 9716159b..701d80f8 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -13,7 +13,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.10 1999/05/16 17:23:14 juergen Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.11 2000/03/19 01:09:56 Bruno.Haible Exp $") typedef struct { char **kwds; @@ -225,7 +225,7 @@ static bool Next_Enum(FIELD * field, const void * argp) } if (cnt<=0) kwds = args->kwds; - if ((cnt>=0) || (Compare((unsigned char *)dummy,bp,ccase)==EXACT)) + if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT)) { set_field_buffer(field,0,*kwds); return TRUE; @@ -261,7 +261,7 @@ static bool Previous_Enum(FIELD * field, const void * argp) if (cnt<=0) kwds = &args->kwds[args->count-1]; - if ((cnt>=0) || (Compare((unsigned char *)dummy,bp,ccase)==EXACT)) + if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT)) { set_field_buffer(field,0,*kwds); return TRUE; diff --git a/include/Caps b/include/Caps index 7c102128..8e4435cc 100644 --- a/include/Caps +++ b/include/Caps @@ -29,7 +29,7 @@ # Author: Zeyd M. Ben-Halim 1992,1995 # and: Eric S. Raymond # -# $Id: Caps,v 1.24 1999/01/17 02:01:44 tom Exp $ +# $Id: Caps,v 1.25 1999/11/27 20:13:55 tom Exp $ # # This is the master termcap/terminfo capability table. # @@ -215,7 +215,7 @@ eat_newline_glitch xenl bool xn YBCGE newline ignored after 80 cols (concept) erase_overstrike eo bool eo YBCG- can erase overstrikes with a blank generic_type gn bool gn YB-G- generic line type hard_copy hc bool hc YBCG- hardcopy terminal -has_meta_key km bool km YB-GE Has a meta key (shift, sets parity bit) +has_meta_key km bool km YB-GE Has a meta key (i.e., sets 8th-bit) has_status_line hs bool hs YB-G- has extra status line insert_null_glitch in bool in YBCGE insert mode distinguishes nulls memory_above da bool da YBCG- display may be retained above the screen diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in index 6f66b21a..e839cf4a 100644 --- a/include/MKterm.h.awk.in +++ b/include/MKterm.h.awk.in @@ -1,7 +1,7 @@ BEGIN { print "/****************************************************************************" - print " * Copyright (c) 1998 Free Software Foundation, Inc. *" + print " * Copyright (c) 1998,1999,2000 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 *" @@ -33,7 +33,7 @@ BEGIN { print "/* and: Eric S. Raymond */" print "/****************************************************************************/" print "" - print "/* $Id: MKterm.h.awk.in,v 1.36 1999/09/01 22:36:52 Peter.Wemm Exp $ */" + print "/* $Id: MKterm.h.awk.in,v 1.37 2000/03/12 02:40:07 tom Exp $ */" print "" print "/*" print "** term.h -- Definition of struct term" @@ -174,6 +174,8 @@ $2 == "%%-STOP-HERE-%%" { /^#/ {next;} +$1 == "acs_chars" {acsindex = StringCount} + $3 == "bool" { printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++ } @@ -197,6 +199,9 @@ END { printf "#define NUMCOUNT %d\n", NumberCount printf "#define STRCOUNT %d\n", StringCount print "" + print "/* used by code for comparing entries */" + print "#define acs_chars_index ", acsindex + print "" print "typedef struct termtype { /* in-core form of terminfo data */" print " char *term_names; /* str_table offset of term names */" print " char *str_table; /* pointer to string table */" diff --git a/include/Makefile.in b/include/Makefile.in index 724be6d5..29c0d7cc 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.22 1998/02/11 12:13:46 tom Exp $ +# $Id: Makefile.in,v 1.23 2000/05/28 01:33:52 tom Exp $ ############################################################################## # Copyright (c) 1998 Free Software Foundation, Inc. # # # @@ -71,6 +71,7 @@ AUTO_SRC = \ ################################################################################ all \ +libs \ sources \ install :: $(AUTO_SRC) diff --git a/include/capdefaults.c b/include/capdefaults.c index af1193cc..071f9e17 100644 --- a/include/capdefaults.c +++ b/include/capdefaults.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,57 +31,54 @@ * and: Eric S. Raymond * ****************************************************************************/ -/* $Id: capdefaults.c,v 1.8 1998/07/04 22:31:04 tom Exp $ */ +/* $Id: capdefaults.c,v 1.12 2000/01/02 02:34:56 tom Exp $ */ - /* - * Compute obsolete capabilities. The reason this is an include file - * is that the two places where it's needed want the macros to - * generate offsets to different structures. See the file Caps for - * explanations of these conversions. - * - * Note: This code is the functional inverse of the first part - * of postprocess_entry(). - */ - { - char *sp; - int capval; + /* + * Compute obsolete capabilities. The reason this is an include file is + * that the two places where it's needed want the macros to generate + * offsets to different structures. See the file Caps for explanations of + * these conversions. + * + * Note: This code is the functional inverse of the first part of + * postprocess_termcap(). + */ +{ + char *sp; + int capval; #define EXTRACT_DELAY(str) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0) - /* current (4.4BSD) capabilities marked obsolete */ - if (VALID_STRING(carriage_return) - && (capval = EXTRACT_DELAY(carriage_return))) - carriage_return_delay = capval; - if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline))) - new_line_delay = capval; + /* current (4.4BSD) capabilities marked obsolete */ + if (VALID_STRING(carriage_return) + && (capval = EXTRACT_DELAY(carriage_return))) + carriage_return_delay = capval; + if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline))) + new_line_delay = capval; - /* current (4.4BSD) capabilities not obsolete */ - if (!VALID_STRING(termcap_init2) && VALID_STRING(init_3string)) - { - termcap_init2 = init_3string; - init_3string = (char *)0; - } - if (VALID_STRING(reset_1string) - && !VALID_STRING(reset_2string) - && VALID_STRING(reset_3string)) - { - termcap_reset = reset_2string; - reset_2string = (char *)0; - } -#if USE_XMC_SUPPORT - if (magic_cookie_glitch_ul < 0 && magic_cookie_glitch && VALID_STRING(enter_underline_mode)) - magic_cookie_glitch_ul = magic_cookie_glitch; -#else - magic_cookie_glitch_ul = -1; -#endif + /* current (4.4BSD) capabilities not obsolete */ + if (!VALID_STRING(termcap_init2) && VALID_STRING(init_3string)) { + termcap_init2 = init_3string; + init_3string = ABSENT_STRING; + } + if (!VALID_STRING(termcap_reset) + && VALID_STRING(reset_2string) + && !VALID_STRING(reset_1string) + && !VALID_STRING(reset_3string)) { + termcap_reset = reset_2string; + reset_2string = ABSENT_STRING; + } + if (magic_cookie_glitch_ul == ABSENT_NUMERIC + && magic_cookie_glitch != ABSENT_NUMERIC + && VALID_STRING(enter_underline_mode)) + magic_cookie_glitch_ul = magic_cookie_glitch; - /* totally obsolete capabilities */ - linefeed_is_newline = VALID_STRING(newline) - && (strcmp("\n", newline) == 0); - if (VALID_STRING(cursor_left) - && (capval = EXTRACT_DELAY(cursor_left))) - backspace_delay = capval; - if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab))) - horizontal_tab_delay = capval; + /* totally obsolete capabilities */ + linefeed_is_newline = VALID_STRING(newline) + && (strcmp("\n", newline) == 0); + if (VALID_STRING(cursor_left) + && (capval = EXTRACT_DELAY(cursor_left))) + backspace_delay = capval; + if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab))) + horizontal_tab_delay = capval; #undef EXTRACT_DELAY - } +} diff --git a/include/curses.h.in b/include/curses.h.in index 4f300b0b..b33995e8 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,7 @@ * and: Eric S. Raymond * ****************************************************************************/ -/* $Id: curses.h.in,v 1.85 1999/10/23 12:33:54 tom Exp $ */ +/* $Id: curses.h.in,v 1.93 2000/07/08 11:07:26 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -65,6 +65,12 @@ #undef NCURSES_CONST #define NCURSES_CONST @NCURSES_CONST@ +#undef NCURSES_COLOR_T +#define NCURSES_COLOR_T short + +#undef NCURSES_SIZE_T +#define NCURSES_SIZE_T short + typedef unsigned @cf_cv_typeof_chtype@ chtype; #include @@ -245,18 +251,18 @@ cchar_t; struct ldat { chtype *text; /* text of the line */ - short firstchar; /* first changed character in the line */ - short lastchar; /* last changed character in the line */ - short oldindex; /* index of the line at last update */ + 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 */ }; struct _win_st { - short _cury, _curx; /* current cursor position */ + NCURSES_SIZE_T _cury, _curx; /* current cursor position */ /* window location and size */ - short _maxy, _maxx; /* maximums of x and y, NOT window size */ - short _begy, _begx; /* screen coords of upper-left-hand corner */ + NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ + NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */ short _flags; /* window state flags */ @@ -279,8 +285,8 @@ struct _win_st struct ldat *_line; /* the actual line data */ /* global screen state */ - short _regtop; /* top line of scrolling region */ - short _regbottom; /* bottom line of scrolling region */ + NCURSES_SIZE_T _regtop; /* top line of scrolling region */ + NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */ /* these are used only if this is a sub-window */ int _parx; /* x coordinate of this window in parent */ @@ -290,12 +296,12 @@ struct _win_st /* these are used only if this is a pad */ struct pdat { - short _pad_y, _pad_x; - short _pad_top, _pad_left; - short _pad_bottom, _pad_right; + NCURSES_SIZE_T _pad_y, _pad_x; + NCURSES_SIZE_T _pad_top, _pad_left; + NCURSES_SIZE_T _pad_bottom, _pad_right; } _pad; - short _yoffset; /* real begy is _begy + _yoffset */ + NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */ }; extern WINDOW *stdscr; @@ -311,8 +317,14 @@ extern int TABSIZE; */ extern int ESCDELAY; /* ESC expire time in milliseconds */ +extern char ttytype[]; /* needed for backward compatibility */ + +/* + * These functions are extensions - not in XSI Curses. + */ extern char *keybound (int, int); extern const char *curses_version (void); +extern int assume_default_colors (int, int); extern int define_key (char *, int); extern int keyok (int, bool); extern int resizeterm (int, int); @@ -320,8 +332,6 @@ extern int use_default_colors (void); extern int use_extended_names (bool); extern int wresize (WINDOW *, int, int); -extern char ttytype[]; /* needed for backward compatibility */ - /* * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like @@ -433,6 +443,7 @@ extern int doupdate(void); /* implemented */ extern WINDOW *dupwin(WINDOW *); /* implemented */ extern int echo(void); /* implemented */ extern int echochar(const chtype); /* generated */ +extern int erase(void); /* generated */ #ifdef _XOPEN_SOURCE_EXTENDED extern int echo_wchar(const cchar_t *); /* missing */ extern int erasewchar(wchar_t*); /* missing */ @@ -715,6 +726,8 @@ extern int tigetflag(NCURSES_CONST char *); /* implemented */ extern int tigetnum(NCURSES_CONST char *); /* implemented */ extern char *tigetstr(NCURSES_CONST char *); /* implemented */ extern void timeout(int); /* generated */ +extern int touchline(WINDOW *, int, int); /* generated */ +extern int touchwin(WINDOW *); /* generated */ extern char *tparm(NCURSES_CONST char *, ...); /* implemented */ extern int typeahead(int); /* implemented */ extern int ungetch(int); /* implemented */ @@ -945,7 +958,7 @@ extern bool mouse_trafo(int*, int*, bool); /* generated */ #define winchstr(w, s) winchnstr(w, s, -1) #define winsstr(w, s) winsnstr(w, s, -1) -#define redrawwin(w) wredrawln(w, 0, w->_maxy+1) +#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1) #define waddstr(win,str) waddnstr(win,str,-1) #define waddchstr(win,str) waddchnstr(win,str,-1) @@ -1329,6 +1342,7 @@ extern void trace(const unsigned int); #define TRACE_BITS 0x0100 /* trace state of TTY control bits */ #define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ #define TRACE_CCALLS 0x0400 /* trace per-character calls */ +#define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */ #define TRACE_MAXIMUM 0xffff /* maximum trace level */ #if defined(TRACE) || defined(NCURSES_TEST) @@ -1341,6 +1355,14 @@ extern const char *_nc_visbuf(const char *); #endif #ifdef __cplusplus + +/* these names conflict with STL */ +#undef box +#undef clear +#undef erase +#undef move +#undef refresh + } #endif diff --git a/include/nc_alloc.h b/include/nc_alloc.h index 1e23a977..5ac5a78d 100644 --- a/include/nc_alloc.h +++ b/include/nc_alloc.h @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996,1997 * ****************************************************************************/ -/* $Id: nc_alloc.h,v 1.7 1999/04/03 23:15:13 tom Exp $ */ +/* $Id: nc_alloc.h,v 1.8 2000/04/08 23:42:57 tom Exp $ */ #ifndef NC_ALLOC_included #define NC_ALLOC_included 1 @@ -69,4 +69,15 @@ extern void _nc_leaks_dump_entry(void); #define ExitProgram(code) return code #endif +/* doalloc.c */ +extern void *_nc_doalloc(void *, size_t); +#if !HAVE_STRDUP +#define strdup _nc_strdup +extern char *_nc_strdup(const char *); +#endif + +#define typeMalloc(type,elts) (type *)malloc((elts)*sizeof(type)) +#define typeCalloc(type,elts) (type *)calloc((elts),sizeof(type)) +#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type)) + #endif /* NC_ALLOC_included */ diff --git a/include/term_entry.h b/include/term_entry.h index a19b6010..7d9f77b4 100644 --- a/include/term_entry.h +++ b/include/term_entry.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,6 +31,7 @@ * and: Eric S. Raymond * ****************************************************************************/ +/* $Id: term_entry.h,v 1.29 2000/03/19 02:04:15 tom Exp $ */ /* * term_entry.h -- interface to entry-manipulation code @@ -46,16 +47,20 @@ extern "C" { #include #define MAX_USES 32 +#define MAX_CROSSLINKS 16 typedef struct entry { TERMTYPE tterm; int nuses; struct { - void *parent; /* (char *) or (ENTRY *) */ + char *name; + struct entry *link; long line; } uses[MAX_USES]; + int ncrosslinks; + struct entry *crosslinks[MAX_CROSSLINKS]; long cstart, cend; long startline; struct entry *next; @@ -130,6 +135,7 @@ extern void _nc_init_acs(void); /* corresponds to traditional 'init_acs()' */ /* parse_entry.c: entry-parsing code */ #if NCURSES_XNAMES extern bool _nc_user_definable; +extern bool _nc_disable_period; #endif extern int _nc_parse_entry(ENTRY *, int, bool); extern int _nc_capcmp(const char *, const char *); @@ -141,7 +147,7 @@ extern void _nc_write_entry(TERMTYPE *const); /* comp_parse.c: entry list handling */ extern void _nc_read_entry_source(FILE*, char*, int, bool, bool (*)(ENTRY*)); extern bool _nc_entry_match(char *, char *); -extern int _nc_resolve_uses(void); +extern int _nc_resolve_uses(bool); extern void _nc_free_entries(ENTRY *); extern void (*_nc_check_termtype)(TERMTYPE *); diff --git a/include/tic.h b/include/tic.h index 0a850540..24f12bcc 100644 --- a/include/tic.h +++ b/include/tic.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -97,8 +97,21 @@ extern "C" { /* location of user's personal info directory */ #define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */ +/* + * Some traces are designed to be used via tic's verbose option (and similar in + * infocmp and toe) rather than the 'trace()' function. So we use the bits + * above the normal trace() parameter as a debug-level. + */ + +#define MAX_DEBUG_LEVEL 15 +#define DEBUG_LEVEL(n) ((n) << 12) /* see TRACE_MAXIMUM */ + +#define set_trace_level(n) \ + _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL), \ + _nc_tracing |= DEBUG_LEVEL(n) + #ifdef TRACE -#define DEBUG(n, a) if (_nc_tracing & (1 << (n - 1))) _tracef a +#define DEBUG(n, a) if (_nc_tracing >= DEBUG_LEVEL(n)) _tracef a #else #define DEBUG(n, a) /*nothing*/ #endif @@ -157,7 +170,7 @@ struct tinfo_fkeys { chtype code; }; -#ifdef BROKEN_LINKER +#if BROKEN_LINKER #define _nc_tinfo_fkeys _nc_tinfo_fkeysf() extern struct tinfo_fkeys *_nc_tinfo_fkeysf(void); @@ -258,7 +271,7 @@ extern bool _nc_suppress_warnings; extern char *_nc_tic_expand(const char *, bool, int); /* comp_scan.c: decode string from readable form */ -extern char _nc_trans_string(char *); +extern char _nc_trans_string(char *, char *); /* captoinfo.c: capability conversion */ extern char *_nc_captoinfo(const char *, const char *, int const); diff --git a/install-sh b/install-sh index 89fc9b09..ebc66913 100755 --- a/install-sh +++ b/install-sh @@ -1,15 +1,27 @@ #! /bin/sh # # install - install a program, script, or datafile -# This comes from X11R5. +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. -# +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script @@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -tranformbasename="" +transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" diff --git a/man/MKterminfo.sh b/man/MKterminfo.sh index a6f765a4..d4e25c51 100755 --- a/man/MKterminfo.sh +++ b/man/MKterminfo.sh @@ -1,6 +1,6 @@ #!/bin/sh #*************************************************************************** -# Copyright (c) 1998 Free Software Foundation, Inc. * +# Copyright (c) 1998-2000 Free Software Foundation, Inc. * # * # Permission is hereby granted, free of charge, to any person obtaining a * # copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ # authorization. * #*************************************************************************** # -# $Id: MKterminfo.sh,v 1.5 1998/09/06 00:20:01 tom Exp $ +# $Id: MKterminfo.sh,v 1.6 2000/01/25 11:31:57 tom Exp $ # # MKterminfo.sh -- generate terminfo.5 from Caps tabular data # @@ -40,6 +40,12 @@ #  to \n because I couldn't get used to inserting linefeeds directly. There # had better be no s in the table source text. # +# keep the order independent of locale: +LANGUAGE=C +LC_ALL=C +export LANGUAGE +export LC_ALL +# head=$1 caps=$2 tail=$3 diff --git a/man/Makefile.in b/man/Makefile.in index f0607f56..a43bc25d 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.25 1998/02/11 12:13:49 tom Exp $ +# $Id: Makefile.in,v 1.26 2000/04/01 22:15:22 tom Exp $ ############################################################################## # Copyright (c) 1998 Free Software Foundation, Inc. # # # @@ -54,11 +54,13 @@ sources: terminfo.5 $(INSTALL_PREFIX)$(mandir) : $(srcdir)/../mkinstalldirs $@ +EDITARGS = $(INSTALL_PREFIX)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]* + install install.man : terminfo.5 $(INSTALL_PREFIX)$(mandir) - sh ./edit_man.sh installing $(INSTALL_PREFIX)$(mandir) terminfo.5 $(srcdir)/*.[0-9]* + sh ./edit_man.sh installing $(EDITARGS) uninstall uninstall.man : - -sh ./edit_man.sh removing $(INSTALL_PREFIX)$(mandir) terminfo.5 $(srcdir)/*.[0-9]* + -sh ./edit_man.sh removing $(EDITARGS) # We compose terminfo.5 from the real sources... CAPLIST=$(srcdir)/../include/Caps diff --git a/man/captoinfo.1m b/man/captoinfo.1m index 70e278cb..16dbe805 100644 --- a/man/captoinfo.1m +++ b/man/captoinfo.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: captoinfo.1m,v 1.13 1998/12/26 19:57:11 tom Exp $ +.\" $Id: captoinfo.1m,v 1.14 2000/03/19 02:20:28 tom Exp $ .TH captoinfo 1M "" .ds n 5 .ds d @DATADIR@/terminfo @@ -173,6 +173,7 @@ 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. 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. diff --git a/man/curs_addch.3x b/man/curs_addch.3x index 7cdfd783..63e05269 100644 --- a/man/curs_addch.3x +++ b/man/curs_addch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,12 +27,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addch.3x,v 1.16 1999/02/07 03:47:42 tom Exp $ +.\" $Id: curs_addch.3x,v 1.17 2000/07/01 19:53:01 tom Exp $ .TH curs_addch 3X "" .SH NAME \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, -\fBechochar\fR, \fBwechochar\fR - add a character (with attributes) to a -\fBcurses\fR window, then advance the cursor +\fBechochar\fR, +\fBwechochar\fR - add a character (with attributes) to a \fBcurses\fR window, then advance the cursor .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_addchstr.3x b/man/curs_addchstr.3x index f552a3b0..0d9ea29f 100644 --- a/man/curs_addchstr.3x +++ b/man/curs_addchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addchstr.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_addchstr.3x,v 1.7 2000/07/01 19:53:33 tom Exp $ .TH curs_addchstr 3X "" .SH NAME \fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR, \fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR, -\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a -\fBcurses\fR window +\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_addstr.3x b/man/curs_addstr.3x index fee3f814..6b74452d 100644 --- a/man/curs_addstr.3x +++ b/man/curs_addstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_addstr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_addstr.3x,v 1.9 2000/07/01 19:54:05 tom Exp $ .TH curs_addstr 3X "" .SH NAME -\fBaddstr\fR, \fBaddnstr\fR, \fBwaddstr\fR, \fBwaddnstr\fR, -\fBmvaddstr\fR, \fBmvaddnstr\fR, \fBmvwaddstr\fR, \fBmvwaddnstr\fR - add a -string of characters to a \fBcurses\fR window and advance cursor +\fBaddstr\fR, +\fBaddnstr\fR, +\fBwaddstr\fR, +\fBwaddnstr\fR, +\fBmvaddstr\fR, +\fBmvaddnstr\fR, +\fBmvwaddstr\fR, +\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_attr.3x b/man/curs_attr.3x index d6ad6247..e884fa88 100644 --- a/man/curs_attr.3x +++ b/man/curs_attr.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,13 +27,19 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_attr.3x,v 1.19 1998/12/26 19:25:35 tom Exp $ +.\" $Id: curs_attr.3x,v 1.22 2000/07/08 11:59:58 tom Exp $ .TH curs_attr 3X "" .SH NAME \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, \fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR, -\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, -\fBwstandout\fR - \fBcurses\fR character and window attribute control routines +\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR, +\fBattr_get\fR, \fBwattr_get\fR, +\fBattr_off\fR, \fBwattr_off\fR, +\fBattr_on\fR, \fBwattr_on\fR, +\fBattr_set\fR, \fBwattr_set\fR, +\fBchgat\fR, \fBwchgat\fR, +\fBmvchgat\fR, \fBmvwchgat\fR, +\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines .SH SYNOPSIS \fB#include \fR .br @@ -75,9 +81,9 @@ .br \fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR .br -\fBint attr_set(attr_t attrs, void *opts);\fR +\fBint attr_set(attr_t attrs, short pair, void *opts);\fR .br -\fBint wattr_set(WINDOW *win, attr_t attrs, void *opts);\fR +\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR .br \fBint chgat(int n, attr_t attr, short color,\fR \fBconst void *opts)\fR diff --git a/man/curs_bkgd.3x b/man/curs_bkgd.3x index a2569997..efd4f827 100644 --- a/man/curs_bkgd.3x +++ b/man/curs_bkgd.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,11 +26,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_bkgd.3x,v 1.12 1998/03/14 23:43:31 tom Exp $ +.\" $Id: curs_bkgd.3x,v 1.14 2000/07/01 17:39:31 tom Exp $ .TH curs_bkgd 3X "" .SH NAME -\fBbkgdset\fR, \fBwbkgdset\fR, \fBbkgd\fR, -\fBwbkgd\fR - \fBcurses\fR window background manipulation routines +\fBbkgdset\fR, \fBwbkgdset\fR, +\fBbkgd\fR, \fBwbkgd\fR, +\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines .. .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_border.3x b/man/curs_border.3x index 45200eb1..2bd96264 100644 --- a/man/curs_border.3x +++ b/man/curs_border.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_border.3x,v 1.11 1999/01/30 23:11:47 tom Exp $ +.\" $Id: curs_border.3x,v 1.14 2000/07/01 19:54:58 tom Exp $ .TH curs_border 3X "" .SH NAME \fBborder\fR, \fBwborder\fR, \fBbox\fR, -\fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create -\fBcurses\fR borders, horizontal and vertical lines +\fBhline\fR, \fBwhline\fR, +\fBvline\fR, \fBwvline\fR, +\fBmvhline\fR, \fBmvwhline\fR, +\fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines .SH SYNOPSIS \fB#include \fR .br diff --git a/man/curs_color.3x b/man/curs_color.3x index 03cbba63..9116b773 100644 --- a/man/curs_color.3x +++ b/man/curs_color.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_color.3x,v 1.10 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_color.3x,v 1.15 2000/07/08 11:59:51 tom Exp $ .TH curs_color 3X "" .SH NAME -\fBstart_color\fR, \fBinit_pair\fR, -\fBinit_color\fR, \fBhas_colors\fR, \fBcan_change_color\fR, -\fBcolor_content\fR, \fBpair_content\fR - \fBcurses\fR color -manipulation routines +\fBstart_color\fR, +\fBinit_pair\fR, +\fBinit_color\fR, +\fBhas_colors\fR, +\fBcan_change_color\fR, +\fBcolor_content\fR, +\fBpair_content\fR, +\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines .SH SYNOPSIS \fB# include \fR .br @@ -83,13 +87,27 @@ just turned on. The \fBinit_pair\fR routine changes the definition of a color-pair. It takes three arguments: the number of the color-pair to be changed, the foreground -color number, and the background color number. The value of the first argument -must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. The value of the second and +color number, and the background color number. +For portable applications: +.TP 5 +- +The value of the first argument +must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. +.TP 5 +- +The value of the second and third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired -to white on black and cannot be changed). If the color-pair was previously +to white on black and cannot be changed). +.PP +If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair is changed to the new definition. +As an extension, ncurses allows you to set color pair 0 via +the \fBassume_default_colors\fR routine, or to specify the use of +default colors (color number \fB-1\fR) if you first invoke the +\fBuse_default_colors\fR routine. + The \fBinit_color\fR routine changes the definition of a color. It takes four arguments: the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of the first @@ -160,15 +178,18 @@ the background color used when parts of a window are blanked by erasing or scrolling operations, see \fBcurs_bkgd\fR(3X). Several caveats apply on 386 and 486 machines with VGA-compatible graphics: - +.TP 5 +- COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with the \fBA_BOLD\fR attribute. - +.TP 5 +- The A_BLINK attribute should in theory cause the background to go bright. This often fails to work, and even some cards for which it mostly works (such as the Paradise and compatibles) do the wrong thing when you try to set a bright "yellow" background (you get a blinking yellow foreground instead). - +.TP 5 +- Color RGB values are not settable. .SH PORTABILITY This implementation satisfies XSI Curses's minimum maximums @@ -177,6 +198,11 @@ for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR. The \fBinit_pair\fP routine accepts negative values of foreground and background color to support the \fBuse_default_colors\fP extension, but only if that routine has been first invoked. +.PP +The assumption that \fBCOLOR_BLACK\fR is the default +background color for all terminals can be modified using the +\fBassume_default_colors\fP extension, +.. .SH SEE ALSO \fBcurses\fR(3X), \fBcurs_initscr\fR(3X), diff --git a/man/curs_delch.3x b/man/curs_delch.3x index d63d6020..34bd9ac3 100644 --- a/man/curs_delch.3x +++ b/man/curs_delch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,11 +26,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_delch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_delch.3x,v 1.7 2000/07/01 19:55:37 tom Exp $ .TH curs_delch 3X "" .SH NAME -\fBdelch\fR, \fBwdelch\fR, \fBmvdelch\fR, \fBmvwdelch\fR - -delete character under the cursor in a \fBcurses\fR window +\fBdelch\fR, +\fBwdelch\fR, +\fBmvdelch\fR, +\fBmvwdelch\fR - delete character under the cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_deleteln.3x b/man/curs_deleteln.3x index 54bf331b..8e48384a 100644 --- a/man/curs_deleteln.3x +++ b/man/curs_deleteln.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_deleteln.3x,v 1.5 1999/02/07 03:58:20 tom Exp $ +.\" $Id: curs_deleteln.3x,v 1.6 2000/07/01 19:56:12 tom Exp $ .TH curs_deleteln 3X "" .SH NAME -\fBdeleteln\fR, \fBwdeleteln\fR, \fBinsdelln\fR, -\fBwinsdelln\fR, \fBinsertln\fR, \fBwinsertln\fR - delete and insert -lines in a \fBcurses\fR window +\fBdeleteln\fR, +\fBwdeleteln\fR, +\fBinsdelln\fR, +\fBwinsdelln\fR, +\fBinsertln\fR, +\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_extend.3x b/man/curs_extend.3x new file mode 100644 index 00000000..16a3f80b --- /dev/null +++ b/man/curs_extend.3x @@ -0,0 +1,89 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1999 +.\" +.\" $Id: curs_extend.3x,v 1.4 2000/07/01 16:43:11 tom Exp $ +.TH use_default_colors 3X "" +.SH NAME +\fBcurs_extend\fR: +\fBcurses_version\fP, +\fBuse_extended_names\fP \- miscellaneous curses extensions +.. +.SH SYNOPSIS +\fB#include \fP + +\fBconst char * curses_version(void);\fP +.br +\fBint use_extended_names(bool enable);\fP +.. +.SH DESCRIPTION +These functions are extensions to the curses library +which do not fit easily into other categories. +.PP +Use +.I curses_version() +to get the version number, including patch level of the library, e.g., +.B 5.0.19991023 +.PP +The +.I use_extended_names() +function controls whether the calling application +is able to use user-defined or nonstandard names +which may be compiled into the terminfo +description, i.e., via the terminfo or termcap interfaces. +Normally these names are available for use, since the essential descision +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 +.. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.. +.SH SEE ALSO +\fBcurs_getch\fR(3X), +\fBcurs_mouse\fR(3X), +\fBcurs_print\fR(3X), +\fBdefine_key\fR(3X), +\fBdft_fgbg\fR(3X), +\fBkeybound\fR(3X), +\fBkeyok\fR(3X), +\fBresizeterm\fR(3X), +\fBwresize\fR(3X). +.. +.SH AUTHOR +Thomas Dickey. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/man/curs_getch.3x b/man/curs_getch.3x index 0e442461..b2b20ef4 100644 --- a/man/curs_getch.3x +++ b/man/curs_getch.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,12 +27,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getch.3x,v 1.15 1998/11/29 01:04:26 Rick.Ohnemus Exp $ +.\" $Id: curs_getch.3x,v 1.17 2000/07/01 16:45:36 tom Exp $ .TH curs_getch 3X "" .SH NAME -\fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, -\fBmvwgetch\fR, \fBungetch\fR - get (or push back) characters from -\fBcurses\fR terminal keyboard +\fBgetch\fR, +\fBwgetch\fR, +\fBmvgetch\fR, +\fBmvwgetch\fR, +\fBungetch\fR, +\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard .SH SYNOPSIS \fB#include \fR @@ -57,7 +60,7 @@ this is after one character (cbreak mode), or after the first newline (nocbreak mode). In half-delay mode, the program waits until a character is typed or the specified timeout has been reached. -If \fBnoecho\fR has been set, then the character will also be echoed into the +Unless \fBnoecho\fR has been set, then the character will also be echoed into the designated window according to the following rules: If the character is the current erase character, left arrow, or backspace, the cursor is moved one space to the left and that screen position is erased diff --git a/man/curs_getstr.3x b/man/curs_getstr.3x index b3678e0a..42c22931 100644 --- a/man/curs_getstr.3x +++ b/man/curs_getstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_getstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_getstr.3x,v 1.9 2000/07/01 17:39:31 tom Exp $ .TH curs_getstr 3X "" .SH NAME -\fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR, -\fBmvwgetstr\fR, \fBwgetnstr\fR - accept character strings from -\fBcurses\fR terminal keyboard +\fBgetstr\fR, +\fBgetnstr\fR, +\fBwgetstr\fR, +\fBwgetnstr\fR, +\fBmvgetstr\fR, +\fBmvgetnstr\fR, +\fBmvwgetstr\fR, +\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard .SH SYNOPSIS \fB#include \fR @@ -41,6 +46,8 @@ .br \fBint wgetstr(WINDOW *win, char *str);\fR .br +\fBint wgetnstr(WINDOW *win, char *str, int n);\fR +.br \fBint mvgetstr(int y, int x, char *str);\fR .br \fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR @@ -49,8 +56,6 @@ .br \fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR .br -\fBint wgetnstr(WINDOW *win, char *str, int n);\fR -.br .SH DESCRIPTION The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR, until a newline or carriage return is received (the terminating character is diff --git a/man/curs_inchstr.3x b/man/curs_inchstr.3x index dfe7bf48..60f9d566 100644 --- a/man/curs_inchstr.3x +++ b/man/curs_inchstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inchstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_inchstr.3x,v 1.8 2000/07/01 20:16:18 tom Exp $ .TH curs_inchstr 3X "" .SH NAME -\fBinchstr\fR, \fBinchnstr\fR, \fBwinchstr\fR, -\fBwinchnstr\fR, \fBmvinchstr\fR, \fBmvinchnstr\fR, \fBmvwinchstr\fR, -\fBmvwinchnstr\fR - get a string of characters (and attributes) from a -\fBcurses\fR window +\fBinchstr\fR, +\fBinchnstr\fR, +\fBwinchstr\fR, +\fBwinchnstr\fR, +\fBmvinchstr\fR, +\fBmvinchnstr\fR, +\fBmvwinchstr\fR, +\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x index 66aae13c..daa5e1e8 100644 --- a/man/curs_initscr.3x +++ b/man/curs_initscr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_initscr.3x,v 1.8 1999/09/18 23:52:30 tom Exp $ +.\" $Id: curs_initscr.3x,v 1.10 2000/07/08 12:47:39 tom Exp $ .TH curs_initscr 3X "" .SH NAME -\fBinitscr\fR, \fBnewterm\fR, \fBendwin\fR, -\fBisendwin\fR, \fBset_term\fR, \fBdelscreen\fR - \fBcurses\fR screen -initialization and manipulation routines +\fBinitscr\fR, +\fBnewterm\fR, +\fBendwin\fR, +\fBisendwin\fR, +\fBset_term\fR, +\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines .SH SYNOPSIS \fB#include \fR @@ -39,7 +42,7 @@ initialization and manipulation routines .br \fBint endwin(void);\fR .br -\fBint isendwin(void);\fR +\fBbool isendwin(void);\fR .br \fBSCREEN *newterm(const char *type, FILE *outfd, FILE *infd);\fR .br diff --git a/man/curs_insch.3x b/man/curs_insch.3x index 5c3c3410..8546cf53 100644 --- a/man/curs_insch.3x +++ b/man/curs_insch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,11 +26,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_insch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_insch.3x,v 1.7 2000/07/01 19:57:21 tom Exp $ .TH curs_insch 3X "" .SH NAME -\fBinsch\fR, \fBwinsch\fR, \fBmvinsch\fR, \fBmvwinsch\fR - -insert a character before cursor in a \fBcurses\fR window +\fBinsch\fR, +\fBwinsch\fR, +\fBmvinsch\fR, +\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_insstr.3x b/man/curs_insstr.3x index 955ac8df..af84cb91 100644 --- a/man/curs_insstr.3x +++ b/man/curs_insstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_insstr.3x,v 1.10 1998/07/25 20:32:57 Todd.Miller Exp $ +.\" $Id: curs_insstr.3x,v 1.11 2000/07/01 19:57:49 tom Exp $ .TH curs_insstr 3X "" .SH NAME -\fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR, -\fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR, \fBmvwinsnstr\fR - insert -string before cursor in a \fBcurses\fR window +\fBinsstr\fR, +\fBinsnstr\fR, +\fBwinsstr\fR, +\fBwinsnstr\fR, +\fBmvinsstr\fR, +\fBmvinsnstr\fR, +\fBmvwinsstr\fR, +\fBmvwinsnstr\fR - insert string before cursor in a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR .br diff --git a/man/curs_instr.3x b/man/curs_instr.3x index d3a7e6f7..283ae19a 100644 --- a/man/curs_instr.3x +++ b/man/curs_instr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,17 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_instr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_instr.3x,v 1.9 2000/07/01 20:05:03 tom Exp $ .TH curs_instr 3X "" .SH NAME -\fBinstr\fR, \fBinnstr\fR, \fBwinstr\fR, \fBwinnstr\fR, -\fBmvinstr\fR, \fBmvinnstr\fR, \fBmvwinstr\fR, \fBmvwinnstr\fR - get a string -of characters from a \fBcurses\fR window +\fBinstr\fR, +\fBinnstr\fR, +\fBwinstr\fR, +\fBwinnstr\fR, +\fBmvinstr\fR, +\fBmvinnstr\fR, +\fBmvwinstr\fR, +\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_kernel.3x b/man/curs_kernel.3x index 62a775e7..ada1a1d1 100644 --- a/man/curs_kernel.3x +++ b/man/curs_kernel.3x @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_kernel.3x,v 1.11 1998/06/27 21:56:38 tom Exp $ +.\" $Id: curs_kernel.3x,v 1.12 2000/02/27 01:37:46 tom Exp $ .TH curs_kernel 3X "" .SH NAME \fBdef_prog_mode\fR, \fBdef_shell_mode\fR, @@ -134,6 +134,13 @@ the variables \fIy\fR and \fIx\fR. Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently incorrect". This implementation gets it right, but it may be unwise to count on the correctness of the return value anywhere else. + +Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR +if \fBcurs_set\fR +has been called to make the cursor other than normal, i.e., either +visible or very visible. +There is no way for ncurses to determine the initial cursor state to +restore that. .SH PORTABILITY The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI Curses standard, Issue 4. All other functions are as described in XSI Curses. diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x index 45fdd2a3..316598a5 100644 --- a/man/curs_mouse.3x +++ b/man/curs_mouse.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998,1999 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,12 +27,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.'" $Id: curs_mouse.3x,v 1.13 1999/09/11 17:28:28 tom Exp $ +.'" $Id: curs_mouse.3x,v 1.15 2000/07/08 12:50:08 tom Exp $ .TH curs_mouse 3X "" .SH NAME \fBgetmouse\fR, \fBungetmouse\fR, \fBmousemask\fR, \fBwenclose\fR, -\fBwmouse_trafo\fR, \fBmouseinterval\fR - mouse interface through curses +\fBmouse_trafo\fR, \fBwmouse_trafo\fR, +\fBmouseinterval\fR - mouse interface through curses .SH SYNOPSIS .nf \fB#include \fR @@ -56,7 +57,11 @@ MEVENT;\fR .br \fBbool wenclose(WINDOW *win, int y, int x);\fR .br -\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen);\fR +\fBbool mouse_trafo(int* pY, int* pX, bool to_screen);\fR +.br +\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX,\fR +.br + \fBbool to_screen);\fR .br \fBint mouseinterval(int erval);\fR .br diff --git a/man/curs_outopts.3x b/man/curs_outopts.3x index 2946562d..4c5bf1f4 100644 --- a/man/curs_outopts.3x +++ b/man/curs_outopts.3x @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_outopts.3x,v 1.13 1998/12/26 20:02:04 tom Exp $ +.\" $Id: curs_outopts.3x,v 1.14 2000/02/27 01:41:58 tom Exp $ .TH curs_outopts 3X "" .SH NAME \fBclearok\fR, \fBidlok\fR, \fBidcok immedok\fR, @@ -151,6 +151,7 @@ time. The XSI Curses standard does not mention that the cursor should be made invisible as a side-effect of \fBleaveok\fR. SVr4 curses documentation does this, but the code does not. +Use \fBcurs_set\fR to make the cursor invisible. .SH NOTES Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR, \fBnonl\fR and \fBsetscrreg\fR may be macros. diff --git a/man/curs_overlay.3x b/man/curs_overlay.3x index b6a02605..9c0b82c9 100644 --- a/man/curs_overlay.3x +++ b/man/curs_overlay.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,11 +26,12 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_overlay.3x,v 1.8 1998/12/26 20:08:30 tom Exp $ +.\" $Id: curs_overlay.3x,v 1.9 2000/07/01 20:05:31 tom Exp $ .TH curs_overlay 3X "" .SH NAME -\fBoverlay\fR, \fBoverwrite\fR, \fBcopywin\fR - overlay and -manipulate overlapped \fBcurses\fR windows +\fBoverlay\fR, +\fBoverwrite\fR, +\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_pad.3x b/man/curs_pad.3x index 35138f12..0813a0a4 100644 --- a/man/curs_pad.3x +++ b/man/curs_pad.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,11 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_pad.3x,v 1.8 1998/12/26 20:09:03 tom Exp $ +.\" $Id: curs_pad.3x,v 1.9 2000/07/04 22:38:13 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 - create and display \fBcurses\fR pads .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_printw.3x b/man/curs_printw.3x index 2f0152f3..8ba9d174 100644 --- a/man/curs_printw.3x +++ b/man/curs_printw.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_printw.3x,v 1.8 1998/12/26 20:09:36 tom Exp $ +.\" $Id: curs_printw.3x,v 1.11 2000/07/01 20:11:32 tom Exp $ .TH curs_printw 3X "" .SH NAME -\fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR, -\fBmvwprintw\fR, \fBvwprintw\fR - print formatted output in -\fBcurses\fR windows +\fBprintw\fR, +\fBwprintw\fR, +\fBmvprintw\fR, +\fBmvwprintw\fR, +\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows .SH SYNOPSIS \fB#include \fR @@ -48,6 +50,8 @@ .br \fBint vwprintw(WINDOW *win, char *fmt, varglist);\fR .br +\fBint vw_printw(WINDOW *win, char *fmt, varglist);\fR +.br .SH DESCRIPTION The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR routines are analogous to \fBprintf\fR [see \fBprintf\fR(3S)]. In diff --git a/man/curs_refresh.3x b/man/curs_refresh.3x index 4572b4c9..9b4cb1df 100644 --- a/man/curs_refresh.3x +++ b/man/curs_refresh.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_refresh.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_refresh.3x,v 1.8 2000/07/01 20:06:14 tom Exp $ .TH curs_refresh 3X "" .SH NAME -\fBrefresh\fR, \fBwrefresh\fR, \fBwnoutrefresh\fR, -\fBdoupdate\fR, \fBredrawwin\fR, \fBwredrawln\fR - refresh -\fBcurses\fR windows and lines +\fBrefresh\fR, +\fBwrefresh\fR, +\fBwnoutrefresh\fR, +\fBdoupdate\fR, +\fBredrawwin\fR, +\fBwredrawln\fR - refresh \fBcurses\fR windows and lines .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_scanw.3x b/man/curs_scanw.3x index f0c64f1f..c0053315 100644 --- a/man/curs_scanw.3x +++ b/man/curs_scanw.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scanw.3x,v 1.8 1998/12/26 20:10:12 tom Exp $ +.\" $Id: curs_scanw.3x,v 1.10 2000/07/01 20:06:29 tom Exp $ .TH curs_scanw 3X "" .SH NAME -\fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR, -\fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a -\fBcurses\fR widow +\fBscanw\fR, +\fBwscanw\fR, +\fBmvscanw\fR, +\fBmvwscanw\fR, +\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR widow .SH SYNOPSIS \fB#include \fR @@ -44,6 +46,8 @@ \fBint mvwscanw(WINDOW *win, int y, int x,\fR \fBchar *fmt\fR [\fB, arg]\fR \fB...);\fR .br +\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR +.br \fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR .SH DESCRIPTION The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to diff --git a/man/curs_scr_dump.3x b/man/curs_scr_dump.3x index 67a22489..581d10d1 100644 --- a/man/curs_scr_dump.3x +++ b/man/curs_scr_dump.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,13 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scr_dump.3x,v 1.1 1998/03/11 21:12:53 tom Exp $ +.\" $Id: curs_scr_dump.3x,v 1.2 2000/07/01 20:06:53 tom Exp $ .TH curs_scr_dump 3X "" .SH NAME -\fBscr_dump\fR, \fBscr_restore\fR, -\fBscr_init\fR, \fBscr_set\fR - read (write) a \fBcurses\fR screen -from (to) a file +\fBscr_dump\fR, +\fBscr_restore\fR, +\fBscr_init\fR, +\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file .SH SYNOPSIS \fB#include \fR diff --git a/man/curs_scroll.3x b/man/curs_scroll.3x index 5429685f..863b587d 100644 --- a/man/curs_scroll.3x +++ b/man/curs_scroll.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,10 +26,10 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_scroll.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_scroll.3x,v 1.8 2000/07/01 17:54:23 tom Exp $ .TH curs_scroll 3X "" .SH NAME -\fBscroll\fR, \fBsrcl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window +\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window .SH SYNOPSIS \fB#include \fR @@ -63,7 +63,8 @@ immediately if the scroll region is the entire screen "is" performed, not that this will occur, in order to leave open the possibility of smarter optimization of multiple scroll actions on the next update. -Neither the SVr4 documentation specifies whether the current attribute or +Neither the SVr4 nor the XSI documentation specify whether the current +attribute or current color-pair of blanks generated by the scroll function is zeroed. Under this implementation it is. .SH PORTABILITY diff --git a/man/curs_slk.3x b/man/curs_slk.3x index 86209d79..c52a7055 100644 --- a/man/curs_slk.3x +++ b/man/curs_slk.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_slk.3x,v 1.9 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_slk.3x,v 1.10 2000/07/01 17:52:44 tom Exp $ .TH curs_slk 3X "" .SH NAME \fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR, -\fBslk_noutrefresh\fR, \fBslk_label\fR, \fBslk_clear\fR, \fBslk_restore\fR, -\fBslk_touch\fR, \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, \fBslk_color\fR - -\fBcurses\fR soft label routines +\fBslk_noutrefresh\fR, \fBslk_label\fR, +\fBslk_clear\fR, \fBslk_restore\fR, \fBslk_touch\fR, +\fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, +\fBslk_attr_on\fR, \fBslk_attr_set\fR, \fBslk_attr_off\fR, +\fBslk_attr\fR \fBslk_color\fR - \fBcurses\fR soft label routines .SH SYNOPSIS \fB#include \fR @@ -54,11 +56,19 @@ .br \fBint slk_attron(const chtype attrs);\fR .br +\fBint slk_attroff(const chtype attrs);\fR +.br \fBint slk_attrset(const chtype attrs);\fR .br -\fBattr_t slk_attr(void);\fR +\fBint slk_attr_on(attr_t attrs, void* opts);\fR .br -\fBint slk_attroff(const chtype attrs);\fR +\fBint slk_attr_off(const attr_t attrs, void * opts);\fR +.br +\fBint slk_attr_set(const attr_t attrs,\fR +.br + \fBshort color_pair_number, void* opts);\fR +.br +\fBattr_t slk_attr(void);\fR .br \fBint slk_color(short color_pair_number);\fR .br diff --git a/man/curs_termattrs.3x b/man/curs_termattrs.3x index 2ece5a35..3938bc0f 100644 --- a/man/curs_termattrs.3x +++ b/man/curs_termattrs.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termattrs.3x,v 1.4 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_termattrs.3x,v 1.6 2000/07/08 12:53:34 tom Exp $ .TH curs_termattrs 3X "" .SH NAME \fBbaudrate\fR, \fBerasechar\fR, \fBhas_ic\fR, @@ -39,9 +39,9 @@ .br \fBchar erasechar(void);\fR .br -\fBint has_ic(void);\fR +\fBbool has_ic(void);\fR .br -\fBint has_il(void);\fR +\fBbool has_il(void);\fR .br \fBchar killchar(void);\fR .br diff --git a/man/curs_termcap.3x b/man/curs_termcap.3x index c3a0cf30..01395bfe 100644 --- a/man/curs_termcap.3x +++ b/man/curs_termcap.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,16 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termcap.3x,v 1.12 1999/09/05 01:02:07 tom Exp $ +.\" $Id: curs_termcap.3x,v 1.13 2000/07/01 20:10:57 tom Exp $ .TH curs_termcap 3X "" .ds n 5 .SH NAME -\fBtgetent\fR, \fBtgetflag\fR, \fBtgetnum\fR, -\fBtgetstr\fR, \fBtgoto\fR, \fBtputs\fR - direct \fBcurses\fR -interface to the terminfo capability database +\fBtgetent\fR, +\fBtgetflag\fR, +\fBtgetnum\fR, +\fBtgetstr\fR, +\fBtgoto\fR, +\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database .SH SYNOPSIS \fB#include \fR .br diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x index 098a0943..bb5c8ca6 100644 --- a/man/curs_terminfo.3x +++ b/man/curs_terminfo.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999 Free Software Foundation, Inc. * +.\" Copyright (c) 1999,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,15 +26,24 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_terminfo.3x,v 1.12 1999/10/17 01:11:59 tom Exp $ +.\" $Id: curs_terminfo.3x,v 1.13 2000/07/01 20:07:34 tom Exp $ .TH curs_terminfo 3X "" .ds n 5 .SH NAME -\fBsetupterm\fR, \fBsetterm\fR, -\fBset_curterm\fR, \fBdel_curterm\fR, \fBrestartterm\fR, \fBtparm\fR, -\fBtputs\fR, \fBputp\fR, \fBvidputs\fR, \fBvidattr\fR, \fBmvcur\fR, -\fBtigetflag\fR, \fBtigetnum\fR, \fBtigetstr\fR - \fBcurses\fR -interfaces to terminfo database +\fBsetupterm\fR, +\fBsetterm\fR, +\fBset_curterm\fR, +\fBdel_curterm\fR, +\fBrestartterm\fR, +\fBtparm\fR, +\fBtputs\fR, +\fBputp\fR, +\fBvidputs\fR, +\fBvidattr\fR, +\fBmvcur\fR, +\fBtigetflag\fR, +\fBtigetnum\fR, +\fBtigetstr\fR - \fBcurses\fR interfaces to terminfo database .SH SYNOPSIS \fB#include \fR .br diff --git a/man/curs_touch.3x b/man/curs_touch.3x index e1d130d3..58ffa9f6 100644 --- a/man/curs_touch.3x +++ b/man/curs_touch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,12 +26,15 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_touch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $ +.\" $Id: curs_touch.3x,v 1.8 2000/07/08 11:07:57 tom Exp $ .TH curs_touch 3X "" .SH NAME -\fBtouchwin\fR, \fBtouchline\fR, \fBuntouchwin\fR, -\fBwtouchln\fR, \fBis_linetouched\fR, \fBis_wintouched\fR - -\fBcurses\fR refresh control routines +\fBtouchwin\fR, +\fBtouchline\fR, +\fBuntouchwin\fR, +\fBwtouchln\fR, +\fBis_linetouched\fR, +\fBis_wintouched\fR - \fBcurses\fR refresh control routines .SH SYNOPSIS \fB#include \fR .br @@ -43,9 +46,9 @@ .br \fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR .br -\fBint is_linetouched(WINDOW *win, int line);\fR +\fBbool is_linetouched(WINDOW *win, int line);\fR .br -\fBint is_wintouched(WINDOW *win);\fR +\fBbool is_wintouched(WINDOW *win);\fR .br .SH DESCRIPTION The \fBtouchwin\fR and \fBtouchline\fR routines throw away all diff --git a/man/curs_trace.3x b/man/curs_trace.3x new file mode 100644 index 00000000..9f5b13a4 --- /dev/null +++ b/man/curs_trace.3x @@ -0,0 +1,147 @@ +.\"*************************************************************************** +.\" Copyright (c) 2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_trace.3x,v 1.2 2000/07/08 12:42:51 tom Exp $ +.TH curs_trace 3X "" +.SH NAME +\fB_tracef\fR, +\fB_tracedump\fR, +\fB_traceattr\fR, +\fB_traceattr2\fR, +\fB_nc_tracebits\fR, +\fB_tracechar\fR, +\fB_tracechtype\fR, +\fB_tracechtype2\fR, +\fB_tracemouse\fR, +\fBtrace\fR - \fBcurses\fR debugging routines +.SH SYNOPSIS +\fB#include \fR +.br +\fBvoid _tracef(const char *format, ...);\fR +.br +\fBvoid _tracedump(const char *label, WINDOW *win);\fR +.br +\fBchar *_traceattr(attr_t attr);\fR +.br +\fBchar *_traceattr2(int buffer, chtype ch);\fR +.br +\fBchar *_nc_tracebits(void);\fR +.br +\fBchar *_tracechar(const unsigned char ch);\fR +.br +\fBchar *_tracechtype(chtype ch);\fR +.br +\fBchar *_tracechtype2(int buffer, chtype ch);\fR +.br +\fBchar *_tracemouse(const MEVENT *event);\fR +.br +\fBvoid trace(const unsigned int param);\fR +.SH DESCRIPTION +The \fBtrace\fR routines are used for debugging the ncurses libraries, +as well as applications which use the ncurses libraries. +These functions are normally available only with the debugging library +\fIlibncurses_g.a\fR, but may be compiled into any model (shared, static, +profile) by defining the symbol \fBTRACE\fR. + +The principal parts of this interface are the \fBtrace\fR routine which +selectively enables different tracing features, and the \fB_tracef\fR +routine which writes formatted data to the \fItrace\fR file. + +Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR +in the current directory for output. The parameter is formed by OR'ing +values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB\fR. +These include: +.TP 5 +TRACE_DISABLE +turn off tracing. +.TP 5 +TRACE_TIMES +trace user and system times of updates. +.TP 5 +TRACE_TPUTS +trace tputs calls. +.TP 5 +TRACE_UPDATE +trace update actions, old & new screens. +.TP 5 +TRACE_MOVE +trace cursor movement and scrolling. +.TP 5 +TRACE_CHARPUT +trace all character outputs. +.TP 5 +TRACE_ORDINARY +trace all update actions. +The old and new screen contents are written to the trace file +for each refresh. +.TP 5 +TRACE_CALLS +trace all curses calls. +The parameters for each call are traced, as well as return values. +.TP 5 +TRACE_VIRTPUT +trace virtual character puts, i.e., calls to \fBaddch\fR. +.TP 5 +TRACE_IEVENT +trace low-level input processing, including timeouts. +.TP 5 +TRACE_BITS +trace state of TTY control bits. +.TP 5 +TRACE_ICALLS +trace internal/nested calls. +.TP 5 +TRACE_CCALLS +trace per-character calls. +.TP 5 +TRACE_DATABASE +trace read/write of terminfo/termcap data. +.TP 5 +TRACE_MAXIMUM +maximum trace level, enables all of the separate trace features. + +Some tracing features are enabled whenever the \fBtrace\fR parameter +is nonzero. Some features overlap. +The specific names are used as a guideline. +.. +.SH RETURN VALUE +Routines which return a value are designed to be used as parameters +to the \fB_tracef\fR routine. +.SH PORTABILITY +These functions are not part of the XSI interface. +Some other curses implementations are known to +have similar, undocumented features, +but they are not compatible with ncurses. +.SH SEE ALSO +\fBcurses\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/man/curs_window.3x b/man/curs_window.3x index 623514e9..4d3ca4ca 100644 --- a/man/curs_window.3x +++ b/man/curs_window.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,13 +26,20 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_window.3x,v 1.8 1999/03/20 22:38:46 tom Exp $ +.\" $Id: curs_window.3x,v 1.9 2000/07/01 20:08:37 tom Exp $ .TH curs_window 3X "" .SH NAME -\fBnewwin\fR, \fBdelwin\fR, \fBmvwin\fR, -\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, \fBdupwin\fR, -\fBwsyncup\fR, \fBsyncok\fR, \fBwcursyncup\fR, \fBwsyncdown\fR - -create \fBcurses\fR windows +\fBnewwin\fR, +\fBdelwin\fR, +\fBmvwin\fR, +\fBsubwin\fR, +\fBderwin\fR, +\fBmvderwin\fR, +\fBdupwin\fR, +\fBwsyncup\fR, +\fBsyncok\fR, +\fBwcursyncup\fR, +\fBwsyncdown\fR - create \fBcurses\fR windows .SH SYNOPSIS \fB#include \fR diff --git a/man/dft_fgbg.3x b/man/dft_fgbg.3x index 24612568..eedde7c3 100644 --- a/man/dft_fgbg.3x +++ b/man/dft_fgbg.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,35 +26,84 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" Author: Thomas E. Dickey 1997 +.\" Author: Thomas E. Dickey 1997,1999 .\" -.\" $Id: dft_fgbg.3x,v 1.6 1998/03/14 23:43:15 tom Exp $ +.\" $Id: dft_fgbg.3x,v 1.12 2000/07/04 22:31:56 tom Exp $ .TH use_default_colors 3X "" .SH NAME -\fBdft_fgbg\fR \- use terminal's default colors +\fBdft_fgbg\fR: +\fBuse_default_colors\fR, +\fBassume_default_colors\fR \- use terminal's default colors .. .SH SYNOPSIS \fB#include \fP \fBint use_default_colors(void);\fP +.br +\fBint assume_default_colors(int fg, int bg);\fP .. .SH DESCRIPTION -This is an extension to the curses library. -It is used with terminals that support ISO 6429 color, or equivalent. +The +.I use_default_colors() +and +.I assume_default_colors() +functions are extensions to the curses library. +They are used with terminals that support ISO 6429 color, or equivalent. These terminals allow the application to reset color to an unspecified default value (e.g., with SGR 39 or SGR 49). -Because they are designed to support this, their design usually includes -features to change the default foreground or background colors so that -they do not match the assumption in XSI curses of white on black. .PP Applications that paint a colored background over the whole screen -are not adversely impacted by this type of terminal design. -However, there are applications that are designed to work with -the default background. +do not take advantage of SGR 39 and SGR 49. +Some applications are designed to work with the default background, +using colors only for text. +For example, there are several implementations of the \fBls\fP program +which use colors to denote different file types or permissions. +These "color ls" programs do not necessarily modify the background color, +typically using only the \fIsetaf\fP terminfo capability to set the +foreground color. +Full-screen applications that use default colors can achieve similar +visual effects. +.PP +The first function, +.I use_default_colors() +tells the curses library to assign terminal default +foreground/background colors to color number -1. So init_pair(x,COLOR_RED,-1) +will initialize pair x as red on default background and init_pair(x,-1,COLOR_BLUE) will +initialize pair x as default foreground on blue. +.PP +The other, +.I assume_default_colors() +is a refinement which tells which colors to paint for color pair 0. +This function recognizes a special color number -1, +which denotes the default terminal color. +.PP +The following are equivalent: +.RS +.br +.I use_default_colors(); +.br +.I assume_default_colors(-1,-1); +.RE +.PP +These are ncurses extensions. +For other curses implementations, color +number -1 does not mean anything, just as for ncurses before a +successful call of \fIuse_default_colors()\fP or \fIassume_default_colors()\fP. +.PP +Other curses implementations do not allow an application to modify color pair 0. +They assume that the background is COLOR_BLACK, +but do not ensure that the color pair 0 is painted to match the +assumption. +If your application does not use either +.I use_default_colors() +or +.I assume_default_colors() +ncurses will paint a white foreground (text) with black background +for color pair 0. .. .SH RETURN VALUE -The function returns the integer \fBERR\fP upon failure and \fBOK\fP on success. -It will fail if either the terminal does not support +These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +They will fail if either the terminal does not support the \fIorig_pair\fP or \fIorig_colors\fP capability. If the \fIinitialize_pair\fP capability is found, this causes an error as well. diff --git a/man/form_field_info.3x b/man/form_field_info.3x index f64c662e..6165dd76 100644 --- a/man/form_field_info.3x +++ b/man/form_field_info.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_info.3x,v 1.5 1998/11/29 01:06:24 Rick.Ohnemus Exp $ +.\" $Id: form_field_info.3x,v 1.6 2000/04/15 22:21:31 tom Exp $ .TH form_field_info 3X "" .SH NAME \fBform_field_info\fR - retrieve field characteristics @@ -69,6 +69,10 @@ The header file \fB\fR automatically includes the header file .SH PORTABILITY These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. +.PP +A null (zero pointer) is accepted for any of the return values, +to ignore that value. +Not all implementations allow this, e.g., Solaris 2.7 does not. .SH AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. diff --git a/man/infocmp.1m b/man/infocmp.1m index 11fa2172..a7449892 100644 --- a/man/infocmp.1m +++ b/man/infocmp.1m @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -27,14 +27,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: infocmp.1m,v 1.21 1999/06/15 23:12:25 tom Exp $ +.\" $Id: infocmp.1m,v 1.25 2000/06/11 02:08:16 tom Exp $ .TH infocmp 1M "" .ds n 5 .ds d @DATADIR@/terminfo .SH NAME \fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions .SH SYNOPSIS -\fBinfocmp\fR [\fB-dceEGgnpILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] +\fBinfocmp\fR [\fB-dceEGgnpqrILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] .br [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR] .br @@ -213,16 +213,27 @@ filenames. The files are searched for pairwise matches between entries, with two entries considered to match if any of their names do. The report printed to standard output lists entries with no matches in the other file, and entries with more than one match. For entries -with exactly one match it includes a difference report. +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. .TP \fB-G\fR Display constant literals in decimal form rather than their character equivalents. +.TP +\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-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 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 don't support -the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX +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 that have their own extensions incompatible with SVr4/XSI. Available terminfo subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for details. You can also choose the subset "BSD" which selects only capabilities @@ -336,11 +347,13 @@ The \fB-G\fR, \fB-R\fR, \fB-T\fR, +\fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-g\fR, -\fB-i\fR, and -\fB-p\fR +\fB-i\fR, +\fB-p\fR, and +\fB-q\fR options are not supported in SVr4 curses. The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's. @@ -355,7 +368,7 @@ The -F option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode. .SH AUTHOR Eric S. Raymond and -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 new file mode 100644 index 00000000..867840da --- /dev/null +++ b/man/infotocap.1m @@ -0,0 +1,74 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1999,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: infotocap.1m,v 1.2 2000/03/19 02:19:49 tom Exp $ +.TH infotocap 1M "" +.ds n 5 +.ds d @DATADIR@/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 . . . +.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 +print out tracing information on standard error as the program runs. +.TP 5 +\fB-V\fR +print out the version of the program in use on standard error and exit. +.TP 5 +\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 +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. +.SH SEE ALSO +\fBcurses\fR(3X), +\fBtic\fR(1M), +\fBinfocmp\fR(1M), +\fBterminfo\fR(\*n) +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/man/man_db.renames b/man/man_db.renames index ba116a0b..8fc89981 100644 --- a/man/man_db.renames +++ b/man/man_db.renames @@ -1,4 +1,4 @@ -# $Id: man_db.renames,v 0.15 1999/10/02 23:28:13 tom Exp $ +# $Id: man_db.renames,v 0.19 2000/07/08 12:11:31 tom Exp $ # Manual-page renamings for the man_db program # captoinfo.1m captoinfo.1 @@ -14,6 +14,7 @@ curs_clear.3x clear.3ncurses curs_color.3x color.3ncurses curs_delch.3x delch.3ncurses curs_deleteln.3x deleteln.3ncurses +curs_extend.3x extensions.3ncurses curs_getch.3x getch.3ncurses curs_getstr.3x getstr.3ncurses curs_getyx.3x getyx.3ncurses @@ -41,6 +42,7 @@ curs_termattrs.3x termattrs.3ncurses curs_termcap.3x termcap.3ncurses curs_terminfo.3x terminfo.3ncurses curs_touch.3x touch.3ncurses +curs_trace.3x trace.3ncurses curs_util.3x util.3ncurses curs_window.3x window.3ncurses curses.3x ncurses.3ncurses @@ -70,6 +72,7 @@ form_requestname.3x requestname.3form form_userptr.3x userptr.3form form_win.3x win.3form infocmp.1m infocmp.1 +infotocap.1m infotocap.1 keybound.3x keybound.3ncurses keyok.3x keyok.3ncurses menu.3x menu.3menu @@ -105,6 +108,7 @@ system.3s system.3 term.5 term.5 term.7 term.7 terminfo.5 terminfo.5 +terminfo.\\\*n terminfo.5 tic.1m tic.1 toe.1m toe.1 tput.1 tput.1 diff --git a/man/manlinks.sed b/man/manlinks.sed new file mode 100644 index 00000000..92214195 --- /dev/null +++ b/man/manlinks.sed @@ -0,0 +1,68 @@ +# $Id: manlinks.sed,v 1.7 2000/07/01 19:50:06 tom Exp $ +############################################################################## +# Copyright (c) 2000 Free Software Foundation, Inc. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a # +# copy of this software and associated documentation files (the "Software"), # +# to deal in the Software without restriction, including without limitation # +# the rights to use, copy, modify, merge, publish, distribute, distribute # +# with modifications, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the # +# following conditions: # +# # +# The above copyright notice and this permission notice shall be included in # +# all copies or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # +# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # +# DEALINGS IN THE SOFTWARE. # +# # +# Except as contained in this notice, the name(s) of the above copyright # +# holders shall not be used in advertising or otherwise to promote the sale, # +# use or other dealings in this Software without prior written # +# authorization. # +############################################################################## +# 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 +/^'\\"/d +/\.\\"/d +/^\.br/d +/^\.sp/d +s/\\f.//g +s/[:,]/ /g +s/^[ ][ ]*// +s/[ ][ ]*$// +s/[ ][ ]*/ /g +s/\.SH[ ][ ]*/.SH_(/ +# +/^\.SH_(NAME/,/^\.SH_(SYNOPSIS/{ +s/\\-.*/ -/ +/ -/{ + s/ -.*// + s/ /\ +/g +} +/^-/{ + d +} +s/ /\ +/g +} +:syn +/^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{ + /^#/d + /^[^(]*$/d + s/^\([^ (]\+ [*]*\)\+//g + s/\.SH_(/.SH_/ + s/(.*// + s/\.SH_/.SH_(/ +} +/^\.SH_(DESCRIPTION/,${ + d +} +/^\./d diff --git a/man/ncurses.3x b/man/ncurses.3x index 92f30934..5aac8f2e 100644 --- a/man/ncurses.3x +++ b/man/ncurses.3x @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: ncurses.3x,v 1.35 1999/10/23 19:50:07 tom Exp $ +.\" $Id: ncurses.3x,v 1.40 2000/07/08 13:10:31 tom Exp $ .hy 0 .TH ncurses 3X "" .ds n 5 @@ -198,11 +198,23 @@ l l l l . \fBcurses\fR Routine Name/Manual Page Name = +COLOR_PAIR/\fBcurs_color\fR(3X) +PAIR_NUMBER/\fBcurs_attr\fR(3X) +_nc_tracebits/\fBcurs_trace\fR(3X)* +_traceattr/\fBcurs_trace\fR(3X)* +_traceattr2/\fBcurs_trace\fR(3X)* +_tracechar/\fBcurs_trace\fR(3X)* +_tracechtype/\fBcurs_trace\fR(3X)* +_tracechtype2/\fBcurs_trace\fR(3X)* +_tracedump/\fBcurs_trace\fR(3X)* +_tracef/\fBcurs_trace\fR(3X)* +_tracemouse/\fBcurs_trace\fR(3X)* addch/\fBcurs_addch\fR(3X) addchnstr/\fBcurs_addchstr\fR(3X) addchstr/\fBcurs_addchstr\fR(3X) addnstr/\fBcurs_addstr\fR(3X) addstr/\fBcurs_addstr\fR(3X) +assume_default_colors/\fBdft_fgbg\fR(3X)* attr_get/\fBcurs_attr\fR(3X) attr_off/\fBcurs_attr\fR(3X) attr_on/\fBcurs_attr\fR(3X) @@ -227,6 +239,7 @@ color_content/\fBcurs_color\fR(3X) color_set/\fBcurs_attr\fR(3X) copywin/\fBcurs_overlay\fR(3X) curs_set/\fBcurs_kernel\fR(3X) +curses_version/\fBcurs_extend\fR(3X)* def_prog_mode/\fBcurs_kernel\fR(3X) def_shell_mode/\fBcurs_kernel\fR(3X) define_key/\fBdefine_key\fR(3X)* @@ -284,6 +297,7 @@ intrflush/\fBcurs_inopts\fR(3X) is_linetouched/\fBcurs_touch\fR(3X) is_wintouched/\fBcurs_touch\fR(3X) isendwin/\fBcurs_initscr\fR(3X) +keybound/\fBkeybound\fR(3X)* keyname/\fBcurs_util\fR(3X) keyok/\fBkeyok\fR(3X)* keypad/\fBcurs_inopts\fR(3X) @@ -292,6 +306,7 @@ leaveok/\fBcurs_outopts\fR(3X) longname/\fBcurs_termattrs\fR(3X) mcprint/\fBcurs_print\fR(3X)* meta/\fBcurs_inopts\fR(3X) +mouse_trafo/\fBcurs_mouse\fR(3X)* mouseinterval/\fBcurs_mouse\fR(3X)* mousemask/\fBcurs_mouse\fR(3X)* move/\fBcurs_move\fR(3X) @@ -318,6 +333,7 @@ mvinsstr/\fBcurs_insstr\fR(3X) mvinstr/\fBcurs_instr\fR(3X) mvprintw/\fBcurs_printw\fR(3X) mvscanw/\fBcurs_scanw\fR(3X) +mvvline/\fBcurs_border\fR(3X) mvwaddch/\fBcurs_addch\fR(3X) mvwaddchnstr/\fBcurs_addchstr\fR(3X) mvwaddchstr/\fBcurs_addchstr\fR(3X) @@ -425,6 +441,7 @@ touchwin/\fBcurs_touch\fR(3X) tparm/\fBcurs_terminfo\fR(3X) tputs/\fBcurs_termcap\fR(3X) tputs/\fBcurs_terminfo\fR(3X) +trace/\fBcurs_trace\fR(3X)* typeahead/\fBcurs_inopts\fR(3X) unctrl/\fBcurs_util\fR(3X) ungetch/\fBcurs_getch\fR(3X) @@ -432,6 +449,7 @@ ungetmouse/\fBcurs_mouse\fR(3X)* untouchwin/\fBcurs_touch\fR(3X) use_default_colors/\fBdft_fgbg\fR(3X)* use_env/\fBcurs_util\fR(3X) +use_extended_names/\fBcurs_extend\fR(3X)* vidattr/\fBcurs_terminfo\fR(3X) vidputs/\fBcurs_terminfo\fR(3X) vline/\fBcurs_border\fR(3X) @@ -479,7 +497,7 @@ winsertln/\fBcurs_deleteln\fR(3X) winsnstr/\fBcurs_insstr\fR(3X) winsstr/\fBcurs_insstr\fR(3X) winstr/\fBcurs_instr\fR(3X) -wmouse_trafo/\fBcurs_mouse\fR(3X) +wmouse_trafo/\fBcurs_mouse\fR(3X)* wmove/\fBcurs_move\fR(3X) wnoutrefresh/\fBcurs_refresh\fR(3X) wprintw/\fBcurs_printw\fR(3X) @@ -549,14 +567,6 @@ a terminal description for terminals which are run as emulations. Use the \fBuse_env\fR function to disable this feature. .TP 5 -DISPLAY -Provides a hint to ncurses that your terminal is an X terminal -emulator such as \fBxterm\fP. -If the \fBkmous\fP capability is set to the beginning of the xterm -mouse response, e.g., "kmous=\E[M", then ncurses will send the terminal -xterm's mouse initialization strings and allow appropriate replies. -See the \fBcurs_mouse\fR(3X) manual page for programming information. -.TP 5 ESCDELAY Specifies the total time, in milliseconds, for which ncurses will await a character sequence, e.g., a function key. diff --git a/man/terminfo.tail b/man/terminfo.tail index 7b019db3..65a83c99 100644 --- a/man/terminfo.tail +++ b/man/terminfo.tail @@ -1,4 +1,4 @@ -.\" $Id: terminfo.tail,v 1.29 1999/03/07 02:09:07 tom Exp $ +.\" $Id: terminfo.tail,v 1.32 2000/04/15 20:04:58 tom Exp $ .\" Beginning of terminfo.tail file .ps +1 .PP @@ -310,7 +310,8 @@ The \fB%\fR encodings have the following meanings: \s-1%% outputs `%' %\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP as in \fBprintf\fP, flags are [-+#] and space - %c print pop() gives %c + %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() @@ -327,7 +328,7 @@ The \fB%\fR encodings have the following meanings: %= %> %< 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 parms (for ANSI terminals) + %i add 1 to first two parameters (for ANSI terminals) %? expr %t thenpart %e elsepart %; if-then-else, %e elsepart is optional. @@ -1326,16 +1327,20 @@ capabilities of the form \fBx\fR\fIx\fR. .PP .SS Similar Terminals .PP -If there are two very similar terminals, -one can be defined as being just like the other with certain exceptions. -The string capability \fBuse\fR can be given -with the name of the similar terminal. -The capabilities given before +If there are two very similar terminals, one (the variant) can be defined as +being just like the other (the base) with certain exceptions. In the +definition of the variant, the string capability \fBuse\fR can be given with +the name of the base terminal. The capabilities given before .B use -override those in the terminal type invoked by +override those in the base type named by .BR use . +If there are multiple \fBuse\fR capabilities, they are merged in reverse order. +That is, the rightmost \fBuse\fR reference is processed first, then the one to +its left, and so forth. Capabilities given explicitly in the entry override +those brought in by \fBuse\fR references. +.PP A capability can be canceled by placing \fBxx@\fR to the left of the -capability definition, where xx is the capability. +use reference that imports it, where \fIxx\fP is the capability. For example, the entry .PP 2621-nl, smkx@, rmkx@, use=2621, @@ -1425,10 +1430,6 @@ of terminfo (under HP-UX and AIX) which diverged from System V terminfo after SVr1, and have added extension capabilities to the string table that (in the binary format) collide with System V and XSI Curses extensions. .SH EXTENSIONS -The %x operator in parameterized strings is unique to the ncurses implementation -of \fBtparm\fR (it is required in order to support an unfortunate choice of -\fBinitc\fR format on the Linux console). -.PP Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, don't interpret the %A and %O operators in parameter strings. .PP diff --git a/man/tic.1m b/man/tic.1m index 7f8fe496..40f790ca 100644 --- a/man/tic.1m +++ b/man/tic.1m @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,1999 Free Software Foundation, Inc. * +.\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: tic.1m,v 1.25 1999/03/07 02:07:06 tom Exp $ +.\" $Id: tic.1m,v 1.26 2000/03/19 02:18:18 tom Exp $ .TH tic 1M "" .ds n 5 .ds d @DATADIR@/terminfo @@ -41,6 +41,7 @@ I\ N\ R\ T\ +a\ c\ f\ r\ @@ -72,8 +73,14 @@ 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-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 +entries as user-defined names. +.TP \fB-c\fR -specifies to only check \fIfile\fR for errors, including syntax problems and +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 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 @@ -171,6 +178,9 @@ are written, and the number of entries which are compiled. .TP \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 +make an extended table entry for that. .TP \fIfile\fR contains one or more \fBterminfo\fR terminal descriptions in source @@ -251,16 +261,17 @@ 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-o\fR, +\fB-C\fR, \fB-G\fR, \fB-I\fR, -\fB-C\fR, \fB-N\fR, \fB-R\fR, +\fB-T\fR, +\fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-g\fR, -\fB-T\fR, +\fB-o\fR, \fB-r\fR, \fB-s\fR and \fB-x\fR diff --git a/menu/Makefile.in b/menu/Makefile.in index d334dab0..3d802c07 100644 --- a/menu/Makefile.in +++ b/menu/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.25 1998/11/10 19:08:30 juergen Exp $ +# $Id: Makefile.in,v 1.28 2000/05/28 01:40:08 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -64,6 +64,7 @@ LD = @LD@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ \ @@ -83,7 +84,7 @@ LINK = $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib -L$(libdir) -SHLIB_LIST = $(SHLIB_DIRS) -lncurses @SHLIB_LIST@ +SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ MK_SHARED_LIB = @MK_SHARED_LIB@ @@ -105,6 +106,7 @@ AUTO_SRC = \ ################################################################################ all \ +libs \ install :: $(AUTO_SRC) $(LIBRARIES) sources : $(AUTO_SRC) diff --git a/misc/form.def b/misc/form.def index 3fbe2b56..ea43b595 100644 --- a/misc/form.def +++ b/misc/form.def @@ -1,5 +1,5 @@ LIBRARY form5 INITINSTANCE TERMINSTANCE -DESCRIPTION "NCurses-5-0-990828, module form" +DESCRIPTION "NCurses-5-1-20000704, module form" CODE LOADONCALL DATA LOADONCALL NONSHARED MULTIPLE EXPORTS diff --git a/misc/indent.pro b/misc/indent.pro new file mode 100644 index 00000000..7ddfe9b7 --- /dev/null +++ b/misc/indent.pro @@ -0,0 +1,35 @@ +/* Use this with indent 2.0 (2.1 is not acceptable, since it has more bugs) */ +/* indent 4 columns */ +-i4 +/* tab stops every 8 columns */ +-ts8 +/* cuddle 'else' */ +-ce +/* force blank lines after procedure body */ +-bap +/* do not force newline after comma in declaration */ +-nbc +/* do not force blank line after declarations */ +-nbad +/* format braces inline */ +-br +/* do not line up parentheses */ +-nlp +/* put the type of a procedure on the line before its name */ +-psl +/* do not insert a space between procedure name and '(' */ +-npcs +/* leave preprocessor space */ +-lps +/* swallow optional blank lines */ +-sob +/* continuation indent of 0 spaces */ +-ci0 +/* force space before semicolon on same line */ +-ss + +/* for vile */ +-T size_t +-T LINE +-T BUFFER +-T WINDOW diff --git a/misc/menu.def b/misc/menu.def index a84e63d1..01f973c2 100644 --- a/misc/menu.def +++ b/misc/menu.def @@ -1,5 +1,5 @@ LIBRARY menu5 INITINSTANCE TERMINSTANCE -DESCRIPTION "NCurses-5-0-990828, module menu" +DESCRIPTION "NCurses-5-1-20000704, module menu" CODE LOADONCALL DATA LOADONCALL NONSHARED MULTIPLE EXPORTS diff --git a/misc/ncurses.def b/misc/ncurses.def index 13db4bf0..fa50456f 100644 --- a/misc/ncurses.def +++ b/misc/ncurses.def @@ -1,5 +1,5 @@ LIBRARY ncurses5 INITINSTANCE TERMINSTANCE -DESCRIPTION "NCurses-5-0-990828, module ncurses" +DESCRIPTION "NCurses-5-1-20000704, module ncurses" CODE LOADONCALL DATA LOADONCALL NONSHARED MULTIPLE EXPORTS @@ -33,8 +33,8 @@ EXPORTS "_nc_curr_file_pos" @817 NONAME "_nc_curr_line" @815 NONAME "_nc_curr_token" @803 NONAME + "_nc_disable_period" @23 NONAME "_nc_do_color" @1037 NONAME - "_nc_do_xmc_glitch" @23 NONAME "_nc_doalloc" @25 NONAME "_nc_entry_match" @710 NONAME "_nc_err_abort" @826 NONAME @@ -44,115 +44,109 @@ EXPORTS "_nc_find_entry" @809 NONAME "_nc_find_type_entry" @810 NONAME "_nc_first_name" @622 NONAME + "_nc_flush" @54 NONAME "_nc_free_entries" @712 NONAME - "_nc_free_termtype" @54 NONAME - "_nc_freeall" @58 NONAME - "_nc_freewin" @59 NONAME - "_nc_get_hash_table" @60 NONAME + "_nc_free_termtype" @58 NONAME + "_nc_freeall" @59 NONAME + "_nc_freewin" @60 NONAME + "_nc_get_hash_table" @63 NONAME "_nc_get_table" @808 NONAME "_nc_get_token" @811 NONAME - "_nc_get_tty_mode" @63 NONAME + "_nc_get_tty_mode" @65 NONAME "_nc_get_type" @823 NONAME - "_nc_getenv_num" @65 NONAME - "_nc_has_mouse" @67 NONAME - "_nc_hash_map" @73 NONAME + "_nc_getenv_num" @67 NONAME + "_nc_has_mouse" @73 NONAME + "_nc_hash_map" @84 NONAME "_nc_head" @700 NONAME - "_nc_home_terminfo" @84 NONAME + "_nc_home_terminfo" @91 NONAME "_nc_info_hash_table" @804 NONAME "_nc_infoalias_table" @807 NONAME "_nc_infotocap" @830 NONAME - "_nc_init_acs" @91 NONAME + "_nc_init_acs" @92 NONAME "_nc_init_entry" @702 NONAME - "_nc_init_keytry" @92 NONAME - "_nc_keep_tic_dir" @93 NONAME - "_nc_key_names" @95 NONAME + "_nc_init_keytry" @93 NONAME + "_nc_keep_tic_dir" @95 NONAME + "_nc_key_names" @96 NONAME "_nc_keypad" @1024 NONAME - "_nc_lib_traceatr" @96 NONAME - "_nc_lib_tracedmp" @97 NONAME - "_nc_lib_tracemouse" @98 NONAME - "_nc_make_oldhash" @103 NONAME + "_nc_make_oldhash" @97 NONAME "_nc_makenew" @1025 NONAME - "_nc_memmove" @106 NONAME + "_nc_memmove" @98 NONAME "_nc_merge_entry" @704 NONAME - "_nc_msec_cost" @116 NONAME + "_nc_msec_cost" @103 NONAME "_nc_mvcur_init" @1014 NONAME - "_nc_mvcur_resume" @117 NONAME + "_nc_mvcur_resume" @106 NONAME "_nc_mvcur_wrap" @1015 NONAME "_nc_name_match" @623 NONAME - "_nc_nulls_sent" @118 NONAME - "_nc_oldnums" @119 NONAME - "_nc_ospeed" @120 NONAME + "_nc_nulls_sent" @116 NONAME + "_nc_oldnums" @117 NONAME + "_nc_ospeed" @118 NONAME "_nc_outch" @1026 NONAME "_nc_outstr" @1033 NONAME - "_nc_panelhook" @127 NONAME + "_nc_panelhook" @119 NONAME "_nc_panic_mode" @814 NONAME "_nc_parse_entry" @706 NONAME - "_nc_printf_string" @129 NONAME + "_nc_printf_string" @120 NONAME "_nc_push_token" @812 NONAME "_nc_read_entry" @620 NONAME "_nc_read_entry_source" @709 NONAME "_nc_read_file_entry" @621 NONAME - "_nc_read_termcap" @130 NONAME - "_nc_remove_key" @132 NONAME - "_nc_remove_string" @137 NONAME + "_nc_read_termcap" @127 NONAME + "_nc_remove_key" @129 NONAME + "_nc_remove_string" @130 NONAME "_nc_render" @1027 NONAME "_nc_reset_input" @813 NONAME "_nc_resolve_uses" @711 NONAME - "_nc_ripoffline" @142 NONAME + "_nc_ripoffline" @132 NONAME "_nc_save_str" @703 NONAME - "_nc_screen_chain" @143 NONAME - "_nc_screen_init" @144 NONAME - "_nc_screen_resume" @145 NONAME - "_nc_screen_wrap" @146 NONAME - "_nc_scroll_oldhash" @147 NONAME + "_nc_screen_chain" @137 NONAME + "_nc_screen_init" @142 NONAME + "_nc_screen_resume" @143 NONAME + "_nc_screen_wrap" @144 NONAME + "_nc_scroll_oldhash" @145 NONAME "_nc_scroll_optimize" @1029 NONAME "_nc_scroll_window" @1030 NONAME - "_nc_scrolln" @148 NONAME - "_nc_set_buffer" @152 NONAME + "_nc_scrolln" @146 NONAME + "_nc_set_buffer" @147 NONAME "_nc_set_source" @822 NONAME - "_nc_set_tty_mode" @158 NONAME + "_nc_set_tty_mode" @148 NONAME "_nc_set_type" @824 NONAME - "_nc_set_writedir" @159 NONAME + "_nc_set_writedir" @152 NONAME "_nc_setupscreen" @1031 NONAME - "_nc_sigaction" @160 NONAME + "_nc_sigaction" @158 NONAME "_nc_signal_handler" @1034 NONAME - "_nc_slk_format" @161 NONAME - "_nc_slk_initialize" @162 NONAME + "_nc_slk_format" @159 NONAME + "_nc_slk_initialize" @160 NONAME "_nc_start_line" @821 NONAME "_nc_suppress_warnings" @828 NONAME "_nc_synchook" @1035 NONAME "_nc_syntax" @820 NONAME "_nc_syserr_abort" @825 NONAME "_nc_tail" @701 NONAME - "_nc_tic_dir" @167 NONAME - "_nc_tic_expand" @169 NONAME - "_nc_tic_written" @170 NONAME + "_nc_tic_dir" @161 NONAME + "_nc_tic_expand" @162 NONAME + "_nc_tic_written" @167 NONAME "_nc_timed_wait" @1036 NONAME - "_nc_tinfo_fkeys" @172 NONAME - "_nc_trace_buf" @178 NONAME - "_nc_trace_tries" @183 NONAME - "_nc_trace_xnames" @184 NONAME - "_nc_tracebits" @185 NONAME + "_nc_tinfo_fkeys" @169 NONAME "_nc_tracing" @1010 NONAME - "_nc_trans_string" @186 NONAME - "_nc_user_definable" @187 NONAME + "_nc_trans_string" @170 NONAME + "_nc_user_definable" @172 NONAME "_nc_visbuf" @1012 NONAME - "_nc_visbuf2" @188 NONAME - "_nc_vsscanf" @189 NONAME + "_nc_visbuf2" @178 NONAME + "_nc_vsscanf" @183 NONAME "_nc_waddch_nosync" @1028 NONAME "_nc_warning" @827 NONAME "_nc_wrap_entry" @705 NONAME "_nc_write_entry" @708 NONAME - "_tracechar" @403 NONAME "acs_map" @506 NONAME "addch" @1 NONAME "addchnstr" @2 NONAME "addchstr" @3 NONAME "addnstr" @4 NONAME "addstr" @5 NONAME + "assume_default_colors" @184 NONAME "attr_get" @14 NONAME - "attr_off" @193 NONAME - "attr_on" @211 NONAME + "attr_off" @185 NONAME + "attr_on" @186 NONAME "attr_set" @17 NONAME "attroff" @11 NONAME "attron" @12 NONAME @@ -174,14 +168,15 @@ EXPORTS "clrtobot" @33 NONAME "clrtoeol" @34 NONAME "color_content" @35 NONAME - "color_set" @234 NONAME + "color_set" @187 NONAME "copywin" @37 NONAME "cur_term" @515 NONAME "curs_set" @38 NONAME "curscr" @501 NONAME + "curses_version" @188 NONAME "def_prog_mode" @39 NONAME "def_shell_mode" @40 NONAME - "define_key" @238 NONAME + "define_key" @189 NONAME "del_curterm" @641 NONAME "delay_output" @41 NONAME "delch" @42 NONAME @@ -194,11 +189,12 @@ EXPORTS "echo" @49 NONAME "echochar" @50 NONAME "endwin" @52 NONAME + "erase" @193 NONAME "erasechar" @53 NONAME "filter" @55 NONAME "flash" @56 NONAME "flushinp" @57 NONAME - "getbkgd" @240 NONAME + "getbkgd" @211 NONAME "getch" @61 NONAME "getmouse" @356 NONAME "getnstr" @62 NONAME @@ -208,7 +204,7 @@ EXPORTS "has_colors" @69 NONAME "has_ic" @70 NONAME "has_il" @71 NONAME - "has_key" @242 NONAME + "has_key" @234 NONAME "hline" @72 NONAME "idcok" @74 NONAME "idlok" @75 NONAME @@ -230,16 +226,16 @@ EXPORTS "is_linetouched" @100 NONAME "is_wintouched" @101 NONAME "isendwin" @99 NONAME - "keybound" @251 NONAME + "keybound" @238 NONAME "keyname" @102 NONAME - "keyok" @263 NONAME + "keyok" @240 NONAME "keypad" @104 NONAME "killchar" @105 NONAME "leaveok" @107 NONAME "longname" @108 NONAME - "mcprint" @266 NONAME + "mcprint" @242 NONAME "meta" @109 NONAME - "mouse_trafo" @270 NONAME + "mouse_trafo" @251 NONAME "mouseinterval" @360 NONAME "mousemask" @358 NONAME "move" @110 NONAME @@ -323,7 +319,7 @@ EXPORTS "reset_prog_mode" @222 NONAME "reset_shell_mode" @223 NONAME "resetty" @221 NONAME - "resizeterm" @272 NONAME + "resizeterm" @263 NONAME "restartterm" @643 NONAME "ripoffline" @224 NONAME "savetty" @225 NONAME @@ -339,13 +335,13 @@ EXPORTS "set_term" @236 NONAME "setscrreg" @235 NONAME "setupterm" @644 NONAME - "slk_attr" @274 NONAME - "slk_attr_set" @276 NONAME + "slk_attr" @266 NONAME + "slk_attr_set" @270 NONAME "slk_attroff" @237 NONAME "slk_attron" @239 NONAME "slk_attrset" @241 NONAME "slk_clear" @243 NONAME - "slk_color" @278 NONAME + "slk_color" @272 NONAME "slk_init" @244 NONAME "slk_label" @245 NONAME "slk_noutrefresh" @246 NONAME @@ -373,24 +369,23 @@ EXPORTS "tigetflag" @260 NONAME "tigetnum" @261 NONAME "tigetstr" @262 NONAME - "timeout" @284 NONAME + "timeout" @274 NONAME "tparm" @653 NONAME "tputs" @655 NONAME - "trace" @405 NONAME "ttytype" @514 NONAME "typeahead" @264 NONAME "unctrl" @361 NONAME "ungetch" @265 NONAME "ungetmouse" @357 NONAME "untouchwin" @267 NONAME - "use_default_colors" @285 NONAME + "use_default_colors" @276 NONAME "use_env" @268 NONAME - "use_extended_names" @286 NONAME + "use_extended_names" @278 NONAME "vidattr" @269 NONAME "vidputs" @271 NONAME "vline" @273 NONAME - "vw_printw" @287 NONAME - "vw_scanw" @294 NONAME + "vw_printw" @284 NONAME + "vw_scanw" @285 NONAME "vwprintw" @275 NONAME "vwscanw" @277 NONAME "waddch" @279 NONAME @@ -401,7 +396,7 @@ EXPORTS "wattr_get" @291 NONAME "wattr_off" @293 NONAME "wattr_on" @292 NONAME - "wattr_set" @297 NONAME + "wattr_set" @286 NONAME "wattroff" @289 NONAME "wattron" @288 NONAME "wattrset" @290 NONAME @@ -412,7 +407,7 @@ EXPORTS "wclear" @302 NONAME "wclrtobot" @303 NONAME "wclrtoeol" @304 NONAME - "wcolor_set" @298 NONAME + "wcolor_set" @287 NONAME "wcursyncup" @305 NONAME "wdelch" @306 NONAME "wdeleteln" @307 NONAME @@ -433,7 +428,7 @@ EXPORTS "winsnstr" @328 NONAME "winsstr" @329 NONAME "winstr" @330 NONAME - "wmouse_trafo" @300 NONAME + "wmouse_trafo" @294 NONAME "wmove" @338 NONAME "wnoutrefresh" @339 NONAME "wprintw" @340 NONAME diff --git a/misc/panel.def b/misc/panel.def index 3d7dc9ca..30ce1d65 100644 --- a/misc/panel.def +++ b/misc/panel.def @@ -1,13 +1,8 @@ LIBRARY panel5 INITINSTANCE TERMINSTANCE -DESCRIPTION "NCurses-5-0-990828, module panel" +DESCRIPTION "NCurses-5-1-20000704, module panel" CODE LOADONCALL DATA LOADONCALL NONSHARED MULTIPLE EXPORTS - "_nc_calculate_obscure" @16 NONAME - "_nc_free_obscure" @17 NONAME - "_nc_override" @18 NONAME - "_nc_panel_is_linked" @19 NONAME - "_nc_panel_link_bottom" @20 NONAME "bottom_panel" @7 NONAME "del_panel" @5 NONAME "hide_panel" @3 NONAME diff --git a/misc/run_tic.sh b/misc/run_tic.sh index a5170773..cdb6a5ea 100755 --- a/misc/run_tic.sh +++ b/misc/run_tic.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -29,7 +29,7 @@ # # Author: Thomas E. Dickey 1996 # -# $Id: run_tic.sh,v 1.10 1998/05/31 00:29:34 mooney Exp $ +# $Id: run_tic.sh,v 1.12 2000/07/01 19:25:13 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. # @@ -118,6 +118,17 @@ if test "x$TABSET" != "x/usr/share/tabset" ; then SRC=$TMP fi +cat < 1996 # -# $Id: shlib,v 1.5 1998/05/31 00:29:38 mooney Exp $ +# $Id: shlib,v 1.6 2000/05/20 23:01:17 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, @@ -55,6 +55,9 @@ # Using a conventional link, with -L and -l options on Linux results in a # statically linked executable, which we don't want at all. # +# Special cases: +# +# BeOS R4.5 uses $LIBRARY_PATH rather than $LD_LIBRARY_PATH. # # Make sure that we use the PATH that was set in run_tic.sh @@ -74,6 +77,8 @@ done if test -n "$q" ; then if test -n "$LD_LIBRARY_PATH"; then LD_LIBRARY_PATH="$q:$LD_LIBRARY_PATH" + elif test -n "$LIBRARY_PATH" ; then + LIBRARY_PATH="$q:$LIBRARY_PATH" else LD_LIBRARY_PATH="$q" fi diff --git a/misc/terminfo.src b/misc/terminfo.src index ee3db89d..c99b2132 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -1,18 +1,20 @@ ######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE # # This version of terminfo.src is distributed with ncurses. +# Report bugs to +# bug-ncurses@gnu.org # # Version 10.2.1 -# $Date: 1999/10/24 00:28:48 $ +# $Date: 2000/07/01 21:23:58 $ # terminfo syntax # # Eric S. Raymond (current maintainer) # John Kunze, Berkeley # Craig Leres, Berkeley # -# Please e-mail changes to terminfo@ccil.org; the old termcap@berkeley.edu +# Please e-mail changes to terminfo@thyrsus.com; the old termcap@berkeley.edu # address is no longer valid. The latest version can always be found at -# . +# . # # PURPOSE OF THIS FILE: # @@ -28,7 +30,7 @@ # termcap/terminfo versions. # # Pointers to related resources (including the ncurses distribution) may -# be found at . +# be found at . # # INTERNATIONALIZATION: # @@ -191,8 +193,8 @@ # the inverse sense from the cup string). The typical CPR value is # \E[%i%d;%dR (on VT100/ANSI/ECMA-48-compatible terminals). # -# These capabilities are used by tac(1m), the terminfo action checker soon -# to be distributed with ncurses. +# These capabilities are used by tack(1m), the terminfo action checker +# (distributed with ncurses 5.0). # # TABSET FILES # @@ -210,7 +212,7 @@ # As the ANSI/ECMA-48 standard and variants take firmer hold, and as # character-cell terminals are increasingly replaced by X displays, much of # this file is becoming a historical document (this is part of the reason for -# the new organization, which puts ANSI types, xterm, free-Unix consoles, +# the new organization, which puts ANSI types, xterm, Unix consoles, # and vt100 up front in confidence that this will catch 95% of new hardware). # # For the terminal types still alive, I'd like to have manufacturer's @@ -255,7 +257,7 @@ ######## ANSI, UNIX CONSOLE, AND SPECIAL TYPES # -# This section describes terminal classes and maker brands that are still +# This section describes terminal classes and brands that are still # quite common. # @@ -273,20 +275,71 @@ dumb|80-column dumb tty, unknown|unknown terminal type, gn, use=dumb, lpr|printer|line printer, - hc, os, + OTbs, hc, os, cols#132, lines#66, bel=^G, cr=^M, cub1=^H, cud1=^J, ff=^L, ind=^J, glasstty|classic glass tty interpreting ASCII control characters, - am, + OTbs, am, cols#80, - bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, ht=^I, kbs=^H, - kcub1=^H, kcud1=^J, nel=^M^J, + bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, ht=^I, kcub1=^H, + kcud1=^J, nel=^M^J, .kbs=^H, + +vanilla, + OTbs, + bel=^G, cr=^M, cud1=^J, ind=^J, #### ANSI.SYS/ISO 6429/ECMA-48 Capabilities # # See the end-of-file comment for more on these. # +# ANSI capabilities are broken up into pieces, so that a terminal +# implementing some ANSI subset can use many of them. +ansi+local1, + cub1=\E[D, cud1=\E[B, cuf1=\E[C, cuu1=\E[A, +ansi+local, + cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, + cuu=\E[%p1%dA, use=ansi+local1, +ansi+tabs, + cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[2g, +ansi+inittabs, + it#8, use=ansi+tabs, +ansi+erase, + clear=\E[H\E[J, ed=\E[J, el=\E[K, +ansi+rca, + hpa=\E[%p1%{1}%+%dG, vpa=\E[%p1%{1}%+%dd, +ansi+cup, + cup=\E[%i%p1%d;%p2%dH, home=\E[H, +ansi+rep, + rep=%p1%c\E[%p2%{1}%-%db, +ansi+idl1, + dl1=\E[M, il1=\E[L, +ansi+idl, + dl=\E[%p1%dM, il=\E[%p1%dL, use=ansi+idl1, +ansi+idc, + dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, rmir=\E6, smir=\E6, +ansi+arrows, + kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + khome=\E[H, +ansi+sgr|ansi graphic renditions, + blink=\E[5m, invis=\E[8m, rev=\E[7m, sgr0=\E[0m, +ansi+sgrso|ansi standout only, + rmso=\E[m, smso=\E[7m, +ansi+sgrul|ansi underline only, + rmul=\E[m, smul=\E[4m, +ansi+sgrbold|ansi graphic renditions; assuming terminal has bold; not dim, + bold=\E[1m, + sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, + use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul, +ansi+sgrdim|ansi graphic renditions; assuming terminal has dim; not bold, + dim=\E[2m, + sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t2;%;m, + use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul, +ansi+pp|ansi printer port, + mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, +ansi+csr|ansi scroll-region plus cursor save & restore, + csr=\E[%i%p1%d;%p2%dr, rc=\E8, sc=\E7, + # The IBM PC alternate character set. Plug this into any Intel console entry. # We use \E[11m for rmacs rather than \E[12m so the string can use the # ROM graphics for control characters such as the diamond, up- and down-arrow. @@ -339,13 +392,13 @@ klone+color|color control for ansi.sys and ISO6429-compatible displays, # 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, # Attribute control for ECMA-48-compatible terminals ecma+sgr|attribute capabilities for true ECMA-48 terminals, - rmso=\E[27m, rmul=\E[24m, - use=klone+sgr, + rmso=\E[27m, rmul=\E[24m, use=klone+sgr, # For comparison, here are all the capabilities implied by the Intel # Binary Compatibility Standard (level 2) that fit within terminfo. @@ -368,12 +421,26 @@ ibcs2|Intel Binary Compatibility Standard prescriptions, # if you're in doubt about what `ANSI' matches yours, try them in that # order and back off from the first that breaks. +# ansi-mr is for ANSI terminals with ONLY relative cursor addressing +# and more than one page of memory. It uses local motions instead of +# direct cursor addressing, and makes almost no assumptions. It does +# assume auto margins, no padding and/or xon/xoff, and a 24x80 screen. +ansi-mr|mem rel cup ansi, + am, xon, + cols#80, lines#24, use=vanilla, use=ansi+erase, + use=ansi+local1, + +# ansi-mini is a bare minimum ANSI terminal. This should work on anything, but +# beware of screen size problems and memory relative cursor addressing. ansi-mini|any ansi terminal with pessimistic assumptions, - am, - cols#80, it#8, lines#24, - clear=\E[H\E[2J$<50>, cub1=\E[D, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[K, home=\E[H, - ht=^I, + am, xon, + cols#80, lines#24, use=vanilla, use=ansi+cup, + use=ansi+erase, + +# ansi-mtabs adds relative addressing and minimal tab support +ansi-mtabs|any ansi terminal with pessimistic assumptions, + it#8, + ht=^I, use=ansi+local1, use=ansi-mini, # ANSI X3.64 from emory!mlhhh (Hugh Hansard) via BRL # @@ -401,17 +468,18 @@ ansi-mini|any ansi terminal with pessimistic assumptions, # # USENET {akgua,msdc,sb1,sb6,gatech}!emory!mlhhh. # +# (Added vt100 , to quiet a tic warning --esr) ansi77|ansi 3.64 standard 1977 version, - am, mir, + OTbs, am, mir, cols#80, it#8, lines#24, bel=^G, clear=\E[;H\E[2J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M$<5*/>, ed=\E[J, el=\E[K, home=\E[H, ht=^I, il1=\E[L$<5*/>, ind=\ED, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, - kf2=\EOR, kf4=\EOS, khome=\E[H, nel=^M\ED, ri=\EM, - rmir=\E[4l, rmso=\E[m, rmul=\E[m, smir=\E[4h, smso=\E[7m, - smul=\E[4m, + kf2=\EOR, kf4=\EOS, khome=\E[H, nel=^M\ED, rc=\E8, ri=\EM, + rmir=\E[4l, rmso=\E[m, rmul=\E[m, sc=\E7, smir=\E[4h, + smso=\E[7m, smul=\E[4m, # Procomm and some other ANSI emulations don't recognize all of the ANSI- # standard capabilities. This entry deletes , , , , and @@ -424,7 +492,7 @@ ansi77|ansi 3.64 standard 1977 version, # ANSI.SYS influence. # From: Eric S. Raymond Oct 30 1995 pcansi-m|pcansi-mono|ibm-pc terminal programs claiming to be ansi (mono mode), - am, mir, msgr, + OTbs, am, mir, msgr, cols#80, it#8, lines#24, bel=^G, cbt=\E[Z, clear=\E[H\E[J, cr=^M, cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, @@ -469,8 +537,21 @@ ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes, # From: Eric S. Raymond Nov 6 1995 ansi|ansi/pc-term compatible with color, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c, - u9=\E[c, - use=ecma+color, use=klone+sgr, use=ansi-m, + u9=\E[c, use=ecma+color, use=klone+sgr, use=ansi-m, + +# ansi-generic is a vanilla ANSI terminal. This is assumed to implement +# all the normal ANSI stuff with no extensions. It assumes +# insert/delete line/char is there, so it won't work with +# vt100 clones. It assumes video attributes for bold, blink, +# underline, and reverse, which won't matter much if the terminal +# can't do some of those. Padding is assumed to be zero, which +# shouldn't hurt since xon/xoff is assumed. +ansi-generic|generic ansi standard terminal, + am, xon, + cols#80, lines#24, use=vanilla, use=ansi+csr, use=ansi+cup, + use=ansi+rca, use=ansi+erase, use=ansi+tabs, + use=ansi+local, use=ansi+idc, use=ansi+idl, use=ansi+rep, + use=ansi+sgrbold, use=ansi+arrows, #### DOS ANSI.SYS variants # @@ -481,15 +562,14 @@ ansi|ansi/pc-term compatible with color, # keys F1-F10 (%p1 values outside this range will yield unpredictable results). # From: Eric S. Raymond Nov 7 1995 ansi.sys-old|ANSI.SYS under PC-DOS 2.1, - am, mir, msgr, xon, + OTbs, am, mir, msgr, xon, cols#80, lines#25, clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H, is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u, rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR, - u7=\E[6n, - use=klone+color, use=klone+sgr, + u7=\E[6n, use=klone+color, use=klone+sgr, ansi.sys|ANSI.SYS 3.1 and later versions, el=\E[K, use=ansi.sys-old, @@ -515,7 +595,8 @@ ansi.sysk|ansisysk|PC-DOS 3.1 ANSI.SYS with keypad redefined for vi, # Adds ins/del line/character, hence vi reverse scrolls/inserts/deletes nicer. nansi.sys|nansisys|PC-DOS Public Domain NANSI.SYS, dch1=\E[1P, dl1=\E[1M, ich1=\E[1@, il1=\E[1L, - is2=U3 PC-DOS Public Domain NANSI.SYS 9-23-86\n, use=ansi.sys, + is2=U3 PC-DOS Public Domain NANSI.SYS 9-23-86\n, + use=ansi.sys, # # See ansi.sysk and nansi.sys above. nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi, @@ -533,26 +614,55 @@ beterm|BeOS Terminal, am, eo, mir, msgr, xenl, xon, colors#8, cols#80, it#8, lines#25, ncv#5, pairs#64, bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, 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, - 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, kbs=^H, - kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kend=\E[4~, kf1=\E[11~, kf10=\E[20~, - kf11=\E[21~, kf12=\E[22~, kf2=\E[12~, kf3=\E[13~, - kf4=\E[14~, kf5=\E[15~, kf6=\E[16~, kf7=\E[17~, kf8=\E[18~, - kf9=\E[19~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - kspd=^Z, nel=^M^J, op=\E[m, rc=\E8, rev=\E[7m, ri=\EM, - rmir=\E[4l, rmso=\E[m, rmul=\E[24m, rs1=\Ec, sc=\E7, + csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, + 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, + 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, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, + il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, + kend=\E[4~, kf1=\E[11~, kf10=\E[20~, kf11=\E[21~, + kf12=\E[22~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, + kf5=\E[15~, kf6=\E[16~, kf7=\E[17~, kf8=\E[18~, kf9=\E[19~, + khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z, + nel=^M^J, op=\E[m, rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, + rmkx=\E[?4l, rmso=\E[m, rmul=\E[24m, rs1=\Ec, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[%p1%{40}%+%cm, setf=\E[%p1%{30}%+%cm, - sgr0=\E[0;10m, smir=\E[4h, smso=\E[7m, smul=\E[4m, - u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, vpa=\E[%i%p1%dd, + sgr0=\E[0;10m, smir=\E[4h, smkx=\E[?4h, smso=\E[7m, + smul=\E[4m, u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, + vpa=\E[%i%p1%dd, #### Linux consoles # +# This entry is good for the 1.2.13 or later version of the Linux console. +# +# *************************************************************************** +# * * +# * WARNING: * +# * Linuxes come with a default keyboard mapping kcbt=^I. This entry, in * +# * response to user requests, assumes kcbt=\E[Z, the ANSI/ECMA reverse-tab * +# * character. Here are the keymap replacement lines that will set this up: * +# * * +# keycode 15 = Tab Tab +# alt keycode 15 = Meta_Tab +# shift keycode 15 = F26 +# string F26 ="\033[Z" +# * * +# * This has to use a key slot which is unfortunate (any unused one will * +# * do, F26 is the higher-numbered one). The change ought to be built * +# * into the kernel tables. * +# * * +# *************************************************************************** +# +# The 1.3.x kernels add color-change capabilities; if yours doesn't have this +# and it matters, turn off . The %02x escape used to implement this is +# not back-portable to SV curses and not supported in ncurses versions before +# 1.9.9. All linux kernels since 1.2.13 (at least) set the screen size +# themselves; this entry assumes that capability. +# # This entry is good for the 1.2.13 or later version of the Linux console. # # *************************************************************************** @@ -584,7 +694,7 @@ beterm|BeOS Terminal, # reported by Frank Heckenbach . linux|linux console, am, bce, eo, mir, msgr, xenl, xon, - it#8, ncv#2, + it#8, ncv#18, 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, civis=\E[?25l\E[?1c, clear=\E[H\E[J, cnorm=\E[?25h\E[?0c, cr=^M, csr=\E[%i%p1%d;%p2%dr, @@ -600,9 +710,9 @@ linux|linux console, 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, rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmso=\E[27m, - rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, + khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, + kspd=^Z, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, + rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, smir=\E[4h, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd, @@ -613,20 +723,17 @@ linux-m|Linux console no color, linux-c-nc|linux console 1.3.x hack for ncurses only, ccc, initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, - oc=\E]R, - use=linux, + oc=\E]R, use=linux, # From: Dennis Henriksen , 9 July 1996 linux-c|linux console 1.3.6+ with private palette for each virtual console, ccc, colors#8, pairs#64, initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%p3%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%p4%{255}%&%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'A'%+%c%e%gx%d%;, - oc=\E]R, - use=linux, + oc=\E]R, use=linux, # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file linux-nic|linux with ich/ich1 suppressed for non-curses programs, - ich@, ich1@, - use=linux, + ich@, ich1@, use=linux, # This assumes you have used setfont(8) to load one of the Linux koi8-r fonts. # acsc entry from Pavel Roskin" , 29 Sep 1997. @@ -637,10 +744,17 @@ linux-koi8|linux with koi8 alternate character set, # Another entry for KOI8-r with Qing Long's acsc. # (which one better complies with the standard?) linux-koi8r|linux with koi8-r alternate character set, - kbs=^H, kcub1=^H, kcud1=^J, use=linux, use=klone+koi8acs, -# From: Matthew Vernon +# Entry for the latin1 and latin2 fonts +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, + +#### Mach +# + +# From: Matthew Vernon mach|Mach Console, am, km, cols#80, it#8, lines#25, @@ -653,16 +767,25 @@ mach|Mach Console, kdch1=\E[9, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kich1=\E[@, kll=\E[F, knp=\E[U, - kpp=\E[V, nel=^M^J, rev=\E[7m, rmso=\E[0m, sgr0=\E[0m, - smso=\E[7m, + kpp=\E[V, rev=\E[7m, rmso=\E[0m, rmul=\E[24m, sgr0=\E[0m, + smso=\E[7m, smul=\E[4m, mach-bold|Mach Console with bold instead of underline, - rmul=\E[0m, smul=\E[1m, - use=mach, + rmul=\E[0m, smul=\E[1m, use=mach, +mach-color|Mach Console with ANSI color, + colors#8, pairs#64, + dim=\E[2m, invis=\E[8m, op=\E[37;40m, rmso=\E[27m, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=mach, -# Entry for the latin1 and latin2 fonts -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, +#### OSF Unix +# + +# OSF/1 1.1 Snapshot 2 +pmcons|pmconsole|PMAX console, + am, + cols#128, lines#57, + bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuu1=^K, ht=^I, + ind=^J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, # SCO console and SOS-Syscons console for 386bsd # (scoansi: had unknown capabilities @@ -682,7 +805,7 @@ linux-lat|linux with latin1 or latin2 alternate character set, # F25-F36 are control F1-F12 # F37-F48 are shift+control F1-F12 scoansi|SCO Extended ANSI standard crt, - am, eo, xon, + OTbs, am, eo, xon, colors#8, cols#80, it#8, lines#25, pairs#64, acsc=0[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`ja0fxgqh2jYk?lZm@nEqDtCu4vAwBx3~y, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[2J, @@ -731,11 +854,10 @@ att6386|at386|386at|AT&T WGS 6386 console, sc=\E7, sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m, sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m, - tbc=\E[2g, vpa=\E[%i%p1%dd, - use=klone+color, + tbc=\E[2g, vpa=\E[%i%p1%dd, use=klone+color, # (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr) pc6300plus|AT&T 6300 plus, - am, xon, + OTbs, am, xon, cols#80, lines#24, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[=C, clear=\E[2J\E[H, cnorm=\E[=1C, cr=^M, cub1=^H, cud1=\E[B, @@ -950,8 +1072,7 @@ iris-ansi|iris-ansi-net|IRIS emulating 40 line ANSI terminal (almost VT100), tbc=\E[3g, iris-ansi-ap|IRIS ANSI in application-keypad mode, is2=\E[?1l\E=\E[?7h, kent=\EOM, kf10=\E[010q, - kf11=\E[011q, kf12=\E[012q, kf9=\E[009q, - use=iris-ansi, + kf11=\E[011q, kf12=\E[012q, kf9=\E[009q, use=iris-ansi, # From the man-page, this is a quasi-vt100 emulator that runs on SGI's IRIX # (T.Dickey 98/1/24) @@ -991,16 +1112,17 @@ pcix|PC/IX console, # ":kh=\E[Y:". Added IBM-PC forms characters and highlights, they match # what was there before. -- esr) ibmpcx|xenix|ibmx|IBM PC xenix console display, - am, msgr, + OTbs, am, msgr, cols#80, lines#25, clear=^L, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ich1=\E[@, il1=\E[L, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[d, kf1=\E[K, kf2=\E[L, kf3=\E[M, kf4=\E[N, khome=\E[Y, knp=\E[e, - kpp=\E[Z, - use=klone+acs, use=klone+sgr, + kpp=\E[Z, use=klone+acs, use=klone+sgr, +#### QNX +# # QNX 4.0 Console # Michael's original version of this entry had , , @@ -1070,8 +1192,7 @@ qnx|qnx4|qnx console, qnxt2|qnx 2.15 serial terminal, am, civis@, cnorm@, cvvis@, dch1@, ich1@, kRES@, kRPL@, kUND@, kspd@, - rep@, rmcup@, rmso=\E>, setb@, setf@, smcup@, smso=\E<, - use=qnx4, + rep@, rmcup@, rmso=\E>, setb@, setf@, smcup@, smso=\E<, use=qnx4, #### NetBSD consoles # @@ -1180,8 +1301,8 @@ arm100|arm100-am|Arm(RiscPC) ncurses compatible (for 640x480), 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$<2>, smacs=^N, smam=\E[?7h, smkx=\E[?1h\E=, - smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, - use=ecma+sgr, use=klone+color, + smso=\E[7m$<2>, smul=\E[4m$<2>, tbc=\E[3g, use=ecma+sgr, + use=klone+color, arm100-w|arm100-wam|Arm(RiscPC) ncurses compatible (for 1024x768), cols#132, lines#50, use=arm100, @@ -1233,6 +1354,30 @@ rcons-color|BSD rasterconsole with ANSI color, colors#8, pairs#64, op=\E[m, setab=\E[4%dm, setaf=\E[3%dm, use=rcons, +# mgterm -- MGL/MGL2, MobileGear Graphic Library +# for PocketBSD,PocketLinux,NetBSD/{hpcmips,mac68k} +# -- the setf/setb are probably incorrect, more likely setaf/setab -TD +# -- compare with cons25w +mgterm, + OTbs, OTpt, am, bce, bw, eo, km, msgr, npc, + colors#8, cols#80, it#8, lines#18, pairs#64, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, + cr=^M, csr=\E[%i%p1%d;%p2%dr, 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, dim=\E[30;1m, 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%d`, ht=^I, ich=\E[%p1%d@, + ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, + indn=\E[%p1%dS, kb2=\E[E, kbs=^H, kcbt=\E[Z, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[F, + kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, kf2=\E[N, + kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, + kf9=\E[U, khome=\E[H, kich1=\E[L, knp=\E[G, kpp=\E[I, + nel=\E[E, op=\E[x, rc=\E8, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, + rmso=\E[m, rs2=\E[x\E[m\Ec, sc=\E7, setb=\E[4%p1%dm, + setf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, + #### FreeBSD console entries # # From: Andrey Chernov 29 Mar 1996 @@ -1272,7 +1417,7 @@ cons25w|ansiw|ansi80x25-raw|freebsd console (25-line raw mode), kf11=\E[W, kf12=\E[X, kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[L, knp=\E[G, kpp=\E[I, nel=\E[E, op=\E[x, rev=\E[7m, - ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, rs1=\E[x\E[m\Ec, + ri=\E[T, rin=\E[%p1%dT, rmso=\E[m, rs2=\E[x\E[m\Ec, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[m, smso=\E[7m, vpa=\E[%i%p1%dd, cons25|ansis|ansi80x25|freebsd console (25-line ansi mode), @@ -1280,7 +1425,8 @@ cons25|ansis|ansi80x25|freebsd console (25-line ansi mode), use=cons25w, cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode), colors@, pairs@, - bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, use=cons25, + bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, + use=cons25, cons30|ansi80x30|freebsd console (30-line ansi mode), lines#30, use=cons25, cons30-m|ansi80x30-mono|freebsd console (30-line mono ansi mode), @@ -1317,7 +1463,8 @@ cons25l1|cons25-iso8859|freebsd console w/iso 8859-1 chars, use=cons25w, cons25l1-m|cons25-iso-m|freebsd console w/iso 8859-1 chars (mono), colors@, pairs@, - bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, use=cons25l1, + bold@, dim@, op@, rmul=\E[m, setab@, setaf@, smul=\E[4m, + use=cons25l1, cons50l1|cons50-iso8859|freebsd console w/iso 8859-1 chars (50 lines), lines#50, use=cons25l1, cons50l1-m|cons50-iso-m|freebsd console w/iso 8859-1 chars (50-line mono), @@ -1334,7 +1481,7 @@ cons60l1-m|cons60-iso-m|freebsd console w/iso 8859-1 chars (60-line mono), # Some places it's named oldpc3|oldibmpc3. # From: Alex R.N. Wetmore origpc3|origibmpc3|IBM PC 386BSD Console, - am, bw, eo, xon, + OTbs, am, bw, eo, xon, cols#80, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263, bold=\E[7m, clear=\Ec, cub1=^H, cud1=\E[B, cuf1=\E[C, @@ -1346,7 +1493,7 @@ origpc3|origibmpc3|IBM PC 386BSD Console, # description of BSD/386 console emulator in version 1.0 (supplied by BSDI) oldpc3|oldibmpc3|old IBM PC BSD/386 Console, - km, + OTbs, km, lines#25, bel=^G, bold=\E[=15F, cr=^M, cud1=^J, dim=\E[=8F, dl1=\E[M, ht=^I, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B, @@ -1361,8 +1508,15 @@ oldpc3|oldibmpc3|old IBM PC BSD/386 Console, # "stty rows NN", e.g. to use 24 lines. # (Color support from Kevin Rosenberg , 2 May 1996) # Bug: The capability resets attributes. +bsdos-pc|IBM PC BSD/OS Console, + sgr=\E[0;10%?%p1%t;7%;%?%p2%t;1%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, + use=bsdos-pc-nobold, + bsdos-pc-nobold|BSD/OS PC console w/o bold, - am, eo, km, xon, + use=klone+color, use=bsdos-pc-m, + +bsdos-pc-m|bsdos-pc-mono|BSD/OS PC console mono, + OTbs, am, eo, km, xon, cols#80, it#8, lines#25, bel=^G, clear=\Ec, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, @@ -1372,9 +1526,7 @@ bsdos-pc-nobold|BSD/OS PC console w/o bold, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L, kll=\E[F, knp=\E[G, kpp=\E[I, nel=^M^J, rc=\E8, sc=\E7, sgr=\E[0;10%?%p1%t;7%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m%?%p5%t\E[=8F%;, - use=klone+sgr, use=klone+color, -bsdos-pc|IBM PC BSD/OS Console, - sgr=\E[0;10%?%p1%t;7%;%?%p2%t;1%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, use=bsdos-pc-nobold, + use=klone+sgr, # Old names for BSD/OS PC console used in releases before 4.1. pc3|BSD/OS on the PC Console, @@ -1390,11 +1542,21 @@ bsdos-sparc|Sun SPARC BSD/OS Console, bsdos-ppc|PowerPC BSD/OS Console, use=bsdos-pc, +#### DEC VT52 +# (// capabilities aren't in DEC's official entry -- esr) +vt52|dec vt52, + OTbs, + cols#80, it#8, lines#24, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, + el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, + kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF, + #### DEC VT100 and compatibles # -# DEC terminals from the vt100 forward (and the vt52, way obsolete but still -# the basis of some emulations) are collected here. Older DEC terminals and -# micro consoles can be found in the `obsolete' section. More details on +# DEC terminals from the vt100 forward are collected here. Older DEC terminals +# and micro consoles can be found in the `obsolete' section. More details on # the relationship between the VT100 and ANSI X3.64/ISO 6429/ECMA-48 may be # found near the end of this file. # @@ -1408,15 +1570,6 @@ bsdos-ppc|PowerPC BSD/OS Console, # its name to Boundless Technologies; see http://www.boundless.com. # -# (// capabilities aren't in DEC's official entry -- esr) -vt52|dec vt52, - cols#80, it#8, lines#24, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, - el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF, - # NOTE: Any VT100 emulation, whether in hardware or software, almost # certainly includes what DEC called the `Level 1 editing extension' codes; # only the very oldest VT100s lacked these and there probably aren't any of @@ -1444,6 +1597,45 @@ vt52|dec vt52, # reset upon login. Also setting the number of columns glitches # the screen annoyingly. You can type "reset" to get them set. # +# The VT100 series terminals have cursor ("arrows") keys which can operate +# in two different modes: Cursor Mode and Application Mode. Cursor Mode +# is the reset state, and is assumed to be the normal state. Application +# Mode is the "set" state. In Cursor Mode, the cursor keys transmit +# "Esc [ {code}" sequences, conforming to ANSI standards. In Application +# Mode, the cursor keys transmit "Esc O " sequences. Application Mode +# was provided primarily as an aid to the porting of VT52 applications. It is +# assumed that the cursor keys are normally in Cursor Mode, and expected that +# applications such as vi will always transmit the string. Therefore, +# the definitions for the cursor keys are made to match what the terminal +# transmits after the string is transmitted. If the string +# is a null string or is not defined, then cursor keys are assumed to be in +# "Cursor Mode", and the cursor keys definitions should match that assumption, +# else the application may fail. It is also expected that applications will +# always transmit the string to the terminal before they exit. +# +# The VT100 series terminals have an auxiliary keypad, commonly referred to as +# the "Numeric Keypad", because it is a cluster of numeric and function keys. +# The Numeric Keypad which can operate in two different modes: Numeric Mode and +# Application Mode. Numeric Mode is the reset state, and is assumed to be +# the normal state. Application Mode is the "set" state. In Numeric Mode, +# the numeric and punctuation keys transmit ASCII 7-bit characters, and the +# Enter key transmits the same as the Return key (Note: the Return key +# can be configured to send either LF (\015) or CR LF). In Application Mode, +# all the keypad keys transmit "Esc O {code}" sequences. The PF1 - PF4 keys +# always send the same "Esc O {code}" sequences. It is assumed that the keypad +# is normally in Numeric Mode. If an application requires that the keypad be +# in Application Mode then it is expected that the user, or the application, +# will set the TERM environment variable to point to a terminfo entry which has +# defined the string to include the codes that switch the keypad into +# Application Mode, and the terminfo entry will also define function key +# fields to match the Application Mode control codes. If the string +# is a null string or is not defined, then the keypad is assumed to be in +# Numeric Mode. If the string switches the keypad into Application +# Mode, it is expected that the string will contain the control codes +# necessary to reset the keypad to "Normal" mode, and it is also expected that +# applications which transmit the string will also always transmit the +# string to the terminal before they exit. +# # Here's a diagram of the VT100 keypad keys with their bindings. # The top line is the name of the key (some DEC keyboards have the keys # labelled somewhat differently, like GOLD instead of PF1, but this is @@ -1503,7 +1695,7 @@ vt52|dec vt52, # # (vt100: I added / based on the init string, also . -- esr) vt100|vt100-am|dec vt100 (w/advanced video), - am, msgr, xenl, xon, + OTbs, am, msgr, xenl, xon, cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, @@ -1540,8 +1732,7 @@ vt100-w-nam|vt100-nam-w|dec vt100 132 cols (w/advanced video no automargin), vt100-nav|vt100 without advanced video option, xmc#1, blink@, bold@, rev@, rmso=\E[m, rmul@, sgr@, sgr0@, smso=\E[7m, - smul@, - use=vt100, + smul@, use=vt100, vt100-nav-w|vt100-w-nav|dec vt100 132 cols 14 lines (no advanced video option), cols#132, lines#14, use=vt100-nav, @@ -1561,15 +1752,15 @@ vt100-s-bot|vt100-bot-s|vt100 for use with bottom sysline, eslok, hs, lines#23, dsl=\E7\E[1;24r\E8, fsl=\E8, is2=\E[1;23r\E[23;1H, - tsl=\E7\E[24;%p1%dH\E[1K, - use=vt100-am, + tsl=\E7\E[24;%p1%dH\E[1K, use=vt100-am, # Most of the `vt100' emulators out there actually emulate a vt102 # This entry (or vt102-nsgr) is probably the right thing to use for # these. vt102|dec vt102, mir, - dch1=\E[P, dl1=\E[M, il1=\E[L, rmir=\E[4l, smir=\E[4h, use=vt100, + dch1=\E[P, dl1=\E[M, il1=\E[L, rmir=\E[4l, smir=\E[4h, + use=vt100, vt102-w|dec vt102 in wide mode, cols#132, rs3=\E[?3h, use=vt102, @@ -1583,8 +1774,7 @@ vt102-w|dec vt102 in wide mode, # slightly more expensive. # From: Eric S. Raymond July 22 1995 vt102-nsgr|vt102 no sgr (use if you see snowflakes after highlight changes), - sgr@, sgr0=\E[m, - use=vt102, + sgr@, sgr0=\E[m, use=vt102, # VT125 Graphics CRT. Clear screen also erases graphics vt125|vt125 graphics terminal, @@ -1593,7 +1783,7 @@ vt125|vt125 graphics terminal, # This isn't a DEC entry, it came from University of Wisconsin. # (vt131: I added / based on the init string, also -- esr) vt131|dec vt131, - am, xenl, + OTbs, am, xenl, cols#80, it#8, lines#24, vt#3, bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, clear=\E[;H\E[2J$<50/>, cr=^M, csr=\E[%i%p1%d;%p2%dr, @@ -1618,18 +1808,17 @@ vt131|dec vt131, vt132|DEC vt132, xenl, dch1=\E[P$<7>, dl1=\E[M$<99>, il1=\E[L$<99>, ind=\n$<30>, - ip=$<7>, rmir=\E[4h, smir=\E[4l, - use=vt100, + ip=$<7>, rmir=\E[4h, smir=\E[4l, use=vt100, -# vt220: # This vt220 description maps F5--F9 to the second block of function keys # at the top of the keyboard. The "DO" key is used as F10 to avoid conflict # with the key marked (ESC) on the vt220. See vt220d for an alternate mapping. # PF1--PF4 are used as F1--F4. # -vt220|vt200|DEC VT220 in vt100 emulation mode, - am, mir, xenl, xon, +vt220-old|vt200-old|DEC VT220 in vt100 emulation mode, + OTbs, OTpt, am, mir, xenl, xon, cols#80, lines#24, vt#3, + OTnl=^J, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, civis=\E[?25l, clear=\E[H\E[2J$<50>, cnorm=\E[?25h, cr=^M, @@ -1649,33 +1838,13 @@ vt220|vt200|DEC VT220 in vt100 emulation mode, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;, sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, smso=\E[7m, smul=\E[4m, -vt220-w|vt200-w|DEC vt220 in wide mode, - cols#132, - rs3=\E[?3h, use=vt220, - -# -# vt220d: -# This vt220 description regards F6--F10 as the second block of function keys -# at the top of the keyboard. This mapping follows the description given -# in the VT220 Programmer Reference Manual and agrees with the labeling -# on some terminals that emulate the vt220. There is no support for an F5. -# See vt220 for an alternate mapping. -# -vt220d|DEC VT220 in vt100 mode with DEC function key labeling, - 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@, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - use=vt220, - -vt220-nam|v200-nam|VT220 in vt100 mode with no auto margins, - am@, - rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h, use=vt220, -# This is misnamed (see xterm-8bit for an example of 8-bit controls) -vt220-8|dec vt220 8 bit terminal, - am, mc5i, mir, msgr, xenl, xon, - cols#80, it#8, lines#24, +# A much better description of the VT200/220; used to be vt220-8 +# changed rmacs/smacs from shift-in/shift-out to vt200-old's explicit G0/G1 +# designation to accommodate bug in pcvt -TD +vt220|vt200|dec vt220, + OTbs, am, mc5i, mir, msgr, xenl, xon, + cols#80, it#8, lines#24, vt#3, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, @@ -1695,9 +1864,56 @@ vt220-8|dec vt220 8 bit terminal, khome=\E[H, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m, - rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=^N, + rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m, + rmul=\E[24m, rs1=\E[?3l, sc=\E7, sgr0=\E[m, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, +vt220-w|vt200-w|DEC vt220 in wide mode, + cols#132, + rs3=\E[?3h, use=vt220, +vt220-8bit|vt220-8|vt200-8bit|vt200-8|dec vt220/200 in 8-bit mode, + OTbs, am, mc5i, mir, msgr, xenl, xon, + cols#80, it#8, lines#24, vt#3, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\2335m, bold=\2331m, clear=\233H\233J, cr=^M, + csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=^H, + cud=\233%p1%dB, cud1=^J, cuf=\233%p1%dC, cuf1=\233C, + cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\233A, + dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dl1=\233M, + ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K, enacs=\E)0, + flash=\233?5h$<200/>\233?5l, home=\233H, ht=^I, hts=\EH, + ich=\233%p1%d@, if=/usr/share/tabset/vt100, + il=\233%p1%dL, il1=\233L, ind=\ED, + is2=\233?7h\233>\233?1h\E F\233?4l, kbs=^H, + kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A, + kf1=\EOP, kf10=\23321~, kf11=\23323~, kf12=\23324~, + kf13=\23325~, kf14=\23326~, kf17=\23331~, kf18=\23332~, + kf19=\23333~, kf2=\EOQ, kf20=\23334~, kf3=\EOR, kf4=\EOS, + kf6=\23317~, kf7=\23318~, kf8=\23319~, kf9=\23320~, + kfnd=\2331~, khlp=\23328~, khome=\233H, kich1=\2332~, + knp=\2336~, kpp=\2335~, krdo=\23329~, kslt=\2334~, lf1=pf1, + lf2=pf2, lf3=pf3, lf4=pf4, mc0=\233i, mc4=\2334i, mc5=\2335i, + nel=\EE, rc=\E8, rev=\2337m, ri=\EM, rmacs=^O, rmam=\233?7l, + rmir=\2334l, rmso=\23327m, rmul=\23324m, rs1=\233?3l, + sc=\E7, sgr0=\233m, smacs=^N, smam=\233?7h, smir=\2334h, + smso=\2337m, smul=\2334m, tbc=\2333g, + +# +# vt220d: +# This vt220 description regards F6--F10 as the second block of function keys +# at the top of the keyboard. This mapping follows the description given +# in the VT220 Programmer Reference Manual and agrees with the labeling +# on some terminals that emulate the vt220. There is no support for an F5. +# See vt220 for an alternate mapping. +# +vt220d|DEC VT220 in vt100 mode with DEC function key labeling, + 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@, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, use=vt220-old, + +vt220-nam|v200-nam|VT220 in vt100 mode with no auto margins, + am@, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h, use=vt220, # vt220 termcap written Tue Oct 25 20:41:10 1988 by Alex Latzko # (not an official DEC entry!) @@ -1713,6 +1929,7 @@ vt220-8|dec vt220 8 bit terminal, # it has a vt220 and will get fouled up coming out of emacs # # From: Alexander Latzko , 30 Dec 1996 +# (Added vt100 , to quiet a tic warning -- esr) vt200-js|vt220-js|dec vt200 series with jump scroll, am, cols#80, @@ -1722,10 +1939,10 @@ vt200-js|vt220-js|dec vt200 series with jump scroll, il1=\E[L, ind=\ED, is2=\E[61"p\E[H\E[?3l\E[?4l\E[?1l\E[?5l\E[?6l\E[?7h\E[?8h\E[?25h\E>\E[m, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M\ED, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M\ED, rc=\E8, rf=/usr/lib/tabset/vt100, ri=\EM, rmdc=, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m$<5/>, rmul=\E[24m, - rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, smdc=, + rs1=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, smdc=, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m$<5/>, smul=\E[4m, # This was DEC's vt320. Use the purpose-built one below instead @@ -1750,7 +1967,7 @@ vt320nam|v320n|DEC VT320 in vt100 emul. mode with NO AUTO WRAP mode, # I left out because of its RIDICULOUS complexity, # and the resulting fact that it causes the termcap translation of the entry # to SMASH the 1k-barrier... -# From: Adam Thompson Sept 10 1995 +# From: Adam Thompson Sept 10 1995 # (vt320: uncommented --esr) vt320|vt300|dec vt320 7 bit terminal, am, eslok, hs, mir, msgr, xenl, @@ -1949,15 +2166,15 @@ vt420pc|DEC VT420 w/PC keyboard, kf48=\E[36;2~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, pctrm=USR_TERM\:vt420pcdos\:, - pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, use=vt420, + pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, + use=vt420, vt420pcdos|DEC VT420 w/PC for DOS Merge, lines#25, dispc=%?%p2%{19}%=%t\E\023\021%e%p2%{32}%<%t\E%p2%c%e%p2%{127}%=%t\E\177%e%p2%c%;, pctrm@, rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr@, - sgr0=\E[m, smsc=\E[?1;2r\E[34h, - use=vt420pc, + sgr0=\E[m, smsc=\E[?1;2r\E[34h, use=vt420pc, vt420f|DEC VT420 with VT kbd; VT400 mode; F1-F5 used as Fkeys, kdch1=\177, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, @@ -2001,10 +2218,10 @@ vt520|DEC VT520, if=/usr/share/tabset/vt300, il1=\E[L, ind=\ED, is2=\E[1;24r\E[24;1H, is3=\E[?67h\E[64;1"p, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kf0=\E[29~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, - kf8=\E[20~, kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, kslt=\E[4~, + kdch1=\E[3~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, + kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, + kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + kslt=\E[4~, pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, rc=\E8, rev=\E[7m$<2>, rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, @@ -2028,10 +2245,10 @@ vt525|DEC VT525, if=/usr/share/tabset/vt300, il1=\E[L, ind=\ED, is2=\E[1;24r\E[24;1H, is3=\E[?67h\E[64;1"p, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, - kdch1=\E[3~, kf0=\E[29~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, - kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, - kf8=\E[20~, kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, - kpp=\E[5~, kslt=\E[4~, + kdch1=\E[3~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, + kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, + kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + kslt=\E[4~, pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\, rc=\E8, rev=\E[7m$<2>, rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, @@ -2061,7 +2278,7 @@ dec-vt220|DOS tnvt200 terminal emulator, # RDBM systems, it includes ReGIS and SiXel support! I'm impressed... # I can send the address if requested. # (z340: changed garbled \E[5?l to \E[?5l, DEC smooth scroll off -- esr) -# From: Adam Thompson Sept 10 1995 +# From: Adam Thompson Sept 10 1995 z340|zstem vt340 terminal emulator 132col 42line, lines#42, is2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h\E[1;42r\E[42;1H, @@ -2076,11 +2293,9 @@ z340-nam|zstem vt340 terminal emulator 132col 42line (no automatic margins), # CRT is shareware. It implements some xterm features, including mouse. crt|crt-vt220|CRT 2.3 emulating VT220, bce, msgr, - colors#8, pairs#64, - hts=\EH, op=\E[39;49m, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, setb=\E[4%p1%dm, setf=\E[3%p1%dm, - u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, - use=vt220, + ncv@, + hts=\EH, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, + use=vt220, use=ecma+color, # This entry is for Tera Term Pro version 2.3, for MS-Windows 95/NT written by # T. Teranishi dated Mar 10, 1998. It is a free software terminal emulator @@ -2139,8 +2354,7 @@ teraterm|Tera Term Pro, kpp=\E[5~, kslt=\E[4~, op=\E[100m, rev=\E[7m, ri=\EM, rmso=\E[27m, rmul=\E[24m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, - vpa=\E[%i%p1%dd, - use=klone+color, use=vt100, + vpa=\E[%i%p1%dd, use=klone+color, use=vt100, # Tested with WinNT 4.0, the telnet application assumes the screensize is # 25x80. This entry uses the 'Terminal' font, to get line-drawing characters. @@ -2168,7 +2382,7 @@ ms-vt100|MS telnet imitating dec vt100, # removed (hs, eslok, tsl=\E[?E\E[?%i%dT, fsl=\E[?F, dsl=\E[?E) # as these seem not to work -- esr) x10term|vs100-x10|xterm terminal emulator (X10 window system), - am, km, mir, msgr, xenl, xon, + OTbs, am, km, mir, msgr, xenl, xon, cols#80, it#8, lines#65, bold=\E[1m, clear=\E[H\E[2J, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, @@ -2182,10 +2396,11 @@ x10term|vs100-x10|xterm terminal emulator (X10 window system), smso=\E[7m, smul=\E[4m, # Compatible with the R5 xterm # (from the XFree86 3.2 distribution, removed) -# added khome/kend, rmir/smir, rmul/smul based on the R5 xterm code - TD +# added khome/kend, rmir/smir, rmul/smul, hts based on the R5 xterm code - TD # corrected typos in rs2 string - TD +# added u6-u9 -TD xterm-r5|xterm R5 version, - am, km, msgr, xenl, + OTbs, am, km, msgr, xenl, cols#80, it#8, lines#24, bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, @@ -2206,12 +2421,15 @@ xterm-r5|xterm R5 version, sc=\E7, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, sgr0=\E[m, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, - smul=\E[4m, tbc=\E[3g, + smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, + u8=\E[?1;2c, u9=\E[c, # Compatible with the R6 xterm # (from XFree86 3.2 distribution, and added, removed) -# added khome/kend - TD +# added khome/kend, hts based on the R6 xterm code - TD +# (khome/kend do not actually work in X11R5 or X11R6, but many people use this +# for compatibility with other emulators). xterm-r6|xterm-old|xterm X11R6 version, - am, km, mir, msgr, xenl, + OTbs, am, km, mir, msgr, xenl, cols#80, it#8, lines#24, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, @@ -2219,19 +2437,19 @@ xterm-r6|xterm-old|xterm X11R6 version, 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, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, - el=\E[K, enacs=\E)0, home=\E[H, ht=^I, il=\E[%p1%dL, + el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, 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>, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, + kdch1=\E[3~, 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=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf5=\E[15~, - kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, - kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, - meml=\El, memu=\Em, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[m, rmul=\E[m, + kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, + kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kfnd=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, + kslt=\E[4~, meml=\El, memu=\Em, rc=\E8, rev=\E[7m, ri=\EM, + rmacs=^O, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, @@ -2239,19 +2457,19 @@ xterm-r6|xterm-old|xterm X11R6 version, # This is the base xterm entry for the xterm supplied with XFree86 3.2 & up. # The name has been changed and some aliases have been removed. xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System), - am, bce, km, mir, msgr, xenl, - colors#8, cols#80, it#8, lines#24, pairs#64, + OTbs, am, bce, km, mir, msgr, xenl, + cols#80, it#8, lines#24, ncv@, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 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, - cvvis=\E[?25h, 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, - enacs=\E(B\E)0, flash=\E[?5h\E[?5l, 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, + 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, enacs=\E(B\E)0, + flash=\E[?5h$<100/>\E[?5l, 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, 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, @@ -2262,63 +2480,83 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System), kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\EOH, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, meml=\El, - memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, - rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, - rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=^O, + memu=\Em, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, + rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>, + rmso=\E[27m, rmul=\E[24m, rs1=^O, rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, sc=\E7, - setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, sgr=\E[0%?%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, 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, + vpa=\E[%i%p1%dd, use=ecma+color, # This is the stock xterm entry supplied with XFree86 3.3, which uses VT100 # codes for F1-F4 except while in VT220 mode. xterm-xf86-v33|xterm terminal emulator (XFree86 3.3 Window System), - kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - use=xterm-xf86-v32, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, use=xterm-xf86-v32, # This version was released in XFree86 3.3.3 (November 1998). # Besides providing printer support, it exploits a new feature that allows # xterm to use terminfo-based descriptions with the titeInhibit resource. +# -- the distribution contained incorrect khome/kend values -TD xterm-xf86-v333|xterm terminal emulator (XFree86 3.3.3 Window System), mc5i, blink=\E[5m, ich1@, invis=\E[8m, - is2=\E[!p\E[?3;4l\E[4l\E>, kdch1=\E[3~, kend=\E[4~, - kfnd@, khome=\E[1~, kslt@, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, - rmcup=\E[?1047l\E[?1048l, rs1=\Ec, - rs2=\E[!p\E[?3;4l\E[4l\E>, + is2=\E[!p\E[?3;4l\E[4l\E>, kdch1=\E[3~, kfnd@, kslt@, + mc0=\E[i, mc4=\E[4i, mc5=\E[5i, rmcup=\E[?1047l\E[?1048l, + rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, 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%;, - smcup=\E[?1048h\E[?1047h, - use=xterm-xf86-v33, + smcup=\E[?1048h\E[?1047h, use=xterm-xf86-v33, # This beta version will probably be released in XFree86 4.0. xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System), - ka1=\EOH, ka3=\E[5~, kb2=\EOE, kc1=\EOF, kc3=\E[6~, - kdch1=\177, kend=\EOF, khome=\EOH, rmcup=\E[?1049l, - smcup=\E[?1049h, - use=xterm-xf86-v333, + npc, + kDC=\E[3;5~, kEND=\EO5F, kHOM=\EO5H, kIC=\E[2;5~, + kLFT=\EO5D, kNXT=\E[6;5~, kPRV=\E[5;5~, kRIT=\EO5C, ka1@, + ka3@, kb2=\EOE, kc1@, kc3@, kcbt=\E[Z, kdch1=\E[3~, kend=\EOF, + kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, + kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, + kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, + kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q, + kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, kf30=\E[17;5~, + kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~, + kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~, kf37=\EO6P, + kf38=\EO6Q, kf39=\EO6R, kf40=\EO6S, kf41=\E[15;6~, + kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, + kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, + kf48=\E[24;6~, khome=\EOH, rmcup=\E[?1049l, + 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), use=xterm-xf86-v40, # From: David J. MacKenzie , 14 Nov 1997 xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1, - rmso=\E[m, rmul=\E[m, - use=xterm-xf86-v33, + rmso=\E[m, rmul=\E[m, use=xterm-xf86-v33, # This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey) xterm-16color|xterm with 16 colors like aixterm, - colors#16, ncv#32, pairs#256, + colors#16, pairs#256, setab=\E[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm, setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm, setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m, setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m, use=xterm-xf86-v40, +# These variants of XFree86 3.9.16 xterm are built as a configure option. +xterm-256color|xterm with 256 colors, + ccc, + colors#256, pairs#256, + initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, + setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm, + setb=\E[48;5;%p1%dm, setf=\E[38;5;%p1%dm, + use=xterm-xfree86, +xterm-88color|xterm with 88 colors, + colors#88, pairs#88, use=xterm-256color, + # 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. @@ -2329,7 +2567,7 @@ xterm-16color|xterm with 16 colors like aixterm, # CSI \E [ \233 # xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), - am, bce, km, mc5i, mir, msgr, xenl, + OTbs, am, bce, km, mc5i, mir, msgr, npc, xenl, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\2335m, bold=\2331m, cbt=\233Z, @@ -2337,12 +2575,12 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=^H, cud=\233%p1%dB, cud1=^J, cuf=\233%p1%dC, cuf1=\233C, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\233A, - cvvis=\233?25h, dch=\233%p1%dP, dch1=\233P, - dl=\233%p1%dM, dl1=\233M, ech=\233%p1%dX, ed=\233J, - el=\233K, el1=\2331K, enacs=\E(B\E)0, - flash=\233?5h\233?5l, home=\233H, hpa=\233%i%p1%dG, - ht=^I, hts=\210, ich=\233%p1%d@, il=\233%p1%dL, il1=\233L, - ind=^J, invis=\2338m, + dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dl1=\233M, + ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K, + enacs=\E(B\E)0, flash=\233?5h$<100/>\233?5l, + home=\233H, hpa=\233%i%p1%dG, ht=^I, hts=\210, + ich=\233%p1%d@, il=\233%p1%dL, il1=\233L, ind=^J, + invis=\2338m, is2=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>, ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kbs=^H, kc1=\217q, kc3=\217s, kcub1=\217D, kcud1=\217B, @@ -2368,14 +2606,42 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System), tbc=\2333g, u6=\233[%i%d;%dR, u7=\E[6n, u8=\233[?1;2c, u9=\E[c, vpa=\233%i%p1%dd, +xterm-hp|XFree86 xterm with hpterm function keys, + kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, + kdch1=\EP, kend=\EF, kf1=\Ep, kf2=\Eq, kf3=\Er, kf4=\Es, + kf5=\Et, kf6=\Eu, kf7=\Ev, kf8=\Ew, khome=\Eh, kich1=\EQ, + knp=\ES, kpp=\ET, use=xterm-xfree86, + +xterm-vt220|XFree86 xterm emulating vt220, + ka1=\EOw, ka3=\EOy, kbeg=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, 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-xfree86, + +xterm-vt52|XFree86 xterm emulating dec vt52, + cols#80, it#8, lines#24, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\EY%p1%' '%+%c%p2%' '%+%c, cuu1=\EA, ed=\EJ, el=\EK, + home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, + kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF, + +xterm-noapp|xterm with cursor keys in normal mode, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rmcup@, + rmkx=\E>, smcup@, smkx=\E=, use=xterm, + xterm-24|vs100|xterms|xterm terminal emulator (X Window System), - lines#24, use=xterm, + lines#24, use=xterm-r6, # This is xterm for ncurses. xterm|xterm terminal emulator (X Window System), - acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, - kmous=\E[M, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, use=xterm-r6, +# use=xterm-xfree86, # These entries allow access to the X titlebar and icon name as a status line. # Note that twm (and possibly window managers descended from it such as tvtwm, @@ -2395,25 +2661,21 @@ xterm+sl-twm|access X title line (pacify twm-descended window managers), # # xterm with bold instead of underline xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold, - smso=\E[7m, smul=\E[1m, - use=xterm, + smso=\E[7m, smul=\E[1m, use=xterm, # (kterm: this had extension capabilities ":KJ:TY=ascii:" -- esr) # (kterm should not invoke DEC Graphics as the alternate character set # -- Kenji Rikitake) kterm|kterm kanji terminal emulator (X window system), eslok, hs, acsc@, csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs@, fsl=\E[?F, - kmous=\E[M, op=\E[39;49m, rc=\E8, rmacs@, sc=\E7, smacs@, - tsl=\E[?E\E[?%i%dT, - use=xterm-r6, use=klone+color, + kmous=\E[M, rc=\E8, rmacs@, sc=\E7, smacs@, + tsl=\E[?E\E[?%i%dT, use=xterm-r6, 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, - ich@, ich1@, - use=xterm, + ich@, ich1@, use=xterm, # From: Mark Sheppard , 4 May 1996 xterm1|xterm terminal emulator ignoring the alternate screen buffer, - rmcup@, smcup@, - use=xterm, + rmcup@, smcup@, use=xterm, # This describes the capabilities of color_xterm, an xterm variant from # before ECMA-64 color support was folded into the main-line xterm release. @@ -2422,8 +2684,8 @@ xterm1|xterm terminal emulator ignoring the alternate screen buffer, # The README's with the distribution also say that it supports SGR 21, 24, 25 # and 27, but they are not present in the terminfo or termcap. color_xterm|cx|cx100|color_xterm color terminal emulator for X, - am, km, mir, msgr, xenl, - colors#8, cols#80, it#8, lines#65, pairs#64, + OTbs, am, km, mir, msgr, xenl, + cols#80, it#8, lines#65, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, @@ -2438,25 +2700,40 @@ color_xterm|cx|cx100|color_xterm color terminal emulator for X, 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~, - kmous=\E[M, knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, - rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l, - rmcup=\E>\E[?41;1r, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, + kmous=\E[M, knp=\E[6~, kpp=\E[5~, rc=\E8, rev=\E[7m, ri=\EM, + rmacs=^O, rmam=\E[?7l, rmcup=\E>\E[?41;1r, rmir=\E[4l, + rmso=\E[27m, rmul=\E[24m, rs1=\E(B\017\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<, - sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + 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, smacs=^N, smam=\E[?7h, smcup=\E[?1;41s\E[?1;41h\E=, smir=\E[4h, smso=\E[7m, - smul=\E[4m, + smul=\E[4m, use=ecma+color, -# The 'nxterm' distributed with Redhat Linux is a slight rehack of +# 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 # SGR 39 or 49. SGR 0 does reset colors (along with everything else). This # description is "compatible" with color_xterm, rxvt and XFree86 xterm, except # that each of those implements the home, end, delete keys differently. +# +# 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, ncv@, op=\E[m, use=xterm-r6, use=klone+color, +# this describes the alpha-version of Gnome terminal shipped with Redhat 6.0 +gnome|Gnome terminal, + bce, + kdch1=\177, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, + use=xterm-color, + +# This is kvt 0-18.7, shipped with Redhat 6.0 (though whether it supports bce +# or not is debatable). +kvt|KDE terminal, + bce, km@, + kdch1=\177, kend=\E[F, khome=\E[H, use=xterm-color, + # From: Thomas Dickey 04 Oct 1997 # Updated: Oezguer Kesim 02 Nov 1997 # Notes: @@ -2476,7 +2753,7 @@ nxterm|xterm-color|generic color xterm, # Since rxvt is not really compatible with xterm, it should be configured as # "rxvt" (monochrome) and "rxvt-color". rxvt-basic|rxvt terminal base (X Window System), - am, bce, eo, km, mir, msgr, xenl, xon, + OTbs, am, bce, eo, km, mir, msgr, xenl, xon, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, @@ -2484,17 +2761,16 @@ rxvt-basic|rxvt terminal base (X Window System), csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 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, - cvvis=\E[?25h, 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, - flash=\E[?5h\E[?5l, home=\E[H, ht=^I, hts=\EH, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, - is1=\E[?47l\E=\E[?1l, + 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, flash=\E[?5h\E[?5l, + home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, + 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, kf0=\E[21~, kf1=\E[11~, kf10=\E[21~, + kend=\E[8~, kent=\EOM, 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~, @@ -2509,15 +2785,56 @@ rxvt-basic|rxvt terminal base (X Window System), smcup=\E7\E[?47h, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, rxvt|rxvt terminal emulator (X Window System), - colors#8, pairs#64, - op=\E[39;49m, setab=\E[%p1%{40}%+%dm, - setaf=\E[%p1%{30}%+%dm, sgr0=\E[m\017, use=rxvt-basic, + ncv@, + sgr0=\E[m\017, use=rxvt-basic, use=ecma+color, + +# From: Michael Jennings +# removed kf0 which conflicts with kf10 -TD +# remove cvvis which conflicts with cnorm -TD +# There's no u6 because Eterm appears to lack CPR (cursor position report). +Eterm|Eterm-color|Eterm with xterm-style color support (X Window System), + am, bce, bw, eo, km, mc5i, mir, msgr, xenl, xon, + btns#5, cols#80, it#8, lines#24, lm#0, ncv@, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, + clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, + csr=\E[%i%p1%d;%p2%dr, 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, + ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, + flash=\E[?5h\E[?5l, 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, 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=\E[7~, ka3=\E[5~, kb2=\EOu, + kbeg=\EOu, kbs=^H, kc1=\E[8~, kc3=\E[6~, 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~, 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~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~, + khome=\E[7~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, + kslt=\E[4~, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM, + rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, + rmkx=, rmso=\E[27m, rmul=\E[24m, + rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, + rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>, + 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, smam=\E[?7h, smcup=\E7\E[?47h, + smir=\E[4h, smkx=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, + u7=\E[6n, u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, + use=ecma+color, # These (xtermc and xtermm) are distributed with Solaris. They refer to a # variant of xterm which is apparently no longer supported, but are interesting # because they illustrate SVr4 curses mouse controls - T.Dickey xtermm|xterm terminal emulator (monocrome), - am, km, mir, msgr, xenl, + OTbs, am, km, mir, msgr, xenl, btns#3, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=@, bold=\E[1m, clear=\E[H\E[2J, cr=^M, @@ -2555,8 +2872,7 @@ xtermc|xterm terminal emulator (color), # title bar. [I have translated it to terminfo -- ESR] xterm-pcolor|xterm with color used for highlights and status line, bold=\E[1m\E[43m, rev=\E[7m\E[34m, smso=\E[7m\E[31m, - smul=\E[4m\E[42m, - use=xterm+sl, use=xterm-r6, + smul=\E[4m\E[42m, use=xterm+sl, use=xterm-r6, # HP ships this, except for the pb#9600 which was merged in from BSD termcap. # (hpterm: added empty , we have no idea what ACS chars look like --esr) @@ -2600,8 +2916,7 @@ xterm-sun|xterm with sunFunctionKeys true, kf40=\E[217z, kf42=\E[219z, kf44=\E[221z, kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, kfnd=\E[200z, khlp=\E[196z, khome=\E[214z, kich1=\E[2z, - knp=\E[222z, kpp=\E[216z, kund=\E[195z, - use=xterm, + knp=\E[222z, kpp=\E[216z, kund=\E[195z, use=xterm, xterms-sun|small (80x24) xterm with sunFunctionKeys true, cols#80, lines#24, use=xterm-sun, @@ -2614,9 +2929,9 @@ emu|emu native mode, clear=\EP\EE0;0;, cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, cub=\Eq-%p1%d;, cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\ED, cup=\EE%p1%d;%p2%d;, - cuu=\Ep-%p1%d;, cuu1=\EA, cvvis=\Ea, dch=\EI%p1%d;, - dch1=\EI1;, dl=\ER%p1%d;, dl1=\ER1;, ech=\Ej%p1%d;, ed=\EN, - el=\EK, el1=\EL, enacs=\0, home=\EE0;0;, ht=^I, hts=\Eh, + cuu=\Ep-%p1%d;, cuu1=\EA, dch=\EI%p1%d;, dch1=\EI1;, + dl=\ER%p1%d;, dl1=\ER1;, ech=\Ej%p1%d;, ed=\EN, el=\EK, + el1=\EL, enacs=\0, home=\EE0;0;, ht=^I, hts=\Eh, il=\EQ%p1%d;, il1=\EQ1;, ind=\EG, is2=\ES\Er0;\Es0;, kbs=^H, kcub1=\EC, kcud1=\EB, kcuf1=\ED, kcuu1=\EA, kdch1=\177, kent=^M, kf0=\EF00, kf1=\EF01, kf10=\EF10, @@ -2651,20 +2966,18 @@ mgr|Bellcore MGR (non X) window system terminal emulation, smul=\E4n, mgr-sun|Mgr window with Sun keyboard, ka1=\E[214z, ka3=\E[216z, kb2=\E[218z, kc1=\E[220z, - kc3=\E[222z, kcpy=\E197z, kend=\E[220z, kent=\E[250z, + kc3=\E[222z, kcpy=\E[197z, kend=\E[220z, kent=\E[250z, kf1=\E[224z, kf10=\E[233z, kf11=\E[234z, kf12=\E[235z, kf2=\E[225z, kf3=\E[226z, kf4=\E[227z, kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, kfnd=\E[200z, khlp=\E[207z, khome=\E[214z, knp=\E[222z, - kopn=\E[198z, kpp=\E[216z, kund=\E[195z, - use=mgr, + kopn=\E[198z, kpp=\E[216z, kund=\E[195z, use=mgr, mgr-linux|Mgr window with Linux keyboard, ka1=\E[H, ka3=\E[5~, kb2=\E[G, kc1=\E[Y, kc3=\E[6~, kdch1=\E[3~, kend=\E[4~, kf0=\E[[J, 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~, knp=\E[6~, kpp=\E[5~, - use=mgr, + khome=\E[1~, knp=\E[6~, kpp=\E[5~, use=mgr, ######## UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS # @@ -2673,7 +2986,7 @@ mgr-linux|Mgr window with Linux keyboard, # UNIX 4.0 and successors as line discipline 1 (?), but is # undocumented and does not really work quite right. cbunix|cb unix virtual terminal, - am, da, db, + OTbs, am, da, db, cols#80, lines#24, lm#0, bel=^G, clear=\EL, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EG%p2%c%p1%c, cuu1=\EA, dch1=\EM, dl1=\EN, ed=\EL, @@ -2687,8 +3000,7 @@ vremote|virtual remote terminal, pty|4bsd pseudo teletype, cup=\EG%p1%{32}%+%c%p2%{32}%+%c, rmso=\Eb$, rmul=\Eb!, - smso=\Ea$, smul=\Ea!, - use=cbunix, + smso=\Ea$, smul=\Ea!, use=cbunix, # The codes supported by the term.el terminal emulation in GNU Emacs 19.30 eterm|gnu emacs term.el terminal emulation, @@ -2705,13 +3017,19 @@ eterm|gnu emacs term.el terminal emulation, sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m, smul=\E[4m, -# Entries for use by the FSF's `screen' program. The screen and +# Entries for use by the `screen' program by Juergen Weigert, +# Michael Schroeder, Oliver Laumann. The screen and # screen-w entries came with version 3.7.1. The screen2 and screen3 entries # come from University of Wisconsin and may be older. # (screen: added on ANSI model -- esr) - +# +# 'screen' defines extensions to termcap. Some are used in its terminal +# description: +# G0 (bool) Terminal can deal with ISO 2022 font selection sequences. +# AX (bool) Does understand ANSI set default fg/bg color +# (\E[39m / \E[49m). screen|VT 100/ANSI X3.64 virtual terminal, - am, km, mir, msgr, xenl, + OTbs, OTpt, am, km, mir, msgr, xenl, G0, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, @@ -2818,7 +3136,7 @@ ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in vt220-8 mode, kdch1=\E[4~, kend=\E[5~, kf1=\E[17~, kf10=\E[28~, kf11=\E[29~, kf12=\E[31~, kf13=\E[32~, kf14=\E[33~, kf15=\E[34~, kf2=\E[18, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, - kf6=\E23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khlp=\E[1~, + kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khlp=\E[1~, khome=\E[2~, knp=\E[6~, kpp=\E[3~, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l, @@ -2847,8 +3165,7 @@ ncsa-vt220|NCSA Telnet using vt220-compatible function keys, 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~, - use=ncsa, + kf8=\E[19~, kf9=\E[20~, use=ncsa, #### Pilot Pro Palm-Top # @@ -2882,7 +3199,7 @@ pccons|pcconsole|ANSI (mostly) Alpha PC console terminal emulation, # :is1: resets scrolling region in case a previous user had used "tset vt100" oldsun|Sun Microsystems Workstation console, - am, km, mir, msgr, + OTbs, am, km, mir, msgr, cols#80, it#8, lines#34, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP, @@ -2910,9 +3227,10 @@ sun-il|Sun Microsystems console with working insert-line, kund=\E[195z, rev=\E[7m, rmso=\E[m, rmul@, rs2=\E[s, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, sgr0=\E[m, smso=\E[7m, smul@, u8=\E[1t, u9=\E[11t, -# On a SparcStation 5, / flake out on the last line. -# Unfortunately, without them the terminal has no way to scroll. -sun-ss5|Sun SparcStation 5 console, +# On some versions of CGSIX framebuffer firmware (SparcStation 5), / +# flake out on the last line. Unfortunately, without them the terminal has no +# way to scroll. +sun-cgsix|sun-ss5|Sun SparcStation 5 console, il@, il1@, use=sun-il, # If you are using an SS5, change the sun definition to use sun-ss5. sun|sun1|sun2|Sun Microsystems Inc. workstation console, @@ -2940,8 +3258,7 @@ sun-1|Sun 1-line window for sysline, cols#80, lines#1, dsl=^L, fsl=\E[K, tsl=^M, use=sun, sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character, - ich1@, rmir@, smir@, - use=sun, + ich1@, rmir@, smir@, use=sun, sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history, lines#35, rmcup=\E[>4h, smcup=\E[>4l, use=sun, @@ -2956,11 +3273,11 @@ sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history, # Finally, removed suboptimal =\EH\EJ and added & # from BRL -- esr) wsiris|iris40|iris emulating a 40 line visual 50 (approximately), - am, - cols#80, it#8, lines#40, - bel=^G, clear=\Ev, cnorm=\E>, cub1=^H, cud1=\EB, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E;, - dim=\E7F2, dl1=\EM, ed=\EJ, el=\EK, + OTbs, OTnc, OTpt, am, + OTkn#3, cols#80, it#8, lines#40, + OTnl=\EB, bel=^G, clear=\Ev, cnorm=\E>, cub1=^H, cud1=\EB, + cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, + cvvis=\E;, dim=\E7F2, dl1=\EM, ed=\EJ, el=\EK, flash=\E7F4\E7B1\013\E7F7\E7B0, home=\EH, ht=^I, il1=\EL, ind=^J, is2=\E7B0\E7F7\E7C2\E7R3, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf0=\E0, kf1=\E1, kf2=\E2, kf3=\E3, @@ -2978,7 +3295,7 @@ wsiris|iris40|iris emulating a 40 line visual 50 (approximately), # Entry for NeWS's psterm from Eric Messick & Hugh Daniel # (psterm: unknown ":sl=\EOl:el=\ENl:" removed -- esr) psterm|psterm-basic|NeWS psterm-80x34, - am, hs, km, ul, + OTbs, am, hs, km, ul, cols#80, it#8, lines#34, blink=\EOb, bold=\EOd, clear=^L, csr=\EE%p1%d;%p2%d;, cub1=\ET, cud1=\EP, cuf1=\EV, cup=\E%p1%d;%p2%d;, cuu1=\EY, @@ -2998,7 +3315,7 @@ psterm-80x24|NeWS psterm 80x24, # some control characters you type will do strange things to the screen. # (psterm-fast: unknown ":sl=^Ol:el=^Nl:" -- esr) psterm-fast|NeWS psterm fast version (flaky ctrl chars), - am, hs, km, ul, + OTbs, am, hs, km, ul, cols#80, it#8, lines#34, blink=^Ob, bold=^Od, clear=^L, csr=\005%p1%d;%p2%d;, cub1=^T, cud1=^P, cuf1=^V, cup=\004%p1%d;%p2%d;, cuu1=^Y, @@ -3032,10 +3349,10 @@ nextshell|NeXT Shell application, # (news-unk: this had :KB=news: -- esr) news-unk|SONY NEWS vt100 emulator common entry, - am, xenl, + OTbs, OTpt, am, xenl, cols#80, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, + OTnl=^J, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, + cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, if=/usr/lib/tabset/vt100, il=\E[%p1%dL, il1=\E[L, @@ -3043,8 +3360,9 @@ news-unk|SONY NEWS vt100 emulator common entry, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf0=\EOY, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rc=\E8, rev=\E[7m, ri=\EM, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[r, sc=\E7, + sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, # # (news-29: this had :TY=ascii: --esr) news-29, @@ -3080,61 +3398,76 @@ news-42-sjis, # # (news-old-unk: this had :KB=news:TY=sjis: --esr) news-old-unk|SONY NEWS vt100 emulator common entry, - am, xenl, + OTbs, OTpt, am, xenl, cols#80, vt#3, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, + OTnl=^J, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, + cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, ht=^I, if=/usr/lib/tabset/vt100, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, rc=\E8, rev=\E[7m, ri=\EM, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sc=\E7, sgr0=\E[m, - smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + sgr0=\E[m, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, # # (nwp512: this had :DE=^H:, which I think means --esr) -nwp512|news|nwp514|news40|vt100-bm|sony vt100 emulator 40 lines, +nwp512|news|nwp514|news40|vt100-bm|old sony vt100 emulator 40 lines, + OTbs, lines#40, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40r\E8, + use=news-old-unk, # # (nwp512-a: this had :TY=ascii: and the alias vt100-bm --esr) nwp512-a|nwp514-a|news-a|news42|news40-a|sony vt100 emulator 42 line, lines#42, - is2=\E[?7h\E[?1l\E[?3l\E7\E[1;42r\E8, use=news-old-unk, + is2=\E[?7h\E[?1l\E[?3l\E7\E[1;42r\E8, + use=news-old-unk, # # (nwp-512-o: this had :KB=nwp410:DE=^H: I interpret the latter as . --esr) nwp512-o|nwp514-o|news-o|news40-o|vt100-bm-o|sony vt100 emulator 40 lines, + OTbs, lines#40, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;40r\E8, + use=news-old-unk, # # (nwp513: this had :DE=^H: and the alias vt100-bm --esr) nwp513|nwp518|nwe501|newscbm|news31|sony vt100 emulator 33 lines, + OTbs, lines#31, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31r\E8, + use=news-old-unk, # # (nwp513-a: this had :TY=ascii: and :DE=^H:, which I interpret as ; --esr) # also the alias vt100-bm. -nwp513-a|nwp518-a|nwe501-a|nwp251-a|newscbm-a|news31-a|newscbm33|news33|sony vt100 emulator 33 lines, +nwp513-a|nwp518-a|nwe501-a|nwp251-a|newscbm-a|news31-a|newscbm33|news33|old sony vt100 emulator 33 lines, + OTbs, lines#33, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;33r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;33r\E8, + use=news-old-unk, # # (nwp513-o: had :DE=^H:, I think that's ; also the alias vt100-bm --esr) -nwp513-o|nwp518-o|nwe501-o|nwp251-o|newscbm-o|news31-o|sony vt100 emulator 33 lines, +nwp513-o|nwp518-o|nwe501-o|nwp251-o|newscbm-o|news31-o|old sony vt100 emulator 33 lines, + OTbs, lines#31, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;31r\E8, + use=news-old-unk, # # (news28: this had :DE=^H:, I think that's , and :KB=nws1200: --esr) news28|sony vt100 emulator 28 lines, + OTbs, lines#28, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;28r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;28r\E8, + use=news-old-unk, # # (news29: this had :TY=ascii:KB=nws1200:\ --esr) news29|news28-a|sony vt100 emulator 29 lines, lines#29, - is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;29r\E8, use=news-old-unk, + is2=\E7\E[r\E8\EE\EE\EE\EM\EM\EM\E[?7h\E[?1l\E[?3l\E7\E[1;29r\E8, + use=news-old-unk, # # (news511: this had :TY=sjis: --esr) nwp511|nwp-511|nwp-511 vt100, - am, xenl, + OTbs, OTpt, am, xenl, cols#80, lines#24, clear=\E[;H\E[2J$<20/>, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A$<2/>, dl1=\E[M, @@ -3144,23 +3477,23 @@ nwp511|nwp-511|nwp-511 vt100, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\E#W, khome=\E[H, ri=\EM$<5/>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, + rs2=\E7\E[r\E8\E[?5l\E[?1l\E>\E[?7h\E[?8h, smso=\E[7m$<2/>, smul=\E[4m$<2/>, # (news517: this had :TY=sjis:. --esr) nwp517|nwp-517|nwp-517 vt200 80 cols 30 rows, eslok, hs, cols#80, lines#30, - dsl=\E[1$~, fsl=\E[0$}, + OTi2=\E[2$~\n, dsl=\E[1$~, fsl=\E[0$}, is2=\E7\E[r\E8\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - tsl=\E[1$}\E[;%df, - use=vt200, + tsl=\E[1$}\E[;%df, use=vt200, # (news517-w: this had :TY=sjis:. --esr) nwp517-w|nwp-517-w|nwp-517 vt200 132 cols 50 rows, eslok, hs, cols#132, lines#50, - dsl=\E[1$~, fsl=\E[0$}, + OTi2=\E[2$~\n, dsl=\E[1$~, fsl=\E[0$}, is2=\E7\E[r\E8\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h, - tsl=\E[1$}\E[;%df, - use=vt200, + rs2=\E>\E[?3h\E[?4l\E[?5l\E[?7h\E[?8h, + tsl=\E[1$}\E[;%df, use=vt200, #### Common Desktop Environment # @@ -3169,7 +3502,7 @@ nwp517-w|nwp-517-w|nwp-517 vt200 132 cols 50 rows, # Corrected Sun Aug 9 1998 by Alexander V. Lukyanov dtterm|CDE desktop terminal, am, mir, msgr, xenl, xon, - colors#8, cols#80, it#8, lines#24, lm#0, pairs#64, + cols#80, it#8, lines#24, lm#0, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, @@ -3188,13 +3521,12 @@ dtterm|CDE desktop terminal, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, 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~, - kslt=\E[4~, nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, - rmacs=^O, rmam=\E[?7l, rmir=\E[4l, rmso=\E[22;27m, - rmul=\E[24m, sc=\E7, setab=\E[%p1%{40}%+%dm, - setaf=\E[%p1%{30}%+%dm, + kslt=\E[4~, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, + rmam=\E[?7l, rmir=\E[4l, rmso=\E[22;27m, rmul=\E[24m, + sc=\E7, sgr=\E[0%?%p1%t;2;7%;%?%p2%t;4%;%?%p3%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, - smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, + smso=\E[2;7m, smul=\E[4m, tbc=\E[3g, use=ecma+color, #### Non-Unix Consoles # @@ -3317,6 +3649,26 @@ ansi-nt|psx_ansi|Microsoft Windows NT console POSIX ANSI mode, home=\E[H, ht=^I, ind=\E[S, kbs=^H, kcub1=\E[D, kcud1=\E[V, kcuf1=\E[C, kcuu1=\E[A, nel=\r\E[S, rc=\E[u, rev=\E[7m, ri=\E[T, rmso=\E[m, sc=\E[s, sgr0=\E[0m, smso=\E[7m, +# From: jew@venus.sunquest.com +# Date: 19 Feb 93 23:41:07 GMT +# Here's a combination of ansi and vt100 termcap +# entries that works nearly perfectly for me +# (Gateway 2000 Handbook and Microsoft Works 3.0): +pcmw|PC running Microsoft Works, + am, xenl, + cols#80, it#8, lines#24, vt#3, + bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, + clear=\E[;H\E[2J$<50/>, cr=^M, cub1=^H, cud1=^J, + cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, + cuu1=\E[A$<2/>, ed=\E[J$<50/>, el=\E[K$<3/>, home=\E[H, + ht=^I, hts=\EH$<2/>, ind=\ED$<5/>, is2=\E[1;24r\E[24;1H, + kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\r\ED$<5/>, + rc=\E8, rev=\E[7m$<2/>, rf=/usr/share/lib/tabset/vt100, + ri=\EM$<5/>, rmso=\E[m$<2/>, rmul=\E[m$<2/>, + rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, + sgr0=\E[m$<2/>, smso=\E[7m$<2/>, smul=\E[4m$<2/>, + tbc=\E[3g$<2/>, ######## COMMON TERMINAL TYPES # @@ -3372,8 +3724,7 @@ altos2|alt2|altos-2|altos II, # :HL=^AP\r:SP=\E[i:\ # :IS=\E[@:DE=\E[P:IL=\E[L:NS=\E[S:PS=\E[T:\ altos3|altos5|alt3|alt5|altos-3|altos-5|altos III or V, - blink=\E[5p, ri=\EM, sgr0=\E[p, - use=altos2, + blink=\E[5p, ri=\EM, sgr0=\E[p, use=altos2, altos4|alt4|altos-4|altos IV, use=wy50, # (altos7: had extension capabilities: @@ -3403,8 +3754,7 @@ altos7|alt7|altos VII, kf42=^Aj\r, kf43=^Ak\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khome=^^, kil1=^AJ\r, kind=^AO\r, knp=\EK, kpp=\EJ, mc4=\EJ, mc5=\Ed#, nel=^M^J, ri=\Ej, - rmir=\Er, smir=\Eq, - use=adm+sgr, + rmir=\Er, smir=\Eq, use=adm+sgr, altos7pc|alt7pc|altos PC VII, kend=\ET, use=altos7, @@ -3416,10 +3766,16 @@ altos7pc|alt7pc|altos PC VII, # Vox: 1-(916)-785-4363 (Technical response line for VDTs) # 1-(800)-633-3600 (General customer support) # +# +# As of March 1998, HP no longer has any terminals in production. +# The 700 series (22, 32, 41, 44, 92, 94, 96, 98) is still being +# supported (they still have parts). So are the 2392a and 2394a. +# See the WORKSTATION CONSOLES section for the 700s. +# # Generic HP terminal - this should (hopefully) work on any HP terminal. hpgeneric|hp|hewlett-packard generic terminal, - am, da, db, mir, xhp, + OTbs, OTpt, am, da, db, mir, xhp, cols#80, lines#24, lm#0, vt#6, bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\E&a%p2%dc%p1%dY$<6>, cuu1=\EA, dch1=\EP, dl1=\EM, @@ -3481,15 +3837,13 @@ hp262x|HP 262x terminals, # sequence, we don't use it in the default. # If you like, you can use 2621-ba (brain-damaged arrow keys). hp2621-ba|2621 w/new rom and strap A set, - rmkx@, smkx@, use=hp+arrows, - use=hp2621, + rmkx@, smkx@, use=hp+arrows, use=hp2621, # hp2621 with function labels. Most of the time they are off, # but inside vi, the function key labels appear. You have to # hold down shift to get them to xmit. hp2621|hp2621a|hp2621A|2621|2621a|2621A|hp2621-wl|2621-wl|hp 2621 w/labels, - is2=\E&jA\r, rmkx=\E&jA, - use=hp2621-fl, + is2=\E&jA\r, rmkx=\E&jA, use=hp2621-fl, hp2621-fl|hp 2621, xhp@, xon, pb#19200, @@ -3508,17 +3862,18 @@ hp2621p-a|hp2621p with fn as arrows, # hp2621 with k45 keyboard hp2621-k45|hp2621k45|k45|hp 2621 with 45 keyboard, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - khome=\Eh, rmkx=\E&s0A, smkx=\E&s1A, - use=hp2621, + khome=\Eh, rmkx=\E&s0A, smkx=\E&s1A, use=hp2621, # 2621 using all 48 lines of memory, only 24 visible at any time. hp2621-48|48 line 2621, lines#48, - cup=\E&a%p2%dc%p1%dR, home=\EH, vpa=\E&a%p1%dR, use=hp2621, + cup=\E&a%p2%dc%p1%dR, home=\EH, vpa=\E&a%p1%dR, + use=hp2621, # 2621 with no labels ever. Also prevents vi delays on escape. hp2621-nl|hp 2621 with no labels, - kcub1@, kcud1@, kcuf1@, kcuu1@, khome@, rmkx@, smkx@, use=hp2621-fl, + kcub1@, kcud1@, kcuf1@, kcuu1@, khome@, rmkx@, smkx@, + use=hp2621-fl, # Needed for UCB ARPAVAX console, since lsi-11 expands tabs # (wrong). @@ -3558,7 +3913,8 @@ hp2621-nt|hp 2621 w/no tabs, hp2624|hp2624a|hp2624b|hp2624b-4p|Hewlett Packard 2624 B, da, db, lm#96, - flash=\E&w13F$<66/>\E&w12F$<66/>\E&w13F$<66/>\E&w12F, use=hp+labels, use=scrhp, + flash=\E&w13F$<66/>\E&w12F$<66/>\E&w13F$<66/>\E&w12F, + use=hp+labels, use=scrhp, # This hp2626 entry does not use any of the fancy windowing stuff # of the 2626. @@ -3581,8 +3937,8 @@ hp2626|hp2626a|hp2626p|hp 2626, da, db, lm#0, pb#19200, ed=\ED\EJ$<500>\EC, indn=\E&r%p1%dD, ip=$<4>, - is2=\E&j@\r, rin=\E&r%p1%dU, - use=hp+pfk+cr, use=hp+labels, use=scrhp, + is2=\E&j@\r, rin=\E&r%p1%dU, use=hp+pfk+cr, + use=hp+labels, use=scrhp, # This entry is for sysline. It allocates a 23 line window with # a 115 line workspace for regular use, and a 1 line window for @@ -3600,11 +3956,11 @@ hp2626-s|hp 2626 using only 23 lines, lines#23, fsl=\E&d@\E&w7f2p1I\E&w4f1I, is1=\E&q3t0{0H \E&w0f115n1I \E&w0f1n2I \E&w2f1i0d0u22l0S \E&w2f2i0d23u23l0S \E&w7f2p1I \r, - tsl=\E&w7f2p2I\E&w4f2I\r\EK\E&a%p1%dC, - use=hp2626, + tsl=\E&w7f2p2I\E&w4f2I\r\EK\E&a%p1%dC, use=hp2626, # Force terminal back to 24 lines after being 23. hp2626-ns|hp 2626 using all 24 lines, - is1=\E&q3t0{0H \E&w0f118n1I \E&w0f1n2I \E&w2f1i0d0u23l0S \E&w3f2I \E&w7f2p1I \r, use=hp2626, + is1=\E&q3t0{0H \E&w0f118n1I \E&w0f1n2I \E&w2f1i0d0u23l0S \E&w3f2I \E&w7f2p1I \r, + use=hp2626, # Various entries useful for small windows on 2626. hp2626-12|hewlett-packard 2626 12 lines, lines#12, use=hp2626, @@ -3622,8 +3978,7 @@ hp2627a-rev|hp 2627 with reverse video colors, cr=^M, cud1=^J, ht=^I, ind=^J, is2=\E&v0m1a0b0c1x1y1z1i0a0b1c1x1y1z0i0S\E&j@\r\E3\r, kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, rmul=\E&v0S\E&d@, - smul=\E&dD\E&v1S, - use=hp2621-nl, + smul=\E&dD\E&v1S, use=hp2621-nl, hp2627a|hp 2627 color terminal with no labels, cr=^M, cud1=^J, ht=^I, ind=^J, is2=\E&v0m1a1b0c1i0a1b1c2i1a0b0c0i0S\E&j@\r\E3\r, @@ -3633,8 +3988,7 @@ hp2627a|hp 2627 color terminal with no labels, hp2627c|hp 2627 color (cyan) terminal with no labels, cr=^M, cud1=^J, ht=^I, ind=^J, is2=\E&v0m1a0b0c2i1a1b0c1i0a1b1c0i0S\E&j@\r\E3\r, - kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, - use=hp2627a, + kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, use=hp2627a, # hp2640a doesn't have the Y cursor addressing feature, and C is # memory relative instead of screen relative, as we need. @@ -3669,19 +4023,17 @@ hp2645|hp45|HP 2645 series, kind=\ES, knp=\EU, kpp=\EV, kri=\ET, krmir=\ER, rev=\E&dB, rmkx=\E&s0A, sgr=\E&d%{64}%?%p1%t%{66}%|%;%?%p2%t%{68}%|%;%?%p3%t%{66}%|%;%?%p4%t%{65}%|%;%?%p5%t%{72}%|%;%?%p6%t%{66}%|%;%c, - sgr0=\E&d@, smkx=\E&s1A, smul=\E&dD, - use=hpgeneric, + sgr0=\E&d@, smkx=\E&s1A, smul=\E&dD, use=hpgeneric, # You should use this terminal at 4800 baud or less. hp2648|hp2648a|HP 2648a graphics terminal, clear=\EH\EJ$<50>, cup=\E&a%p2%dc%p1%dY$<20>, - dch1=\EP$<7>, ip=$<5>, - use=hp2645, + dch1=\EP$<7>, ip=$<5>, use=hp2645, # The HP 150 terminal is a fairly vanilla HP terminal, with the # clreol standout problem. It also has graphics capabilities and # a touch screen, which we don't describe here. hp150|hewlett packard Model 150, - use=hp2622, + OTbs, use=hp2622, # HP 2382a terminals, "the little ones." They don't have any # alternate character set support and sending out ^N/^O will @@ -3693,8 +4045,7 @@ hp2382a|hp2382|hewlett packard 2382a, pln=\E&f0a%p1%dk%p2%l%Pa%?%ga%t%ga%d%e1%;d0L%?%ga%!%t %;%p2%s, rmacs@, sgr=\E&d%{0}%Pa%?%p4%t%{1}%ga%+%Pa%;%?%p1%p3%|%p6%|%t%{2}%ga%+%Pa%;%?%p2%p6%|%t%{4}%ga%+%Pa%;%?%p1%p5%|%t%{8}%ga%+%Pa%;%?%p7%t%?%ga%ts%ga%{64}%+%e%{83}%;%e%?%ga%t%ga%{64}%+%e%{64}%;%;%c, - sgr0=\E&d@, smacs@, - use=hp+labels, use=scrhp, + sgr0=\E&d@, smacs@, use=hp+labels, use=scrhp, hp2621-a|hp2621a-a|hp2621 with fn as arrows, use=hp+pfk+arrows, use=hp2621-fl, @@ -3722,8 +4073,7 @@ newhp|generic entry for new hewlett packard terminals, rmacs=^O, rmir=\ER, rmso=\E&d@, rmul=\E&d@, rs1=\Eg, sgr=\E&d%{0}%Pa%?%p4%t%{1}%ga%+%Pa%;%?%p1%p3%|%p6%|%t%{2}%ga%+%Pa%;%?%p2%p6%|%t%{4}%ga%+%Pa%;%?%p1%p5%|%t%{8}%ga%+%Pa%;%?%p7%t%?%ga%ts%ga%{64}%+%e%{83}%;%e%?%ga%t%ga%{64}%+%e%{64}%;%;%c%?%p9%t\016%e\017%;, sgr0=\E&d@\017, smacs=^N, smir=\EQ, smso=\E&dJ, smul=\E&dD, - tbc=\E3, - use=newhpkeyboard, + tbc=\E3, use=newhpkeyboard, memhp|memory relative addressing for new HP ttys, vt#6, @@ -3759,8 +4109,7 @@ hp2621b|hp 2621b with old style keyboard, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\Eh, kind=\ET, kll=\EF, kri=\ES, pln=\E&f0a%p1%dk%p2%l%Pa%?%ga%t%ga%d%e1%;d3L%?%ga%!%t%{32}%c%;%p2%s\E%{111}%p1%+%c\r, - smln=\E&jB, - use=hp2621, + smln=\E&jB, use=hp2621, hp2621b-p|hp 2621b with printer, use=hp+printer, use=hp2621b, @@ -3815,8 +4164,7 @@ hp+color|hp with colors, # sets the screen to be 80 columns wide hp2397a|hp2397|hewlett packard 2397A color terminal, - is2=\E&w6f80X, - use=memhp, use=hp+labels, use=hp+color, + is2=\E&w6f80X, use=memhp, use=hp+labels, use=hp+color, # HP 700/44 Setup parameters: # Terminal Mode HP-PCterm @@ -3883,8 +4231,7 @@ hpsub|hp terminals -- capability subset, hpex|hp extended capabilites, cr=^M, cud1=^J, cup=\E&a%p1%dy%p2%dC, ht=^I, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, rmir=\ER, rmul=\E&d@, smir=\EQ, - smul=\E&dD, vpa=\E&a%p1%dY, - use=hpsub, + smul=\E&dD, vpa=\E&a%p1%dY, use=hpsub, # From: Ville Sulko , 05 Aug 1996 hp2|hpex2|hewlett-packard extended capabilities newer version, @@ -3911,7 +4258,7 @@ hp2|hpex2|hewlett-packard extended capabilities newer version, # HP 236 console # From: hp236|hp236 internal terminal emulator, - am, + OTbs, am, cols#80, lines#24, clear=\EF, cnorm=\EDE, cub1=^H, cup=\EE%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, cvvis=\EDB, @@ -3921,7 +4268,7 @@ hp236|hp236 internal terminal emulator, # This works on a hp300 console running Utah 4.3 BSD # From: Craig Leres hp300h|HP Catseye console, - am, da, db, mir, xhp, + OTbs, am, da, db, mir, xhp, cols#128, lines#51, lm#0, xmc#0, bel=^G, cbt=\Ei, clear=\E&a0y0C\EJ, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, @@ -3933,7 +4280,7 @@ hp300h|HP Catseye console, vpa=\E&a%p1%dY, # From: Greg Couch hp9837|hp98720|hp98721|HP 9000/300 workstations, - am, da, db, mir, xhp, + OTbs, am, da, db, mir, xhp, cols#128, it#8, lines#46, lm#0, bel=^G, cbt=\Ei, clear=\E&a0y0C\EJ, cub1=^H, cud1=\EB, cuf1=\EC, cup=\E&a%p1%dy%p2%dC, cuu1=\EA, dch1=\EP, @@ -3947,17 +4294,17 @@ hp9837|hp98720|hp98721|HP 9000/300 workstations, # HP 9845 desktop computer from BRL # (hp9845: removed unknown capability :gu: -- esr) hp9845|HP 9845, - am, da, db, eo, mir, xhp, + OTbs, am, da, db, eo, mir, xhp, cols#80, lines#21, - clear=\EH\EJ, cuf1=\EC, cup=\E&a%p2%2dc%p1%2dY, cuu1=\EA, - dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, + OTbc=\ED, clear=\EH\EJ, cuf1=\EC, cup=\E&a%p2%2dc%p1%2dY, + cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, if=/usr/share/tabset/std, il1=\EL, rmir=\ER, rmso=\E&d@, smir=\EQ, smso=\E&dB, # From: Charles A. Finnell of MITRE , developed 07SEP90 # (hp98550: replaced /usr/share/tabset/9837 with std because ,; # added empty to avoid warnings re / --esr) hp98550|hp98550a|HP 9000 Series 300 color console, - am, da, db, mir, xhp, + OTbs, am, da, db, mir, xhp, cols#128, it#8, lines#49, lm#0, acsc=, bel=^G, blink=\E&dA, bold=\E&dJ, cbt=\Ei, civis=\E*dR, clear=\EH\EJ, cnorm=\E*dQ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, @@ -3976,7 +4323,7 @@ hp98550|hp98550a|HP 9000 Series 300 color console, # (hp700-wy: removed obsolete ":nl=^J:"; # replaced /usr/share/tabset/hp700-wy with std because , -- esr) hp700-wy|HP700/41 emulating wyse30, - am, bw, mir, msgr, + OTbs, am, bw, mir, msgr, cols#80, it#8, lines#24, xmc#1, cbt=\EI, clear=^Z, cr=^M, cub1=^H, cud1=^V, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -3988,8 +4335,7 @@ hp700-wy|HP700/41 emulating wyse30, ri=\Ej, rmir=\Er, rmso=\EG0$<10/>, rmul=\EG0$<10/>, sgr0=\EG0$<10/>, smir=\Eq, smso=\EG4$<10/>, smul=\EG8$<10/>, tbc=\E0, vpa=\E[%p1%{32}%+%c, -# (hp70092: added empty to avoid warnings re / --esr) -hp70092|hp70092a|hp70092A|70092|HP 700/92, +hp70092|hp70092a|hp70092A|HP 700/92, am, da, db, xhp, cols#80, lh#2, lines#24, lm#0, lw#8, nlab#8, acsc=0cjgktlrmfn/q\,t5u6v8w7x., bel=^G, blink=\E&dA, @@ -4077,7 +4423,7 @@ adm1a|adm1|lsi adm1a, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, home=^^, ind=^J, adm2|lsi adm2, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\E;, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -4085,7 +4431,7 @@ adm2|lsi adm2, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, # (adm3: removed obsolete ":ma=^K^P:" -- esr) adm3|lsi adm3, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, ind=^J, # The following ADM-3A switch settings are assumed for normal operation: @@ -4101,19 +4447,19 @@ adm3|lsi adm3, # # (adm3a: some capabilities merged in from BRl entry -- esr) adm3a|lsi adm3a, - am, + OTbs, 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, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, rs1=^N, + OTma=^K^P, OTnl=^J, 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, kcub1=^H, kcud1=^J, kcuf1=^L, + kcuu1=^K, rs2=^N, adm3a+|adm3a plus, kbs=^H, use=adm3a, # (adm5: removed obsolete ":ma=^Hh^Jj^Kk^Ll^^H:" & duplicate ":do=^J:" -- esr) adm5|lsi adm5, xmc#1, bel=^G, cr=^M, cud1=^J, ed=\EY, el=\ET, kbs=^H, khome=^^, - rmso=\EG, smso=\EG, - use=adm3a+, + rmso=\EG, smso=\EG, use=adm3a+, # A lot of terminals other than adm11s use these. Wherever you see # use=adm+sgr with some of its capabilities disabled, try the # disabled ones. They may well work but not have been documented or @@ -4129,14 +4475,14 @@ adm+sgr|adm style highlight capabilities, # (adm11: =\EG4 was obviously erroneous because it also said # =\EG4. Looking at other ADMs confirms this -- esr) adm11|LSI ADM-11, - am, hs, - cols#80, lines#24, - bel=^G, blink=\EG2, clear=\E*, cr=^M, cub1=^H, cud1=^J, - cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, - dsl=\Eh, ed=\EY, el=\ET, fsl=\E(\r, home=^^, ht=^I, kbs=^H, - kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kf1=^A@\r, kf2=^AA\r, - kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, - kf8=^AG\r, khome=^^, nel=^M^J, tsl=\EF\E), + OTbs, am, hs, + OTkn#8, cols#80, lines#24, + OTnl=^J, bel=^G, blink=\EG2, clear=\E*, cr=^M, cub1=^H, + cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, + cuu1=^K, dsl=\Eh, ed=\EY, el=\ET, fsl=\E(\r, home=^^, ht=^I, + kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kf1=^A@\r, + kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, + kf7=^AF\r, kf8=^AG\r, khome=^^, nel=^M^J, tsl=\EF\E), use=adm+sgr, # From: Andrew Scott Beals # Corrected by Olaf Siebert , 11 May 1995 @@ -4184,8 +4530,8 @@ adm11|LSI ADM-11, # 20 - 6,8 # adm12|lsi adm12, - am, mir, - cols#80, it#8, lines#24, + OTbs, OTpt, am, mir, + OTug#1, cols#80, it#8, lines#24, bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dl1=\ER, ed=\EY, el=\ET, home=^^, hts=\E1, ich1=\EQ, il1=\EE, @@ -4196,7 +4542,7 @@ adm12|lsi adm12, use=adm+sgr, # (adm20: removed obsolete ":kn#7:" -- esr) adm20|lear siegler adm20, - am, + OTbs, am, cols#80, it#8, lines#24, bel=^G, cbt=\EI, clear=^Z, cr=^M, cub1=^H, cuf1=^L, cup=\E=%i%p2%{31}%+%c%p1%{31}%+%c, cuu1=^K, dch1=\EW, @@ -4207,13 +4553,13 @@ adm21|lear siegler adm21, xmc#1, bel=^G, cr=^M, cud1=^J, dch1=\EW, dl1=30*\ER, ed=\EY, el=\ET, ich1=\EQ, il1=30*\EE, ind=^J, invis@, kbs=^H, kcub1=^H, - kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, - use=adm+sgr, use=adm3a, + kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, use=adm+sgr, + use=adm3a, # (adm22: ":em=:" was an obvious typo for ":ei=:"; also, # removed obsolete ":kn#7:ma=j^Jk^P^K^Pl ^R^L^L :"; # removed bogus-looking \200 from before . -- esr) adm22|lsi adm22, - am, + OTbs, am, cols#80, lines#24, bel=^G, cbt=\EI, clear=\E+, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -4367,7 +4713,7 @@ adm22|lsi adm22, # OFF. If there is no such switch, you have an old adm31 and must use oadm31. # (adm31: removed obsolete ":ma=j^Jk^P^K^Pl ^R^L^L :" -- esr) adm31|lsi adm31 with sw6 set for underline mode, - am, mir, + OTbs, am, mir, cols#80, lines#24, bel=^G, clear=\E*, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -4380,19 +4726,21 @@ adm31-old|o31|old adm31, rmul@, smso=\EG4, smul@, use=adm31, # LSI ADM-36 from Col. George L. Sicherman via BRL adm36|LSI ADM36, + OTbs, OTpt, + OTkn#4, if=/usr/lib/tabset/vt100, - is2=\E<\E>\E[6;?2;?7;?8h\E[4;20;?1;?3;?4;?5;?6;?18;?19l, use=vt100, + is2=\E<\E>\E[6;?2;?7;?8h\E[4;20;?1;?3;?4;?5;?6;?18;?19l, + use=vt100, # (adm42: removed obsolete ":ma=^K^P:" -- esr) adm42|lsi adm42, - am, + OTbs, am, cols#80, lines#24, bel=^G, cbt=\EI, clear=\E;, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, cvvis=\EC\E3 \E3(, dch1=\EW, dl1=\ER, ed=\EY, el=\ET, ht=^I, il1=\EE$<270>, ind=^J, invis@, ip=$<6*>, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, pad=\177, rmir=\Er, rmul@, - smir=\Eq, smul@, - use=adm+sgr, + smir=\Eq, smul@, use=adm+sgr, # The following termcap for the Lear Siegler ADM-42 leaves the # "system line" at the bottom of the screen blank (for those who # find it distracting otherwise) @@ -4401,8 +4749,7 @@ adm42-ns|lsi adm-42 with no system line, cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<6>\EF \011, dch1=\EW\EF \011, dl1=\ER\EF \011, ed=\EY\EF \011, el=\ET\EF \011, il1=\EE\EF \011, rmir=\Er\EF \011, - smir=\Eq\EF \011, - use=adm42, + smir=\Eq\EF \011, use=adm42, # ADM 1178 terminal -- rather like an ADM-42. Manual is dated March 1 1985. # The insert mode of this terminal is commented out because it's broken for our # purposes in that it will shift the position of every character on the page, @@ -4507,8 +4854,7 @@ qvt101+|qvt101p|qume qvt 101 PLUS product, kf1=^A@\r, kf10=^AI\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, khome=^^, kich1=\EQ, kil1=\EE, mc4=\EA, mc5=\E@, rmso=\E(, - smso=\E0P\E), tbc=\E3, tsl=\Eg\Ef, - use=adm+sgr, + smso=\E0P\E), tbc=\E3, tsl=\Eg\Ef, use=adm+sgr, qvt102|qume qvt 102, cnorm=\E., use=qvt101, # (qvt103: added / based on init string -- esr) @@ -4544,8 +4890,7 @@ qvt119+|qvt119p|qvt119|qume qvt 119 and 119PLUS terminals, 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, khome=^^, mc4=\EA, mc5=\E@, ri=\EJ, rmir=\Er, smir=\Eq, smul=\EG8, - tbc=\E3, tsl=\Eg\Ef, - use=adm+sgr, + tbc=\E3, tsl=\Eg\Ef, use=adm+sgr, qvt119+-25|qvt119p-25|QVT 119 PLUS with 25 data lines, lines#25, use=qvt119+, qvt119+-w|qvt119p-w|qvt119-w|QVT 119 and 119 PLUS in 132 column mode, @@ -4557,8 +4902,7 @@ qvt203|qvt203+|qume qvt 203 Plus, dch1=\E[P$<7>, dl1=\E[M$<99>, il1=\E[L$<99>, ind=\n$<30>, ip=$<7>, kf0=\E[29~, kf1=\E[17~, kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, - kf9=\E[28~, rmir=\E[4l, smir=\E[4h, - use=qvt103, + kf9=\E[28~, rmir=\E[4l, smir=\E[4h, use=qvt103, qvt203-w|qvt203-w-am|qume qvt 203 PLUS in 132 cols (w/advanced video), cols#132, lines#24, rs2=\E>\E[?3h\E[?4l\E[?5l\E[?8h, use=qvt203, @@ -4678,7 +5022,7 @@ tvi803|televideo 803, # (tvi910: removed obsolete ":ma=^Kk^Ll^R^L:"; added , , , # , , , , from SCO entry -- esr) tvi910|televideo model 910, - am, msgr, + OTbs, am, msgr, cols#80, it#8, lines#24, xmc#1, bel=^G, cbt=\EI, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, ed=\EY, el=\ET, @@ -4722,13 +5066,12 @@ tvi910+|televideo 910+, dch1=\EW, dl1=\ER$<33*>, home=^^, ich1=\EQ, il1=\EE$<33*>, kf0=^A@\r, kf1=^AA\r, kf2=^AB\r, kf3=^AC\r, kf4=^AD\r, kf5=^AE\r, kf6=^AF\r, kf7=^AG\r, kf8=^AH\r, kf9=^AI\r, - ll=\E=7\s, - use=tvi910, + ll=\E=7\s, use=tvi910, # (tvi912: removed obsolete ":ma=^K^P^L :", added and # from BRL entry -- esr) tvi912|tvi914|tvi920|old televideo 912/914/920, - am, msgr, + OTbs, OTpt, am, msgr, cols#80, it#8, lines#24, xmc#1, bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -4809,15 +5152,14 @@ tvi912cc|tvi912 at cowell college, 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, + kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, use=tvi912, # Televideo 921 and variants # From: Tim Theisen 22 Sept 1995 # (tvi921: removed :ko=bt: before translation, I see no backtab cap; # also added empty to suppress tic warning -- esr) tvi921|televideo model 921 with sysline same as page & real vi function, - am, hs, xenl, xhp, + OTbs, OTpt, am, hs, xenl, xhp, cols#80, lines#24, xmc#0, acsc=, clear=^Z, cnorm=\E.3, cr=^M, cub1=^H, cud1=^V, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<3/>, cuu1=^K, @@ -4827,8 +5169,7 @@ tvi921|televideo model 921 with sysline same as page & real vi function, is2=\El\E"\EF1\E.3\017\EA\E<, kbs=^H, kclr=^Z, kcub1=^H, kcud1=^V, kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER$<1*/>, ked=\EY, kel=\ET, kich1=\EQ, kil1=\EE, nel=^M^J, rmacs=\E%, - rmir=, smacs=\E$, smir=, tsl=\Ef\EG0, - use=adm+sgr, + rmir=, smacs=\E$, smir=, tsl=\Ef\EG0, use=adm+sgr, # without the beeper # (tvi92B: removed :ko=bt: before translation, I see no backtab cap; # also added empty to suppress tic warning -- esr) @@ -4843,14 +5184,12 @@ tvi92B|televideo model 921 with sysline same as page & real vi function & no bee invis@, is2=\El\E"\EF1\E.3\017\EA\E<, kbs=^H, kclr=^Z, kcub1=^H, kcud1=^V, kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER$<1*/>, ked=\EY, kel=\ET, kich1=\EQ, kil1=\EE, - nel=^M^J, rmacs=\E%, smacs=\E$, tsl=\Ef\EG0, - use=adm+sgr, + nel=^M^J, rmacs=\E%, smacs=\E$, tsl=\Ef\EG0, use=adm+sgr, # (tvi92D: removed :ko=bt: before translation, I see no backtab cap -- esr) tvi92D|tvi92B with DTR instead of XON/XOFF & better padding, dl1=\ER$<2*/>, il1=\EE$<2*/>, is2=\El\E"\EF1\E.3\016\EA\E<, kdl1=\ER$<2*/>, - kil1=\EE$<2*/>, - use=tvi92B, + kil1=\EE$<2*/>, use=tvi92B, # (tvi924: This used to have , . I put the new strings # in from a BSD termcap file because it looks like they do something the @@ -4873,7 +5212,8 @@ tvi924|televideo tvi924, kf6=^AF\r, kf7=^AG\r, kf8=^AH\r, kf9=^AI\r, khome=^^, kich1=\EQ, kil1=\EE, lf0=F1, lf1=F2, lf10=F11, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F7, lf7=F8, lf8=F9, lf9=F10, - pfkey=\E|%p1%{49}%+%c%p2%s\031, ri=\Ej, tbc=\E3, tsl=\Ef, use=adm+sgr, + pfkey=\E|%p1%{49}%+%c%p2%s\031, ri=\Ej, tbc=\E3, tsl=\Ef, + use=adm+sgr, # TVI925 DIP switches. In each of these, D = Down and U = Up, # @@ -5009,7 +5349,7 @@ tvi924|televideo tvi924, # # (tvi925: BSD has . I got and from there -- esr) tvi925|televideo 925, - am, bw, hs, ul, + OTbs, am, bw, hs, ul, cols#80, lines#24, xmc#1, bel=^G, cbt=\EI, clear=^Z, cnorm=\E.4, cr=^M, cub1=^H, cud1=^V, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, @@ -5020,8 +5360,7 @@ tvi925|televideo 925, ked=\EY, kel=\ET, 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, khome=^^, kich1=\EQ, kil1=\EE, ri=\Ej, tbc=\E3, - tsl=\Eh\Ef, - use=adm+sgr, + tsl=\Eh\Ef, use=adm+sgr, # TeleVideo 925 from Mitch Bradley via BRL # to avoid "magic cookie" standout glitch: tvi925-hi|TeleVideo Model 925 with half intensity standout mode, @@ -5126,7 +5465,7 @@ tvi925-hi|TeleVideo Model 925 with half intensity standout mode, # should be present and all tvi native modes use the same string for this. # Finally, note that BSD has cud1=^V. -- esr) tvi950|televideo 950, - am, hs, mir, msgr, xenl, xon, + OTbs, am, hs, mir, msgr, xenl, xon, cols#80, it#8, lines#24, xmc#1, acsc=b\011c\014d\re\ni\013, bel=^G, cbt=\EI, clear=\E*, cr=^M, cub1=^H, cud1=^J, cuf1=^L, @@ -5158,8 +5497,7 @@ tvi950|televideo 950, tvi950-2p|televideo950 w/2 pages, is2=\EDF\EC\Ed\EG0\Eg\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\Ek\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0\E\\2\E-07 \011, rmcup=\E\\2\E-07\s, rmkx=\Ek, smcup=\E\\1\E-07\s, - smkx=\El, - use=tvi950, + smkx=\El, use=tvi950, # # is for 950 with four pages adds the following: # set 96 line page (\E\\3) @@ -5173,8 +5511,7 @@ tvi950-2p|televideo950 w/2 pages, tvi950-4p|televideo950 w/4 pages, is2=\EDF\EC\Ed\EG0\Eg\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\Ek\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0\E\\3\E-07 \011, rmcup=\E\\3\E-07\s, rmkx=\Ek, smcup=\E\\1\E-07\s, - smkx=\El, - use=tvi950, + smkx=\El, use=tvi950, # # for reverse video 950 changes the following: # set reverse video (\Ed) @@ -5183,23 +5520,22 @@ tvi950-4p|televideo950 w/4 pages, # tvi950-rv|televideo950 rev video, flash=\Ed$<200/>\Eb, - is2=\EDF\EC\Eb\EG0\Eg\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\El\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0, use=tvi950, + is2=\EDF\EC\Eb\EG0\Eg\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\El\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0, + use=tvi950, # tvi950-rv-2p uses the appropriate entries from 950-2p and 950-rv tvi950-rv-2p|televideo950 rev video w/2 pages, flash=\Ed$<200/>\Eb, is2=\EDF\EC\Eb\EG0\Eg\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\Ek\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0\E\\2\E-07\s, rmcup=\E\\2\E-07\s, rmkx=\Ek, smcup=\E\\1\E-07\s, - smkx=\El, - use=tvi950, + smkx=\El, use=tvi950, # tvi950-rv uses the appropriate entries from 950-4p and 950-rv tvi950-rv-4p|televideo950 rev video w/4 pages, flash=\Ed$<200/>\Eb, is2=\EDF\EC\Eb\EG0\Er\EO\E'\E(\E%\Ew\EX\Ee \017\011\Ek\E016\E004\Ex0\0\0\Ex1\0\0\Ex2\0\0\011\Ex3\0\0\Ex4\r\0\E\\3\E-07\s, rmcup=\E\\3\E-07\s, rmkx=\Ek, smcup=\E\\1\E-07\s, - smkx=\El, - use=tvi950, + smkx=\El, use=tvi950, # From: Andreas Stolcke # (tvi955: removed obsolete ":ma:=^Vj^Kk^Hh^Ll^^H"; # removed incorrect (and overridden) ":do=^J:"; fixed broken continuations in @@ -5211,7 +5547,7 @@ tvi950-rv-4p|televideo950 rev video w/4 pages, # If the BSD termcap file was right, would # also work. tvi955|televideo 955, - mc5i, msgr@, + OTbs, mc5i, msgr@, it#8, xmc@, acsc=0_`RjHkGlFmEnIoPqKsQtMuLvOwNxJ, blink=\EG2, civis=\E.0, cnorm=\E.2, cud1=^V, cup=\E[%i%p1%d;%p2%dH, @@ -5228,8 +5564,7 @@ tvi955-w|955-w|televideo955 w/132 cols, # use half-intensity as normal mode, full intensity as tvi955-hb|955-hb|televideo955 half-bright, bold=\E[=5l, dim@, is2=\E[=3l\EF1\Ed\EG0\E[=5h\E%\El, - sgr0=\EG0\E[=5h, - use=tvi955, + sgr0=\EG0\E[=5h, use=tvi955, # From: Humberto Appleton , 880521 UT Austin # (tvi970: removed ":sg#0:"; removed =\E[m, =\E[m; # added ////// from BRL. @@ -5237,7 +5572,7 @@ tvi955-hb|955-hb|televideo955 half-bright, # it does to the function keys. I deduced /. # also added empty to suppress tic warning, -- esr) tvi970|televideo 970, - am, da, db, mir, msgr, + OTbs, OTpt, am, da, db, mir, msgr, cols#80, it#8, lines#24, acsc=, cbt=\E[Z, clear=\E[H\E[2J, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\ED, cuf1=\E[C, cup=\E[%i%p1%d;%p2%df, @@ -5253,7 +5588,8 @@ tvi970|televideo 970, smcup=\E[?20l\E[?7h\E[1Q, smir=\E[4h, smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, tvi970-vb|televideo 970 with visual bell, - flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l, use=tvi970, + flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l, + use=tvi970, tvi970-2p|televideo 970 with using 2 pages of memory, rmcup=\E[H\E[J\E[V, smcup=\E[U\E[?20l\E[?7h\E[1Q, use=tvi970, @@ -5267,7 +5603,7 @@ tvi970-2p|televideo 970 with using 2 pages of memory, # The ////, and caps are from BRL, which says: # F1 and F2 should be programmed as ^A and ^B; required for UNIFY. tvipt|televideo personal terminal, - am, + OTbs, am, cols#80, lines#24, cbt=\EI, clear=^Z, cub1=^H, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dl1=\ER$<5*>, @@ -5338,15 +5674,15 @@ tvi9065|televideo 9065, # Note especially the function. - are really l4-l6 in # disguise; - are really l1-l3. vi50|visual 50, - am, da, db, msgr, + OTbs, OTpt, am, da, db, msgr, cols#80, it#8, lines#24, - bel=^G, cbt=\Ez$<4/>, clear=\EH\EJ, cr=^M, cub1=^H, cud1=\EB, - cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, - dl1=\EM$<3*/>, ed=\EJ, el=\EK$<16/>, home=\EH, ht=^I, - il1=\EL, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\EV, kf5=\EE, - kf6=\E], kf7=\EL, kf8=\Ev, kf9=\EM, khome=\EH, nel=^M^J, - ri=\EI, rmso=\ET, rmul=\EW, smso=\EU, smul=\ES, + OTnl=^J, bel=^G, cbt=\Ez$<4/>, clear=\EH\EJ, cr=^M, cub1=^H, + cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, + cuu1=\EA, dl1=\EM$<3*/>, ed=\EJ, el=\EK$<16/>, home=\EH, + ht=^I, il1=\EL, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, + kcuf1=\EC, kcuu1=\EA, kf1=\EP, kf2=\EQ, kf3=\ER, kf4=\EV, + kf5=\EE, kf6=\E], kf7=\EL, kf8=\Ev, kf9=\EM, khome=\EH, + nel=^M^J, ri=\EI, rmso=\ET, rmul=\EW, smso=\EU, smul=\ES, # this one was BSD & SCO's vi50 vi50adm|visual 50 in adm3a mode, am, msgr, @@ -5356,9 +5692,9 @@ vi50adm|visual 50 in adm3a mode, ed=\Ek, el=\EK, home=\EH, ht=^I, il1=\EL, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, khome=\EH, rmso=\ET, smso=\EU, -# From: Jeff Siegal +# From: Jeff Siegal vi55|Visual 55, - am, mir, msgr, + OTbs, am, mir, msgr, cols#80, it#8, lines#24, clear=\Ev, csr=\E_%p1%{65}%+%c%p2%{65}%+%c, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, @@ -5378,8 +5714,8 @@ vi55|Visual 55, # Supposedly "4*" delays should be used for , , , , # and strings, but we seem to get along fine without them. vi200|visual 200, - am, mir, msgr, - cols#80, it#8, lines#24, + OTbs, OTpt, am, mir, msgr, + OTkn#10, cols#80, it#8, lines#24, acsc=, bel=^G, cbt=\Ez, clear=\Ev, cnorm=\Ec, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ed, dch1=\EO, dim=\E4, dl1=\EM, ed=\Ey, @@ -5536,8 +5872,7 @@ wy30-mc|wyse30-mc|wyse 30 with magic cookies, rmcup=\EG0, rmso=\EG0, sgr=\EG%{48}%?%p2%p6%|%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;, sgr0=\EG0\E(\EH\003, smacs=\EG0\EH\002, smcup=, - smso=\EG4, use=wy30, - use=adm+sgr, + smso=\EG4, use=wy30, use=adm+sgr, # The mandatory pause used by does not work with # older versions of terminfo. If you see this effect then # unset xon and delete the / from the delay. @@ -5593,16 +5928,15 @@ wy50-mc|wyse50-mc|wyse 50 with magic cookies, rmacs=\EG0\EH\003, rmcup=\EG0, rmso=\EG0, sgr=\EG%{48}%?%p2%p6%|%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;, sgr0=\EG0\E(\EH\003, smacs=\EG0\EH\002, smcup=, - smso=\EGt, use=wy50, - use=adm+sgr, + smso=\EGt, use=wy50, use=adm+sgr, wy50-vb|wyse50-vb|wyse 50 visible bell, bel@, use=wy50, wy50-w|wyse50-w|wyse 50 132-column, cols#132, lw#7, nlab#16, wsl#97, - cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, use=wy50, + cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, + use=wy50, wy50-wvb|wyse50-wvb|wyse 50 132-column visible bell, - bel@, - use=wy50-w, + bel@, use=wy50-w, # # The Wyse 350 is a Wyse 50 with color. @@ -5652,16 +5986,15 @@ wy350|wyse350|Wyse 350, setf=%?%p1%{0}%=%t%{76}%e%p1%{1}%=%t%{64}%e%p1%{2}%=%t%{8}%e%p1%{3}%=%t%{72}%e%p1%{4}%=%t%{4}%e%p1%{5}%=%t%{68}%e%p1%{6}%=%t%{12}%e%p1%{7}%=%t%{0}%;%PC\EG%gC%gA%+%{48}%+%c, sgr=%{0}%?%p4%t%{2}%|%;%?%p7%t%{1}%|%;%PA\EG%?%gC%t%gC%e%{0}%?%p1%t%{4}%|%;%?%p2%t%{8}%|%;%?%p3%t%{4}%|%;%?%p5%t%{64}%|%;%;%gA%+%{48}%+%c%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;, sgr0=\EG0\E(\EH\003%{0}%PA%{0}%PC, smacs=\EG0\EH\002, - smir=\Eq, smln=\EA10, tbc=\E0, tsl=\EF, - use=adm+sgr, + smir=\Eq, smln=\EA10, tbc=\E0, tsl=\EF, use=adm+sgr, wy350-vb|wyse350-vb|wyse 350 visible bell, bel@, use=wy350, wy350-w|wyse350-w|wyse 350 132-column, cols#132, lw#7, nlab#16, wsl#97, - cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, use=wy350, + cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<2>, is1=\E`;\E`9$<30>, + use=wy350, wy350-wvb|wyse350-wvb|wyse 350 132-column visible bell, - bel@, - use=wy350-w, + bel@, use=wy350-w, # # This terminfo description is untested. # The wyse100 emulates an adm31, so the adm31 entry should work. @@ -5675,8 +6008,7 @@ wy100|wyse 100, invis@, is2=\Eu\E0, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, kf1=^A@\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, khome=\E{, - rmir=\Er, smir=\Eq, tsl=\EF, - use=adm+sgr, + rmir=\Er, smir=\Eq, tsl=\EF, use=adm+sgr, # # The Wyse 120/150 has most of the features of the Wyse 60. # This terminal does not need padding up to 9600 baud! @@ -5712,8 +6044,7 @@ wy120|wyse120|wy150|wyse150|Wyse 120/150, sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EcE%e\EcD%;\EG%{48}%?%p2%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c, sgr0=\E(\EH\003\EG0\EcD, smacs=\EcE, smam=\Ed/, smcup=\Ew0, smir=\Eq, smln=\EA10, smso=\EGt, smxon=\Ec21, - tbc=\E0, tsl=\EF, - use=adm+sgr, + tbc=\E0, tsl=\EF, use=adm+sgr, # wy120-w|wyse120-w|wy150-w|wyse150-w|wyse 120/150 132-column, cols#132, lw#7, nlab#16, wsl#97, @@ -5729,12 +6060,10 @@ wy120-25-w|wyse120-25-w|wy150-25-w|wyse150-25-w|wyse 120/150 132-column 25-lines pln@, rs3=\EwG\Ee)$<100>, use=wy120-w, # wy120-vb|wyse120-vb|wy150-vb|wyse150-vb|Wyse 120/150 visible bell, - bel@, - use=wy120, + bel@, use=wy120, # wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column visible bell, - bel@, - use=wy120-w, + bel@, use=wy120-w, # # The Wyse 60 is like the Wyse 50 but with more padding. # The reset strings are slow and the pad times very depending @@ -5795,8 +6124,7 @@ wy60|wyse60|Wyse 60, sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EcE%e\EcD%;\EG%{48}%?%p2%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c, sgr0=\E(\EH\003\EG0\EcD, smacs=\EcE, smam=\Ed/, smcup=\Ew0, smir=\Eq, smln=\EA10, smso=\EGt, smxon=\Ec21, - tbc=\E0, tsl=\EF, - use=adm+sgr, + tbc=\E0, tsl=\EF, use=adm+sgr, # wy60-w|wyse60-w|wyse 60 132-column, cols#132, lw#7, nlab#16, wsl#97, @@ -5815,14 +6143,12 @@ wy60-42|wyse60-42|wyse 60 80-column 42-lines, clear=\E+$<260>, cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<2>, dch1=\EW$<16>, dl1=\ER$<11>, ed=\Ey$<260>, il1=\EE$<11>, ind=\n$<9>, ip=$<5>, is1=\EcB2\EcC3, nel=\r\n$<6>, - ri=\Ej$<10>, rs3=\Ee*$<150>, - use=wy60, + ri=\Ej$<10>, rs3=\Ee*$<150>, use=wy60, wy60-42-w|wyse60-42-w|wyse 60 132-column 42-lines, cols#132, lw#7, nlab#16, wsl#97, clear=\E+$<260>, cup=\Ea%i%p1%dR%p2%dC$<2>, dch1=\EW$<19>, ed=\Ey$<260>, home=\036$<2>, ip=$<6>, - nel=\r\n$<11>, rs2=\EeF$<150>\E`;$<150>, - use=wy60-42, + nel=\r\n$<11>, rs2=\EeF$<150>\E`;$<150>, use=wy60-42, # wy60-43|wyse60-43|wyse 60 80-column 43-lines, lh@, lines#43, lw@, nlab@, @@ -5834,8 +6160,7 @@ wy60-43-w|wyse60-43-w|wyse 60 132-column 43-lines, wy60-vb|wyse60-vb|Wyse 60 visible bell, bel@, use=wy60, wy60-w-vb|wy60-wvb|wyse60-wvb|Wyse 60 132-column visible bell, - bel@, - use=wy60-w, + bel@, use=wy60-w, # The Wyse-99GT looks at lot like the Wyse 60 except that it # does not have the 42/43 line mode. In the Wyse-60 the "lines" @@ -5858,13 +6183,13 @@ wy99gt|wyse99gt|Wyse 99gt, el=\Et$<5>, flash=\E`8$<100/>\E`9, ht=\011$<1>, il1=\EE$<4>, ind=\n$<4>, ip=$<2>, is3=\Ew0$<20>, nel@, ri=\Ej$<3>, rmcup=\Ew0, rs2=\E`\:$<150>, smcup=\Ew1, - u0=\E~>\E8, u1=\E[42h, - use=wy60, + u0=\E~>\E8, u1=\E[42h, use=wy60, # wy99gt-w|wyse99gt-w|wyse 99gt 132-column, cols#132, lw#7, nlab#16, wsl#97, clear=\E+$<160>, cup=\Ea%i%p1%dR%p2%dC$<2>, - dch1=\EW$<9>, ed=\Ey$<160>, ip=$<4>, rs2=\E`;$<150>, use=wy99gt, + dch1=\EW$<9>, ed=\Ey$<160>, ip=$<4>, rs2=\E`;$<150>, + use=wy99gt, # wy99gt-25|wyse99gt-25|wyse 99gt 80-column 25-lines, lh@, lines#25, lw@, nlab@, @@ -5878,8 +6203,7 @@ wy99gt-vb|wyse99gt-vb|Wyse 99gt visible bell, bel@, use=wy99gt, # wy99gt-w-vb|wy99gt-wvb|wyse99gt-wvb|Wyse 99gt 132-column visible bell, - bel@, - use=wy99gt-w, + bel@, use=wy99gt-w, # Can't set tabs! Other bugs (ANSI mode only): # - can't redefine function keys (anyway, key redefinition in ANSI mode @@ -5929,8 +6253,7 @@ wy99-ansi|Wyse WY-99GT in ansi mode (int'l PC keyboard), # This is the american terminal. Here tabs work fine. # From: Francesco Potorti` , 24 Aug 1998 wy99a-ansi|Wyse WY-99GT in ansi mode (US PC keyboard), - hts=\EH, is3=\E[?5l, rs3=\E[?5l, tbc=\E[3g, - use=wy99-ansi, + hts=\EH, is3=\E[?5l, rs3=\E[?5l, tbc=\E[3g, use=wy99-ansi, # This terminal (firmware version 02) has a lot of bugs: # - can't set tabs; @@ -5970,8 +6293,7 @@ wy99f|wy99fgt|wy-99fgt|Wyse WY-99GT (int'l PC keyboard), # This is the american terminal. Here tabs work. # From: Francesco Potorti` , 24 Aug 1998 wy99fa|wy99fgta|wy-99fgta|Wyse WY-99GT (US PC keyboard), - hts=\E1, tbc=\E0, - use=wy99f, + hts=\E1, tbc=\E0, use=wy99f, # # The Wyse 160 is combination of the WY-60 and the WY-99gt. @@ -6022,8 +6344,7 @@ wy160|wyse160|Wyse 160, sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EcE%e\EcD%;\EG%{48}%?%p2%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c, sgr0=\E(\EH\003\EG0\EcD, smacs=\EcE, smam=\Ed/, smcup=\Ew1, smir=\Eq, smln=\EA10, smso=\EGt, smxon=\Ec21, - tbc=\E0, tsl=\EF, - use=adm+sgr, + tbc=\E0, tsl=\EF, use=adm+sgr, # wy160-w|wyse160-w|wyse 160 132-column, cols#132, lw#7, nlab#16, wsl#90, @@ -6041,13 +6362,11 @@ wy160-42|wyse160-42|wyse 160 80-column 42-lines, lines#42, clear=\E+$<50>, dl1=\ER$<2>, ed=\Ey$<50>, il1=\EE$<2>, ind=\n$<2>, is1=\EcB2\EcC3, nel=\r\n$<2>, ri=\Ej$<2>, - rs3=\Ee*$<150>, - use=wy160, + rs3=\Ee*$<150>, use=wy160, wy160-42-w|wyse160-42-w|wyse 160 132-column 42-lines, cols#132, lw#7, nlab#16, wsl#90, cup=\Ea%i%p1%dR%p2%dC, dch1=\EW$<8>, ip=$<3>, - rs2=\EeF$<150>\E`;$<150>, - use=wy160-42, + rs2=\EeF$<150>\E`;$<150>, use=wy160-42, # wy160-43|wyse160-43|wyse 160 80-column 43-lines, lh@, lines#43, lw@, nlab@, @@ -6059,8 +6378,7 @@ wy160-43-w|wyse160-43-w|wyse 160 132-column 43-lines, wy160-vb|wyse160-vb|Wyse 160 visible bell, bel@, use=wy160, wy160-w-vb|wy160-wvb|wyse160-wvb|Wyse 160 132-column visible bell, - bel@, - use=wy160-w, + bel@, use=wy160-w, # # The Wyse 75 is a vt100 lookalike without advanced video. # @@ -6188,8 +6506,53 @@ wy85-w|wyse85-w|wyse 85 in 132-column mode, # # Wyse 85 in 132-column mode with visual bell. wy85-wvb|wyse85-wvb|wyse 85 with visible bell 132-columns, - bel@, - use=wy85-w, + bel@, use=wy85-w, + +# From: Kevin Turner , 12 Jul 1998 +# This copes with an apparent firmware bug in the wy85. He writes: +# "What I did was change leave the terminal cursor keys set to Normal +# (instead of application), and change \E[ to \233 for all the keys in +# terminfo. At one point, I found some reference indicating that this +# terminal bug (not sending \E[) was acknowledged by Wyse (so it's not just +# me), but I can't find that and the server under my bookmark to "Wyse +# Technical" isn't responding. So there's the question of wether the wy85 +# terminfo should reflect the manufactuer's intended behaviour of the terminal +# or the actual." +wy85-8bit|wyse85-8bit|wyse 85 in 8-bit mode, + am, hs, mc5i, mir, msgr, xenl, xon, + cols#80, it#8, lines#24, wsl#80, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, + clear=\E[H\E[J$<110>, cnorm=\E[?25h, cr=^M, + csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, + cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH$<1>, cuu=\E[%p1%dA, cuu1=\E[A, + dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[2m, + dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l, + ech=\E[%p1%dX, ed=\E[J$<110>, el=\E[K$<1>, el1=\E[1K, + enacs=\E)0, flash=\E[30h\E\,\E[30l$<300>, + fsl=\E[1;24r\E8, home=\E[H, ht=\011$<1>, hts=\EH, + 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=\233D, kcud1=\233B, + kcuf1=\233C, kcuu1=\233A, kdch1=\2333~, kent=\EOM, + kf1=\EOP, kf10=\23321~, kf11=\23323~, kf12=\23324~, + kf13=\23325~, kf14=\23326~, kf15=\23328~, kf16=\23329~, + kf17=\23331~, kf18=\23332~, kf19=\23333~, kf2=\EOQ, + kf20=\23334~, kf3=\EOR, kf4=\EOS, kf6=\23317~, kf7=\23318~, + kf8=\23319~, kf9=\23320~, kfnd=\2331~, khlp=\23328~, + khome=\23326~, kich1=\2332~, knp=\2336~, kpp=\2335~, + kslt=\2334~, 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, # # Wyse 185 emulating a vt320 7 bit mode. # @@ -6242,7 +6605,8 @@ wy185|wyse185|wyse 185, # Wyse 185 with 24 data lines and top status (terminal status) wy185-24|wyse185-24|wyse 185 with 24 data lines, hs@, - dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, use=wy185, + dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, + use=wy185, # # Wyse 185 with visual bell. wy185-vb|wyse185-vb|wyse 185+flash, @@ -6252,8 +6616,7 @@ wy185-vb|wyse185-vb|wyse 185+flash, wy185-w|wyse185-w|wyse 185 in 132-column mode, cols#132, wsl#132, dch=\E[%p1%dP$<7>, dch1=\E[P$<7>, ich=\E[%p1%d@$<7>, - ip=$<7>, rs2=\E[35h\E[?3h, - use=wy185, + ip=$<7>, rs2=\E[35h\E[?3h, use=wy185, # # Wyse 185 in 132-column mode with visual bell. wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols, @@ -6292,8 +6655,7 @@ wy325|wyse325|Wyse epc, sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EcE%e\EcD%;\EG%{48}%?%p2%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c, sgr0=\E(\EH\003\EG0\EcD, smacs=\EcE, smam=\Ed/, smcup=\Ew1, smir=\Eq, smln=\EA10, smso=\EGt, tbc=\E0, - tsl=\EF, - use=adm+sgr, + tsl=\EF, use=adm+sgr, # # lines 24 columns 80 vb @@ -6324,8 +6686,7 @@ wy325-25w|wyse325-25w|wy325 132 columns, # lines 25 columns 132 vb # wy325-w-vb|wy325-wvb|wyse325-wvb|wyse-325 wide mode reverse video, - bel@, - use=wy325-w, + bel@, use=wy325-w, # # lines 42 columns 80 @@ -6343,8 +6704,7 @@ wy325-42w|wyse325-42w|wyse-325 42 lines wide mode, # lines 42 columns 132 vb # wy325-42w-vb|wy325-42wvb|wyse-325 42 lines wide mode visual bell, - bel@, - use=wy325-w, + bel@, use=wy325-w, # # lines 43 columns 80 # @@ -6361,8 +6721,7 @@ wy325-43w|wyse325-43w|wyse-325 43 lines wide mode, # lines 43 columns 132 vb # wy325-43w-vb|wy325-43wvb|wyse-325 43 lines wide mode visual bell, - bel@, - use=wy325-w, + bel@, use=wy325-w, # Wyse 370 -- 24 line screen with status line. # @@ -6427,8 +6786,7 @@ wy370|wyse370|wy370-101k|Wyse 370 with 101 key keyboard, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf2=\E[?3i, kf3=\E[2i, kf4=\E[@, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, kich1=\EOP, kil1=\EOP, - knp=\E[U, kpp=\E[V, - use=wy370-nk, + knp=\E[U, kpp=\E[V, use=wy370-nk, # # Function key set for the VT-320 (and wy85) compatible keyboard # @@ -6451,8 +6809,7 @@ wy370-EPC|Wyse 370 with 102 key keyboard, kcuu1=\E[A, kend=\E[1~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[M, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - khome=\E[H, kich1=\E[2~, knp=\E[U, kpp=\E[V, - use=wy370-nk, + khome=\E[H, kich1=\E[2~, knp=\E[U, kpp=\E[V, use=wy370-nk, # # Wyse 370 with visual bell. wy370-vb|Wyse 370 with visible bell, @@ -6465,8 +6822,7 @@ wy370-w|Wyse 370 in 132-column mode, # # Wyse 370 in 132-column mode with visual bell. wy370-wvb|Wyse 370 with visible bell 132-columns, - flash=\E[30h\E\,\E[30l$<300>, - use=wy370-w, + flash=\E[30h\E\,\E[30l$<300>, use=wy370-w, wy370-rv|Wyse 370 reverse video, rs3=\E[32h\E[?5h, use=wy370, # @@ -6487,8 +6843,7 @@ wy99gt-tek|Wyse 99gt Tektronix 4010/4014 emulator, # wy160-tek|Wyse 160 Tektronix 4010/4014 emulator, cup=\035%{3103}%{91}%p1%*%-%Py%p2%{55}%*%Px%gy%{128}%/%{31}%&%{32}%+%c%gy%{3}%&%{4}%*%gx%{3}%&%+%{96}%+%c%gy%{004}%/%{31}%&%{96}%+%c%gx%{128}%/%{31}%&%{32}%+%c%gx%{004}%/%{31}%&%{64}%+%c\037, - home=^]8`g @\037, - use=wy99gt-tek, + home=^]8`g @\037, use=wy99gt-tek, # # Wyse 370 Tektronix 4010/4014 emulator, # @@ -6573,7 +6928,8 @@ wy520|wyse520|wyse 520, # Wyse 520 with 24 data lines and status (terminal status) wy520-24|wyse520-24|wyse 520 with 24 data lines, hs@, - dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, use=wy520, + dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, + use=wy520, # # Wyse 520 with visual bell. wy520-vb|wyse520-vb|wyse 520 with visible bell, @@ -6583,13 +6939,11 @@ wy520-vb|wyse520-vb|wyse 520 with visible bell, wy520-w|wyse520-w|wyse 520 in 132-column mode, cols#132, wsl#132, dch=\E[%p1%dP$<7>, dch1=\E[P$<7>, ich=\E[%p1%d@$<7>, - ip=$<7>, rs2=\E[35h\E[?3h, - use=wy520, + ip=$<7>, rs2=\E[35h\E[?3h, use=wy520, # # Wyse 520 in 132-column mode with visual bell. wy520-wvb|wyse520-wvb|wyse 520 with visible bell 132-columns, - flash=\E[30h\E\,\E[30l$<100>, - use=wy520-w, + flash=\E[30h\E\,\E[30l$<100>, use=wy520-w, # # # Wyse 520 emulating a vt420 7 bit mode. @@ -6608,81 +6962,87 @@ wy520-epc|wyse520-epc|wyse 520 with EPC keyboard, # # Wyse 520 with 24 data lines and status (terminal status) # with EPC keyboard. -wy520-epc-24|wyse520-pc-24|wyse 520 with 24 data lines, +wy520-epc-24|wyse520-pc-24|wyse 520 with 24 data lines and EPC keyboard, hs@, - dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, use=wy520-epc, + dsl@, fsl@, rs3=\E[?5l\E[47h\E[40l\E[1;24r, tsl@, + use=wy520-epc, # # Wyse 520 with visual bell. -wy520-epc-vb|wyse520-pc-vb|wyse 520 with visible bell, - flash=\E[30h\E\,\E[30l$<100>, - use=wy520-epc, +wy520-epc-vb|wyse520-pc-vb|wyse 520 with visible bell and EPC keyboard, + flash=\E[30h\E\,\E[30l$<100>, use=wy520-epc, # # Wyse 520 in 132-column mode. wy520-epc-w|wyse520-epc-w|wyse 520 in 132-column mode with EPC keyboard, cols#132, wsl#132, dch=\E[%p1%dP$<7>, dch1=\E[P$<7>, ich=\E[%p1%d@$<7>, - ip=$<7>, rs2=\E[35h\E[?3h, - use=wy520-epc, + ip=$<7>, rs2=\E[35h\E[?3h, use=wy520-epc, # # Wyse 520 in 132-column mode with visual bell. -wy520-epc-wvb|wyse520-p-wvb|wyse 520 with visible bell 132-columns, - flash=\E[30h\E\,\E[30l$<100>, - use=wy520-epc-w, +wy520-epc-wvb|wyse520-p-wvb|wyse 520 with visible bell 132-columns and EPC keyboard, + flash=\E[30h\E\,\E[30l$<100>, use=wy520-epc-w, # # Wyse 520 in 80-column, 36 lines wy520-36|wyse520-36|wyse 520 with 36 data lines, hs@, lines#36, - dsl@, fsl@, rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r, tsl@, use=wy520, + dsl@, fsl@, rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r, tsl@, + use=wy520, # # Wyse 520 in 80-column, 48 lines wy520-48|wyse520-48|wyse 520 with 48 data lines, hs@, lines#48, - dsl@, fsl@, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r, tsl@, use=wy520, + dsl@, fsl@, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r, tsl@, + use=wy520, # # Wyse 520 in 132-column, 36 lines wy520-36w|wyse520-36w|wyse 520 with 132 columns and 36 data lines, cols#132, wsl#132, rs2=\E[?3h, - rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r\E[132$|, use=wy520-36, + rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r\E[132$|, + use=wy520-36, # # Wyse 520 in 132-column, 48 lines wy520-48w|wyse520-48w|wyse 520 with 48 data lines, cols#132, wsl#132, rs2=\E[?3h, - rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, use=wy520-48, + rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, + use=wy520-48, # # # Wyse 520 in 80-column, 36 lines with EPC keyboard wy520-36pc|wyse520-36pc|wyse 520 with 36 data lines and EPC keyboard, hs@, lines#36, - dsl@, fsl@, rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r, tsl@, use=wy520-epc, + dsl@, fsl@, rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r, tsl@, + use=wy520-epc, # # Wyse 520 in 80-column, 48 lines with EPC keyboard wy520-48pc|wyse520-48pc|wyse 520 with 48 data lines and EPC keyboard, hs@, lines#48, - dsl@, fsl@, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r, tsl@, use=wy520-epc, + dsl@, fsl@, rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r, tsl@, + use=wy520-epc, # # Wyse 520 in 132-column, 36 lines with EPC keyboard wy520-36wpc|wyse520-36wpc|wyse 520 with 36 data lines and EPC keyboard, cols#132, wsl#132, rs2=\E[?3h, - rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r\E[132$|, use=wy520-36pc, + rs3=\E[?5l\E[36*|\E[36t\E[40l\E[1;36r\E[132$|, + use=wy520-36pc, # # Wyse 520 in 132-column, 48 lines with EPC keyboard -wy520-48wpc|wyse520-48wpc|wyse 520 with 48 data lines, +wy520-48wpc|wyse520-48wpc|wyse 520 with 48 data lines and EPC keyboard, cols#132, wsl#132, rs2=\E[?3h, - rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, use=wy520-48pc, + rs3=\E[?5l\E[48*|\E[48t\E[40l\E[1;48r\E[132$|, + use=wy520-48pc, # From: John Gilmore # (wyse-vp: removed , there's no such # file and we don't know what is -- esr) wyse-vp|Wyse 50 in ADDS Viewpoint emulation mode with "enhance" on, - am, + OTbs, am, cols#80, it#8, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^F, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, dch1=\EW, @@ -6700,13 +7060,13 @@ wy75ap|wyse75ap|wy-75ap|wyse-75ap|Wyse WY-75 Applications and Cursor keypad, # From: Eric Freudenthal wy100q|Wyse 100 for Quotron, + OTbs, cols#80, lines#24, xmc#1, cbt=\EI, clear=^Z, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dl1=\ER, ed=\EY, el=\ET, home=^^, il1=\EE, invis@, is2=\E`\:\0\EC\EDF\E0\E'\E(\EA21, kcub1=^H, kcud1=^J, - kcuf1=^L, kcuu1=^K, ri=\Ej, rmir=\Er, smir=\Eq, - use=adm+sgr, + kcuf1=^L, kcuu1=^K, ri=\Ej, rmir=\Er, smir=\Eq, use=adm+sgr, #### Kermit terminal emulations # @@ -6719,6 +7079,7 @@ wy100q|Wyse 100 for Quotron, # (kermit: removed obsolete ":ma=^Hh^Jj^Kk^Ll^^H:" -- esr) # From: greg small 9-25-84 kermit|standard kermit, + OTbs, cols#80, lines#24, clear=\EE, cub1=^H, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, @@ -6726,7 +7087,8 @@ kermit|standard kermit, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, kermit-am|standard kermit plus auto-margin, am, - is2=K1 Standard Kermit plus Automatic Margins\n, use=kermit, + is2=K1 Standard Kermit plus Automatic Margins\n, + use=kermit, # IBMPC Kermit 1.2. # Bugs: , : do not work except at beginning of line! does # not work, but fake with :cl=\EH\EJ (since :cd=\EJ: works at beginning of @@ -6748,8 +7110,7 @@ pckermit120|UCB IBMPC Kermit 1.20, cud1=\EB, cvvis=\EO\Eq\EEK3, dch1=\EN, dl1=\EM, ht=^I, il1=\EL, is2=\EO\Eq\EJ\EY7 K3 UCB IBMPC Kermit 1.20 12-19-84\n, - rmir@, rmso=\Eq, smir@, smso=\Ep, - use=kermit, + rmir@, rmso=\Eq, smir@, smso=\Ep, use=kermit, # MS-DOS Kermit 2.27 for the IBMPC # Straight ascii keyboard. :sr=\EI: not avail. many versions + bug prone in vi. # Cannot use line 25, now acts funny like ansi special scrolling region. @@ -6759,7 +7120,7 @@ pckermit120|UCB IBMPC Kermit 1.20, # (msk227: removed obsolete ":ma=^Hh^Jj^Kk^Ll^^H:" -- esr) # From: greg small 3-17-85 msk227|mskermit227|MS-DOS Kermit 2.27 for the IBMPC, - am@, + OTbs, am@, cols#80, it#8, lines#24, clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, @@ -6773,7 +7134,8 @@ msk227|mskermit227|MS-DOS Kermit 2.27 for the IBMPC, msk227am|mskermit227am|UCB MS-DOS Kermit 2.27 with automatic margins, am, cvvis=\EO\Eq\EG\EvK5, - is2=\EO\Eq\EG\Ev\EJ\EY7 K5 MS Kermit 2.27 +automatic margins 3-17-85\n, use=msk227, + is2=\EO\Eq\EG\Ev\EJ\EY7 K5 MS Kermit 2.27 +automatic margins 3-17-85\n, + use=msk227, # MS-DOS Kermit 2.27 UCB 227.14 for the IBM PC # Automatic margins now default. Use ansi for highlights. # Define function keys. @@ -6785,8 +7147,7 @@ msk22714|mskermit22714|UCB MS-DOS Kermit 2.27 UCB 227.14 IBM PC, is2=\EO\Eq\EG\Ev\EJ\EY7 K6 MS Kermit 2.27 UCB 227.14 IBM PC 3-17-85\n, kf0=\E0, kf1=\E1, kf2=\E2, kf3=\E3, kf4=\E4, kf5=\E5, kf6=\E6, kf7=\E7, kf8=\E8, kf9=\E9, rev=\E[7m, rmso=\E[m, rmul=\E[m, - sgr0=\E[m, smso=\E[1m, smul=\E[4m, - use=mskermit227, + sgr0=\E[m, smso=\E[1m, smul=\E[4m, use=mskermit227, # This was designed for a VT320 emulator, but it is probably a good start # at support for the VT320 itself. # Please send changes with explanations to bug-gnu-emacs@prep.ai.mit.edu. @@ -6812,7 +7173,7 @@ vt320-k3|MS-Kermit 3.00's vt320 emulation, kpp=\E[5~, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dL, rmacs=\E(B, rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, - rs1=\E(B\E)B\E>\E F\E[4;20l\E[12h\E[?1;5;6;38;42l\E[?7;25h\E4i\E?4i\E[m\E[r\E[2$~, + rs1=\E(B\E)B\E>\E F\E[4;20l\E[12h\E[?1;5;6;38;42l\E[?7;25h\E[4i\E[?4i\E[m\E[r\E[2$~, 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$}\r\E[K, vpa=\E[%i%p1%dd, @@ -6910,16 +7271,14 @@ avatar0|avatar terminal emulator level 0, ind=^J, invis=^V^A\0, rep=\031%p1%c%p2%d, rev=^A^Vp, rs2=^L, sgr=\026\001%{0}%?%p1%t%{112}%|%;%?%p2%t%{1}%|%;%?%p3%t%{112}%|%;%?%p4%t{128}%|%;%?%p6%t%{16}%|%;, - sgr0=^V^A^G, smacs=, smso=^A^Vp, smul=^V^A, - use=klone+acs, + sgr0=^V^A^G, smacs=, smso=^A^Vp, smul=^V^A, use=klone+acs, # From: Eric S. Raymond 1 Nov 1995 avatar0+|avatar terminal emulator level 0+, dch1=^V^N, rmir=\026\n\0\0\0\0, smir=^V^I, use=avatar0, # From: Eric S. Raymond 1 Nov 1995 avatar|avatar1|avatar terminal emulator level 1, civis=^V'^B, cnorm=^V'^A, cvvis=^V^C, dl1=^V-, il1=^V+, - rmam=^V", rmir=^V^P, smam=^V$, - use=avatar0+, + rmam=^V", rmir=^V^P, smam=^V$, use=avatar0+, #### RBcomm # @@ -6947,14 +7306,12 @@ rbcomm-nam|IBM PC with RBcomm without autowrap, am@, bel=^G, cr=^M, cud1=^J, ht=^I, ind=^J, is2=\017\035\E(B\E)0\E[?7l\E[?3l\E[>8g, kbs=^H, - kcub1=^H, kcud1=^J, nel=^M^J, - use=rbcomm, + kcub1=^H, kcud1=^J, nel=^M^J, use=rbcomm, rbcomm-w|IBM PC with RBcomm in 132 column mode, cols#132, bel=^G, cr=^M, cud1=^J, ht=^I, ind=^J, is2=\017\035\E(B\E)0\E[?7h\E[?3h\E[>8g, kbs=^H, - kcub1=^H, kcud1=^J, nel=^M^J, - use=rbcomm, + kcub1=^H, kcud1=^J, nel=^M^J, use=rbcomm, ######## OLDER TERMINAL TYPES # @@ -6991,8 +7348,7 @@ att2300|sv80|AT&T 2300 Video Information Terminal 80 column mode, rev=\E[7m, rmir=\E[4l, rmso=\E[m, sgr0=\E[m, smir=\E[4h, smso=\E[7m, att2350|AT&T 2350 Video Information Terminal 80 column mode, - mc0@, mc4@, mc5@, - use=att2300, + mc0@, mc4@, mc5@, use=att2300, # Must setup RETURN KEY - CR, REC'VD LF - INDEX. # Seems upward compatible with vt100, plus ins/del line/char. @@ -7032,6 +7388,7 @@ att4410v1-w|att5410v1-w|tty5410v1-w|AT&T 4410/5410 132 columns - version 1, is1=\E[?3h\E)0, rs2=\Ec\E[?3h\E[2;0y, use=att5410v1, att4410|att5410|tty5410|AT&T 4410/5410 80 columns - version 2, + OTbs, pfx=\E[%p1%d;%p2%l%02dq f%p1%d %p2%s, use=att5410v1, @@ -7101,7 +7458,7 @@ v5410|att5410 in terms of a vt100, # when pressed in SYS PF mode. # (att4415: I added / based on the init string -- esr) att4415|tty5420|att5420|AT&T 4415/5420 80 cols, - db, mir, xon, + OTbs, db, mir, xon, lh#2, lm#78, lw#8, nlab#8, wsl#55, cbt=\E[Z, clear=\E[x\E[J, cnorm=\E[11;0j, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dx, @@ -7133,12 +7490,12 @@ att4415-w|tty5420-w|att5420-w|AT&T 4415/5420 132 cols, is1=\E[?3h$<100>, use=att4415, att4415-rv|tty5420-rv|att5420-rv|AT&T 4415/5420 80 cols/rv, - flash=\E[?5l$<200>\E[?5h, is3=\E[?5h, - use=att4415, + flash=\E[?5l$<200>\E[?5h, is3=\E[?5h, use=att4415, att4415-w-rv|tty5420-w-rv|att5420-w-rv|AT&T 4415/5420 132 cols/rv, cols#132, lm#54, wsl#97, - flash=\E[?5l$<200>\E[?5h, is1=\E[?3h$<100>, is3=\E[?5h, use=att4415, + flash=\E[?5l$<200>\E[?5h, is1=\E[?3h$<100>, is3=\E[?5h, + use=att4415, # Note that this mode permits programming USER PF KEYS and labels # However, when you program user pf labels you have to reselect @@ -7149,20 +7506,20 @@ att4415+nl|tty5420+nl|att5420+nl|generic AT&T 4415/5420 changes for not changing pln=\E[%p1%d;0;0;1q%p2%:-16.16s, att4415-nl|tty5420-nl|att5420-nl|AT&T 4415/5420 without changing labels, - kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, - use=att4415+nl, use=att4415, + kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, use=att4415+nl, + use=att4415, att4415-rv-nl|tty5420-rv-nl|att5420-rv-nl|AT&T 4415/5420 reverse video without changing labels, - kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, - use=att4415+nl, use=att4415-rv, + kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, use=att4415+nl, + use=att4415-rv, att4415-w-nl|tty5420-w-nl|att5420-w-nl|AT&T 4415/5420 132 cols without changing labels, - kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, - use=att4415+nl, use=att4415-w, + kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, use=att4415+nl, + use=att4415-w, att4415-w-rv-n|tty5420-w-rv-n|att5420-w-rv-n|AT&T 4415/5420 132 cols reverse without changing labels, - kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, - use=att4415+nl, use=att4415-w-rv, + kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, use=att4415+nl, + use=att4415-w-rv, att5420_2|AT&T 5420 model 2 80 cols, am, db, hs, mir, msgr, xon, @@ -7198,7 +7555,8 @@ att5420_2|AT&T 5420 model 2 80 cols, tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd, att5420_2-w|AT&T 5420 model 2 in 132 column mode, cols#132, - is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;1j\E[6;0j\E[7;0j\E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j\E[29;0j\E[1;24r, use=att5420_2, + is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;1j\E[6;0j\E[7;0j\E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j\E[29;0j\E[1;24r, + use=att5420_2, att4418|att5418|AT&T 5418 80 cols, am, xon, @@ -7223,7 +7581,7 @@ att4418-w|att5418-w|AT&T 5418 132 cols, is1=\E[?3h, use=att5418, att4420|tty4420|teletype 4420, - da, db, eo, msgr, ul, xon, + OTbs, da, db, eo, msgr, ul, xon, cols#80, lines#24, lm#72, bel=^G, clear=\EH\EJ, cr=\EG, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EP, @@ -7250,7 +7608,7 @@ att4420|tty4420|teletype 4420, # # (att4424: commented out =\E[1m, we don't need bright locked on -- esr) att4424|tty4424|teletype 4424, - am, xon, + OTbs, am, xon, cols#80, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E3, bold=\E3, cbt=\EO, clear=\E[H\E[2J, cr=^M, @@ -7334,8 +7692,7 @@ att5425|tty5425|att4425|AT&T 4425/5425, vpa=\E[%p1%{1}%+%dd, att5425-nl|tty5425-nl|att4425-nl|AT&T 4425/5425 80 columns no labels, - smkx=\E[21;1j\E[25;4j\Eent, - use=att4425, + smkx=\E[21;1j\E[25;4j\Eent, use=att4425, att5425-w|att4425-w|tty5425-w|teletype 4425/5425 in 132 column mode, cols#132, lm#54, wsl#97, @@ -7539,7 +7896,7 @@ att5620-1|tty5620-1|dmd1|Teletype 5620 with old ROMs, # also has =\E[70H commented out and marked unsafe. # For more, see the 5620 FAQ maintained by David Breneman . att5620|dmd|tty5620|ttydmd|5620|5620 terminal 88 columns, - am, msgr, npc, xon, + OTbs, am, msgr, npc, xon, cols#88, it#8, lines#70, bel=^G, bold=\E[2m, 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, @@ -7557,7 +7914,7 @@ att5620-34|tty5620-34|dmd-34|teletype dmd 5620 in a 34x80 layer, lines#34, use=att5620, # 5620 layer running the "S" system's downloaded graphics handler: att5620-s|tty5620-s|layer|vitty|5620 S layer, - am, + OTbs, OTpt, am, cols#80, it#8, lines#72, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=^K, dl1=\ED, @@ -7609,11 +7966,11 @@ att605-pc|ATT 605 in pc term mode, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[@, knp=\E[G, kpp=\E[I, rmsc=400\E[50;0|, smsc=250\E[?11l\E[50;1|, xoffc=g, - xonc=e, - use=att605, + xonc=e, use=att605, att605-w|AT&T 605-w 132 column 102 key keyboard, cols#132, wsl#132, - is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h\E(B\E)0, use=att605, + is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h\E(B\E)0, + use=att605, # (att610: I added / based on the init string. I also # added and because the BSD file says the att615s have them, # and the 615 is like a 610 with a big keyboard, and most of their other @@ -7649,7 +8006,8 @@ att610|AT&T 610; 80 column; 98key keyboard, smln=\E[p, smso=\E[7m, smul=\E[4m, tsl=\E7\E[25;%i%p1%dx, att610-w|AT&T 610; 132 column; 98key keyboard, cols#132, wsl#132, - is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, use=att610, + is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, + use=att610, att610-103k|AT&T 610; 80 column; 103key keyboard, kBEG=\ENB, kCAN=\EOW, kCMD=\EOU, kCPY=\END, kCRT=\EON, @@ -7664,11 +8022,11 @@ att610-103k|AT&T 610; 80 column; 103key keyboard, knp=\E[U, knxt=\ENh, kopn=\EOv, kopt=\EOr, kpp=\E[V, kprt=\EOz, kprv=\ENg, krdo=\EOt, kref=\EOb, kres=\EOq, krfr=\ENa, krmir=\ENj, krpl=\EOy, krst=\EOB, ksav=\EOo, - kslt=\ENI, kspd=\EOp, kund=\EOs, - use=att610, + kslt=\ENI, kspd=\EOp, kund=\EOs, use=att610, att610-103k-w|AT&T 610; 132 column; 103key keyboard, cols#132, wsl#132, - is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, use=att610-103k, + is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, + use=att610-103k, att615|AT&T 615; 80 column; 98key keyboard, kLFT=\E[ A, kRIT=\E[ @, kf15=\EOC, kf16=\EOD, kf17=\EOE, kf18=\EOF, kf19=\EOG, kf20=\EOH, kf21=\EOI, kf22=\EOJ, @@ -7676,8 +8034,7 @@ att615|AT&T 615; 80 column; 98key keyboard, kf28=\ENT, kf29=\EOP, kf30=\EOQ, kf31=\EOR, kf32=\EOS, kf33=\EOw, kf34=\EOx, kf35=\EOy, kf36=\EOm, kf37=\EOt, kf38=\EOu, kf39=\EOv, kf40=\EOl, kf41=\EOq, kf42=\EOr, - kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, - use=att610, + kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, use=att610, att615-w|AT&T 615; 132 column; 98key keyboard, kLFT=\E[ A, kRIT=\E[ @, kf15=\EOC, kf16=\EOD, kf17=\EOE, kf18=\EOF, kf19=\EOG, kf20=\EOH, kf21=\EOI, kf22=\EOJ, @@ -7685,14 +8042,11 @@ att615-w|AT&T 615; 132 column; 98key keyboard, kf28=\ENT, kf29=\EOP, kf30=\EOQ, kf31=\EOR, kf32=\EOS, kf33=\EOw, kf34=\EOx, kf35=\EOy, kf36=\EOm, kf37=\EOt, kf38=\EOu, kf39=\EOv, kf40=\EOl, kf41=\EOq, kf42=\EOr, - kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, - use=att610-w, + kf43=\EOs, kf44=\EOp, kf45=\EOn, kf46=\EOM, use=att610-w, att615-103k|AT&T 615; 80 column; 103key keyboard, - kLFT=\E[ A, kRIT=\E[ @, - use=att610-103k, + kLFT=\E[ A, kRIT=\E[ @, use=att610-103k, att615-103k-w|AT&T 615; 132 column; 103key keyboard, - kLFT=\E[ A, kRIT=\E[ @, - use=att610-103k-w, + kLFT=\E[ A, kRIT=\E[ @, use=att610-103k-w, # (att620: I added / based on the init string and # / from a BSD termcap -- esr) att620|AT&T 620; 80 column; 98key keyboard, @@ -7734,7 +8088,8 @@ att620|AT&T 620; 80 column; 98key keyboard, tsl=\E7\E[25;%i%p1%dx, att620-w|AT&T 620; 132 column; 98key keyboard, cols#132, wsl#132, - is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, use=att620, + is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, + use=att620, att620-103k|AT&T 620; 80 column; 103key keyboard, kBEG=\ENB, kCAN=\EOW, kCMD=\EOU, kCPY=\END, kCRT=\EON, kDC=\ENF, kDL=\ENE, kEND=\ENN, kEOL=\EOA, kEXT=\EOK, @@ -7751,12 +8106,12 @@ att620-103k|AT&T 620; 80 column; 103key keyboard, kmsg=\EOl, knp=\E[U, knxt=\ENh, kopn=\EOv, kopt=\EOr, kpp=\E[V, kprt=\EOz, kprv=\ENg, krdo=\EOt, kref=\EOb, kres=\EOq, krfr=\ENa, krmir=\ENj, krpl=\EOy, krst=\EOB, - ksav=\EOo, kslt=\ENI, kspd=\EOp, kund=\EOs, - use=att620, + ksav=\EOo, kslt=\ENI, kspd=\EOp, kund=\EOs, use=att620, att620-103k-w|AT&T 620; 132 column; 103key keyboard, cols#132, wsl#132, - is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, use=att620-103k, + is1=\E[8;0|\E[?4;5;13;15l\E[13;20l\E[?3;7h\E[12h, + use=att620-103k, # AT&T (formerly Teletype) 630 Multi-Tasking Graphics terminal # The following SETUP modes are assumed for normal operation: @@ -7769,7 +8124,7 @@ att620-103k-w|AT&T 620; 132 column; 103key keyboard, # delays are specified; use "stty ixon -ixany" to enable DC3/DC1 flow control! # (att630: added , and from a BSD termcap file -- esr) att630|AT&T 630 windowing terminal, - am, da, db, mir, msgr, npc, xon, + OTbs, am, da, db, mir, msgr, npc, xon, cols#80, it#8, lines#60, lm#0, bel=^G, blink=\E[5m, cbt=\E[Z, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, @@ -7966,7 +8321,8 @@ att730-24|730MTG-24|AT&T 730-24 windowing terminal Version, lines#24, use=att730, att730r|730MTGr|AT&T 730 rev video windowing terminal Version, flash=\E[?5l$<200>\E[?5h, - is1=\E[8;0|\E[?3;4;13;15l\E[?5h\E[13;20l\E[?7h\E[12h\E(B\E)B, use=att730, + is1=\E[8;0|\E[?3;4;13;15l\E[?5h\E[13;20l\E[?7h\E[12h\E(B\E)B, + use=att730, att730r-41|730MTG-41r|AT&T 730r-41 rev video windowing terminal Version, lines#41, use=att730r, att730r-24|730MTGr-24|AT&T 730r-24 rev video windowing terminal Version, @@ -8143,13 +8499,13 @@ att505|pt505|att5430|gs5430|AT&T Personal Terminal 505 or 5430 GETSET terminal, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[>h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, - dl1=\E[M, ed=\E[0J, el=\E[0K, el1=\E2K, home=\E[H, ht=^I, + dl1=\E[M, ed=\E[0J, el=\E[0K, el1=\E[2K, home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=^J, is1=\EPr\\E[0u\E[2J\E[0;0H\E[m\E[3l\E[l\E[=l\E[?l, kbs=^H, kcmd=\E!, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[00s, kf1=\E[01s, kf18=\E[18s, kf19=\E[19s, kf2=\E[02s, kf20=\E[20s, kf21=\E[21s, - kf22=\E[22s, kf23=\E[23s, kf24=\E24s, kf26=\E26s, + kf22=\E[22s, kf23=\E[23s, kf24=\E[24s, kf26=\E[26s, kf3=\E[03s, kf4=\E[04s, kf5=\E[05s, kf6=\E[06s, krfr=\E[27s, mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, rmacs=\E[10m, rmam=\E[11;1j, rmir=\E[4l, rmso=\E[m, @@ -8180,7 +8536,7 @@ tt505-22|pt505-22|gs5430-22|AT&T PT505 or 5430 GETSET version 1 22 lines, # From: Fri Sep 11 22:38:32 1981 # (ampex80: some capabilities merged in from SCO's entry -- esr) ampex80|a80|d80|dialogue|dialogue80|ampex dialogue 80, - am, bw, ul, + OTbs, am, bw, ul, cols#80, it#8, lines#24, bel=^G, cbt=\EI, clear=\E*$<75>, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, @@ -8204,12 +8560,11 @@ ampex175|ampex d175, # some people and some systems may not, there is another termcap ("ampex175") # that suppresses this little eccentricity by omitting the relevant capability. ampex175-b|ampex d175 using left arrow for erase, - kbs=^_, - use=ampex175, + kbs=^_, use=ampex175, # From: Richard Bascove # (ampex210: removed obsolete ":kn#10:" -- esr) ampex210|a210|ampex a210, - am, hs, xenl, + OTbs, am, hs, xenl, cols#80, it#8, lines#24, xmc#1, cbt=\EI, clear=\E*, cub1=^H, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -8255,8 +8610,7 @@ ampex232|ampex-232|Ampex Model 232, invis@, is2=\Eg\El, kbs=^H, kcub1=^H, kcud1=^V, kcuf1=^L, kcuu1=^K, kf0=^A@\r, kf1=^AA\r, kf2=^AB\r, kf3=^AC\r, kf4=^AD\r, kf5=^AE\r, kf6=^AF\r, kf7=^AG\r, kf8=^AH\r, - kf9=^AI\r, khome=^^, - use=adm+sgr, + kf9=^AI\r, khome=^^, use=adm+sgr, # (ampex: removed , no file and no -- esr) ampex232w|Ampex Model 232 / 132 columns, cols#132, lines#24, @@ -8391,7 +8745,7 @@ ampex232w|Ampex Model 232 / 132 columns, # annarbor4080|aa4080|ann arbor 4080, - am, + OTbs, am, cols#80, lines#40, bel=^G, clear=\014$<2>, cr=^M, cub1=^H, cud1=^J, cuf1=^_, cup=\017%p2%{10}%/%{16}%*%p2%{10}%m%+%c%p1%?%p1%{19}%>%t%{12}%+%;%{64}%+%c, @@ -8416,7 +8770,7 @@ aas1901|Ann Arbor K4080 w/S1901 mod, # 4. Total number of lines on the screen, the same as the first parameter. # The generic Ann Arbor entry is the only one that uses this. aaa+unk|aaa-unk|ann arbor ambassador (internal - don't use this directly), - am, km, mc5i, mir, xon, + OTbs, am, km, mc5i, mir, xon, cols#80, it#8, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J$<156>, cr=^M, cub=\E[%p1%dD, cub1=^H, @@ -8459,21 +8813,25 @@ aaa+dec|ann arbor ambassador in dec vt100 mode, aaa-18|ann arbor ambassador/18 lines, lines#18, is2=\E7\E[60;0;0;18p\E8, - rmcup=\E[60;0;0;18p\E[60;1H\E[K, smcup=\E[18;0;0;18p, use=aaa+unk, + rmcup=\E[60;0;0;18p\E[60;1H\E[K, smcup=\E[18;0;0;18p, + use=aaa+unk, aaa-18-rv|ann arbor ambassador/18 lines+reverse video, use=aaa+rv, use=aaa-18, aaa-20|ann arbor ambassador/20 lines, lines#20, is2=\E7\E[60;0;0;20p\E8, - rmcup=\E[60;0;0;20p\E[60;1H\E[K, smcup=\E[20;0;0;20p, use=aaa+unk, + rmcup=\E[60;0;0;20p\E[60;1H\E[K, smcup=\E[20;0;0;20p, + use=aaa+unk, aaa-22|ann arbor ambassador/22 lines, lines#22, is2=\E7\E[60;0;0;22p\E8, - rmcup=\E[60;0;0;22p\E[60;1H\E[K, smcup=\E[22;0;0;22p, use=aaa+unk, + rmcup=\E[60;0;0;22p\E[60;1H\E[K, smcup=\E[22;0;0;22p, + use=aaa+unk, aaa-24|ann arbor ambassador/24 lines, lines#24, is2=\E7\E[60;0;0;24p\E8, - rmcup=\E[60;0;0;24p\E[60;1H\E[K, smcup=\E[24;0;0;24p, use=aaa+unk, + rmcup=\E[60;0;0;24p\E[60;1H\E[K, smcup=\E[24;0;0;24p, + use=aaa+unk, aaa-24-rv|ann arbor ambassador/24 lines+reverse video, use=aaa+rv, use=aaa-24, aaa-26|ann arbor ambassador/26 lines, @@ -8493,8 +8851,7 @@ aaa-30-s|aaa-s|ann arbor ambassador/30 lines w/status, fsl=\E[>51l, is2=\r\n\E[A\E7\E[60;1;0;30p\E8, rmcup=\E[60;1;0;30p\E[29;1H\E[K, smcup=\E[H\E[J$<156>\E[30;1;0;30p\E[30;1H\E[K, - tsl=\E[>51h\E[1;%p1%dH\E[2K, - use=aaa+unk, + tsl=\E[>51h\E[1;%p1%dH\E[2K, use=aaa+unk, aaa-30-s-rv|aaa-s-rv|ann arbor ambassador/30 lines+status+reverse video, use=aaa+rv, use=aaa-30-s, aaa-s-ctxt|aaa-30-s-ctxt|ann arbor ambassador/30 lines+status+save context, @@ -8542,27 +8899,26 @@ aaa-60-s|ann arbor ambassador/59 lines+status, lines#59, dsl=\E7\E[60;0;0;60p\E[1;1H\E[K\E[H\E8\r\n\E[K, fsl=\E[>51l, is2=\r\n\E[A\E7\E[60;1;0;60p\E8, - tsl=\E[>51h\E[1;%p1%dH\E[2K, - use=aaa+unk, + tsl=\E[>51h\E[1;%p1%dH\E[2K, use=aaa+unk, aaa-60-s-rv|ann arbor ambassador/59 lines+status+reverse video, use=aaa+rv, use=aaa-60-s, aaa-60-dec-rv|ann arbor ambassador/dec mode+59 lines+status+rev video, use=aaa+dec, use=aaa+rv, use=aaa-60-s, aaa-60|ann arbor ambassador/60 lines, lines#60, - is2=\E7\E[60;0;0;60p\E[1Q\E[m\E[>20;30l\E8, use=aaa+unk, + is2=\E7\E[60;0;0;60p\E[1Q\E[m\E[>20;30l\E8, + use=aaa+unk, aaa-60-rv|ann arbor ambassador/60 lines+reverse video, use=aaa+rv, use=aaa-60, aaa-db|ann arbor ambassador 30/destructive backspace, - cub1=\E[D, is3=\E[1Q\E[m\E[>20l\E[>30h, - use=aaa-30, + OTbs@, + cub1=\E[D, is3=\E[1Q\E[m\E[>20l\E[>30h, use=aaa-30, guru|guru-33|guru+unk|ann arbor guru/33 lines 80 cols, lines#33, flash=\E[>59h$<100>\E[>59l, is2=\E7\E[255;0;0;33;80;80p\E8\E[J, is3=\E[>59l, - rmcup=\E[255p\E[255;1H\E[K, smcup=\E[33p, - use=aaa+unk, + rmcup=\E[255p\E[255;1H\E[K, smcup=\E[33p, use=aaa+unk, guru+rv|guru changes for reverse video, flash=\E[>59l$<100>\E[>59h, is3=\E[>59h, guru-rv|guru-33-rv|ann arbor guru/33 lines+reverse video, @@ -8577,41 +8933,43 @@ guru-nctxt|guru with no saved context, guru-s|guru-33-s|ann arbor guru/33 lines+status, lines#32, is2=\r\n\E[A\E7\E[255;1;0;33;80;80p\E8\E[J, - smcup=\E[33;1p\E[255;1H\E[K, - use=guru+s, use=guru+unk, + smcup=\E[33;1p\E[255;1H\E[K, use=guru+s, use=guru+unk, guru-24|ann arbor guru 24 lines, cols#80, lines#24, - is2=\E7\E[255;0;0;24;80;80p\E8\E[J, smcup=\E[24p, use=guru+unk, + is2=\E7\E[255;0;0;24;80;80p\E8\E[J, smcup=\E[24p, + use=guru+unk, guru-44|ann arbor guru 44 lines, cols#97, lines#44, - is2=\E7\E[255;0;0;44;97;100p\E8\E[J, smcup=\E[44p, use=guru+unk, + is2=\E7\E[255;0;0;44;97;100p\E8\E[J, smcup=\E[44p, + use=guru+unk, guru-44-s|ann arbor guru/44 lines+status, lines#43, is2=\r\n\E[A\E7\E[255;1;0;44;80;80p\E8\E[J, - smcup=\E[44;1p\E[255;1H\E[K, - use=guru+s, use=guru+unk, + smcup=\E[44;1p\E[255;1H\E[K, use=guru+s, use=guru+unk, guru-76|guru with 76 lines by 89 cols, cols#89, lines#76, - is2=\E7\E[255;0;0;76;89;100p\E8\E[J, smcup=\E[76p, use=guru+unk, + is2=\E7\E[255;0;0;76;89;100p\E8\E[J, smcup=\E[76p, + use=guru+unk, guru-76-s|ann arbor guru/76 lines+status, cols#89, lines#75, is2=\r\n\E[A\E7\E[255;1;0;76;89;100p\E8\E[J, - smcup=\E[76;1p\E[255;1H\E[K, - use=guru+s, use=guru+unk, + smcup=\E[76;1p\E[255;1H\E[K, use=guru+s, use=guru+unk, guru-76-lp|guru-lp|guru with page bigger than line printer, cols#134, lines#76, - is2=\E7\E[255;0;0;76;134;134p\E8\E[J, smcup=\E[76p, use=guru+unk, + is2=\E7\E[255;0;0;76;134;134p\E8\E[J, smcup=\E[76p, + use=guru+unk, guru-76-w|guru 76 lines by 178 cols, cols#178, lines#76, - is2=\E7\E[255;0;0;76;178;178p\E8\E[J, smcup=\E[76p, use=guru+unk, + is2=\E7\E[255;0;0;76;178;178p\E8\E[J, smcup=\E[76p, + use=guru+unk, guru-76-w-s|ann arbor guru/76 lines+status+wide, cols#178, lines#75, is2=\r\n\E[A\E7\E[255;1;0;76;178;178p\E8\E[J, - smcup=\E[76;1p\E[255;1H\E[K, - use=guru+s, use=guru+unk, + smcup=\E[76;1p\E[255;1H\E[K, use=guru+s, use=guru+unk, guru-76-wm|guru 76 lines by 178 cols with 255 cols memory, cols#178, lines#76, - is2=\E7\E[255;0;0;76;178;255p\E8\E[J, smcup=\E[76p, use=guru+unk, + is2=\E7\E[255;0;0;76;178;255p\E8\E[J, smcup=\E[76p, + use=guru+unk, aaa-rv-unk|ann arbor unknown type, lh#0, lw#0, nlab#0, blink=\E[5;7m, bold=\E[1;7m, home=\E[H, invis=\E[7;8m, @@ -8643,7 +9001,7 @@ aaa-rv-unk|ann arbor unknown type, # Regent: lowest common denominator, works on all regents. # (regent: renamed ":bc:" to ":le:" -- esr) regent|Adds Regent Series, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^U, cud1=^J, cuf1=^F, cuu1=^Z, home=\EY\s\s, ind=^J, ll=^A, @@ -8651,24 +9009,25 @@ regent|Adds Regent Series, # down shift key it gets confused, so we avoid escape. regent100|Adds Regent 100, xmc#1, - bel=^G, cup=\013%p1%{32}%+%c%p2%p2%{6}%*%+\020%c, + bel=^G, + cup=\013%p1%' '%+%c\020%p2%{10}%/%{16}%*%p2%{10}%m%+%c, kf0=^B1\r, kf1=^B2\r, kf2=^B3\r, kf3=^B4\r, kf4=^B5\r, kf5=^B6\r, kf6=^B7\r, kf7=^B8\r, lf0=F1, lf1=F2, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F7, lf7=F8, rmso=\E0@, rmul=\E0@, - sgr0=\E0@, smso=\E0P, smul=\E0`, - use=regent, + sgr0=\E0@, smso=\E0P, smul=\E0`, use=regent, regent20|Adds Regent 20, - bel=^G, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, ed=\Ek, el=\EK, use=regent, + bel=^G, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, ed=\Ek, el=\EK, + use=regent, regent25|Adds Regent 25, - bel=^G, kcub1=^U, kcud1=^J, kcuf1=^F, kcuu1=^Z, khome=^A, use=regent20, + bel=^G, kcub1=^U, kcud1=^J, kcuf1=^F, kcuu1=^Z, khome=^A, + use=regent20, regent40|Adds Regent 40, xmc#1, bel=^G, dl1=\El$<2*>, il1=\EM$<2*>, kf0=^B1\r, kf1=^B2\r, kf2=^B3\r, kf3=^B4\r, kf4=^B5\r, kf5=^B6\r, kf6=^B7\r, kf7=^B8\r, lf0=F1, lf1=F2, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F7, lf7=F8, rmso=\E0@, rmul=\E0@, sgr0=\E0@, smso=\E0P, - smul=\E0`, - use=regent25, + smul=\E0`, use=regent25, regent40+|Adds Regent 40+, is2=\EB, use=regent40, regent60|regent200|Adds Regent 60, @@ -8678,7 +9037,7 @@ regent60|regent200|Adds Regent 60, # From: Thu Jul 9 09:27:33 1981 # (viewpoint: added , function key, and capabilities -- esr) viewpoint|addsviewpoint|adds viewpoint, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^L, cnorm=\017\E0`, cr=^M, cub1=^H, cud1=^J, cuf1=^F, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, @@ -8719,7 +9078,7 @@ vp60|viewpoint60|addsvp60|adds viewpoint60, # the status line # Function key and label capabilities merged in from SCO. vp90|viewpoint90|adds viewpoint 90, - bw, msgr, xhp, + OTbs, bw, msgr, xhp, cols#80, lines#24, clear=\EG\Ek, cub1=^H, cud1=^J, cuf1=^F, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, dch1=\EE, @@ -8734,7 +9093,7 @@ vp90|viewpoint90|adds viewpoint 90, # Note: if return acts weird on a980, check internal switch #2 # on the top chip on the CONTROL pc board. adds980|a980|adds consul 980, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\014$<1>\013@, cr=^M, cub1=^H, cud1=^J, cuf1=\E^E01, cup=\013%p1%{64}%+%c\E\005%p2%2d, @@ -8753,7 +9112,7 @@ adds980|a980|adds consul 980, # the delay times and do an auto tab set rather than the indirect # file used in vt100. cit80|cit-80|citoh 80, - am, + OTbs, am, cols#80, lines#24, clear=\E[H\EJ, cr=^M, cub1=^H, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\EJ, el=\EK, ff=^L, @@ -8762,7 +9121,7 @@ cit80|cit-80|citoh 80, # From: Tim Wood Fri Sep 27 09:39:12 PDT 1985 # (cit101: added / based on init string, merged this with c101 -- esr) cit101|citc|C.itoh fast vt100, - am, xenl, + OTbs, am, xenl, cols#80, lines#24, bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U, @@ -8781,7 +9140,7 @@ cit101|citc|C.itoh fast vt100, # f6=\EOv:f7=\EOw:f8=\EOx:f9=\EOy:AB=\E[0;5m:AL=\E[m:AR=\E[0;7m:AS=\E[0;5;7m:\ # :NB=\E[0;1;5m:NM=\E[0;1m:NR=\E[0;1;7m:NS=\E[0;1;5;7m: -- esr) cit101e|C. Itoh CIT-101e, - am, mir, msgr, + OTbs, OTpt, am, mir, msgr, cols#80, it#8, lines#24, acsc=, clear=\E[H\E[J, cnorm=, csr=\E[%i%p1%2d;%p2%2dr, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, @@ -8812,8 +9171,8 @@ cit101e|C. Itoh CIT-101e, cit101e-rv|Citoh CIT-101e (sets reverse video), am, eo, mir, msgr, xenl, xon, cols#80, it#8, lines#24, - bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[1v, - clear=\E[H\E[J, cnorm=\E[0;3;4v, cr=^M, + OTnl=\EM, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, + civis=\E[1v, clear=\E[H\E[J, cnorm=\E[0;3;4v, cr=^M, csr=\E[%i%p1%d;%p2%dr, 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, @@ -8831,14 +9190,16 @@ cit101e-rv|Citoh CIT-101e (sets reverse video), u7=\E[6n, u8=\E[?6c, u9=\E[c, cit101e-n|CIT-101e w/o am, am@, - cvvis=\E[?1l\E[?4l\E[?7l, kbs=^H, kcub1=^H, kcud1=^J, use=cit101e, + cvvis=\E[?1l\E[?4l\E[?7l, kbs=^H, kcub1=^H, kcud1=^J, + use=cit101e, cit101e-132|CIT-101e with 132 cols, cols#132, kbs=^H, kcub1=^H, kcud1=^J, use=cit101e, cit101e-n132|CIT-101e with 132 cols w/o am, am@, cols#132, - cvvis=\E[?1l\E[?4l\E[?7l, kbs=^H, kcub1=^H, kcud1=^J, use=cit101e, + cvvis=\E[?1l\E[?4l\E[?7l, kbs=^H, kcub1=^H, kcud1=^J, + use=cit101e, # CIE Terminals CIT-500 from BRL # The following SET-UP modes are assumed for normal operation: # GENERATE_XON/XOFF:YES DUPLEX:FULL NEWLINE:OFF @@ -8851,8 +9212,8 @@ cit101e-n132|CIT-101e with 132 cols w/o am, # "stty ixon -ixany" to enable DC3/DC1 flow control! # (cit500: I added / based on the init string -- esr) cit500|CIE Terminals CIT-500, - mir, msgr, xon, - cols#80, it#8, lines#64, vt#3, + OTbs, OTpt, mir, msgr, xon, + OTkn#10, cols#80, it#8, lines#64, vt#3, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, @@ -8878,18 +9239,19 @@ citoh|ci8510|8510|c.itoh 8510a, bold=\E!, cub1@, is2=\E(009\,017\,025\,033\,041\,049\,057\,065\,073., rep=\ER%p2%03d%p1%c, ri=\Er, rmul=\EY, sgr0=\E"\EY, - smul=\EX, - use=lpr, + smul=\EX, use=lpr, citoh-pica|citoh in pica, is1=\EN, use=citoh, citoh-elite|citoh in elite, cols#96, is1=\EE, - is2=\E(009\,017\,025\,033\,041\,049\,057\,065\,073\,081\,089., use=citoh, + is2=\E(009\,017\,025\,033\,041\,049\,057\,065\,073\,081\,089., + use=citoh, citoh-comp|citoh in compressed, cols#136, is1=\EQ, - is2=\E(009\,017\,025\,033\,041\,049\,057\,065\,073\,081\,089\,097\,105\,113\,121\,129., use=citoh, + is2=\E(009\,017\,025\,033\,041\,049\,057\,065\,073\,081\,089\,097\,105\,113\,121\,129., + use=citoh, # citoh has infinite cols because we don't want lp ever inserting \n\t**. citoh-prop|citoh-ps|ips|citoh in proportional spacing mode, cols#32767, @@ -8904,7 +9266,7 @@ citoh-8lpi|citoh in 8 lines per inch mode, # cdc456|cdc 456 terminal, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^Y^X, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E1%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, dl1=\EJ, ed=^X, @@ -8912,20 +9274,20 @@ cdc456|cdc 456 terminal, # Assorted CDC terminals from BRL (improvements by DAG & Ferd Brundick) cdc721|CDC Viking, - am, + OTbs, am, cols#80, lines#24, clear=^L, cuf1=^X, cup=\002%p2%{32}%+%c%p1%{32}%+%c, cuu1=^W, el=^K, home=^Y, kcub1=^H, kcud1=^J, kcuf1=^I, kcuu1=^W, khome=^Y, cdc721ll|CDC Vikingll, - am, + OTbs, am, cols#132, lines#24, clear=^L, cuf1=^X, cup=\002%p2%{32}%+%c%p1%{32}%+%c, cuu1=^W, el=^K, home=^Y, kcub1=^H, kcud1=^J, kcuf1=^I, kcuu1=^W, khome=^Y, # (cdc752: the BRL entry had :ll=\E1 ^Z: commented out cdc752|CDC 752, - am, bw, xhp, + OTbs, am, bw, xhp, cols#80, lines#24, bel=^G, clear=\030\E1\s\s, cr=^M, cub1=^H, cud1=^J, cuf1=^U, cup=\E1%p2%{32}%+%c%p1%{32}%+%c, cuu1=^Z, el=^V, @@ -8937,8 +9299,8 @@ cdc752|CDC 752, # Insert/delete-character cannot be used, as the whole display is affected. # "so" & "se" are commented out until jove handles "sg" correctly. cdc756|CDC 756, - am, bw, - cols#80, lines#24, + OTbs, am, bw, + OTkn#10, cols#80, lines#24, bel=^G, clear=^Y^X, cr=^M, cub1=^H, cud1=^J, cuf1=^U, cup=\E1%p2%{32}%+%c%p1%{32}%+%c, cuu1=^Z, dl1=\EJ$<6*/>, ed=^X, el=^V, home=^Y, il1=\EL$<6*/>, ind=^J, @@ -8961,8 +9323,8 @@ cdc756|CDC 756, # # (cdc721: changed :ri: to :sr: -- esr) cdc721-esc|Control Data 721, - am, bw, msgr, xon, - cols#80, it#8, lines#30, + OTbs, OTpt, am, bw, msgr, xon, + OTkn#10, cols#80, it#8, lines#30, bel=^G, blink=^N, cbt=^^^K, clear=^L, cub1=^H, cud1=^Z, cuf1=^X, cup=\002%p2%{32}%+%c%p1%{32}%+%c, cuu1=^W, dch1=^^N, dim=^\, dl1=^^Q, ed=^^P, el=^K, home=^Y, hts=^^^RW, @@ -9073,10 +9435,9 @@ visa50|geveke visa 50 terminal in ansi 80 character mode, # c108|concept108|c108-8p|concept108-8p|concept 108 w/8 pages, is3=\EU\E z"\Ev\001\177 !p\E ;"\E z \Ev \001\177p\Ep\n, - rmcup=\Ev \001\177p\Ep\r\n, - use=c108-4p, + rmcup=\Ev \001\177p\Ep\r\n, use=c108-4p, c108-4p|concept108-4p|concept 108 w/4 pages, - eslok, hs, xon, + OTbs, eslok, hs, xon, pb@, acsc=jEkTl\\mMqLxU, cnorm=\Ew, cr=^M, cup=\Ea%p1%?%p1%{95}%>%t\001%{96}%-%;%{32}%+%c%p2%?%p2%{95}%>%t\001%{96}%-%;%{32}%+%c, @@ -9136,7 +9497,7 @@ c108-w|c108-w-8p|concept108-w-8|concept108-w8p|concept 108 w/8 pages in wide mod # cannot be # in is2 because it will hang a c100 with no printer # if sent twice. c100|concept100|concept|c104|c100-4p|hds concept 100, - am, eo, mir, ul, xenl, + OTbs, am, eo, mir, ul, xenl, cols#80, lines#24, pb#9600, vt#8, bel=^G, blink=\EC, clear=\E?\E\005$<2*>, cr=$<9>\r, cub1=^H, cud1=^J, cuf1=\E=, @@ -9160,8 +9521,7 @@ c100|concept100|concept|c104|c100-4p|hds concept 100, smso=\ED, smul=\EG, c100-rv|c100-rv-4p|concept100-rv|c100 rev video, cnorm@, cvvis@, flash=\EK$<200>\Ek, is1=\Ek, rmso=\Ee, - smso=\EE, - use=c100, + smso=\EE, use=c100, oc100|oconcept|c100-1p|old 1 page concept 100, in, is3@, use=c100, @@ -9446,7 +9806,7 @@ hds200|Human Designed Systems HDS200, # through included to specify padding needed in raw mode. # (avt-ns: added empty to suppress a tic warning --esr) avt-ns|concept avt no status line, - am, eo, mir, ul, xenl, xon, + OTbs, am, eo, mir, ul, xenl, xon, cols#80, it#8, lines#24, lm#192, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J$<38>, cnorm=\E[=119l, cr=^M, @@ -9457,7 +9817,7 @@ avt-ns|concept avt no status line, dl1=\E[M$<4>, ed=\E[J$<96>, el=\E[K$<6>, home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=\011$<4>, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL$<4*>, il1=\E[L$<4>, ind=\n$<8>, - invis=\E8m, ip=$<4>, is1=\E[=103l\E[=205l, + invis=\E[8m, ip=$<4>, is1=\E[=103l\E[=205l, is2=\E[1*q\E[2!t\E[7!t\E[=4;101;119;122l\E[=107;118;207h\E)1\E[1Q\EW\E[!y\E[!z\E>\E[0\:0\:32!r\E[0*w\E[w\E2\r\n\E[2;27!t, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E^B\r, ked=\E^D\r, kf1=\EOP, kf2=\EOQ, kf3=\EOR, @@ -9465,11 +9825,12 @@ avt-ns|concept avt no status line, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, pfloc=\E[%p1%d;0u#%p2%s#, pfx=\E[%p1%d;1u#%p2%s#, prot=\E[99m, rc=\E8, rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, - ri=\EM$<4>, rmacs=\016$<1>, rmcup=\E[w\E2\r\n, rmir=\E4l, - rmkx=\E[!z\E[0;2u, rmso=\E[7!{, rmul=\E[4!{, sc=\E7, + ri=\EM$<4>, rmacs=\016$<1>, rmcup=\E[w\E2\r\n, + rmir=\E[4l, rmkx=\E[!z\E[0;2u, rmso=\E[7!{, rmul=\E[4!{, + sc=\E7, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r, - smir=\E1, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m, + smir=\E[4h, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m, tbc=\E[2g, vpa=\E[%p1%{1}%+%dd, avt-rv-ns|concept avt in reverse video mode/no status line, flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h, @@ -9479,8 +9840,7 @@ avt-w-ns|concept avt in 132 column mode/no status line, use=avt-ns, avt-w-rv-ns|concept avt in 132 column mode/no status line/reverse video, flash=\E[=205l$<200>\E[=205h, is1=\E[=103h\E[=205h, - smcup=\E[H\E[1;24;1;132w, - use=avt-ns, + smcup=\E[H\E[1;24;1;132w, use=avt-ns, # Concept AVT with status line. We get the status line using the # "Background status line" feature of the terminal. We swipe the @@ -9500,15 +9860,14 @@ avt+s|concept avt status line changes, avt|avt-s|concept-avt|avt w/80 columns, use=avt+s, use=avt-ns, avt-rv|avt-rv-s|avt reverse video w/sl, - flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h, use=avt+s, - use=avt-ns, + flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h, + use=avt+s, use=avt-ns, avt-w|avt-w-s|concept avt 132 cols+status, - is1=\E[=103h\E[=205l, smcup=\E[H\E[1;24;1;132w, use=avt+s, - use=avt-ns, + is1=\E[=103h\E[=205l, smcup=\E[H\E[1;24;1;132w, + use=avt+s, use=avt-ns, avt-w-rv|avt-w-rv-s|avt wide+status+rv, flash=\E[=205l$<200>\E[=205h, is1=\E[=103h\E[=205h, - smcup=\E[H\E[1;24;1;132w, - use=avt+s, use=avt-ns, + smcup=\E[H\E[1;24;1;132w, use=avt+s, use=avt-ns, #### Contel Business Systems. # @@ -9706,8 +10065,7 @@ dg-generic|Generic Data General terminal in DG mode, bel=^G, blink=^N, clear=^L, cr=^M, cub1=^Y, cud1=^Z, cuf1=^X, cup=\020%p2%c%p1%c, cuu1=^W, dim=^\, el=^K, ind=^J, is1=^R^C, mc0=^Q, nel=^J, rmso=^], rmul=^U, sgr0=^O^U^], smso=^\, - smul=^T, - use=dgkeys+11, + smul=^T, use=dgkeys+11, # According to the 4.4BSD termcap file, the dg200 should be the # termcap equivalent of \020%p2%{128}%+%c%p1%{128}%+%c (in termcap @@ -9715,7 +10073,7 @@ dg-generic|Generic Data General terminal in DG mode, # maybe they were originally nuls (which would fit). dg200|data general dasher 200, - am, bw, + OTbs, am, bw, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^Y, cud1=^Z, cuf1=^X, cup=\020%p2%c%p1%c, cuu1=^W, el=^K, home=^H, ind=^J, @@ -9728,10 +10086,11 @@ dg200|data general dasher 200, dg210|dg-ansi|Data General 210/211, am, cols#80, lines#24, - clear=\E[2J, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - ed=\E[J, el=\E[K, home=\E[H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, nel=\r\E[H\E[A\n, - rmso=\E[0;m, rmul=\E[0;m, smso=\E[7;m, smul=\E[4;m, + OTnl=\E[B, clear=\E[2J, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, + nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, smso=\E[7;m, + smul=\E[4;m, # From: Peter N. Wan # courtesy of Carlos Rucalde of Vantage Software, Inc. # (dg211: this had ., which was an ancient termcap hangover. @@ -9739,11 +10098,13 @@ dg210|dg-ansi|Data General 210/211, dg211|Data General d211, cnorm=^L, cvvis=^L^R, ht=^I, ind@, kbs=^Y, kf0@, kf1@, kf2@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, lf0@, nel=^M^Z, rmcup=^L, - rmso=\036E$<\0/>, smcup=^L^R, smso=\036D$<5/>, - use=dg200, -# dg450 from cornell + rmso=\036E$<\0/>, smcup=^L^R, smso=\036D$<5/>, use=dg200, + +# dg450 from Cornell (not official) dg450|dg6134|data general 6134, cub1@, cuf1=^X, use=dg200, + +# Not official... # Note: lesser Dasher terminals will not work with vi because vi insists upon # having a command to move straight down from any position on the bottom line # and scroll the screen up, or a direct vertical scroll command. The 460 and @@ -9754,19 +10115,20 @@ dg450|dg6134|data general 6134, # grounds that there is no matching ":ml:" # fixed garbled ":k9=\E[00\:z:" capability -- esr) dg460-ansi|Data General Dasher 460 in ANSI-mode, - am, msgr, ul, + OTbs, am, msgr, ul, cols#80, it#8, lines#24, - blink=\E[5m, clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, - cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dim=\E[2m, - dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@, - il1=\E[L, ind=\E[S, is2=^^F@, kbs=\E[D, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[001z, - kf1=\E[002z, kf2=\E[003z, kf3=\E[004z, kf4=\E[005z, - kf5=\E[006z, kf6=\E[007z, kf7=\E[008z, kf8=\E[009z, - kf9=\E[010z, khome=\E[H, lf0=f1, lf1=f2, lf2=f3, lf3=f4, - lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, rev=\E[7m, ri=\E[T, - rmso=\E[m, rmul=\E[05, sgr0=\E[m, smso=\E[7m, smul=\E[4m, -# From: Wayne Throop + OTnl=\ED, blink=\E[5m, clear=\E[2J, cub1=^H, cud1=\E[B, + cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, + dim=\E[2m, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, + ich1=\E[@, il1=\E[L, ind=\E[S, is2=^^F@, kbs=\E[D, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf0=\E[001z, kf1=\E[002z, kf2=\E[003z, kf3=\E[004z, + kf4=\E[005z, kf5=\E[006z, kf6=\E[007z, kf7=\E[008z, + kf8=\E[009z, kf9=\E[010z, khome=\E[H, lf0=f1, lf1=f2, lf2=f3, + lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, rev=\E[7m, + ri=\E[T, rmso=\E[m, rmul=\E[05, sgr0=\E[m, smso=\E[7m, + smul=\E[4m, +# From: Wayne Throop (not official) # Data General 605x # Ought to work for a Model 6242, Type D210 as well as a 605x. # Note that the cursor-down key transmits ^Z. Job control users, beware! @@ -9774,14 +10136,15 @@ dg460-ansi|Data General Dasher 460 in ANSI-mode, # so there's a dg100 alias here. # (dg6053: the 4.4BSD file had , , . -- esr) dg6053-old|dg100|data general 6053, - am, bw, ul, + OTbs, am, bw, ul, cols#80, lines#24, - bel=^G, clear=^L, cnorm=^L, cr=^M, cub1=^Y, cud1=^Z, cuf1=^X, - cup=\020%p2%c%p1%c, cuu1=^W, cvvis=^L^R, el=^K, home=^H, - ht=^I, is2=^R, kbs=^Y, kcub1=^Y, kcud1=^Z, kcuf1=^X, kcuu1=^W, - kf0=^^q, kf1=^^r, kf2=^^s, kf3=^^t, kf4=^^u, kf5=^^v, kf6=^^w, - kf7=^^x, kf8=^^y, kf9=^^z, khome=^H, rmcup=^L, rmso=\0^^E, - rmul=^U, smcup=^L^R, smso=\0\0\0\0\0\036D, smul=^T, + OTbc=^Y, bel=^G, clear=^L, cnorm=^L, cr=^M, cub1=^Y, cud1=^Z, + cuf1=^X, cup=\020%p2%c%p1%c, cuu1=^W, cvvis=^L^R, el=^K, + home=^H, ht=^I, is2=^R, kbs=^Y, kcub1=^Y, kcud1=^Z, kcuf1=^X, + kcuu1=^W, kf0=^^q, kf1=^^r, kf2=^^s, kf3=^^t, kf4=^^u, kf5=^^v, + kf6=^^w, kf7=^^x, kf8=^^y, kf9=^^z, khome=^H, rmcup=^L, + rmso=\0^^E, rmul=^U, smcup=^L^R, smso=\0\0\0\0\0\036D, + smul=^T, # (Some performance can be gained over the generic DG terminal type) dg6053|6053|6053-dg|dg605x|605x|605x-dg|d2|d2-dg|Data General DASHER 6053, @@ -9792,8 +10155,8 @@ dg6053|6053|6053-dg|dg605x|605x|605x-dg|d2|d2-dg|Data General DASHER 6053, d200|d200-dg|Data General DASHER D200, bold=^^D^T, home@, ll@, rev=^^D, rmso=^^E^], sgr=\036%?%p1%p3%|%p6%|%tD%eE%;%?%p2%p6%|%t\024%e\025%;%?%p4%t\016%e\017%;%?%p1%p5%|%t\034%e\035%;, - sgr0=\017\025\035\036E, smso=^^D^\, - use=dgkeys+15, use=dg6053, + sgr0=\017\025\035\036E, smso=^^D^\, use=dgkeys+15, + use=dg6053, # DASHER D210 series terminals in ANSI mode. # Reverse video, no insert/delete character/line, 7 bits/character only. @@ -9812,8 +10175,7 @@ d210|d214|Data General DASHER D210 series, el1=\E[1K, home=\E[H, ind=^J, is1=\E[<0;<1;<4l, ll=\E[H\E[A, nel=^J, rev=\E[7m, rmso=\E[m, rmul=\E[m, sgr=\E[%?%p1%p3%|%p6%|%t7;%;%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;m, - sgr0=\E[m, smso=\E[2;7m, smul=\E[4m, - use=dgkeys+7b, + sgr0=\E[m, smso=\E[2;7m, smul=\E[4m, use=dgkeys+7b, # DASHER D210 series terminals in DG mode. # Like D200, but adds clear to end-of-screen and needs XON/XOFF. @@ -9834,7 +10196,8 @@ d210-dg|d214-dg|Data General DASHER D210 series in DG mode, # d211|d215|Data General DASHER D211 series, km, - is2=\E[2;1;1;1v\E(B\E)4\017, mc0=\E[i, use=dgkeys+8b, use=d210, + is2=\E[2;1;1;1v\E(B\E)4\017, mc0=\E[i, use=dgkeys+8b, + use=d210, # Initialization string 2 sets: # \E[2;0;1;0v @@ -9875,8 +10238,7 @@ d216-unix|d216e-unix|d216+|d216e+|Data General DASHER D216+ in DG-UNIX mode, rs2=\036N\036FS0E\036O\036FS00, sgr=\036%?%p1%p3%|%p6%|%tD%eE%;%?%p2%p6%|%t\024%e\025%;\036P%?%p4%tI%eJ%;%?%p1%p5%|%t\034%e\035%;\036FS%?%p9%t11%e00%;, sgr0=\036PJ\025\035\036E\036FS00, smacs=\036FS11, - vpa=\020\177%p1%c, - use=dgkeys+15, use=d216-dg, + vpa=\020\177%p1%c, use=dgkeys+15, use=d216-dg, d216-unix-25|d216+25|Data General DASHER D216+ in DG-UNIX mode with 25 lines, lines#25, is3=\036Fz2, use=d216+, @@ -9900,11 +10262,13 @@ d217-unix-25|Data General DASHER D217 in DG-UNIX mode with 25 lines, # d220|Data General DASHER D220, mc5i@, - dl@, dl1@, il@, il1@, is1=\E[<0;<1;<4l\E[m, mc4@, mc5@, rs1=\Ec, use=dg+color8, use=d470c, + dl@, dl1@, il@, il1@, is1=\E[<0;<1;<4l\E[m, mc4@, mc5@, rs1=\Ec, + use=dg+color8, use=d470c, d220-7b|Data General DASHER D220 in 7 bit mode, mc5i@, - dl@, dl1@, il@, il1@, is1=\E[<0;<1;<4l\E[m, mc4@, mc5@, rs1=\Ec, use=dg+color8, use=d470c-7b, + dl@, dl1@, il@, il1@, is1=\E[<0;<1;<4l\E[m, mc4@, mc5@, rs1=\Ec, + use=dg+color8, use=d470c-7b, # Initialization string 3 sets: # - default cursor (solid rectangle) @@ -9917,8 +10281,8 @@ d220-7b|Data General DASHER D220 in 7 bit mode, d220-dg|Data General DASHER D220 color terminal in DG mode, mc5i@, dl1@, home@, il1@, is2@, is3=\036FQ2, ll@, mc4@, mc5@, rs1@, - rs2=\036N\036FS0>\036O\036FS00, - use=dgmode+color8, use=d470c-dg, + rs2=\036N\036FS0>\036O\036FS00, use=dgmode+color8, + use=d470c-dg, # DASHER D230C color terminal in ANSI mode. # Like the D220 but with minor ANSI compatibility improvements. @@ -9928,8 +10292,7 @@ d230c|d230|Data General DASHER D230C, rev=\E[7;50m, rmkx=\E[2;1v, rmso=\E[50m, rmul=\E[50m, sgr=\E[50%?%p1%p3%|%p6%|%t;7%{1}%e%{0}%;%PR%?%p4%t;5%{1}%e%{0}%;%PB%?%p2%p6%|%t;4%{1}%e%{0}%;%PU%?%p1%p5%|%t;2%{1}%e%{0}%;%PDm\E)%?%p9%t6\016%e4\017%;, sgr0=\E[50m\E)4\017, smkx=\E[2;0v, smso=\E[2;7;50m, - smul=\E[4;50m, - use=dgkeys+7b, use=d220, + smul=\E[4;50m, use=dgkeys+7b, use=d220, d230c-dg|d230-dg|Data General DASHER D230C in DG mode, use=d220-dg, @@ -10014,8 +10377,7 @@ d410|d411|d460|d461|Data General DASHER D410/D460 series, ri=\EM, rmacs=\E)4\017, rs1=\Ec\E[<2h, rs2=\E[4;0;2;1;1;1v\E(B\E)4, sgr=\E[%?%p1%p3%|%p6%|%t7;%;%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;m\E)%?%p9%t6\016%e4\017%;, - sgr0=\E[m\E)4\017, smacs=\E)6\016, - use=d211, + sgr0=\E[m\E)4\017, smacs=\E)6\016, use=d211, # Initialization string 2 sets: # \E[3;2;2;0;1;0v @@ -10037,8 +10399,7 @@ d410-7b|d411-7b|d460-7b|d461-7b|Data General DASHER D410/D460 series in 7 bit mo enacs=\E)6, is2=\E[3;2;2;0;1;0v\E(0\017, rmacs=^O, rs2=\E[4;0;2;0;1;0v\E(0, sgr=\E[%?%p1%p3%|%p6%|%t7;%;%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;m%?%p9%t\016%e\017%;, - sgr0=\E[m\017, smacs=^N, - use=dgkeys+7b, use=d410, + sgr0=\E[m\017, smacs=^N, use=dgkeys+7b, use=d410, d410-dg|d460-dg|d411-dg|d461-dg|Data General DASHER D410/D460 series in DG mode, km, @@ -10072,14 +10433,12 @@ d410-dg|d460-dg|d411-dg|d461-dg|Data General DASHER D410/D460 series in DG mode, d410-w|d411-w|d460-w|d461-w|Data General DASHER D410/D460 series in wide mode, cols#126, is1=\E[<0;<1;<2;<4l\E[5;1v\E[1;1;126w\E[1;6;<2h, - rs1=\Ec\E[5;1v\E[1;1;126w\E[<2h, - use=d410, + rs1=\Ec\E[5;1v\E[1;1;126w\E[<2h, use=d410, d410-7b-w|d411-7b-w|d460-7b-w|d461-7b-w|Data General DASHER D410/D460 series in wide 7 bit mode, cols#126, is1=\E[<0;<1;<2;<4l\E[5;1v\E[1;1;126w\E[1;6;<2h, - rs1=\Ec\E[5;1v\E[1;1;126w\E[<2h, - use=d410-7b, + rs1=\Ec\E[5;1v\E[1;1;126w\E[<2h, use=d410-7b, d412-dg|d462-dg|d462e-dg|d412+dg|d462+dg|d413-dg|d463-dg|Data General DASHER D412/D462 series in DG mode, use=d410-dg, @@ -10093,30 +10452,33 @@ d412-unix|d462-unix|d412+|d462+|Data General DASHER D412+/D462+ series in Unix m ll=\036FG\036PA, mc0=^A, rc=\036F}11, ri=^^I, rs1=\036FA\036FT0, rs2=\036P@1, sc=\036F}10, vpa=\036FPFF%p1%2.2X, - wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{23}%p2%>%t000%;\036FX%p3%2.2X%p4%2.2X, use=d216+, + wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{23}%p2%>%t000%;\036FX%p3%2.2X%p4%2.2X, + use=d216+, d412-unix-w|d462-unix-w|d412+w|d462+w|Data General DASHER D412+/D462+ series in wide Unix mode, cols#132, is2=\036FQ5\036FW\036FK\036F\^\036FX0083\036O\036FS00, rs2=\036P@1\036FK\036FX0083, - wind=\036FB%?%p1%t%p1%2.2X1%;%p2%p1%-%{1}%+%2.2X1%?%{23}%p2%>%t001%;\036FX%p3%2.2X%p4%2.2X, use=d412-unix, + wind=\036FB%?%p1%t%p1%2.2X1%;%p2%p1%-%{1}%+%2.2X1%?%{23}%p2%>%t001%;\036FX%p3%2.2X%p4%2.2X, + use=d412-unix, d412-unix-25|d462-unix-25|d412+25|d462+25|Data General DASHER D412+/D462+ series in Unix mode with 25 lines, lines#25, is3=\036Fz2, - wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{24}%p2%>%t000%;\036FX%p3%2.2X%p4%2.2X, use=d462+, + wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{24}%p2%>%t000%;\036FX%p3%2.2X%p4%2.2X, + use=d462+, d412-unix-s|d462-unix-s|d412+s|d462+s|Data General DASHER D412+/D462+ in Unix mode with status line, eslok, hs, clear=\036FG\036PH, fsl=\036F}01\022, is3=\036Fz2\036F}00\036FB180000\036F}01, ll@, tsl=\036F}00\036FP%p1%2.2X18\036PG, - wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{23}%p2%>%t%{23}%p2%-%2.2X0%;000\036FX%p3%2.2X%p4%2.2X, use=d462+, + wind=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{23}%p2%>%t%{23}%p2%-%2.2X0%;000\036FX%p3%2.2X%p4%2.2X, + use=d462+, # Relative cursor motions are confined to the current window, # which is not what the scrolling region specification expects. # Thus, relative vertical cursor positioning must be deleted. d412-unix-sr|d462-unix-sr|d412+sr|d462+sr|Data General DASHER D412+/D462+ in Unix mode with scrolling region, csr=\036FB%?%p1%t%p1%2.2X0%;%p2%p1%-%{1}%+%2.2X0%?%{23}%p2%>%t000%;, - cud1@, cuu1@, ll@, - use=d462+, + cud1@, cuu1@, ll@, use=d462+, d413-unix|d463-unix|Data General DASHER D413/D463 series in DG-UNIX mode, use=d412-unix, @@ -10252,29 +10614,14 @@ d577-dg|d578-dg|Data General DASHER D577/D578 series in DG mode, d578|Data General DASHER D578, is1=\E[<0;<1;<2;<4l\E[1;1;80w\E[1;6;<2h, use=d577, d578-7b|Data General DASHER D578 in 7-bit mode, - is1=\E[<0;<1;<2;<4l\E[1;1;80w\E[1;6;<2h, - use=d577-7b, + is1=\E[<0;<1;<2;<4l\E[1;1;80w\E[1;6;<2h, use=d577-7b, #### Datamedia (dm) # -# Datamedia was headquartered in Nashua, New Hampshire in 1993. -# As of early 1996, at least one company called `Datamedia' has been taken -# over by: -# -# Axent Technologies, Inc. -# 2400 Research Boulevard -# Rockville, Maryland 20850 -# voice: +1 301/258-5043 -# fax: +1 301/330-5756 -# email: -# -# makers of OmniGuard client/server security software. They are a software -# only company and no longer make terminals. However, the operator there -# told me that she had once spoken to a customer looking for Datamedia -# terminals who'd mentioned a Datamedia in New Jersey. This is backed up -# by comp.terminals posting describing the ID plate on the back of a -# "Datamedia 3000" terminal. Was this an earlier incarnation of Axent? -# Inquiring minds want to know... +# Datamedia was headquartered in Nashua, New Hampshire until it went +# out of business in 1993, but the ID plates on the terminals referred +# to the factory in Pennsauken, NJ. The factory was sold to a PCB board +# manufacturer which threw out all information about the terminals. # cs10|colorscan|Datamedia Color Scan 10, @@ -10291,7 +10638,7 @@ cs10-w|Datamedia Color Scan 10 with 132 columns, # (dm1520: removed obsolete ":ma=^\ ^_^P^YH:" -- esr) dm1520|dm1521|datamedia 1520, - am, xenl, + OTbs, am, xenl, cols#80, it#8, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -10300,6 +10647,7 @@ dm1520|dm1521|datamedia 1520, # dm2500: this terminal has both and . Applications using # termcap/terminfo directly (rather than through ncurses) might be confused. dm2500|datamedia2500|datamedia 2500, + OTbs, OTnc, cols#80, lines#24, bel=^G, clear=^^^^\177, cub1=^H, cud1=^J, cuf1=^\, cup=\014%p2%{96}%^%c%p1%{96}%^%c, cuu1=^Z, @@ -10319,7 +10667,7 @@ dmchat|dmchat version of datamedia 2500, il1=\020\n\030\035\030\035$<1*/>, use=dm2500, # (dm3025: ":MT:" changed to ":km:" -- esr) dm3025|datamedia 3025a, - km, + OTbs, km, cols#80, it#8, lines#24, bel=^G, clear=\EM$<2>, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=\EA, @@ -10328,7 +10676,7 @@ dm3025|datamedia 3025a, is2=\EQ\EU\EV, rmdc=\EQ, rmir=\EQ, rmso=\EO0, smdc=\EP, smir=\EP, smso=\EO1, dm3045|datamedia 3045a, - am, eo, km@, ul, xenl, + OTbs, am, eo, km@, ul, xenl, dch1=\EB$<6>, dl1@, il1@, is2=\EU\EV, kcuf1=\EC, kcuu1=\EA, kf0=\Ey\r, kf1=\Ep\r, kf2=\Eq\r, kf3=\Er\r, kf4=\Es\r, kf5=\Et\r, kf6=\Eu\r, kf7=\Ev\r, kf8=\Ew\r, kf9=\Ex\r, @@ -10380,7 +10728,7 @@ dm80w|dmdt80w|dt80w|datamedia dt80/1 in 132 char mode, clear=\E[H\E[2J$<50/>, cud1=^J, cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<5/>, ed=\E[0J$<20/>, el=\E[0K$<20/>, use=dm80, -# From: Adam Thompson Sept 10 1995 +# From: Adam Thompson Sept 10 1995 dt80-sas|Datamedia DT803/DTX for SAS usage, am, bw, cols#80, lines#24, @@ -10414,8 +10762,7 @@ excel62-w|excel64-w|datamedia Excel 62 in 132 char mode, excel62-rv|excel64-rv|datamedia Excel 62 in reverse video mode, dch1=\E[P, flash=\E[?5l\E[?5h, kbs=^H, kcub1=^H, kcud1=^J, kf5=\EOu, kf6=\EOv, kf7=\EOw, kf8=\EOx, kf9=\EOy, rmir=\E[4l, - smir=\E[4h, - use=dt80, + smir=\E[4h, use=dt80, #### Falco # @@ -10434,7 +10781,7 @@ excel62-rv|excel64-rv|datamedia Excel 62 in reverse video mode, # This terminal was released around 1983 and was discontinued long ago. # The standout and underline highlights are the same. falco|ts1|ts-1|falco ts-1, - am, + OTbs, am, cols#80, it#8, lines#24, bel=^G, clear=\E*, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -10443,7 +10790,7 @@ falco|ts1|ts-1|falco ts-1, kf0=^A0\r, rmir=\Er, rmso=\Eg0, rmul=\Eg0, sgr0=\Eg0, smir=\Eq, smso=\Eg1, smul=\Eg1, falco-p|ts1p|ts-1p|falco ts-1 with paging option, - am, da, db, mir, msgr, ul, + OTbs, am, da, db, mir, msgr, ul, cols#80, it#8, lines#24, bel=^G, cbt=\EI, clear=\E*, cr=^M, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=\E[A, @@ -10530,7 +10877,7 @@ f1720|f1720a|fluke 1720A, # made this relative to adm+sgr -- note that isn't # known to work for f100 but does on the f110. --esr) f100|freedom|freedom100|freedom model 100, - am, bw, hs, mir, msgr, xon, + OTbs, am, bw, hs, mir, msgr, xon, cols#80, lines#24, acsc=, bel=^G, cbt=\EI, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, @@ -10564,8 +10911,7 @@ f110|freedom110|Liberty Freedom 110, flash=\Eb$<200/>\Ed, il1=\EE, ip@, is2@, kclr=^^, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, kf0=^AI\r, kf10@, kich1=\EQ, kil1=\EE, mc4=\Ea, mc5=\E`, ri=\EJ, rmacs=\E%%, rmir=\Er\EO, - smacs=\E$, smir=\EO\Eq, smso=\EG<, tsl=\Ef, - use=f100, + smacs=\E$, smir=\EO\Eq, smso=\EG<, tsl=\Ef, use=f100, f110-14|Liberty Freedom 110 14inch, dch1@, use=f110, f110-w|Liberty Freedom 110 - 132 cols, @@ -10575,7 +10921,7 @@ f110-14w|Liberty Freedom 110 14in/132 cols, dch1@, use=f110, # (f200: added to suppress tic warnings re / --esr) f200|freedom200|Liberty Freedom 200, - am, eslok, hs, mir, msgr, xon, + OTbs, am, eslok, hs, mir, msgr, xon, cols#80, it#8, lines#24, wsl#80, acsc=, bel=^G, blink=\EG2, bold=\EG0, cbt=\EI, civis=\E.0, clear=^Z, cnorm=\E.1, cr=^M, @@ -10589,8 +10935,7 @@ f200|freedom200|Liberty Freedom 200, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, kich1=\EQ, kil1=\EE, mc4=\Ea, mc5=\E`, ri=\EJ, rmacs=\E%%, rmir=\Er, smacs=\E$, smir=\Eq, smso=\EG<, - tbc=\E3, tsl=\Ef, vpa=\E[%p1%{32}%+%c, - use=adm+sgr, + tbc=\E3, tsl=\Ef, vpa=\E[%p1%{32}%+%c, use=adm+sgr, f200-w|Liberty Freedom 200 - 132 cols, cols#132, use=f200, # The f200 has the ability to reprogram the down cursor key. The key is @@ -10617,6 +10962,7 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi, # line) by an escape sequence. No info on this beast yet. # (go140: I added / based on the init string -- esr) go140|graphon go-140, + OTbs, cols#80, it#8, lines#24, clear=\E[H\E[2J$<10/>, cub1=^H, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, @@ -10631,12 +10977,13 @@ go140|graphon go-140, go140w|graphon go-140 in 132 column mode, am, cols#132, - is2=\E<\E=\E[?3h\E[?7h\E(B\E[J\E7\E[;r\E8\E[m\E[q, use=go140, + is2=\E<\E=\E[?3h\E[?7h\E(B\E[J\E7\E[;r\E8\E[m\E[q, + use=go140, # Hacked up vt200 termcap to handle GO-225/VT220 # From: # (go225: I added / based on the init string -- esr) go225|go-225|Graphon 225, - am, mir, xenl, + OTbs, am, mir, xenl, cols#80, it#8, lines#25, vt#3, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, @@ -10717,7 +11064,7 @@ go225|go-225|Graphon 225, # not AEP! # sb1|beehive superbee, - am, bw, da, db, mir, ul, xsb, + OTbs, am, bw, da, db, mir, ul, xsb, cols#80, lines#25, xmc#1, bel=^G, cbt=\E`$<650>, clear=\EH$<1>\EJ$<3>, cr=$<1>\r, cub1=^H, cud1=^J, cuf1=\EC$<3>, cup=\EF%p2%03d%p1%03d, @@ -10733,7 +11080,8 @@ sb1|beehive superbee, smso=\E_1, smul=\E_0, tbc=\E3, sbi|superbee|beehive superbee at Indiana U., xsb, - cr=\r$<1>, il1=1\EN\EL$<9>\EQ \EP$<9> \EO\ER\EA, use=sb1, + cr=\r$<1>, il1=1\EN\EL$<9>\EQ \EP$<9> \EO\ER\EA, + use=sb1, # Alternate (older) description of Superbee - f1=escape, f2=^C. # Note: there are at least 3 kinds of superbees in the world. The sb1 # holds onto escapes and botches ^C's. The sb2 is the best of the 3. @@ -10761,12 +11109,22 @@ superbeeic|super bee with insert char, sb2|sb3|fixed superbee, xsb@, use=superbee, +#### Beehive Medical Electronics +# +# Steve Seymour writes (Wed, 03 Feb 1999): +# Regarding your question though; Beehive terminals weren't made by Harris. +# They were made by Beehive Medical Electronics in Utah. They went out of +# business in the early '80s. +# +# (OK, then, I don't know why a couple of these say "harris beehive".) +# + # Reports are that most of these Beehive entries (except superbee) have not # been tested and do not work right. is a trouble spot. Be warned. # (bee: was empty, which is obviously bogus -- esr) beehive|bee|harris beehive, - am, mir, + OTbs, am, mir, cols#80, lines#24, cbt=\E>, clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EF%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EP, @@ -10781,7 +11139,7 @@ beehive|bee|harris beehive, # (beehive: removed, no such file. If you # really care, cook up one using ^F -- esr) beehive3|bh3m|beehiveIIIm|harris beehive 3m, - am, + OTbs, am, cols#80, it#8, lines#20, bel=^G, clear=^E^R, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cuu1=^K, dl1=\021$<350>, ed=^R, el=^P, home=^E, ht=^I, hts=^F, @@ -10791,8 +11149,11 @@ beehive4|bh4|beehive 4, cols#80, lines#24, bel=^G, clear=\EE, cr=^M, cub1=\ED, cud1=^J, cuf1=\EC, cuu1=\EA, ed=\EJ, el=\EK, home=\EH, ind=^J, +# There was an early Australian kit-built computer called a "Microbee". +# It's not clear whether this is for one of those or for a relative +# of the Beehive. microb|microbee|micro bee series, - am, + OTbs, am, cols#80, it#8, lines#24, bel=^G, clear=\EE, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EF%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, @@ -10807,8 +11168,7 @@ ha8675|harris 8675, is2=\ES\E#\E*\Eh\Em\E?\E1\E9\E@\EX\EU, kf1=^F, kf10=\Ed, kf11=^W, kf12=\ER, kf13=\EE, kf14=\EI, kf15=\Ei, kf16=\Eg, kf2=^P, kf3=^N, kf4=^V, kf5=^J, kf6=^T, kf7=^H, - kf8=\177, kf9=\Ee, - use=bee, + kf8=\177, kf9=\Ee, use=bee, # (8686: changed k10, k11...k16 to k;, F1...F6; fixed broken continuation # in :is: -- esr) ha8686|harris 8686, @@ -10849,12 +11209,13 @@ ha8686|harris 8686, # vi - this terminal is too dumb for even vi. (The code is # there but it isn't debugged for this case.) hz1000|hazeltine 1000, + OTbs, cols#80, lines#12, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=\s, home=^K, ind=^J, # From: Thu Aug 20 09:09:18 1981 hz1420|hazeltine 1420, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\E^\, cr=^M, cub1=^H, cud1=^J, cuf1=^P, cup=\E\021%p2%c%p1%{32}%+%c, cuu1=\E^L, dl1=\E^S, @@ -10864,7 +11225,7 @@ hz1420|hazeltine 1420, # freakout with out-of-range args and tn3270. No hz since it needs to # receive tildes. hz1500|hazeltine 1500, - am, hz, + OTbs, am, hz, cols#80, lines#24, bel=^G, clear=~^\, cr=^M, cub1=^H, cud1=~^K, cuf1=^P, cup=~\021%p2%p2%?%{30}%>%t%{32}%+%;%{96}%+%c%p1%{96}%+%c, @@ -10876,7 +11237,7 @@ hz1500|hazeltine 1500, # , but these caps were commented out in 8.3; also, # removed incorrect and overridden ":do=^J:" -- esr) hz1510|hazeltine 1510, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\E^\, cr=^M, cub1=^H, cud1=\E^K, cuf1=^P, cup=\E\021%p2%c%p1%c, cuu1=\E^L, dl1=\E^S, ed=\E^X, @@ -10888,7 +11249,7 @@ hz1510|hazeltine 1510, # Other switches may be set for operator convenience or communication # requirements. hz1520|Hazeltine 1520, - am, bw, msgr, + OTbs, am, bw, msgr, cols#80, lines#24, bel=^G, bold=\E^_, clear=\E^\, cr=^M, cub1=^H, cud1=^J, cuf1=^P, cup=\E\021%p2%c%p1%c, cuu1=\E^L, dl1=\E^S, @@ -10908,14 +11269,14 @@ hz1520-noesc|hazeltine 1520, # is not braindamaged. It has tildes and backprimes and everything! # Be sure the auto lf/cr switch is set to cr. hz1552|hazeltine 1552, + OTbs, cud1=^J, dl1=\EO, il1=\EE, kf1=\EP, kf2=\EQ, kf3=\ER, lf1=blue, - lf2=red, lf3=green, - use=vt52, + lf2=red, lf3=green, use=vt52, hz1552-rv|hazeltine 1552 reverse video, cud1=^J, rmso=\ET, smso=\ES, use=hz1552, # Note: h2000 won't work well because of a clash between upper case and ~'s. hz2000|hazeltine 2000, - am, + OTbs, OTnc, am, cols#74, lines#27, bel=^G, clear=~\034$<6>, cub1=^H, cud1=^J, cup=~\021%p2%c%p1%c, dl1=~\023$<6>, home=~^R, @@ -10929,7 +11290,7 @@ hz2000|hazeltine 2000, # char as a built in function. Vi has to delete to end of line and then # redraw the rest of the line. esprit|Hazeltine Esprit I, - am, bw, + OTbs, am, bw, cols#80, lines#24, bel=^G, cbt=\E^T, clear=\E^\, cr=^M, cub1=^H, cud1=\E^K, cuf1=^P, cup=\E\021%p2%c%p1%c, cuu1=\E^L, dl1=\E^S, @@ -10946,7 +11307,7 @@ esprit-am|hazeltine esprit auto-margin, # that the terminal would work somewhat if the auto LF/CR was turned off. # (hmod1: removed :dn=~^K: -- esr) hmod1|Hazeltine Modular 1, - am, hz, + OTbs, am, hz, cols#80, lines#24, bel=^G, cbt=~^T, clear=~^\, cr=^M, cub1=^H, cud1=~^K, cuf1=^P, cup=~\021%p2%c%p1%c, cuu1=~^L, dl1=~^S, home=~^R, il1=~^Z, @@ -10957,9 +11318,9 @@ hmod1|Hazeltine Modular 1, # from Will Martin via BRL # Like VT100, except for different "am" behavior. hazel|exec80|h80|he80|Hazeltine Executive 80, - am, + OTbs, OTpt, am, cols#80, it#8, lines#24, vt#3, - bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, + OTnl=^J, bel=^G, blink=\E[5m$<2/>, bold=\E[1m$<2/>, clear=\E[;H\E[2J$<50/>, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C$<2/>, cup=\E[%i%p1%d;%p2%dH$<5/>, cuu1=\E[A$<2/>, @@ -10981,7 +11342,7 @@ ibm327x|line mode IBM 3270 style, clear=^M^J, el=^M, home=^M, ibm3101|i3101|IBM 3101-10, - am, xon, + OTbs, am, xon, cols#80, lines#24, bel=^G, clear=\EK, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, @@ -10990,12 +11351,11 @@ ibm3101|i3101|IBM 3101-10, ibm3151|IBM 3151 display, is2=\E S, rmacs=\E>B, rmcup=\E>B, rs2=\E S, s0ds=\E>B, sgr=\E4%{64}%?%p1%t%{65}%|%;%?%p2%t%{66}%|%;%?%p3%t%{65}%|%;%?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t%{80}%|%;%c%?%p9%t\E>A%e\E>B%;, - sgr0=\E4@\E>B, smacs=\E>A, smcup=\E>B, - use=ibm3162, + sgr0=\E4@\E>B, smacs=\E>A, smcup=\E>B, use=ibm3162, # From: Mark Easter 29 Oct 1992 -# I've commented out or translated some IBM extensions. +# removed kend, knp, kpp -TD ibm3161|ibm3163|wy60-316X|wyse60-316X|IBM 3161/3163 display, - am, mir, msgr, + OTbs, am, mir, msgr, cols#80, it#8, lines#24, acsc=j\352k\353l\354m\355n\356q\361t\364u\365v\366w\367x\370, bel=^G, blink=\E4D, bold=\E4H, clear=\EH\EJ, cr=^M, cub1=\ED, @@ -11003,39 +11363,40 @@ ibm3161|ibm3163|wy60-316X|wyse60-316X|IBM 3161/3163 display, cuu1=\EA, dch1=\EQ, dl1=\EO, ed=\EJ, el=\EI, home=\EH, ind=^J, invis=\E4P, kbs=^H, kcbt=\E2, kclr=\EL\r, kctab=\E1, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\EQ, - kdl1=\EO, ked=\EJ, kel=\EI, kend=\E2, kf1=\Ea\r, kf10=\Ej\r, + kdl1=\EO, ked=\EJ, kel=\EI, kf1=\Ea\r, kf10=\Ej\r, kf11=\Ek\r, kf12=\El\r, kf13=\E!a\r, kf14=\E!b\r, kf15=\E!c\r, kf16=\E!d\r, kf17=\E!e\r, kf18=\E!f\r, kf19=\E!g\r, kf2=\Eb\r, kf20=\E!h\r, kf21=\E!i\r, kf22=\E!j\r, kf23=\E!k\r, kf24=\E!l\r, kf3=\Ec\r, kf4=\Ed\r, kf5=\Ee\r, kf6=\Ef\r, kf7=\Eg\r, kf8=\Eh\r, kf9=\Ei\r, khome=\EH, khts=\E0, kich1=\EP \010, kil1=\EN, - knp=\EI, kpp=\EL, ktbc=\E 1, mc4=^P^T, mc5=^P^R, rev=\E4A, - rmcup=\E>A, rmso=\E4@, rmul=\E4@, + ktbc=\E 1, mc4=^P^T, mc5=^P^R, rev=\E4A, rmcup=\E>A, + rmso=\E4@, rmul=\E4@, sgr=\E4%{64}%?%p1%t%{65}%|%;%?%p2%t%{66}%|%;%?%p3%t%{65}%|%;%?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t%{80}%|%;%c%?%p9%t\E>A%e\E<@%;, sgr0=\E4@\E<@, smcup=\E>A, smso=\E4A, smul=\E4B, ibm3161-C|IBM 3161-C NLS terminal using cartridge, - rmcup=\E>B, s0ds=\E>B, s1ds=\E>A, smcup=\E>B, - use=ibm3161, + rmcup=\E>B, s0ds=\E>B, s1ds=\E>A, smcup=\E>B, use=ibm3161, ibm3162|IBM 3162 display, blink=\E4$a, bold=\E4(a, il1=\EN, invis=\E40a, rev=\E4!a, rmso=\E4>b, rmul=\E4=b, sgr0=\E4@, smso=\E4!a, smul=\E4"a, use=ibm3161-C, +# This really should not use setab/setaf, but it is clear that the +# original terminfo does not toggle red/blue colors as in setb/setf. ibm3164|i3164|IBM 3164, msgr, colors#8, pairs#64, - rmcup=\E!9(N\E>B, s0ds=\E>B, s1ds=\E>A, - setb=\E4 %p1%{64}%+%c, - setf=\E4%?%p1%t %p1%{32}%+%c%e!'%;@, + op=\E4 "@, rmcup=\E!9(N\E>B, s0ds=\E>B, s1ds=\E>A, + setab=\E4 %p1%{64}%+%c, + setaf=\E4%?%p1%t %p1%{32}%+%c%e!'%;@, smcup=\E!9/N\E>B, use=ibm3161, ibm5151|wy60-AT|wyse60-AT|IBM 5151 Monochrome display, am, bw, msgr, xon, cols#80, it#8, lines#25, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=^M, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD, cub1=^H, 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, dch1=\E[P, dl=\E[%p1%dM, @@ -11044,25 +11405,24 @@ ibm5151|wy60-AT|wyse60-AT|IBM 5151 Monochrome display, indn=\E[%p1%dS, invis=\E[8m, is2=\Ec, kbs=^H, kcbt=\E[Z, kclr=\E[144q, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, ked=\E[148q, kel=\E[142q, - kend=\E[146q, kf0=\E[010q, kf1=\E[001q, kf10=\E[010q, - kf11=\E[011q, kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, - kf15=\E[015q, kf16=\E[016q, kf17=\E[017q, kf18=\E[018q, - kf19=\E[019q, kf2=\E[002q, kf20=\E[020q, kf21=\E[021q, - kf22=\E[022q, kf23=\E[023q, kf24=\E[024q, kf25=\E[025q, - kf26=\E[026q, kf27=\E[027q, kf28=\E[028q, kf29=\E[029q, - kf3=\E[003q, kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, - kf33=\E[033q, kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, - kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, - kf8=\E[008q, kf9=\E[009q, khome=\E[H, kich1=\E[139q, - kil1=\E[140q, kind=\E[151q, knp=\E[154q, kpp=\E[150q, - kri=\E[155q, krmir=\E[4l, rc=\E[u, rev=\E[7m, ri=\E[T, - rin=\E[%p1%dT, rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs2=\Ec, - sc=\E[s, + kend=\E[146q, kf1=\E[001q, kf10=\E[010q, kf11=\E[011q, + kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, kf15=\E[015q, + kf16=\E[016q, kf17=\E[017q, kf18=\E[018q, kf19=\E[019q, + kf2=\E[002q, kf20=\E[020q, kf21=\E[021q, kf22=\E[022q, + kf23=\E[023q, kf24=\E[024q, kf25=\E[025q, kf26=\E[026q, + kf27=\E[027q, kf28=\E[028q, kf29=\E[029q, kf3=\E[003q, + kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, kf33=\E[033q, + kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, kf4=\E[004q, + kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, + kf9=\E[009q, khome=\E[H, kich1=\E[139q, kil1=\E[140q, + kind=\E[151q, knp=\E[154q, kpp=\E[150q, kri=\E[155q, + krmir=\E[4l, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, rmir=\E[4l, + rmso=\E[m, rmul=\E[m, rs2=\Ec, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m, sgr0=\E[0m, smir=\E[4h, smso=\E[7m, smul=\E[4m, ibmaed|IBM Experimental display, - am, eo, msgr, + OTbs, am, eo, msgr, cols#80, it#8, lines#52, clear=\EH\EK, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, @@ -11080,25 +11440,31 @@ ibmmono|IBM workstation monochrome, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\EY, khome=\EH, kich1=\0, kind=\EE, knp=\EE, kpp=\Eg, kri=\EG, lf0=f10, rev=\Ep, ri=\EA, rmso=\Ez, rmul=\Ew, - sgr0=\Ew\Eq\Ez\EB, smso=\EZ, smul=\EW, tsl=\Ej\EY8%+ \Eo, use=ibm3101, + sgr0=\Ew\Eq\Ez\EB, smso=\EZ, smul=\EW, tsl=\Ej\EY8%+ \Eo, + use=ibm3101, ibmega|IBM Enhanced Color Display, cr=^M, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, - nel=^M^J, - use=ibmmono, + nel=^M^J, use=ibmmono, +# This color scheme is assumed in some recent IBM terminal descriptions +# (green on black, emulated on a 16-color terminal). +ibm+color|IBM color definitions, + colors#8, ncv#3, pairs#64, + op=\E[32m\E[40m, + setb=\E[%?%p1%{0}%=%t40m%e%p1%{1}%=%t41m%e%p1%{2}%=%t42m%e%p1%{3}%=%t43m%e%p1%{4}%=%t44m%e%p1%{5}%=%t45m%e%p1%{6}%=%t46m%e%p1%{7}%=%t107m%;, + setf=\E[%?%p1%{0}%=%t30m%e%p1%{1}%=%t31m%e%p1%{2}%=%t32m%e%p1%{3}%=%t33m%e%p1%{4}%=%t34m%e%p1%{5}%=%t35m%e%p1%{6}%=%t36m%e%p1%{7}%=%t97m%;, ibm5154|IBM 5154 Color display, - colors#8, pairs#64, + colors#8, ncv@, pairs#64, bold@, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ibm5151, + use=ibm+color, ibmega-c|ibm5154-c|IBM Enhanced Color Display with standout and underline, rmso=\EB, rmul=\EB, smso=\EF\Ef3;, smul=\EF\Ef2;, use=ibmmono, ibmvga-c|IBM VGA display color termcap, cr=^M, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, - nel=^M^J, - use=ibmega-c, + nel=^M^J, use=ibmega-c, ibmvga|IBM VGA display, cr=^M, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, - nel=^M^J, - use=ibmega, + nel=^M^J, use=ibmega, # ibmapa* and ibmmono entries come from ACIS 4.3 distribution rtpc|ibmapa16|IBM 6155 Extended Monochrome Graphics Display, lines#32, @@ -11111,17 +11477,16 @@ ibmapa8c|ibmapa8|IBM 6154 Advanced Graphics Display, dsl=\Ej\EY? \EI\Ek, tsl=\Ej\EY?%+ \Eo, use=ibmmono, ibmapa8c-c|ibm6154-c|IBM 6154 Advanced Color Graphics Display, lines#31, - dim=\EF\Ef7;, dsl=\Ej\EY? \EI\Ek, tsl=\Ej\EY?%+ \Eo, use=ibmega-c, + dim=\EF\Ef7;, dsl=\Ej\EY? \EI\Ek, tsl=\Ej\EY?%+ \Eo, + use=ibmega-c, ibm6154|IBM 6154 Color displays, blink@, bold=\E[12m, s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;12%;m, - sgr0=\E[0;10m, - use=ibm5154, + sgr0=\E[0;10m, use=ibm5154, ibm6153|IBM 6153 Black & White display, blink@, bold=\E[12m, s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;12%;m, - sgr0=\E[0;10m, - use=ibm5151, + sgr0=\E[0;10m, use=ibm5151, ibm6153-90|IBM 6153 Black & White display, cols#90, lines#36, blink@, bold@, use=ibm5151, @@ -11131,7 +11496,7 @@ ibm8512|ibm8513|IBM color VGA Terminal, am, mir, msgr, cols#80, it#8, lines#25, acsc=jjkkllmmnnqqttuuvvwwxx, blink=\E[5m, bold=\E[1m, - clear=\E[H\E[2J, cub1=\E[D, cud1=^J, cuf1=\E[C, + clear=\E[H\E[J, cub1=\E[D, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, home=\E[H, il=\E[%p1%dL, il1=\E[L, is2=\Eb\E[m\017\E[?7h, kcud1=\E[B, kcuu1=\E[A, @@ -11148,24 +11513,71 @@ hft-c|HFT with Color, colors#8, pairs#64, acsc=jjkkllmmnnqqttuuvvwwxx, s0ds=\E(B, s1ds=\E(0, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr0=\E[0m\E(B, - use=ibm5151, + use=ibm5151, use=ibm+color, hft-c-old|HFT with Color PC850, colors#8, pairs#64, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ibm5151, + use=ibm+color, +hft-old|AIWS High Function Terminal, + am, xon, + cols#80, lines#25, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, + cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, + ht=^I, ich1=\E[@, il1=\E[L, ind=^J, invis=\E[8m, kbs=^H, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf1=\E[001q, kf2=\E[002q, kf3=\E[003q, kf4=\E[004q, + kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, kf8=\E[008q, + kf9=\E[009q, khome=\E[H, knp=\E[153q, kpp=\E[159q, + ktbc=\E[010q, rev=\E[7m, rmir=\E6, rmso=\E[m, rmul=\E[m, + sgr0=\E[m, smir=\E6, smso=\E[7m, smul=\E[4m, use=ibm+color, ibm-system1|system1|ibm system/1 computer, am, xt, cols#80, lines#24, bel=^G, clear=^Z, cub1=^H, cuf1=^\, cup=\005%p1%{32}%+%c%p2%{32}%+%c, cuu1=^^, home=^K, ind=^J, +# lft-pc850 : IBM Low Function Terminal Device +# lft "supports" underline, bold, and blink in the sense that the lft code +# sets all the right bits. HOWEVER, depending upon the adapter, these +# attributes may or may not be supported by the device driver. +lft|lft-pc850|LFT-PC850|IBM LFT PC850 Device, + am, bw, msgr, xon, + cols#80, it#8, lines#25, + acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, + cr=^M, cub=\E[%p1%dD, cub1=^H, 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, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[2J, el=\E[0K, + home=\E[H, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, il=\E[%p1%dL, + il1=\E[L, ind=\ED, indn=\E[%p1%dS, invis=\E[8m, is2=\Ec, + kbs=^H, kcbt=\E[Z, kclr=\E[144q, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, ked=\E[148q, + kel=\E[142q, kend=\E[146q, kf1=\E[001q, kf10=\E[010q, + kf11=\E[011q, kf12=\E[012q, kf13=\E[013q, kf14=\E[014q, + kf15=\E[015q, kf16=\E[016q, kf17=\E[017q, kf18=\E[018q, + kf19=\E[019q, kf2=\E[002q, kf20=\E[020q, kf21=\E[021q, + kf22=\E[022q, kf23=\E[023q, kf24=\E[024q, kf25=\E[025q, + kf26=\E[026q, kf27=\E[027q, kf28=\E[028q, kf29=\E[029q, + kf3=\E[003q, kf30=\E[030q, kf31=\E[031q, kf32=\E[032q, + kf33=\E[033q, kf34=\E[034q, kf35=\E[035q, kf36=\E[036q, + kf4=\E[004q, kf5=\E[005q, kf6=\E[006q, kf7=\E[007q, + kf8=\E[008q, kf9=\E[009q, khome=\E[H, kich1=\E[139q, + kil1=\E[140q, kind=\E[151q, knp=\E[154q, kpp=\E[150q, + kri=\E[155q, krmir=\E[4l, rev=\E[7m, ri=\EL, rin=\E[%p1%dT, + rmacs=\E(B, rmir=\E[4l, rmso=\E[0m, rmul=\E[0m, rs2=\Ec, + sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, + sgr0=\E[0m, smacs=\E(0, smir=\E[4h, smso=\E[7m, smul=\E[4m, + tbc=\E[3g, ibm5081|hft|IBM Megapel Color display, acsc=jjkkllmmnnqqttuuvvwwxx, blink@, bold@, s0ds=\E(B, - s1ds=\E(0, sgr0=\E[0m\E(B, - use=ibm5154, + s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154, ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 Megapel enhanced color display, eslok, hs, lines#33, - dsl=\Ej\EYA \EI\Ek, fsl=\Ek, tsl=\Ej\EYA%+ \Eo, use=ibmega-c, + dsl=\Ej\EYA \EI\Ek, fsl=\Ek, tsl=\Ej\EYA%+ \Eo, + use=ibmega-c, ibm8503|ibm8507|ibm8604|IBM 8503 B & W VGA display, use=hft-c, ibm8514|IBM 8514/a color VGA display, @@ -11180,48 +11592,42 @@ ibm8514-c|IBM 8514 color display with standout and underline, # # AIX entries. IBM ships these with AIX 3.2.5. -# AIX extension caps are commented out, -# except for box1 which has been translated to an string. -# -aixterm|IBM Aixterm Terminal Eemulator, +# -- added rc, sc based on manpage -TD +aixterm|IBM Aixterm Terminal Emulator, eslok, hs, acsc=jjkkllmmnnqqttuuvvwwxx, bold=\E[1m, dsl=\E[?E, - fsl=\E[?F, ri@, s0ds=\E(B, s1ds=\E(0, - sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m, - sgr0=\E[0;10m\E(B, tsl=\E[?%p1%dT, - use=ibm6154, + fsl=\E[?F, rc=\E8, ri@, s0ds=\E(B, s1ds=\E(0, sc=\E7, + sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, + sgr0=\E[0;10m\E(B, tsl=\E[?%p1%dT, use=ibm6154, aixterm-m|IBM AIXterm Monochrome Terminal Emulator, eslok, hs, acsc=jjkkllmmnnqqttuuvvwwxx, bold=\E[1m, dsl=\E[?E, fsl=\E[?F, ri@, s0ds=\E(B, s1ds=\E(0, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, - sgr0=\E[0;10m\E(B, tsl=\E[?%p1%dT, - use=ibm6153, + sgr0=\E[0;10m\E(B, tsl=\E[?%p1%dT, use=ibm6153, aixterm-m-old|old IBM AIXterm Monochrome Terminal Emulator, eslok, hs, bold=\E[1m, dsl=\E[?E, fsl=\E[?F, ri@, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, - tsl=\E[?%p1%dT, - use=ibm6153, + tsl=\E[?%p1%dT, use=ibm6153, jaixterm|IBM Kanji Aixterm Terminal Eemulator, acsc@, use=aixterm, jaixterm-m|IBM Kanji AIXterm Monochrome Terminal Emulator, - acsc@, - use=aixterm-m, + acsc@, use=aixterm-m, #### Infoton/General Terminal Corp. # # gt100 sounds like something DEC would come out with. Let's hope they don't. i100|gt100|gt100a|General Terminal 100A (formerly Infoton 100), - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\Ef%p2%{32}%+%c%p1%{32}%+%c, cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, flash=\Eb$<200/>\Ea, home=\EH, il1=\EL, ind=^J, rmso=\Ea, smso=\Eb, i400|infoton 400, - am, + OTbs, am, cols#80, lines#25, bel=^G, clear=\E[2J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, cup=%i\E[%p1%3d;%p2%3dH, cuu1=\E[A, @@ -11503,7 +11909,7 @@ infoton, # foreground, black background, normal highlight. # icl6404|kds7372|icl6402|kds6402|ICL 6404 aka Kokusai Display Systems 7372, - am, hs, + OTbs, am, hs, cols#80, lines#24, bel=^G, blink=\E[2ZZ, cbt=\EI, civis=\E.0, clear=\E*, cnorm=\E.3, cr=^M, @@ -11517,8 +11923,7 @@ icl6404|kds7372|icl6402|kds6402|ICL 6404 aka Kokusai Display Systems 7372, sgr=\E[%{0}%?%p1%t%{4}%|%;%?%p2%t%{8}%|%;%?%p3%t%{4}%|%;%?%p4%t%{2}%|%;%?%p7%t%{1}%|%;ZZ, sgr0=\E[0ZZ, smir=\Eq, smso=\E[8ZZ, smul=\E[8ZZ, tbc=\E3, icl6404-w|kds7372-w|ICL 6404 aka Kokusai Display Systems 7372 132 cols, - rs2=\Eo1, - use=icl6404, + rs2=\Eo1, use=icl6404, #### Interactive Systems Corp # @@ -11531,7 +11936,7 @@ icl6404-w|kds7372-w|ICL 6404 aka Kokusai Display Systems 7372 132 cols, # (intext: removed obsolete ":ma=^K^P^R^L^L ::bc=^_:", also the # ":le=^_:" later overridden -- esr) intext|Interactive Systems Corporation modified owl 1200, - am, + OTbs, am, cols#80, it#8, lines#24, xmc#1, bel=^G, cbt=^Y, clear=\014$<132>, cr=^M, cub1=^H, cud1=^J, cuf1=^^, cup=\017%p1%{32}%+%c%p2%{32}%+%c, cuu1=^\, @@ -11580,7 +11985,7 @@ intext2|intextii|INTERACTIVE modified owl 1251, # Kimtron ABM 85 added by Dual Systems # (abm85: removed duplicated ":kd=^J:" -- esr) abm85|Kimtron ABM 85, - am, bw, msgr, + OTbs, am, bw, msgr, cols#80, it#8, lines#24, xmc#1, cbt=\EI, clear=\E*, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -11617,24 +12022,22 @@ abm85h|Kimtron ABM 85H native mode, bel=^G, cnorm=\E.4, cvvis=\E.2, dim=\E), dsl=\Ee, flash@, fsl=^M, invis@, is2=\EC\EN\EX\024\016\EA\Ea\E%\E9\Ee\Er\En\E"\E}\E'\E(\Ef\r\EG0\Ed\E.4\El, - kcud1=^V, sgr0=\E(\EG0, smir=\EZ, tsl=\Eg\Ef, - use=adm+sgr, use=abm85, + kcud1=^V, sgr0=\E(\EG0, smir=\EZ, tsl=\Eg\Ef, use=adm+sgr, + use=abm85, abm85e|Kimtron ABM 85H in 920E mode, xmc@, bel=^G, dim=\E), flash@, is2=\EC\EX\EA\E%\E9\Ee\Er\En\E"\E}\E'\E(\Ef\r\Ek\Eq\Em, - rev=\Ej, sgr0=\E(\Ek, smir=\EZ, - use=abm85, + rev=\Ej, sgr0=\E(\Ek, smir=\EZ, use=abm85, abm85h-old|oabm85h|o85h|Kimtron ABM 85H with old firmware rev., xmc@, bel=^G, dim=\E), is2=\E}\EC\EX\Ee\En\E%\Er\E(\Ek\Em\Eq\Ed\ET\EC\E9\EF, - rev=\Ej, sgr0=\E(\Ek, smir=\EZ, - use=abm85, + rev=\Ej, sgr0=\E(\Ek, smir=\EZ, use=abm85, # From: # (kt7: removed obsolete :ma=^V^J^L :" -- esr) kt7|kimtron model kt-7, - am, + OTbs, am, cols#80, it#8, lines#24, cbt=\EI, clear=^Z, cub1=^H, cud1=^V, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, @@ -11644,8 +12047,7 @@ kt7|kimtron model kt-7, kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY, kel=\ET, 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, khome=^^, - kich1=\EQ, kil1=\EE, tsl=\Ef, - use=adm+sgr, + kich1=\EQ, kil1=\EE, tsl=\Ef, use=adm+sgr, # Renamed TB=^I to :ta:, BE=^G to :bl:, BS=^H to :kb:, N to :kS: (based on the # other kt7 entry and the adjacent key capabilities). Removed EE which is # identical to :mh:. Removed :ES=\EGD: which is some kind of highlight @@ -11803,8 +12205,7 @@ prism7|p7|P7|MDC Prism-7, # prism8|p8|P8|MDC Prism-8, cup=\E[%i%p1%d;%p2%dH, hpa=\E[%i%p1%d`, is2=\E[<12h, - vpa=\E[%i%p1%dd, - use=p4, + vpa=\E[%i%p1%dd, use=p4, # p8-w: Prism-8 in 132 column mode # -------------------------------- @@ -11990,7 +12391,7 @@ p8gl|prism8gl|McDonnell-Douglas Prism-8 alternate definition, # since Sytek insists ^S means xoff. # (act4: found ":ic=2^S:ei=:im=:ip=.1*^V:" commented out in 8.3 -- esr) act4|microterm|microterm act iv, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\014$<12/>, cr=^M, cub1=^H, cud1=^K, cuf1=^X, cup=\024%p1%{24}%+%c%p2%p2%?%{47}%>%t%{48}%+%;%{80}%+%c, @@ -12002,7 +12403,8 @@ act4|microterm|microterm act iv, # The act 5 has hardware tabs, but they are in columns 8, 16, 24, 32, 41 (!)... # (microterm5: removed obsolete ":ma==^Z^P^Xl^Kj:" -- esr) act5|microterm5|microterm act v, - kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, ri=\EH$<3>, uc=^H\EA, use=act4, + kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, ri=\EH$<3>, uc=^H\EA, + use=act4, # Mimes using brightness for standout. Half bright is really dim unless # you turn up the brightness so far that lines show up on the screen. mime-fb|full bright mime1, @@ -12013,7 +12415,7 @@ mime-hb|half bright mime1, # the more plausible ":do=^J:" -- esr) # uc was at one time disabled to get around a curses bug, be wary of it mime|mime1|mime2|mimei|mimeii|microterm mime1, - am, + OTbs, am, cols#80, it#8, lines#24, vt#9, bel=^G, clear=^]^C, cr=^M, cub1=^H, cud1=^J, cuf1=^X, cup=\024%p1%{24}%+%c%p2%p2%?%{32}%>%t%{48}%+%;%{80}%+%c, @@ -12023,7 +12425,7 @@ mime|mime1|mime2|mimei|mimeii|microterm mime1, # These termcaps (for mime2a) put the terminal in low intensity mode # since high intensity mode is so obnoxious. mime2a-s|microterm mime2a (emulating an enhanced soroc iq120), - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\EL, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EI, dch1=\ED, @@ -12033,6 +12435,7 @@ mime2a-s|microterm mime2a (emulating an enhanced soroc iq120), smir=\EE, smso=\E\:, smul=\E6, # This is the preferred mode (but ^X can't be used as a kill character) mime2a|mime2a-v|microterm mime2a (emulating an enhanced vt52), + OTbs, cols#80, it#8, lines#24, bel=^G, clear=\EL, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=^N, @@ -12046,7 +12449,8 @@ mime3a|mime1 emulating 3a, kcub1=^H, kcud1=^K, kcuf1=^X, kcuu1=^Z, use=adm3a, mime3ax|mime-3ax|mime1 emulating enhanced 3a, it#8, - dl1=\027$<80>, ed=^_, el=^X, ht=\011$<3>, il1=\001$<80>, use=mime3a, + dl1=\027$<80>, ed=^_, el=^X, ht=\011$<3>, il1=\001$<80>, + use=mime3a, # Wed Mar 9 18:53:21 1983 # We run our terminals at 2400 baud, so there might be some timing problems at # higher speeds. The major improvements in this model are the terminal now @@ -12129,26 +12533,30 @@ ergo4000|microterm ergo 4000, # identical, except for case, to lower-case ones. I also uncommented the acsc # capabilities.X # -# The Intecolor emulation of the NCR 2900/260C color terminal is basicly a +# The Intecolor emulation of the NCR 2900/260C color terminal is basically a # DEC vt200/300 with color capabilities added. ncr260intan|NCR Intecolor emulation of the 2900_260C with an ANSI keyboard, colors#8, pairs#64, - op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ncr260vt300an, -# The Intecolor emulation of the NCR 2900/260C color terminal is basicly a + op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + use=ncr260vt300an, +# The Intecolor emulation of the NCR 2900/260C color terminal is basically a # DEC vt200/300 with color capabilities added. ncr260intwan|NCR Intecolor emulation of the 2900_260C with an ANSI keyboard, colors#8, pairs#64, - op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ncr260vt300wan, -# The Intecolor emulation of the NCR 2900/260C color terminal is basicly a DEC -# vt200/300 with color capabilities added. + op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + use=ncr260vt300wan, +# The Intecolor emulation of the NCR 2900/260C color terminal is basically a +# DEC vt200/300 with color capabilities added. ncr260intpp|NCR Intecolor emulation of the 2900_260C with a PC+ keyboard, colors#8, pairs#64, - op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ncr260vt300pp, + op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + use=ncr260vt300pp, # The Intecolor emulation of the NCR 2900/260C color terminal is basicly a # DEC vt200/300 with color capabilities added. ncr260intwpp|NCR Intecolor emulation of the 2900_260C with a PC+ keyboard in 132 column mode, colors#8, pairs#64, - op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=ncr260vt300wpp, + op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + use=ncr260vt300wpp, # This definition for ViewPoint supports several attributes. This means # that it has magic cookies (extra spaces where the attributes begin). # Some applications do not function well with magic cookies. The System @@ -12235,8 +12643,7 @@ ncr260vt100pp|NCR 2900_260 vt100 with PC+ kybd, kend=\E[5~, khome=\E[2~, kich1=\E[1~, knp=\E[6~, kpp=\E[3~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, rmkx=\E>, rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>, - smkx=\E=, - use=ncr260vt100an, + smkx=\E=, use=ncr260vt100an, ncr260vt100wpp|NCR 2900_260 vt100 wide mode pc+ kybd, cols#132, cup=\E[%i%p1%d;%p2%dH$<30>, @@ -12649,6 +13056,21 @@ ncrvt100wan|NCRVT100WPP|ncrvt100wpp|NCR VT100 emulation of the 2900 terminal, # 7 - Enable / Disable CR turnoff # 8 - Enable / Disable backspace # +# Since each attribute parameter is 0 or 1, we shift each attribute (standout, +# reverse, blink, dim, and underline) the appropriate number of bits (by +# multiplying the 0 or 1 by a correct factor to shift) so the bias character, +# '@' is (effectively) "or"ed with each attribute to generate the proper third +# character in the 0 sequence. The string implements the following +# equation: +# +# ((((('@' + P5) | (P4 << 1)) | (P3 << 3)) | (P2 << 4)) | (p1 * 17)) => +# ((((('@' + P5) + (P4 << 1)) + (P3 << 3)) + (P2 << 4)) + (p1 * 17)) +# +# Where: P1 <==> Standout attribute parameter +# P2 <==> Underline attribute parameter +# P3 <==> Reverse attribute parameter +# P4 <==> Blink attribute parameter +# P5 <==> Dim attribute parameter # From , init string hacked by SCO. ncr7900i|ncr7900|ncr 7900 model 1, am, bw, ul, @@ -12670,6 +13092,10 @@ ncr7900iv|ncr 7900 model 4, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue, lf7=red, lf8=white, nel=^M^J, tsl=\Ej\Ex5\Ex1\EY8%p1%{32}%+%c\Eo, +# Warning: This terminal will lock out the keyboard when it receives a CTRL-D. +# The user can enter a CTRL-B to get out of this locked state. +# In , we want to output the character given by the formula: +# ((col / 10) * 16) + (col % 10) where "col" is "p1" ncr7901|ncr 7901 model, am, bw, ul, cols#80, lines#24, @@ -12690,19 +13116,20 @@ ncr7901|ncr 7901 model, # bantam|pe550|pe6100|perkin elmer 550, + OTbs, cols#80, lines#24, bel=^G, clear=\EK$<20>, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EX%p1%{32}%+%c\EY%p2%{32}%+%c, cuu1=\EA, el=\EI$<20>, home=\EH, ind=^J, ll=\EH\EA, fox|pe1100|perkin elmer 1100, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\EH\EJ$<132>, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EX%p1%{32}%+%c\EY%p2%{32}%+%c, cuu1=\EA, ed=\EJ$<5.5*>, el=\EI, flash=\020\002$<200/>\020\003, home=\EH, hts=\E1, ind=^J, ll=\EH\EA, tbc=\E3, owl|pe1200|perkin elmer 1200, - am, in, + OTbs, am, in, cols#80, lines#24, bel=^G, clear=\EH\EJ$<132>, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EX%p1%{32}%+%c\EY%p2%{32}%+%c, cuu1=\EA, @@ -12736,8 +13163,7 @@ pe7000m|perkin elmer 7000 series monochrome monitor, ll=\ES7\s, ri=\ER, pe7000c|perkin elmer 7000 series colour monitor, is1=\E!\0\EW 7o\Egf\Eb0\Ec7\ES7\s, rmso=\Eb0, - rmul=\E!\0, smso=\Eb2, smul=\E!\s, - use=pe7000m, + rmul=\E!\0, smso=\Eb2, smul=\E!\s, use=pe7000m, #### Sperry Univac # @@ -12784,7 +13210,7 @@ tandem6510|adm3a repackaged by Tandem, # (tandem653: had ":sb=\ES:", probably someone's mistake for sf; also, # removed , no such file -- esr) tandem653|t653x|Tandem 653x multipage terminal, - am, da, db, hs, + OTbs, am, da, db, hs, cols#80, lines#24, wsl#64, xmc#1, clear=\EI, cub1=^H, cud1=^J, cuf1=\EC, cup=\023%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dsl=\Eo\r, @@ -12855,7 +13281,7 @@ pt210|TRS-80 PT-210 printing terminal, # tek|tek4012|tektronix 4012, - os, + OTbs, os, cols#75, lines#35, bel=^G, clear=\E\014$<1000>, cr=^M, cub1=^H, cud1=^J, ff=\014$<1000>, is2=\E^O, @@ -12884,11 +13310,11 @@ tek4015-sm|tektronix 4015 in small font, # reverse video. If you like reverse video stand-out mode but don't want # it to flash, change the letter 'H' to 'P' in the :so: field. tek4023|tektronix 4023, - am, - cols#80, lines#24, vt#4, xmc#1, - bel=^G, clear=\E\014$<4/>, cr=^M, cub1=^H, cud1=^J, cuf1=^I, - cup=\034%p2%{32}%+%c%p1%{32}%+%c, kbs=^H, rmso=^_@, - smso=^_P, + OTbs, am, + OTdN#4, cols#80, lines#24, vt#4, xmc#1, + OTnl=^J, bel=^G, clear=\E\014$<4/>, cr=^M, cub1=^H, cud1=^J, + cuf1=^I, cup=\034%p2%{32}%+%c%p1%{32}%+%c, kbs=^H, + rmso=^_@, smso=^_P, # It is recommended that you run the 4025 at 4800 baud or less; # various bugs in the terminal appear at 9600. It wedges at the # bottom of memory (try "cat /usr/dict/words"); ^S and ^Q typed @@ -12905,7 +13331,7 @@ tek4023|tektronix 4023, # and didn't seem necessary. # tek4024|tek4025|tek4027|tektronix 4024/4025/4027, - am, da, db, + OTbs, am, da, db, cols#80, it#8, lines#34, lm#0, bel=^G, clear=\037era\r\n\n, cmdch=^_, cr=^M, cub=\037lef %p1%d\r, cub1=^H, cud=\037dow %p1%d\r, @@ -12923,12 +13349,10 @@ tek4025-17|tek 4025 17 line window, tek4025-17-ws|tek 4025 17 line window in workspace, is2=!com 31\r\n\037sto 9 17 25 33 41 49 57 65 73\r\037wor 17\r\037mon 17\r, rmcup=\037mon h\r, rmso=\037att s\r, smcup=\037wor h\r, - smso=\037att e\r, - use=tek4025-17, + smso=\037att e\r, use=tek4025-17, tek4025-ex|tek4027-ex|tek 4025/4027 w/!, is2=\037com 33\r\n!sto 9 17 25 33 41 49 57 65 73\r, - rmcup=\037com 33\r, smcup=!com 31\r, - use=tek4025, + rmcup=\037com 33\r, smcup=!com 31\r, use=tek4025, # Tektronix 4025a # From: Doug Gwyn # The following status modes are assumed for normal operation (replace the @@ -12950,7 +13374,7 @@ tek4025-ex|tek4027-ex|tek 4025/4027 w/!, # (tek4025a: removed obsolete ":xx:". This may mean the tek4025a entry won't # work any more. -- esr) tek4025a|Tektronix 4025A, - am, bw, da, db, xon, + OTbs, OTpt, am, bw, da, db, xon, cols#80, it#8, lines#34, bel=^G, cbt=\035bac;, clear=\035era;\n\035rup;, cmdch=^], cr=^M, cub=\035lef %p1%d;, cub1=^H, cud=\035dow %p1%d;, @@ -12959,6 +13383,7 @@ tek4025a|Tektronix 4025A, dch1=\035dch;, dl=\035dli %p1%d;, dl1=\035dli;, el=\035dch 80;, hpa=\r\035rig %p1%d;, ht=^I, il1=\013\035ili;, ind=^J, indn=\035dow %p1%d;, + rs2=!com 29\035del 0\035rss t\035buf\035buf n\035cle\035dis\035dup\035ech r\035eol\035era g\035for n\035pad 203\035pad 209\035sno n\035sto 9 17 25 33 41 49 57 65 73\035wor 0;, tbc=\035sto;, # From: cbosg!teklabs!davem Wed Sep 16 21:11:41 1981 # Here's the command file that I use to get rogue to work on the 4025. @@ -12967,7 +13392,7 @@ tek4025a|Tektronix 4025A, # see the cursor.) # (This "learns" the arrow keys for rogue. I have adapted it for termcap - mrh) tek4025-cr|tek 4025 for curses and rogue, - am, + OTbs, am, cols#80, it#8, lines#33, clear=\037era;, cub1=^H, cud1=^F^J, cuf1=\037rig;, cup=\037jum%i%p1%d\,%p2%d;, cuu1=^K, ht=^I, ind=^F^J, @@ -12978,10 +13403,9 @@ tek4025-cr|tek 4025 for curses and rogue, # :te=\037lea p1\037lea p2\037lea p3\037lea p4\037lea pt\037lea p5\037lea p6\037lea p7\037lea p8\037lea p9/la/13\037lea p.\037lea p0\037wor 0: tek4025ex|4025ex|4027ex|tek 4025 w/!, is2=\037com 33\r\n!sto 9\,17\,25\,33\,41\,49\,57\,65\,73\r, - rmcup=\037com 33\r, smcup=!com 31\r, - use=tek4025, + rmcup=\037com 33\r, smcup=!com 31\r, use=tek4025, tek4105|tektronix 4105, - am, mir, msgr, ul, xenl, xt, + OTbs, am, mir, msgr, ul, xenl, xt, cols#79, it#8, lines#29, acsc=, bel=^G, blink=\E[=3;<7m, bold=\E[=7;<4m, cbt=\E[Z, clear=\E[2J\E[H, cr=^M, cud1=\E[1B, cuf1=\E[1C, @@ -13040,8 +13464,8 @@ tek4105-30|4015 emulating 30 line vt100, # "IC" cannot be used in combination with "im" & "ei". # "tek4105a" is just a guess: tek4105a|Tektronix 4105, - msgr, xon, - cols#80, it#8, lines#30, vt#3, + OTbs, OTpt, msgr, xon, + OTkn#8, cols#80, it#8, lines#30, vt#3, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E%!0\ETD00\E%!1, clear=\E[H\E[J, cnorm=\E%!0\ETD10\E%!1, cr=^M, csr=\E[%i%p1%d;%p2%dr, @@ -13056,8 +13480,9 @@ tek4105a|Tektronix 4105, kf6=\EOR, kf7=\EOS, lf0=F1, lf1=F2, lf2=F3, lf3=F4, lf4=F5, lf5=F6, lf6=F8, ll=\E[30;H, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmcup=\E%!0\ELBH=\E%!1, - rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, sc=\E7, - sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, + rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + rs2=\030\E%!0\EKC\E\014\EKR0\EKF0\ENM0\ELBH=\ETF8000010F40\ELI100\ELLA>\ELM0\EKE0\ENF1\EKS0\END0\E%!1\Ec\E[?3;5l\E[?7;8h\E[r\E[m\E>, + sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, # @@ -13105,7 +13530,7 @@ tek4106brl|tek4107brl|tek4109brl|Tektronix 4106 4107 or 4109, smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, tbc=\E[3g, tek4107|tek4109|tektronix terminals 4107 4109, - am, mir, msgr, ul, xenl, xt, + OTbs, am, mir, msgr, ul, xenl, xt, cols#79, it#8, lines#29, bel=^G, blink=\E%!1\E[5m$<2>\E%!0, bold=\E%!1\E[1m$<2>\E%!0, clear=\ELZ, cnorm=\E%!0, cr=^M, @@ -13148,7 +13573,7 @@ otek4112|o4112-nd|otek4113|otek4114|old tektronix 4110 series, rmcup=\EKA1\ELV1, smcup=\EKA0\ELV0\EMG0, # The 4112 with the ANSI compatibility enhancement tek4112|tek4114|tektronix 4110 series, - am, db, + OTbs, am, db, cols#80, lines#34, cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P, dl1=\E[M, @@ -13156,6 +13581,7 @@ tek4112|tek4114|tektronix 4110 series, ind=\E7\E[0;0H\E[M\E8, is2=\E3!1, ri=\E7\E[0;0H\E[L\E8, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, tek4112-nd|4112 not in dialog area, + OTns, cuu1=^K, use=tek4112, tek4112-5|4112 in 5 line dialog area, lines#5, use=tek4112, @@ -13165,7 +13591,7 @@ tek4112-5|4112 in 5 line dialog area, # previously \0410 and \0411 sequences...I don't *think* they were supposed # to be 4-digit octal -- esr) tek4113|tektronix 4113 color graphics with 5 line dialog area, - am, da, eo, + OTbs, am, da, eo, cols#80, lines#5, clear=\ELZ, cub1=^H, cud1=^J, cuf1=\ELM1 \ELM0, flash=\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERBA4\ERB0, @@ -13177,7 +13603,7 @@ tek4113-34|tektronix 4113 color graphics with 34 line dialog area, # supported here. :uc: is slow, but looks nice. Suggest setenv MORE -up . # :vb: needs enough delay to let you see the background color being toggled. tek4113-nd|tektronix 4113 color graphics with no dialog area, - am, eo, + OTbs, am, eo, cols#80, it#8, lines#34, clear=\E^L, cub1=^H, cud1=^J, cuf1=^I, cuu1=^K, cvvis=\ELZ\EKA0, @@ -13187,7 +13613,7 @@ tek4113-nd|tektronix 4113 color graphics with no dialog area, # This entry is from Tek. Inc. (Brian Biehl) # (tek4115: :bc: renamed to :le:, / added based on init string -- esr) otek4115|Tektronix 4115, - am, da, db, eo, + OTbs, am, da, db, eo, cols#80, it#8, lines#34, cbt=\E[Z, clear=\E[H\E[2J, cnorm=\E%!0\ELBG8\E%!1\E[34;1H, cub1=\E[D, cud1=\E[B, @@ -13229,8 +13655,7 @@ tek4125|tektronix 4125, lines#34, csr@, dl1=\E[1M, il1=\E[1L, is2=\E%\E!0\EQD1\EUX03\EKA\ELBB2\ELCE0\ELI100\ELJ2\ELLB2\ELM0\ELS1\ELX00\ELV1\E%\E!1\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, - rc@, sc@, smkx=\E=, - use=vt100, + rc@, sc@, smkx=\E=, use=vt100, # From: # (tek4207: This was the termcap file's entry for the 4107/4207, but SCO @@ -13256,6 +13681,7 @@ tek4207|Tektronix 4207 graphics terminal with memory, # (tek4404: There was a "\!" in that I replaced with "\E!". # Tab had been given as \E2I,that must be the tab-set capability -- esr) tek4404|tektronix 4404, + OTbs, cols#80, it#8, lines#32, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, @@ -13334,7 +13760,7 @@ tty33|tty35|model 33 or 35 teletype, cols#72, bel=^G, cr=^M, cud1=^J, ind=^J, tty37|model 37 teletype, - hc, os, xon, + OTbs, hc, os, xon, bel=^G, cr=^M, cub1=^H, cud1=^J, cuu1=\E7, hd=\E9, hu=\E8, ind=^J, @@ -13350,7 +13776,7 @@ tty37|model 37 teletype, # to get crlf, even if is not ^M.) # (tty40: removed obsolete ":nl=\EG\EB:", it's just do+cr -- esr) tty40|ds40|ds40-2|dataspeed40|teletype dataspeed 40/2, - xon, + OTbs, xon, cols#80, lines#24, clear=\EH$<20>\EJ$<80>, cr=\EG, cub1=^H, cud1=\EB, cuf1=\EC, cuu1=\E7, dch1=\EP$<50>, dl1=\EM$<50>, @@ -13359,7 +13785,7 @@ tty40|ds40|ds40-2|dataspeed40|teletype dataspeed 40/2, kcub1=^H, mc4=^T, mc5=\022$<2000>, ri=\ET$<10>, rmso=\E4, rs2=\023\ER$<60>, smso=\E3, tbc=\EH\E2$<80>, tty43|model 43 teletype, - am, hc, os, xon, + OTbs, am, hc, os, xon, cols#132, bel=^G, cr=^M, cub1=^H, cud1=^J, ind=^J, kbs=^H, @@ -13388,7 +13814,7 @@ scanset|sc410|sc415|Tymshare Scan Set, # Missing in vc303a and vc303 descriptions: they scroll 2 lines at a time # every other linefeed. vc303|vc103|vc203|volker-craig 303, - am, + OTbs, OTns, am, cols#80, lines#24, bel=^G, clear=\014$<40>, cr=^M, cub1=^H, cud1=^J, cuf1=^I, cuu1=^N, home=\013$<40>, kcub1=^H, kcud1=^J, kcuf1=^I, @@ -13398,7 +13824,7 @@ vc303a|vc403a|volker-craig 303a, home=\031$<40>, kcuf1=^U, kcuu1=^Z, ll=^P, use=vc303, # (vc404: removed obsolete ":ma=^Z^P^U :" -- esr) vc404|volker-craig 404, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\030$<40>, cr=^M, cub1=^H, cud1=^J, cuf1=^U, cup=\020%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, @@ -13409,7 +13835,7 @@ vc404-s|volker-craig 404 w/standout mode, # From: # (vc414: merged in cup/dl1/home from an old vc414h-noxon) vc414|vc414h|Volker-Craig 414H in sane escape mode., - am, + OTbs, am, cols#80, lines#24, clear=\E\034$<40>, cud1=\E^K, cuf1=^P, cup=\E\021%p2%c%p1%c$<40>, cuu1=\E^L, dch1=\E3, @@ -13444,22 +13870,22 @@ pcplot|pc-plot terminal emulation program, # I have noticed a couple of minor glitches, but nothing I can't work # around. (I added two capabilities from the BRL entry -- esr) kaypro|kaypro2|kaypro II, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\032$<1/>, cr=^M, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dl1=\ER, ed=^W, el=^X, home=^^, il1=\EE, ind=^J, kcud1=^J, kcuf1=^L, kcuu1=^K, # From IBM, Thu May 5 19:35:27 1983 -# (commented out =\200R because we don't know -- esr) +# (ibmpc: commented out =\200R because we don't know -- esr) ibm-pc|ibm5051|5051|IBM Personal Computer (no ANSI.SYS), - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^L^K, cr=^M^^, cub1=^], cud1=^J, cuf1=^\, cuu1=^^, home=^K, ind=\n$<10>, kcud1=^_, ibmpc|wy60-PC|wyse60-PC|IBM PC/XT running PC/IX, - am, bw, eo, hs, km, msgr, ul, + OTbs, am, bw, eo, hs, km, msgr, ul, cols#80, it#8, lines#24, acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263, bel=^G, blink=\E[5m, bold=\E[1m, clear=\Ec, cr=^M, @@ -13471,9 +13897,9 @@ ibmpc|wy60-PC|wyse60-PC|IBM PC/XT running PC/IX, kcbt=^], kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[Y, kf1=\240, kf10=\251, kf2=\241, kf3=\242, kf4=\243, kf5=\244, kf6=\245, kf7=\246, kf8=\247, - kf9=\250, khome=\E[H, kich1=\E[^H, knp=\E[U, ll=\E[24;1H, - nel=^M, rev=\E[7m, ri=\E[T\E[A, rin=\E[%p1%dT\E[%p1%dA, - rmso=\E[m, rmul=\E[m, + kf9=\250, khome=\E[H, kich1=\E[^H, knp=\E[U, kpp=\E[V, + ll=\E[24;1H, nel=^M, rev=\E[7m, ri=\E[T\E[A, + rin=\E[%p1%dT\E[%p1%dA, rmso=\E[m, rmul=\E[m, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, @@ -13490,7 +13916,7 @@ ibmpc|wy60-PC|wyse60-PC|IBM PC/XT running PC/IX, # The clear key on a IIgs will do something like clear-screen, # depending on what you're in. appleIIgs|appleIIe|appleIIc|Apple 80 column firmware interface, - am, bw, eo, msgr, + OTbs, am, bw, eo, msgr, cols#80, it#8, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -13517,12 +13943,11 @@ apple2e|Apple //e, # 4.20, with incoming and outgoing terminals both on 0, emulation On. apple2e-p|Apple //e via Pascal, cup=\036%p2%{32}%+%c%p1%{32}%+%c, kbs=^H, kcub1=^H, - kcud1=^J, - use=apple2e, + kcud1=^J, use=apple2e, # (ASCII Express) MouseTalk "Standard Apple //" emulation from BRL # Enable DC3/DC1 flow control with "stty ixon -ixany". apple-ae|ASCII Express, - am, bw, msgr, nxon, xon, + OTbs, am, bw, msgr, nxon, xon, cols#80, it#8, lines#24, bel=\007$<500/>, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^U, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -13530,7 +13955,7 @@ apple-ae|ASCII Express, kcuf1=^U, kcuu1=^K, rev=^O, ri=^V, rmso=^N, rs1=^R^N, sgr0=^N, smso=^O, appleII|apple ii plus, - am, + OTbs, am, cols#80, it#8, lines#24, clear=^L, cnorm=^TC2, cub1=^H, cud1=^J, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, cvvis=^TC6, @@ -13540,7 +13965,7 @@ appleII|apple ii plus, # Originally by Gary Ford 21NOV83 # From: Fri Oct 11 21:27:00 1985 apple-80|apple II with smarterm 80 col, - am, bw, + OTbs, am, bw, cols#80, lines#24, cbt=^R, clear=\014$<10*/>, cr=\r$<10*/>, cub1=^H, cud1=^J, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, @@ -13558,7 +13983,7 @@ apple-soroc|apple emulating soroc 120, # Apple with videx then remove the :so: and :se: fields." # (apple-videx: this used to be called DaleApple -- esr) apple-videx|Apple with videx videoterm 80 column board with inverse video, - am, xenl, + OTbs, am, xenl, cols#80, it#8, lines#24, clear=\014$<300/>, cub1=^H, cud1=^J, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -13569,7 +13994,7 @@ apple-videx|Apple with videx videoterm 80 column board with inverse video, # controlled by ASCII Express: Pro. # From Dave Shaver apple-uterm-vb|Videx Ultraterm for Apple micros with Visible Bell, - am, eo, xt, + OTbs, am, eo, xt, cols#80, lines#24, acsc=, clear=^L, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -13577,7 +14002,7 @@ apple-uterm-vb|Videx Ultraterm for Apple micros with Visible Bell, is2=^V4^W06\017\rVisible Bell Installed.\016\r\n, rmso=^N, smso=^O, apple-uterm|Ultraterm for Apple micros, - am, eo, xt, + OTbs, am, eo, xt, cols#80, lines#24, acsc=, clear=^L, cuf1=^\, cup=\036%p2%{32}%+%c%p1%{32}%+%c, cuu1=^_, ed=^K, el=^], @@ -13621,7 +14046,7 @@ apple-videx2|Apple II+ w/ Videx card (similar to Datamedia h1520), ind=^J, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^\, kcuu1=^_, khome=^Y, rmso=^Z2, smso=^Z3, apple-videx3|vapple|Apple II with 80 col card, - am, + OTbs, am, cols#80, lines#24, clear=\Ev, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, el=\Ex, home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, @@ -13629,12 +14054,14 @@ apple-videx3|vapple|Apple II with 80 col card, kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%, kf9=\E&, khome=\EH, #From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL aepro|Apple II+ running ASCII Express Pro--vt52, + OTbs, cols#80, lines#24, clear=\014$<300/>, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EK, home=\EH, # UCSD addition: Yet another termcap from Brian Kantor's Micro Munger Factory apple-vm80|ap-vm80|apple with viewmax-80, + OTbs, cols#80, lines#24, clear=\014$<300/>, cuf1=^\\:, cup=\036%p1%{32}%+%c%p2%{32}%+%c$<100/>, cuu1=^_, @@ -13645,7 +14072,7 @@ apple-vm80|ap-vm80|apple with viewmax-80, # (lisa: changed to -- esr) lisa|apple lisa console display (black on white), - am, eo, msgr, + OTbs, am, eo, msgr, cols#88, it#8, lines#32, acsc=jdkclfmenbqattuvvuwsx`, civis=\E[5h, clear=^L, cnorm=\E[5l, cub1=^H, cud1=\E[B, cuf1=\E[C, @@ -13670,8 +14097,8 @@ liswb|apple lisa console display (white on black), # You can type "reset" to get them set. # lisaterm|Apple Lisa or Lisa/2 running LisaTerm vt100 emulation, - am, xenl, xon, - cols#80, it#8, lines#24, vt#3, + OTbs, OTpt, am, xenl, xon, + OTkn#4, cols#80, it#8, lines#24, vt#3, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, @@ -13695,6 +14122,7 @@ lisaterm-w|Apple Lisa with Lisaterm in 132 column mode, # supported by MacTerminal. mac|macintosh|Macintosh with MacTerminal, xenl, + OTdN#30, blink@, dch1=\E[P$<7/>, ich1=\E[@$<9/>, ip=$<7/>, use=lisa, # Lisaterm in 132 column ("wide") mode. mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, @@ -13707,7 +14135,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, # I read these as mistakes for ":it#8:" and ":bl=\007:" respectively -- esr) # From: <{pbrown,ctl}@ocf.berkeley.edu> 12 Mar 90 coco3|os9LII|Tandy CoCo3 24*80 OS9 Level II, - am, + OTbs, am, cols#80, it#8, lines#24, bel=^G, blink=^_", bold=\E\:^A, civis=^E\s, clear=\014$<5*/>, cnorm=^E!, cub1=^H, cud1=^J, cuf1=^F, @@ -13717,7 +14145,7 @@ coco3|os9LII|Tandy CoCo3 24*80 OS9 Level II, sgr0=\037!\E\:\0, smso=^_\s, smul=^_", # (trs2: removed obsolete ":nl=^_:" -- esr) trs2|trsII|trs80II|Radio Shack Model II using P&T CP/M, - am, msgr, + OTbs, am, msgr, cols#80, it#8, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^_, cuf1=^], cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^^, dl1=^K, ed=^B, @@ -13729,7 +14157,7 @@ trs2|trsII|trs80II|Radio Shack Model II using P&T CP/M, # :CN=\ERC:CF=\ERc:NR=\ERD:NM=\ER@: # I also deleted the unnecessary ":kn#2:", ":sg#0:" -- esr) trs16|trs-80 model 16 console, - am, + OTbs, am, cols#80, it#8, lines#24, acsc=jak`l_mbquvewcxs, bel=^G, civis=\ERc, clear=^L, cnorm=\ERC, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, @@ -13746,7 +14174,7 @@ trs16|trs-80 model 16 console, # From: Simson L. Garfinkel atari|atari st, - am, + OTbs, am, cols#80, it#8, lines#25, clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, @@ -13756,7 +14184,8 @@ atari|atari st, # From: Paul M. Aoki uniterm|uniterm49|UniTerm VT220 emulator with 49 lines, lines#49, - is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H, use=vt220, + is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H, + use=vt220, # MiNT VT52 emulation. 80 columns, 25 rows. # MiNT is Now TOS, the operating system which comes with all Ataris now # (mainly Atari Falcon). This termcap is for the VT52 emulation you get @@ -13789,6 +14218,7 @@ st52|Atari ST with VT52 emulation, # From: Kent Polk , 30 May 90 # Added a few more entries, converted caret-type control sequence (^x) entries # to '\0xx' entries since a couple of people mentioned losing '^x' sequences. +# Corrections by Ty Sarna , Sat Feb 28 18:55:15 1998 # # :as:, :ae: Support for alternate character sets. # :ve=\E[\040p:vi=\E[\060\040p: cursor visible/invisible. @@ -13803,7 +14233,7 @@ st52|Atari ST with VT52 emulation, # (amiga: removed obsolete :kn#10:, # also added empty to suppress a warning --esr) amiga|Amiga ANSI, - am, bw, xenl, + OTbs, am, bw, xenl, cols#80, lines#24, acsc=, bel=^G, blink=\E[7;2m, bold=\E[1m, cbt=\E[Z, civis=\E[0 p, clear=\E[H\E[J, cnorm=\E[ p, cub=\E[%p1%dD, @@ -13812,19 +14242,19 @@ amiga|Amiga ANSI, 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, home=\E[H, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\E[S, - indn=\E[%p1%dS, invis=\E[8m, is2=\E[20l, kbs=^H, kcub1=\ED, - kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf0=\E9~, kf1=\E0~, - kf2=\E1~, kf3=\E2~, kf4=\E3~, kf5=\E4~, kf6=\E5~, kf7=\E6~, - kf8=\E7~, kf9=\E8~, rev=\E[7m, ri=\E[T, rin=\E[%p1%dT, - rmacs=^O, rmso=\E[m, rmul=\E[m, rs1=\Ec, sgr0=\E[m, smacs=^N, - smso=\E[7m, smul=\E[4m, + indn=\E[%p1%dS, invis=\E[8m, is2=\E[20l, kbs=^H, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\E[9~, + kf1=\E[0~, kf2=\E[1~, kf3=\E[2~, kf4=\E[3~, kf5=\E[4~, + kf6=\E[5~, kf7=\E[6~, kf8=\E[7~, kf9=\E[8~, rev=\E[7m, + ri=\E[T, rin=\E[%p1%dT, rmacs=^O, rmso=\E[m, rmul=\E[m, + rs1=\Ec, sgr0=\E[m, smacs=^N, smso=\E[7m, smul=\E[4m, # From: Hans Verkuil , 4 Dec 1995 # (amiga: added empty to suppress a warning. # I'm told this entry screws up badly with AS225, the Amiga # TCP/IP package once from Commodore, and now sold by InterWorks.--esr) amiga-h|Hans Verkuil's Amiga ANSI, - bw, msgr, + OTbs, bw, msgr, cols#80, lines#24, acsc=, bel=^G, blink=\2337;2m, bold=\2331m, cbt=\233Z, civis=\2330 p, clear=\233H\233J, cnorm=\233 p, cr=^M, @@ -13845,8 +14275,7 @@ amiga-h|Hans Verkuil's Amiga ANSI, # From: Henning 'Faroul' Peters , 25 Sep 1999 amiga-8bit|Amiga ANSI using 8-bit controls, acsc=, dl=\233%p1%dM, dl1=\233M, il=\233%p1%dL, il1=\233L, - ind=\204, indn@, ri=\215, rin@, - use=amiga-h, + ind=\204, indn@, ri=\215, rin@, use=amiga-h, # Commodore B-128 microcomputer from Doug Tyrol # I'm trying to write a termcap for a commodore b-128, and I'm @@ -13862,9 +14291,9 @@ amiga-8bit|Amiga ANSI using 8-bit controls, # commodore|b-128|Commodore B-128 micro, am, bw, - cols#80, lines#24, pb#150, - clear=\E\006$<10/>, cr=^M, cud1=^J, cuf1=^F, - cup=\E\013%p1%2d\,%p2%2d\,$<20/>, cuu1=^P, + OTdN#20, cols#80, lines#24, pb#150, + OTbc=^H, OTnl=^M, clear=\E\006$<10/>, cr=^M, cud1=^J, + cuf1=^F, cup=\E\013%p1%2d\,%p2%2d\,$<20/>, cuu1=^P, dch1=\177$<10*/>, dl1=\Ed$<10*/>, el=\Eq$<10/>, home=\E^E, ht=\011$<5/>, ich1=\E\n$<5/>, il1=\Ei$<10/>, kcub1=^B, kcud1=^J, kcuf1=^F, kcuu1=^P, khome=\E^E, rmir=, @@ -13874,6 +14303,7 @@ commodore|b-128|Commodore B-128 micro, # # North Star Advantage from Lt. Fickie via BRL northstar|North Star Advantage, + OTbs, cols#80, lines#24, clear=\004$<200/>, cup=\E=%p1%{32}%+%c%p2%{32}%+%c$<1/>, ed=\017$<200/>, @@ -13902,8 +14332,8 @@ osborne-w|osborne1-w|osborne I in 104-column mode, kcuf1=^L, kcuu1=^K, rmso=\E(, rmul=\Em, smso=\E), smul=\El, # Osborne I from ptsfa!rhc (Robert Cohen) via BRL osborne|osborne1|osborne I in 80-column mode, - am, mir, msgr, ul, xhp, - cols#80, lines#24, + OTbs, am, mir, msgr, ul, xhp, + OTdB#4, cols#80, lines#24, clear=^Z, cub1=\010$<4>, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<4/>, dl1=\ER, el=\ET, il1=\EE, is2=^Z, kbs=^H, @@ -13914,9 +14344,9 @@ osborne|osborne1|osborne I in 80-column mode, # Similar to tvi920 # Added by David Milligan and Tom Smith (SMU) osexec|Osborne executive, - am, - cols#80, lines#24, xmc#1, - bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, + OTbs, am, + OTug#1, cols#80, lines#24, xmc#1, + OTnl=^J, bel=^G, clear=^Z, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dl1=\ER, ed=\EY, el=\ET, home=^^, hts=\E1, ich1=\EQ, il1=\EE, is2=\Eq\Ek\Em\EA\Ex0, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, @@ -14031,12 +14461,24 @@ mai|basic4|MAI Basic Four in ansi mode, smir=\E[4h, smso=\E[7m, smul=\E[4m, # basis from Peter Harrison, Computer Graphics Lab, San Francisco # ucbvax!ucsfmis!harrison ...uucp / ucbvax!ucsfmis!harrison@BERKELEY ...ARPA +# +# On Sat, 7 Aug 1999, Torsten Jerzembeck wrote: +# The Basis 108 was a Apple II clone, manufactured by the "Basis +# Mikrocomputer GmbH" in Munster, Germany (the company still exists today, +# about 1,5 km from where I live, but doesn't build own computers any +# more). A Basis 108 featured a really heavy (cast aluminium?) case, was +# equipped with one or two 5.25" disk drives, had a monochrome and colour +# video output for a TV set or a dedicated monitor and several slots for +# Apple II cards. Basis 108 were quite popular at german schools before +# the advent of the IBM PC. They run, for example, the UCSD Pascal +# development system (which I used even in 1993 to program the steering +# and data recording for our school's experimental solar panel :), Apple DOS +# or CP/M. # (basis: removed obsolete ":ma=^K^P^R^L^L :nl=5000*^J:" -- esr) basis|BASIS108 computer with terminal translation table active, clear=\E*$<300/>, cud1=\n$<5000/>, ed=\EY, el=\ET, kbs=^H, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, rmso=\E), sgr0=\E), - smso=\E(, - use=adm3a, + smso=\E(, use=adm3a, # luna's BMC terminal emulator luna|luna68k|LUNA68K Bitmap console, cols#88, lines#46, use=ansi-mini, @@ -14064,7 +14506,7 @@ xerox820|x820|Xerox 820, # # From: Igor Tamitegama , 18 Jan 1997 m2-nam|minitel|minitel-2|minitel-2-nam|France Telecom Minitel 2 mode te'le'informatique, - eslok, hs, xenl, + OTbs, eslok, hs, xenl, cols#80, it#8, lines#24, wsl#72, xmc#0, acsc=aaffggjjkkllmmnnooqqssttuuvvwwxx, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[<1h, clear=\E[H\E[J, @@ -14109,8 +14551,7 @@ minitel1b|minitel 1-bistandard (in 40cols mode), is1=\E;iYA\E;jYC, kclr=\E[2J, kctab=^I, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, kel=^X, khome=\E[H, kich1=\E[4h, kil1=\E[L, rmir=\E[4l, - smir=\E[4h, smkx=\E;iYA\E;jYC, - use=minitel1, + smir=\E[4h, smkx=\E;iYA\E;jYC, use=minitel1, # posait des problemes (logout en sortant de vi). minitel1b-80|minitel 1-bistandard (standard teleinformatique), am@, bw@, hz@, @@ -14123,8 +14564,7 @@ minitel1b-80|minitel 1-bistandard (standard teleinformatique), kf8=\EOx, kf9=\EOy, nel=\EE, op@, rc=\E8, rep@, rev=\E[7m, ri=\EM, rmkx@, rmso=\E[27m, rmul=\E[24m, sc=\E7, setf@, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, - sgr0=\E[m, smkx@, smso=\E[7m, smul=\E[4m, - use=minitel1b, + sgr0=\E[m, smkx@, smso=\E[7m, smul=\E[4m, use=minitel1b, ######## OBSOLETE VDT TYPES # @@ -14138,7 +14578,7 @@ minitel1b-80|minitel 1-bistandard (standard teleinformatique), # but these caps were commented out in 8.3; also, removed overridden # ":do=^J:" -- esr) abm80|amtek business machines 80, - am, bw, + OTbs, am, bw, cols#80, lines#24, cbt=^T, clear=\E^\, cub1=^H, cud1=\E^K, cuf1=^P, cup=\E\021%p2%{32}%+%c%p1%{32}%+%c, cuu1=\E^L, @@ -14182,8 +14622,7 @@ cbblit|fixterm|blit running columbus code, cols#88, ed=\EJ, flash=\E^G, ich1@, mc4=^T, mc5=^R, mc5p=\EP%p1%03d, rmir=\ER, rmso=\EV!, rmul=\EV", smir=\EQ, smso=\EU!, - smul=\EU", - use=blit, + smul=\EU", use=blit, oblit|ojerq|first version of blit rom, am, da, db, eo, mir, ul, xon, @@ -14231,7 +14670,7 @@ bg2.0rv|bg3.10rv|bbn bitgraph 2.0 (reverse video), flash=\E[?5l$<200/>\E[?5h, is2=\E>\E[?5h\E[?7h, use=bg2.0, bg2.0|bg3.10|bbn bitgraph 2.0 or later (no init), - xenl, + OTbs, xenl, cols#85, lines#64, bel=^G, clear=\E[H\E[J$<150>, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C, @@ -14243,9 +14682,11 @@ bg2.0|bg3.10|bbn bitgraph 2.0 or later (no init), sgr0=\E[m, smkx=\E=, smso=\E[7m, bg1.25rv|bbn bitgraph 1.25 (reverse video), - flash=\E[?5l$<200/>\E[?5h, is2=\E>\E[?5h\E[?7h, use=bg1.25, + flash=\E[?5l$<200/>\E[?5h, is2=\E>\E[?5h\E[?7h, + use=bg1.25, bg1.25nv|bbn bitgraph 1.25 (normal video), - flash=\E[?5h$<200/>\E[?5l, is2=\E>\E[?5l\E[?7h, use=bg1.25, + flash=\E[?5h$<200/>\E[?5l, is2=\E>\E[?5l\E[?7h, + use=bg1.25, # (bg1.25: I added / based on the init string -- esr) bg1.25|bbn bitgraph 1.25, cols#85, lines#64, @@ -14258,6 +14699,480 @@ bg1.25|bbn bitgraph 1.25, rmkx=\E>, rmso=\E[m, sgr0=\E[m, smam=\E[?7h, smkx=\E=, smso=\E[7m, +#### Bull (bq, dku, vip) +# +# (Adapted for terminfo; AIX extension capabilities translated -- esr) + +#============================================# +# BULL QUESTAR 210 `SDP' terminals emulation # +#============================================# +# +# Description written by R.K.Saunders (Bull Transac) +# +# Modifications written by F. Girard (Bull MTS) +# 19-05-87 V02.00.01 +# 17-12-87 V02.00.02 +# 15-09-89 V02.00.05 +# +# Typical technical selections F1 (modes SDP/ROLL): +# ------------------------------------------------------- +# | 01 02 03 04 05 06 07 08 09 10 | +# | 1010 0011 1010 0110 0110 0001 0100 0000 0000 0000 | +# | | +# | 11 12 13 14 15 16 17 18 19 20 | +# | 0000 0110 100? 0000 0000 0000 0001 0000 0000 0001 | +# | | +# | 21 22 23 24 25 26 27 28 29 30 | +# | 0011 0000 0001 1000 0000 0000 0000 0000 0000 0000 | +# | | +# | 31 32 33 34 35 36 37 38 39 40 | +# | 1010 0011 0000 0000 0000 0000 0000 0000 0000 0000 | +# ------------------------------------------------------- +# Typical firmware identification F5 "etat 6": +# P287.02.04b (AZERTY) +# P297.11.04 (24-pin: 2732) or P798.11.04 (28-pin: 2764) +# P298.03.03 (monochrome) or P374.03.02 (colour) +# +# SM SDP mode (VIP command): ^[[?=h +# RIS (erases screen): ^[c +# DMI disable keyboard: ^[` +# SM double rendition mode: ^[[?>h +# RM solicited status mode: ^[[5l +# RM character mode: ^[[>l +# RM echoplex mode: ^[[12l +# RM column tab mode: ^[[18l +# RM forbid SS2 keyboard mode: ^[[?h\EPY99\:98\E\\, + is2=\E[5;>;12;18;?h\EPY99\:98\E\\, + smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[2g, + tsl=\EPY99\:98\E\\\E[0;98v\E[2;7m, +tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA, + dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v, + use=tws-generic, +tws2103|xdku|BULL Questar tws2103, + ht=^I, use=tws-generic, +tws2103-sna|dku7103-sna|BULL Questar tws2103 for SNA, + ht=^I, use=tws2102-sna, +dku7102-old|BULL Questar 200 DKU7102 (microcode version < 6), + clear=\E[2J\E[H, cup@, dl@, dl1@, + dsl=\EPY99\:98\E\\\E[0;98v\E[2J\E[H\E[v, el=\E[K\E[m, + il@, il1@, tsl=\EPY99\:98\E\\\E[0;98v\E[H\E[2;7m, + use=tws-generic, +dku7202|BULL Questar 200 DKU7202 (colour/character attributes), + blink=\E[0;2;4m, dim=\E[0;5m, ht=^I, is3=\E[?3h\Eb, + smso=\E[0;4;5;7m, smul=\E[0;2m, use=tws-generic, + +#=========================================================# +# BULL QUESTAR 303 & 310 `DEC VT 320' terminals emulation # +#=========================================================# +# +# Description written by J. Staerck (BULL SA) +# Copyright (c) 1989 BULL SA +#--------------------------------------------------------------------------- +# This entry is used for terminals with vt320 emulation mode +# and following set-up : +# 8 bit ISO Latin Character Set (ISO 8859-1), +# 7 bit Control Characters, +# 80 columns screen. +# Hereafter are some DEC vt terminals' commands. (valid on vt200 and 300) +# They are used in string capabilities with vt220-320 emulation mode. +# In the following DEC definitions, two kinds of terminfo databases are +# provided : +# 1. the first with Command Sequence Introducer starting with escape +# sequence in 7 bits characters ex. ESC [ : 2 chars. in 7-bit mode. +# 2. the second with Command Sequence Introducer starting with escape +# sequence in 8 bits characters ex. ESC [ : 1 char. 'CSI' =x9B. +# Soft Terminal Reset esc [ ! p +# RIS (erases screen): esc c +# DECKPNM numeric keypad mode: esc > +# DECKPAM applic. keypad mode: esc = +# DECSTBM Scrolling region: esc [ r +# SCS select G0 = US: esc ( B +# SCS select G1 = line-graphic: esc ) 0 +# Select 7-bit C1 controls: esc sp F +# Select 8-bit C1 controls: esc sp G +# Select cursor home: esc [ H +# Select erase screen: esc [ J +# SM KAM lock keyboard: esc [ 2 h +# RM KAM unlock keyboard: esc [ 2 l +# SM SRM local echo off: esc [ 1 2 h +# RM SRM local echo on: esc [ 1 2 l +# SM LNM New line : esc [ 2 0 h +# RM LNM return = CR only: esc [ 2 0 l +# SM DECCKM cursor keys mode: esc [ ? 1 h +# RM DECCKM appli. keys mode: esc [ ? 1 l +# SM DECANM ANSI mode on: esc [ ? 2 h +# RM DECANM ANSI mode off: esc [ ? 2 l +# SM DECCOLM 132-column screen: esc [ ? 3 h +# RM DECCOLM 80-column screen: esc [ ? 3 l +# SM DECSCLM Smooth scroll: esc [ ? 4 h +# RM DECSCLM Jump scroll: esc [ ? 4 l +# SM DECSCNM screen light backgr. esc [ ? 5 h +# RM DECSCNM screen dark backgr. esc [ ? 5 l +# SM DECOM move within margins: esc [ ? 6 h +# RM DECOM move outside margins: esc [ ? 6 l +# SM DECAWM auto right margin: esc [ ? 7 h +# RM DECAWM auto right margin: esc [ ? 7 l +# SM DECARM auto repeat: esc [ ? 8 h +# RM DECARM auto repeat: esc [ ? 8 l +# DECSASD Select active main: esc [ 0 $ } +# DECSASD Select active status: esc [ 1 $ } +# DECSSDT Select status none: esc [ 0 $ ~ +# DECSSDT Select status indic.: esc [ 1 $ ~ +# DECSSDT Select status host-wr: esc [ 2 $ ~ +# SM DECTCEM Visible cursor: esc [ ? 2 5 h +# RM DECTCEM Invisible cursor: esc [ ? 2 5 l +# SM DECNCRM 7 bits NCR set: esc [ ? 4 2 h +# RM DECNCRM Multi or ISO latin: esc [ ? 4 2 l +# SM DECNKM numeric keypad mode: esc [ ? 6 6 h +# RM DECNKM numeric keypad appl.: esc [ ? 6 6 l +# SM DECKBUM clavier informatique esc [ ? 6 8 h +# RM DECKBUM clavier bureautique: esc [ ? 6 8 l +# DECSCL vt300 mode 8-bit ctrl: esc [ 6 3 " p +# or DECSCL vt300 mode 8-bit ctrl: esc [ 6 3 ; 0 " p +# or DECSCL vt300 mode 8-bit ctrl: esc [ 6 3 ; 2 " p +# DECSCL vt300 mode 7-bit ctrl: esc [ 6 3 ; 1 " p +# Char. and Line attributes: esc [ Ps ... Ps m +# with: 0 All off, 1 Bold, 4 Underline, 5 Blinking, 7 Reverse +# and : 22 Bold off, 24 Underline off, 25 Blinking off, 27 Reverse off +# + +# This entry covers BQ303, BQ306, BQ310, Q303, Q306, Q310 +bq300|Bull vt320 ISO Latin 1 80 columns terminal, + am, eo, eslok, hs, km, mc5i, mir, msgr, xenl, xon, + cols#80, it#8, lines#24, vt#3, wsl#80, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + 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, + cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, + dl1=\E[M, dsl=\E[1$}\E[2$~\n\E[0$}, ech=\E[%p1%dX, + ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, + flash=\E[?5h$<50>\E[?5l, fsl=\E[0$}, home=\E[H, ht=^I, + hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED, + is1=\E[63;1"p\E[2h, + is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + is3=\E[0$}\E[?25h\E[2l\E[H\E[J, 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~, 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~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + krdo=\E[29~, kslt=\E[4~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, + mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, + ri=\EM, rmacs=^O, rmam=\E[?7l, rmcup=\E[?7h, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p, + rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, sc=\E7, + sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;, + sgr0=\E[0m\E(B, smacs=^N, smam=\E[?7h, + smcup=\E[?7l\E[?1l\E(B, smir=\E[4h, smso=\E[7m, + smul=\E[4m, tbc=\E[3g, tsl=\E[1$}\E[2$~, +bq300-rv|Bull vt320 reverse 80 columns, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + use=bq300, +bq300-w|Bull vt320 132 columns, + cols#132, wsl#132, + is2=\E[?2h\E[?3h\E[?5l\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300, +bq300-w-rv|Bull vt320 reverse mode 132 columns, + cols#132, wsl#132, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3h\E[?5h\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300, + +# This entry is used for terminals with vt320 emulation mode +# and following set-up : +# 8 bit ISO Latin Character Set (ISO 8859-1), +# 8 bit Control Characters, (CSI coded as x9B for ESC [) +# 80 columns screen. +# Soft Terminal Reset csi ! p +# RIS (erases screen): esc c +# DECKPNM numeric keypad mode: esc > +# DECKPAM applic. keypad mode: esc = +# DECSTBM Scrolling region: esc [ r +# SCS select G0 = US: esc ( B +# SCS select G1 = line-graphic: esc ) 0 +# Select 7-bit C1 controls: esc sp F +# Select 8-bit C1 controls: esc sp G +# Select cursor home: csi H +# Select erase screen: csi J +# SM KAM lock keyboard: csi 2 h +# RM KAM unlock keyboard: csi 2 l +# SM SRM local echo off: csi 1 2 h +# RM SRM local echo on: csi 1 2 l +# SM LNM New line : csi 2 0 h +# RM LNM return = CR only: csi 2 0 l +# SM DECCKM cursor keys mode: csi ? 1 h +# RM DECCKM appli. keys mode: csi ? 1 l +# SM DECANM ANSI mode on: csi ? 2 h +# RM DECANM ANSI mode off: csi ? 2 l +# SM DECCOLM 132-column screen: csi ? 3 h +# RM DECCOLM 80-column screen: csi ? 3 l +# SM DECSCLM Smooth scroll: csi ? 4 h +# RM DECSCLM Jump scroll: csi ? 4 l +# SM DECSCNM screen light backgr. csi ? 5 h +# RM DECSCNM screen dark backgr. csi ? 5 l +# SM DECOM move within margins: csi ? 6 h +# RM DECOM move outside margins: csi ? 6 l +# SM DECAWM auto right margin: csi ? 7 h +# RM DECAWM auto right margin: csi ? 7 l +# SM DECARM auto repeat: csi ? 8 h +# RM DECARM auto repeat: csi ? 8 l +# DECSASD Select active main: csi 0 $ } +# DECSASD Select active status: csi 1 $ } +# DECSSDT Select status none: csi 0 $ ~ +# DECSSDT Select status indic.: csi 1 $ ~ +# DECSSDT Select status host-wr: csi 2 $ ~ +# SM DECTCEM Visible cursor: csi ? 2 5 h +# RM DECTCEM Invisible cursor: csi ? 2 5 l +# SM DECNCRM 7 bits NCR set: csi ? 4 2 h +# RM DECNCRM Multi or ISO latin: csi ? 4 2 l +# DECSCL vt300 mode 8-bit ctrl: csi 6 3 " p +# or DECSCL vt300 mode 8-bit ctrl: csi 6 3 ; 0 " p +# DECSCL vt300 mode 7-bit ctrl: csi 6 3 ; 1 " p +# Char. and Line attributes: csi Ps ... Ps m +# with: 0 All off, 1 Bold, 4 Underline, 5 Blinking, 7 Reverse +# and : 22 Bold off, 24 Underline off, 25 Blinking off, 27 Reverse off +# (bq300-8: ,,,,, to get under 1024 --esr) +bq300-8|Bull vt320 full 8 bits 80 columns, + am, eo, eslok, hs, km, mc5i, mir, msgr, xenl, xon, + cols#80, it#8, lines#24, vt#3, wsl#80, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\2335m, bold=\2331m, civis=\233?25l, + clear=\233H\233J, cnorm=\233?25h, cr=^M, + csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cud=\233%p1%dB, + cuf=\233%p1%dC, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, + cvvis=\233?25h, dch=\233%p1%dP, dch1=\233P, + dl=\233%p1%dM, dsl=\2331$}\2332$~\n\2330$}, + ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K, + enacs=\E(B\E)0, flash=\233?5h$<50>\233?5l, fsl=\2330$}, + home=\233H, ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL, + ind=\ED, is1=\E[63;2"p\E[2h, + is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + is3=\2330$}\233?25h\2332l\233H\233J, ka1=\217w, + ka3=\217y, kb2=\217u, kbs=^H, kc1=\217q, kc3=\217s, + kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A, + kdch1=\2333~, kf1=\217P, kf10=\23321~, kf11=\23323~, + kf12=\23324~, kf13=\23325~, kf14=\23326~, kf15=\23328~, + kf16=\23329~, kf17=\23331~, kf18=\23332~, kf19=\23333~, + kf2=\217Q, kf20=\23334~, kf3=\217R, kf4=\217S, kf6=\23317~, + kf7=\23318~, kf8=\23319~, kf9=\23320~, kfnd=\2331~, + khlp=\23328~, kich1=\2332~, knp=\2336~, kpp=\2335~, + krdo=\23329~, kslt=\2334~, lf1=pf1, lf2=pf2, lf3=pf3, + lf4=pf4, mc0=\233i, mc4=\2334i, mc5=\2335i, nel=\EE, rc=\E8, + rev=\2337m, ri=\EM, rmacs=^O, rmam=\233?7l, rmcup=\233?7h, + rmir=\2334l, rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m, + rs1=\E[!p, rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, sc=\E7, + sgr=\233%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;, + sgr0=\2330m\E(B, smacs=^N, smam=\233?7h, + smcup=\233?7l\233?1l\E(B, smir=\2334h, smso=\2337m, + smul=\2334m, tbc=\2333g, tsl=\2331$}\2332$~, +bq300-8rv|Bull vt320 8-bit reverse mode 80 columns, + flash=\233?5l$<50>\233?5h, + is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + use=bq300-8, +bq300-8w|Bull vt320 8-bit 132 columns, + cols#132, wsl#132, + is2=\E[?2h\E[?3h\E[?5l\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + rs2=\233?3h, use=bq300-8, +bq300-w-8rv|Bull vt320 8-bit reverse mode 132 columns, + cols#132, wsl#132, + flash=\233?5l$<50>\233?5h, + is2=\E[?2h\E[?3h\E[?5h\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + rs2=\233?3h, use=bq300-8, + +# This entry is used for terminals with vt320 emulation mode +# a 102 keys keyboard (PC scancode !) and following set-up : +# 8 bit ISO Latin Character Set (ISO 8859-1), +# 7 bit Control Characters, +# 80 columns screen. +bq300-pc|Questar 303 with PC keyboard ISO Latin 1 80 columns, + kbs=^H, kdch1=\E[3~, kend=\E[4~, kf1=\E[17~, kf10=\E[28~, + kf11=\E[29~, kf12=\E[31~, kf13@, kf14@, kf15@, kf16@, kf17@, + kf18@, kf19@, kf2=\E[18~, kf20@, kf3=\E[19~, kf4=\E[20~, + kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, + kfnd@, khlp@, khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, + krdo@, kslt@, lf1@, lf2@, lf3@, lf4@, use=bq300, +bq300-pc-rv|Questar 303 with PC keyboard reverse mode 80 columns, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + use=bq300-pc, +bq300-pc-w|Questar 303 with PC keyboard 132 columns terminal, + cols#132, wsl#132, + is2=\E[?2h\E[?3h\E[?5l\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300-pc, +bq300-pc-w-rv|Questar 303 with PC keyboard reverse mode 132 columns, + cols#132, wsl#132, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3h\E[?5h\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300-pc, +# 8 bit ISO Latin Character Set (ISO 8859-1), +# 8 bit Control Characters, +# 80 columns screen. +bq300-8-pc|Q306-8-pc|Questar 303 with PC keyboard in full 8 bits 80 columns, + kbs=^H, kdch1=\2333~, kend=\2334~, kf1=\23317~, + kf10=\23328~, kf11=\23329~, kf12=\23331~, kf13@, kf14@, + kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\23318~, kf20@, + kf3=\23319~, kf4=\23320~, kf5=\23321~, kf6=\23323~, + kf7=\23324~, kf8=\23325~, kf9=\23326~, kfnd@, khlp@, + khome=\2331~, kich1=\2332~, knp=\2336~, kpp=\2335~, krdo@, + kslt@, lf1@, lf2@, lf3@, lf4@, use=bq300-8, +bq300-8-pc-rv|Questar 303 with PC keyboard full 8 bits reverse mode 80 columns, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + use=bq300-8-pc, +bq300-8-pc-w|Questar 303 with PC keyboard full 8 bits 132 columns, + cols#132, wsl#132, + is2=\E[?2h\E[?3h\E[?5l\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300-8-pc, +bq300-8-pc-w-rv|Questar 303 with PC keyboard full 8 bits reverse 132 columns, + cols#132, wsl#132, + flash=\E[?5l$<50>\E[?5h, + is2=\E[?2h\E[?3h\E[?5h\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l, + rs2=\E[?3h, use=bq300-8-pc, + +#======================================================# +# BULL QUESTAR 310 `VIP 7800/8800' terminals emulation # +#======================================================# + +# normal mode, 8 bits, 80 columns terminal. +# RES reset : ^[e +# RIS reset initial state: ^[c +# BLE bell enable ^[h +# BLD bell disable ^[g +# CAMS char. attr. mode set ^[[D +# CAMR char. attr. mode reset ^[[G +# CLR clear ^[` +# KBU keyboard unlock (set) ^[[W +# KBL keyboard lock (reset) ^[[X +# CM character mode (async.) ^[k +# NEP non echoplex mode (by host) ^[l +# EP echoplex mode (by host) ^[m +# IM insert mode set ^[[I +# IM insert mode reset ^[[J +# RMS roll mode set ^[r +# RMR roll mode reset ^[q +# SM78 set mode vip7800 ^[[1q +# SD scroll up (72 lines) ^[[0s +# SD scroll down (72 lines) ^[[1s +# RBM block mode reset ^[[E +# SLS status line set ^[w +# SLR status line reset ^[v +# SLL status line lock ^[O +# LGS Line-graphic mode set ^[G +# LGR Line-graphic mode reset ^[F +# TBC tab clear (at cursor pos.) ^[[g +# TBI tab initialize ^[[N +# TBS tab set (at cursor pos.) ^[p +# PDS print data space ^[[0p +# PHD print host data ^[[3p +# PDT print data terminator ^[[

            u +# SSP0 partition 0 set ^[[00u +# SSP1 partition n format 1 ^[[PnPnSTRINGu +# SSP2 partition n format 2 ^[[PnPnSTRINGu +# SSP3 partition n format 3 ^[[PnPnu +# ATR attribute (visual) +# blink : ^[sB +# dim : ^[sL +# hide (blank) : ^[sH +# restore : ^[sR +# inverse video : ^[sI +# prot. : ^[sP +# underline : ^[s_ +# reset : ^{ +# +# This covers the vip7800 and BQ3155-vip7800 +vip|Bull Questar 3155-7800, + am, eslok, hs, km, mc5i, msgr, xenl, xon, + cols#80, it#8, lines#24, vt#3, wsl#80, + acsc=0pjdkblamcnkqitgufvhwexj, bel=^G, blink=\EsB, + cbt=\E[Z, clear=\E`, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, + cup=\E[%i%p1%03d%p2%03df, cuu1=\EA, dch1=\E[P, dim=\EsL, + dl1=\E[M, dsl=\Ev, ed=\EJ, el=\EK, + flash=\007$<80>\007$<80>\007, fsl=\EO, home=\EH, ht=^I, + hts=\Ep, ich1=\E[I, ind=^J, invis=\EsH, + is2=\E[00u\E[<>001001024080024080u\E[01u, + is3=\Er\E[W\E`, kHOM=\EH, kLFT=\Eo, kRIT=\Eu, kbs=^H, + kcbt=\E[Z, kclr=\E`, kctab=\E[g, kcub1=\ED, kcud1=\EB, + kcuf1=\EC, kcuu1=\EA, kdch1=\E[P, kdl1=\E[M, ked=\EJ, + kel=\EK, kf1=\E0, kf10=\ET, kf11=\E\\, kf12=\E\^, kf13@, kf14@, + kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\E2, kf20@, kf21=\E1, + kf22=\E5, kf23=\E7, kf24=\E9, kf25=\E;, kf26=\E=, kf27=\E?, + kf28=\EQ, kf29=\ES, kf3=\E6, kf30=\EV, kf31=\E], kf32=\E_, + kf4=\E8, kf5=\E\:, kf6=\E<, kf7=\E>, kf8=\EP, kf9=\ER, + khome=\EH, khts=\Ep, kich1=\E[I, kil1=\E[L, kind=\E[0s, + kll=\EH\EA, kri=\E[1s, krmir=\E[J, ktbc=\E[N, lf1=pf1, + lf2=pf2, lf3=pf3, lf4=pf4, ll=\EH\EA, mc0=\E[0p, mc4=\E[, rmacs=\EF, rmir=\E[J, rmso=\EsR, + rmul=\EsR, rs1=\Ec, rs2=\E[G, s0ds=\EF, s1ds=\EG, + sgr0=\EsR\EsU\EF, smacs=\EG, smir=\E[I, smso=\EsI, + smul=\Es_, tbc=\E[N, tsl=\Ew, +# normal screen, 8 bits, 132 columns terminal. +vip-w|vip7800-w|Q310-vip-w|Q310-vip-w-am|Questar 3155-vip7800 wide, + cols#132, wsl#132, + is2=\E[00u\E[<>001001024132024132u\E[01u, use=vip, +vip-H|vip7800-H|Q310-vip-H|Q310-vip-H-am|Questar 3155-vip7800 72 lines, + lines#72, + is2=\E[00u\E[<>001001024080072080u\E[01u, use=vip, +vip-Hw|vip7800-Hw|Q310-vip-Hw|Questar 3155-vip7800 wide 72 lines, + cols#132, lines#72, wsl#132, + is2=\E[00u\E[<>001001024132072132u\E[01u, use=vip, + #### Chromatics # @@ -14294,7 +15209,7 @@ ca22851|computer automation 22851, # This entry has correct padding and the undocumented "ri" capability cyb83|xl83|cybernex xl-83, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\014$<62>, cr=^M, cub1=^H, cud1=^J, cuf1=^I, cup=\027%p1%{32}%+%c%p2%{32}%+%c, cuu1=^N, @@ -14302,7 +15217,7 @@ cyb83|xl83|cybernex xl-83, kcud1=^J, kcuf1=^I, kcuu1=^N, ri=^N, # (mdl110: removed obsolete ":ma=^Z^P:" and overridden ":cd=145^NA^W:" -- esr) cyb110|mdl110|cybernex mdl-110, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=\030$<70>, cr=^M, cub1=^H, cud1=^J, cuf1=^U, cup=\020%p1%{32}%+%c%p2%{32}%+%c, cuu1=^Z, @@ -14320,7 +15235,7 @@ cyb110|mdl110|cybernex mdl-110, # dp3360|datapoint|datapoint 3360, - am, + OTbs, am, cols#82, lines#25, bel=^G, clear=^]^_, cr=^M, cub1=^H, cud1=^J, cuf1=^X, cuu1=^Z, ed=^_, el=^^, home=^], ind=^J, @@ -14377,18 +15292,20 @@ dp8242|datapoint 8242, # gt40|dec gt40, - os, + OTbs, os, cols#72, lines#30, bel=^G, cr=^M, cub1=^H, cud1=^J, gt42|dec gt42, - os, + OTbs, os, cols#72, lines#40, bel=^G, cr=^M, cub1=^H, cud1=^J, vt50|dec vt50, + OTbs, cols#80, lines#12, bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cuu1=\EA, ed=\EJ, el=\EK, ht=^I, ind=^J, vt50h|dec vt50h, + OTbs, cols#80, lines#12, bel=^G, clear=\EH\EJ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, @@ -14405,7 +15322,7 @@ vt61|vt-61|vt61.5|dec vt61, # The gigi does standout with red! # (gigi: I added / based on the init string, corrected cub1 -- esr) gigi|vk100|dec gigi graphics terminal, - am, xenl, + OTbs, am, xenl, cols#84, lines#24, bel=^G, clear=\E[H\E[2J, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, @@ -14424,6 +15341,7 @@ gigi|vk100|dec gigi graphics terminal, # a format program, so you had to buy pre-formatted floppies from DEC at # a hefty premium!). pro350|decpro|dec pro console, + OTbs, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, clear=\EH\EJ, cub1=^H, cud1=\EB, cuf1=\EC, @@ -14434,11 +15352,11 @@ pro350|decpro|dec pro console, rmso=\E^N, rmul=\E^C, smacs=\EF, smso=\E^H, smul=\E^D, dw1|decwriter I, - hc, os, + OTbs, hc, os, cols#72, bel=^G, cr=^M, cub1=^H, cud1=^J, ind=^J, dw2|decwriter|dw|decwriter II, - hc, os, + OTbs, hc, os, cols#132, bel=^G, cr=^M, cub1=^H, cud1=^J, ind=^J, kbs=^H, # \E(B Use U.S. character set (otherwise # => british pound !) @@ -14458,14 +15376,14 @@ dw2|decwriter|dw|decwriter II, # The dw3 does standout with wide characters. # dw3|la120|decwriter III, - hc, os, + OTbs, hc, os, cols#132, bel=^G, cr=^M, cub1=^H, cud1=^J, ht=^I, ind=^J, is1=\E(B\E[20l\E[w\E[0;132s\E[2g\E[z\E[66t\E[1;66r\E[4g\E>, is2=\E[9;17;25;33;41;49;57;65;73;81;89;97;105;113;121;129u\r, kbs=^H, rmso=\E[w, sgr0=\E[w, smso=\E[6w, dw4|decwriter IV, - am, hc, os, + OTbs, am, hc, os, cols#132, bel=^G, cr=^M, cub1=^H, cud1=^J, ht=^I, ind=^J, is2=\Ec, kbs=^H, kf0=\EOP, kf1=\EOQ, kf2=\EOR, kf3=\EOS, @@ -14480,8 +15398,7 @@ ln03|dec ln03 laser printer, ln03-w|dec ln03 laser printer 132 cols, cols#132, bel=^G, cr=^M, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, - kcud1=^J, nel=^M^J, - use=ln03, + kcud1=^J, nel=^M^J, use=ln03, #### Delta Data (dd) # @@ -14491,7 +15408,7 @@ ln03-w|dec ln03 laser printer 132 cols, # There are BSD-derived termcap entries floating around for this puppy # that are *certainly* wrong. delta|dd5000|delta data 5000, - am, + OTbs, am, cols#80, lines#27, bel=^G, clear=^NR, cub1=^H, cud1=^J, cuf1=^Y, cup=\017%p1%p1%{16}%m%{2}%*%-%{57}%+%c%p2%p2%{16}%m%{2}%*%-%{57}%+%c, @@ -14502,7 +15419,7 @@ delta|dd5000|delta data 5000, # (ddr: I added / based on the init string -- esr) ddr|rebus3180|ddr3180|Rebus/DDR 3180 vt100 emulator, - am, xenl, + OTbs, am, xenl, cols#80, it#8, lines#24, vt#3, blink=\E[5m$<2/>, bold=\E[1m$<2/>, clear=\E[H\E[2J$<50/>, csr=\E[%i%p1%d;%p2%dr, cub1=^H, @@ -14540,7 +15457,7 @@ ps300|Picture System 300, # terminet1200|terminet300|tn1200|tn300|terminet|GE terminet 1200, - hc, os, + OTbs, hc, os, cols#120, bel=^G, cr=^M, cud1=^J, ind=^J, @@ -14583,7 +15500,7 @@ terminet1200|terminet300|tn1200|tn300|terminet|GE terminet 1200, # (h19: I added / based on the init string; # also added empty to suppress a tic warning -- esr) h19-a|h19a|heath-ansi|heathkit-a|heathkit h19 ansi mode, - am, mir, msgr, + OTbs, am, mir, msgr, cols#80, it#8, lines#24, acsc=, bel=^G, clear=\E[2J, cnorm=\E[>4l, cr=^M, cub1=^H, cud1=\E[1B, cuf1=\E[1C, cup=\E[%i%p1%d;%p2%dH, @@ -14598,8 +15515,7 @@ h19-a|h19a|heath-ansi|heathkit-a|heathkit h19 ansi mode, h19-bs|heathkit w/keypad shifted, rmkx=\Eu, smkx=\Et, use=h19-b, h19-us|h19us|h19-smul|heathkit w/keypad shifted/underscore cursor, - rmkx=\Eu, smkx=\Et, - use=h19-u, + rmkx=\Eu, smkx=\Et, use=h19-u, # (h19: merged in from BSDI hp19-e entry>; # also added empty to suppress a tic warning --esr) # From: Tim Pierce , 23 Feb 1998 @@ -14616,7 +15532,7 @@ h19-us|h19us|h19-smul|heathkit w/keypad shifted/underscore cursor, # makes Emacs a little slower, but it remains in the land of the living. # Big win. h19|heath|h19-b|heathkit|heath-19|z19|zenith|heathkit h19, - am, eslok, hs, mir, msgr, + OTbs, am, eslok, hs, mir, msgr, cols#80, it#8, lines#24, acsc=, bel=^G, clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, @@ -14676,10 +15592,10 @@ alto-h19|altoh19|altoheath|alto-heath|alto emulating heathkit h19, # (z29: added empty to suppress a tic warning, merged in # status line capabilities from BRL entry --esr) z29|zenith29|z29b|zenith z29b, - am, eslok, hs, mir, msgr, - cols#80, lines#24, - acsc=, bel=^G, cbt=\E-, clear=\EE$<14>, cnorm=\Ey4, cr=^M, - cub1=^H, cud1=\EB, cuf1=\EC, + OTbs, OTpt, am, eslok, hs, mir, msgr, + OTkn#10, cols#80, lines#24, + OTbc=\ED, acsc=, bel=^G, cbt=\E-, clear=\EE$<14>, cnorm=\Ey4, + cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\E$<1>A, cvvis=\Ex4, dch1=\EN$<0.1*>, dl1=\EM$<1/>, dsl=\Ey1, ed=\EJ$<14>, el=\EK$<1>, fsl=\Ek\Ey5, home=\EH, ht=^I, @@ -14698,10 +15614,10 @@ z29|zenith29|z29b|zenith z29b, # (z29a: replaced nonexistent befause # looks vt100-compatible -- esr) z29a|z29a-kc-bc|h29a-kc-bc|heath/zenith 29 in ansi mode, - am, eslok, hs, mir, msgr, - cols#80, it#8, lines#24, - bel=^G, blink=\E[5m, bold=\E[2m, clear=\E[2J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, + OTbs, OTpt, am, eslok, hs, mir, msgr, + OTkn#10, cols#80, it#8, lines#24, + OTbc=\ED, bel=^G, blink=\E[5m, bold=\E[2m, clear=\E[2J, + cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 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, dch=\E[%p1%dP, dch1=\E[1P, dim=\E[2m, dl=\E[%p1%dM, @@ -14751,12 +15667,11 @@ z39-a|z39a|zenith39-a|zenith39-ansi|Zenith 39 in ANSI mode, # From: Brad Brahms z100|h100|z110|z-100|h-100|heath/zenith z-100 pc with color monitor, - cnorm=\Ey4\Em70, cvvis=\Ex4\Em71, - use=z100bw, + cnorm=\Ey4\Em70, cvvis=\Ex4\Em71, use=z100bw, # (z100bw: removed obsolete ":kn#10:", added empty -- esr) z100bw|h100bw|z110bw|z-100bw|h-100bw|heath/zenith z-100 pc, - mir, msgr, - cols#80, it#8, lines#24, + OTbs, OTpt, mir, msgr, + OTkn#10, cols#80, it#8, lines#24, acsc=, clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>, cuu1=\EA, cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>, @@ -14770,7 +15685,7 @@ p19|h19-b with il1/dl1, # From: # (ztx: removed duplicate :sr: -- esr) ztx|ztx11|zt-1|htx11|ztx-1-a|ztx-10 or 11, - am, eslok, hs, + OTbs, am, eslok, hs, cols#80, it#8, lines#24, clear=\EE, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, @@ -14795,16 +15710,14 @@ ims950-b|bare ims950 no init string, ims950|ims televideo 950 emulation, xenl@, flash@, kbs@, kcub1@, kcud1@, kcuf1@, kcuu1@, kf0@, kf1@, kf2@, kf3@, - kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, khome@, - use=tvi950, + kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, khome@, use=tvi950, # (ims950-rv: removed obsolete ":ko@:" -- esr) ims950-rv|ims tvi950 rev video, xenl@, flash@, kbs@, kcub1@, kcud1@, kcuf1@, kcuu1@, kf0@, kf1@, kf2@, kf3@, - kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, khome@, - use=tvi950-rv, + kf4@, kf5@, kf6@, kf7@, kf8@, kf9@, khome@, use=tvi950-rv, ims-ansi|ultima2|ultimaII|IMS Ultima II, - am, + OTbs, am, cols#80, it#8, lines#24, clear=\E[H\E[2J, cub1=^H, cud1=\ED, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\EM, ed=\E[0J, el=\E[0K, @@ -14822,17 +15735,17 @@ ims-ansi|ultima2|ultimaII|IMS Ultima II, # superbrain|intertec superbrain, - am, bw, + OTbs, am, bw, cols#80, lines#24, - bel=^G, clear=\014$<5*>, cr=^M, cub1=^H, cud1=^J, cuf1=^F, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<20>, cuu1=^K, + OTbc=^U, bel=^G, clear=\014$<5*>, cr=^M, cub1=^H, cud1=^J, + cuf1=^F, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<20>, cuu1=^K, ed=\E~k<10*>, el=\E~K$<15>, ht=^I, ind=^J, kcub1=^U, kcud1=^J, kcuf1=^F, kcuu1=^K, rmcup=^L, smcup=^L, # (intertube: a Gould entry via BRL asserted smul=\E0@$<200/>, # rmul=\E0A$<200/>; my guess is the highlight letter is bit-coded like an ADM, # and the reverse is actually true. Try it. -- esr) intertube|intertec|Intertec InterTube, - am, + OTbs, am, cols#80, lines#25, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^F, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<50>, cuu1=^Z, home=^A, @@ -14841,10 +15754,10 @@ intertube|intertec|Intertec InterTube, # are typing and a command comes in, the keystrokes you type get interspersed # with the command and it messes up intertube2|intertec data systems intertube 2, + OTbs, cup=\016%p1%c\020%p2%{10}%/%{16}%*%p2%{10}%m%+%c, el=\EK, hpa=\020%p1%{10}%/%{16}%*%p1%{10}%m%+%c, - ll=^K^X\r, vpa=\013%p1%c, - use=intertube, + ll=^K^X\r, vpa=\013%p1%c, use=intertube, #### Ithaca Intersystems # @@ -14912,8 +15825,7 @@ modgraph|mod24|modgraph terminal emulating vt100, cols#80, lines#24, cvvis=\E\^9;0s\E\^7;1s, is2=\E\^9;0s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s\E\^11;81s\E\^11;89s, - rf@, ri=\EM\E[K$<5/>, - use=vt100, + rf@, ri=\EM\E[K$<5/>, use=vt100, # The GX-1000 manual is dated 1984. This looks rather like a VT-52. modgraph2|modgraph gx-1000 80x24 with keypad not enabled, am, da, db, @@ -14937,10 +15849,10 @@ modgraph2|modgraph gx-1000 80x24 with keypad not enabled, # the first line disappears but a ctrl-l shows that it did work # correctly. modgraph48|mod|Modgraph w/48 lines, - am, xenl, + OTbs, OTpt, am, xenl, cols#80, it#8, lines#48, vt#3, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, + OTnl=^J, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[;H\E[2J, + cr=^M, csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, flash=\E[?5h\E[0q\E[1;2q\E[?5l\E[0q\E[4;3q, home=\E[H, ht=^I, is2=\E<\E[1;48r\E[0q\E[3;4q\E=\E[?1h, @@ -14981,8 +15893,7 @@ mt70|mt-70|Morrow MD-70; native Morrow mode, kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r, khlp=^AO\r, khome=^AN\r, nel=^_, rmacs=\E%, rmcup=, smacs=\E$, smcup=\E"2\EG0\E], smul=\EG1, - tbc=\E0, - use=adm+sgr, + tbc=\E0, use=adm+sgr, #### Motorola # @@ -14990,8 +15901,8 @@ mt70|mt-70|Morrow MD-70; native Morrow mode, # Motorola EXORterm 155 from {decvax, ihnp4}!philabs!sbcs!megad!seth via BRL # (Seth H Zirin) ex155|Motorola Exorterm 155, - am, bw, - cols#80, lines#24, + OTbs, am, bw, + OTkn#5, OTug#1, cols#80, lines#24, cbt=\E[, clear=\EX, cud1=\EB, cuf1=\ED, cup=\EE%p1%{32}%+%c%p2%{32}%+%c, ed=\ET, el=\EU, home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H, @@ -15003,7 +15914,7 @@ ex155|Motorola Exorterm 155, # This company is still around in 1995, manufacturing point-of-sale systems. omron|Omron 8025AG, - am, da, db, + OTbs, am, da, db, cols#80, lines#24, bel=^G, clear=\EJ, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cuu1=\EA, cvvis=\EN, dch1=\EP, dl1=\EM, ed=\ER, el=\EK, home=\EH, @@ -15027,8 +15938,8 @@ omron|Omron 8025AG, # Note that the Control-E key is useless on this brain-damaged terminal. No # delays are specified; use "stty ixon -ixany" to enable DC3/DC1 flow control! rt6221|Ramtek 6221 80x24, - msgr, xon, - cols#80, it#8, lines#24, vt#3, + OTbs, OTpt, msgr, xon, + OTkn#4, cols#80, it#8, lines#24, vt#3, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[>5l, clear=\E[1;1H\E[J, cnorm=\E[>5h\E[>9h, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, @@ -15053,6 +15964,7 @@ rt6221-w|Ramtek 6221 160x48, # RCA VP3301 or VP3501 rca|rca vp3301/vp3501, + OTbs, cols#40, lines#24, clear=^L, cuf1=^U, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, home=^Z, rmso=\E\ES0, smso=\E\ES1, @@ -15074,8 +15986,8 @@ rca|rca vp3301/vp3501, # to enable DC3/DC1 flow control! # I commented out the scrolling capabilities since they are too slow. hirez100|Selanar HiREZ-100, - mir, msgr, xon, - cols#80, it#8, lines#48, vt#3, + OTbs, OTpt, mir, msgr, xon, + OTkn#4, cols#80, it#8, lines#48, vt#3, acsc=, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, @@ -15129,10 +16041,9 @@ vsc|Signetics Vsc Video driver by RMC, # (soroc120: removed obsolete ":ma=^K^P^R^L^L :" -- esr) soroc120|iq120|soroc|soroc iq120, clear=\E*$<2>, cud1=^J, ed=\EY, el=\ET, kcub1=^H, kcud1=^J, - kcuf1=^L, kcuu1=^K, - use=adm3a, + kcuf1=^L, kcuu1=^K, use=adm3a, soroc140|iq140|soroc iq140, - am, mir, + OTbs, am, mir, cols#80, lines#24, bel=^G, cbt=\EI, clear=\E+, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\Ew, @@ -15223,19 +16134,17 @@ synertek|ktm|synertek380|synertek ktm 3/80 tubeless terminal, # compatible but looks more vt100-like. tab132|tab|tab132-15|tab 132/15, da, db, - cols#80, lines#24, lm#96, + OTdN@, cols#80, lines#24, lm#96, cud1=^J, cup=\E[%i%p1%d;%p2%dH, dch1=\E[P, dl1=\E[M, il1=\E[L, is2=\E[?7h\E[?3l\E[?5l, kcub1=\E[D, kcud1=\E[B, - kcuu1=\E[A, rmir=\E[4l, rmkx@, smir=\E[4h, smkx@, - use=vt100, + kcuu1=\E[A, rmir=\E[4l, rmkx@, smir=\E[4h, smkx@, use=vt100, tab132-w|tab132 in wide mode, cols#132, is2=\E[?7h\E[?3h\E[?5l, use=tab132, tab132-rv|tab132 in reverse-video mode, is2=\E[?7h\E[?3l\E[?5h, use=tab132, tab132-w-rv|tab132 in reverse-video/wide mode, - is2=\E[?7h\E[?3h\E[?5h, - use=tab132-w, + is2=\E[?7h\E[?3h\E[?5h, use=tab132-w, #### Teleray @@ -15257,15 +16166,17 @@ tab132-w-rv|tab132 in reverse-video/wide mode, # t3700|dumb teleray 3700, + OTbs, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, ind=^J, t3800|teleray 3800 series, + OTbs, cols#80, it#8, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, ed=\EJ, el=\EK, home=\EH, ht=^I, ind=^J, ll=\EY7\s, t1061|teleray|teleray 1061, - am, km, xhp, xt, + OTbs, am, km, xhp, xt, cols#80, it#8, lines#24, xmc#1, bel=^G, clear=\014$<1>, cr=^M, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, @@ -15288,7 +16199,7 @@ t1061f|teleray 1061 with fast PROMs, # From: J. Lepreau Tue Feb 1 06:39:37 1983, Univ of Utah # (t10: removed overridden ":so@:se@:us@:ue@:" -- esr) t10|teleray 10 special, - km, xhp, xt, + OTbs, km, xhp, xt, cols#80, it#8, lines#24, xmc#2, clear=\Ej$<30/>, cub1=^H, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, @@ -15319,7 +16230,7 @@ t16|teleray 16, # printer. It was portable, equipped with an acoustic coupler, and pretty # neat for its day. ti700|ti733|ti735|ti745|ti800|ti silent 700/733/735/745 or omni 800, - hc, os, + OTbs, hc, os, cols#80, bel=^G, cr=\r$<162>, cub1=^H, cud1=^J, ind=^J, @@ -15341,7 +16252,8 @@ ti916|ti916-220-7|Texas Instruments 916 VDT 8859/1 vt220 mode 7 bit CTRL, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, khome=\E[H, kich1=\E[@, knp=\E[S, kpp=\E[T, kprt=^X, prot=\E&, rmacs=\017$<2>, rs2=\E[!p, - smacs=\016$<2>, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, use=vt220, + smacs=\016$<2>, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, + use=vt220, # # Texas Instruments 916 VDT 8 bit control mode # @@ -15351,8 +16263,7 @@ ti916-8|ti916-220-8|Texas Instruments 916 VDT 8859/1 8 vt220 mode bit CTRL, kf10=\23328~, kf11=\23329~, kf12=\23331~, kf2=\23318~, kf3=\23319~, kf4=\23320~, kf5=\23321~, kf6=\23323~, kf7=\23324~, kf8=\23325~, kf9=\23326~, khome=\233H, - kich1=\233@, knp=\233S, kpp=\233T, kprt=^X, - use=ti916, + kich1=\233@, knp=\233S, kpp=\233T, kprt=^X, use=ti916, # # Texas Instruments 916 VDT 8859/1 7 bit control 132 column mode # @@ -15364,7 +16275,7 @@ ti916-132|Texas Instruments 916 VDT vt220 132 column, ti916-8-132|Texas Instruments 916 VDT 8-bit vt220 132 column, cols#132, use=ti916-8, ti924|Texas Instruments 924 VDT 8859/1 7 bit CTRL, - am, xon, + OTbs, am, xon, cols#80, it#8, lines#24, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, clear=\E[2J\E[H, cnorm=\E[?25h, cr=^M, @@ -15397,7 +16308,7 @@ ti924w|Texas Instruments 924 VDT 7 bit - 132 column mode, ti924-8w|Texas Instruments 924 VDT 8 bit - 132 column mode, cols#132, use=ti924-8, ti931|Texas Instruments 931 VDT, - am, xon, + OTbs, am, xon, cols#80, lines#24, bel=^G, blink=\E4P, clear=\EL, cnorm=\E4@, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, @@ -15409,12 +16320,10 @@ ti931|Texas Instruments 931 VDT, kich1=\EP, kil1=\EN, rev=\E4B, ri=\Eb, rmso=\E4@, rmul=\E4@, sgr0=\E4@, smso=\E4A, smul=\E4D, ti926|Texas Instruments 926 VDT 8859/1 7 bit CTRL, - csr@, ind=\E[1S, ri=\E[1T, - use=ti924, + csr@, ind=\E[1S, ri=\E[1T, use=ti924, # (ti926-8: I corrected this from the broken SCO entry -- esr) ti926-8|Texas Instruments 926 VDT 8859/1 8 bit CTRL, - csr@, ind=\2331S, ri=\2331T, - use=ti924-8, + csr@, ind=\2331S, ri=\2331T, use=ti924-8, ti_ansi|basic entry for ti928, am, bce, eo, xenl, xon, colors#8, cols#80, it#8, lines#25, pairs#64, @@ -15437,8 +16346,7 @@ ti928|Texas Instruments 928 VDT 8859/1 7 bit CTRL, kf10=\E[28~, kf11=\E[29~, kf12=\E[31~, kf13=\E[32~, kf15=\E[34~, kf2=\E[18~, kf3=\E[19~, kf4=\E[20~, kf5=\E[21~, kf6=\E[23~, kf7=\E[24~, kf8=\E[25~, kf9=\E[26~, - kich1=\E[@, knp=\E[S, kpp=\E[T, kprt=\E[35~, - use=ti_ansi, + kich1=\E[@, knp=\E[S, kpp=\E[T, kprt=\E[35~, use=ti_ansi, # # 928 VDT 8 bit control mode # @@ -15448,8 +16356,7 @@ ti928-8|Texas Instruments 928 VDT 8859/1 8 bit CTRL, kf15=\23334~, kf2=\23318~, kf3=\23319~, kf4=\23320~, kf5=\23321~, kf6=\23323~, kf7=\23324~, kf8=\23325~, kf9=\23326~, khome=\233H, kich1=\233@, knp=\233S, - kpp=\233T, kprt=\23335~, - use=ti_ansi, + kpp=\233T, kprt=\23335~, use=ti_ansi, #### Zentec (zen) # @@ -15459,31 +16366,29 @@ ti928-8|Texas Instruments 928 VDT 8859/1 8 bit CTRL, # dim-reverse using ADM12-style attributes. ADM12 / and # might work-- esr) zen30|z30|zentec 30, - am, mir, ul, + OTbs, am, mir, ul, cols#80, lines#24, bel=^G, clear=\E*, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dim=\EG2, dl1=\ER$<1.5*>, ed=\EY, el=\ET$<1.0*>, home=^^, il1=\EE$<1.5*>, ind=^J, rmir=\Er, rmul@, smir=\Eq, smso=\EG6, - smul@, - use=adm+sgr, + smul@, use=adm+sgr, # (zen50: this had extension capabilities # :BS=^U:CL=^V:CR=^B: # UK/DK/RK/LK/HM were someone's aliases for ku/kd/kl/kr/kh, # which were also in the original entry -- esr) # (zen50: removed obsolete ":ma=^Hh^Ll^Jj^Kk:" -- esr) zen50|z50|zentec zephyr, - am, + OTbs, am, cols#80, lines#24, xmc#1, clear=\E+, cub1=^H, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dl1=\ER, ed=\EY, el=\ET, ich1=\EQ, il1=\EE, invis@, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, - rmul@, smul@, - use=adm+sgr, + rmul@, smul@, use=adm+sgr, # CCI 4574 (Office Power) from Will Martin via BRL cci|cci1|z8001|zen8001|CCI Custom Zentec 8001, - am, bw, + OTbs, am, bw, cols#80, lines#24, blink=\EM", clear=\EH\EJ, cnorm=\EP, csr=\ER%p1%{32}%+%c%p2%{32}%+%c, cub1=^H, cud1=^J, @@ -15505,7 +16410,7 @@ cci|cci1|z8001|zen8001|CCI Custom Zentec 8001, # From: Gary Darland apollo|apollo console, - am, mir, + OTbs, am, mir, cols#88, lines#53, clear=^L, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EM%p1%{32}%+%c%p2%d), cuu1=\EA, dch1=\EP, dl1=\EL, @@ -15534,20 +16439,22 @@ apollo_color|apollo color display, # (aws: removed unknown :dn=^K: -- esr) aws|Convergent Technologies AWS workstation under UTX and Xenix, am, - cols#80, lines#28, xmc#0, - acsc=, clear=^L, cud1=^K, cuf1=^R, cup=\EC%p2%c%p1%c, - cuu1=^A, dch1=\EDC, dl1=\EDL, ed=\EEF, el=\EEL, hpa=\EH%p1%c, + OTug#0, cols#80, lines#28, xmc#0, + OTbc=^H, OTma=\016h\013j\001k\022l\002m, OTnl=^J, acsc=, + clear=^L, cud1=^K, cuf1=^R, cup=\EC%p2%c%p1%c, cuu1=^A, + dch1=\EDC, dl1=\EDL, ed=\EEF, el=\EEL, hpa=\EH%p1%c, ich1=\EIC, il1=\EIL, ind=\ESU, kbs=^H, kcub1=^N, kcud1=^K, kcuf1=^R, kcuu1=^A, ri=\ESD, rmacs=\EAAF, rmso=\EARF, rmul=\EAUF, smacs=\EAAN, smso=\EARN, smul=\EAUN, vpa=\EV%p1%c, awsc|Convergent Technologies AWS workstation under CTOS, am, - cols#80, lines#24, xmc#0, - acsc=, clear=^L, cud1=^K, cuf1=^R, cup=\EC%p2%c%p1%c, - cuu1=^A, ed=\EEF, el=\EEL, kbs=^H, kcub1=^N, kcud1=^K, - kcuf1=^R, kcuu1=^A, rmacs=\EAAF, rmso=\EAA, rmul=\EAA, - smacs=\EAAN, smso=\EAE, smul=\EAC, + OTug#0, cols#80, lines#24, xmc#0, + OTbc=^N, OTma=\016h\013j\001k\022l\002m, acsc=, clear=^L, + cud1=^K, cuf1=^R, cup=\EC%p2%c%p1%c, cuu1=^A, ed=\EEF, + el=\EEL, kbs=^H, kcub1=^N, kcud1=^K, kcuf1=^R, kcuu1=^A, + rmacs=\EAAF, rmso=\EAA, rmul=\EAA, smacs=\EAAN, smso=\EAE, + smul=\EAC, #### DEC consoles # @@ -15561,7 +16468,7 @@ awsc|Convergent Technologies AWS workstation under CTOS, # within it. And that is what your termcap entry is for. In graphics # mode the screen size is 1024x864 pixels. qdss|qdcons|qdss glass tty, - am, + OTbs, am, cols#128, lines#57, clear=\032$<1/>, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%c%p2%c, cuu1=^K, @@ -15590,7 +16497,7 @@ qdss|qdcons|qdss glass tty, # "reverse-video-glitch" capability; I have put :rv: and :re: in with standard # names below. I've removed obsolete ":nl=5^J:" as there is a :do: -- esr) fos|fortune|Fortune system, - am, bw, + OTbs, am, bw, cols#80, lines#25, acsc=j*k(l m"q&v%w#x-, bel=^G, blink=\EN, civis=\E], clear=\014$<20>, cnorm=\E\\, cr=^M, cub1=^H, cud1=\n$<3>, @@ -15614,7 +16521,7 @@ fos|fortune|Fortune system, # (masscomp: ":MT:" changed to ":km:"; -- esr) masscomp|masscomp workstation console, - km, mir, + OTbs, km, mir, cols#80, it#8, lines#24, clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, @@ -15863,11 +16770,11 @@ xerox1720|x1720|x1750|xerox 1720, # and a date on the serial-number plate) please send it! cad68-3|cgc3|cad68 basic monitor transparent mode size 3 chars, - am, + OTbs, am, cols#73, lines#36, clear=^Z, cub1=^H, cuf1=^L, cuu1=^K, home=^^, cad68-2|cgc2|cad68 basic monitor transparent mode size 2 chars, - am, + OTbs, am, cols#85, lines#39, clear=^Z, cub1=^H, cuf1=^L, cuu1=^K, home=^^, kcub1=\E3, kcud1=\E2, kcuf1=\E4, kcuu1=\E1, kf1=\E5, kf2=\E6, kf3=\E7, @@ -15893,7 +16800,7 @@ d132|datagraphix|datagraphix 132a, # mode (which is what this entry looks like) and several other lesser-known # emulations. d800|Direct 800/A, - am, da, db, msgr, xhp, + OTbs, am, da, db, msgr, xhp, cols#80, it#8, lines#24, acsc=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~, bel=^G, clear=\E[1;1H\E[2J, cnorm=\E[>12h, cr=^M, cub1=^H, @@ -15904,6 +16811,7 @@ d800|Direct 800/A, ri=\EM, rmacs=\E[m, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smacs=\E[1m, smso=\E[7m, smul=\E[4m, digilog|digilog 333, + OTbs, cols#80, lines#16, bel=^G, cr=^M, cub1=^H, cud1=^J, cuf1=^I, cuu1=^O, el=^X, home=^N, ind=^J, @@ -15923,17 +16831,18 @@ dwk|dwk-vt|dwk terminal, env230|envision230|envision 230 graphics terminal, xenl@, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, - sgr=\E[%?%p1%t;1%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, use=vt100, + sgr=\E[%?%p1%t;1%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, + use=vt100, # These execuports were impact-printer ttys with a 30- or maybe 15-cps acoustic # coupler attached, the whole rig fitting in a suitcase and more or less # portable. Hot stuff for c.1977 :-) -- esr ep48|ep4080|execuport 4080, - am, os, + OTbs, am, os, cols#80, bel=^G, cr=^M, cub1=^H, cud1=^J, hd=^\, hu=^^, ind=^J, ep40|ep4000|execuport 4000, cols#136, use=ep4080, -# Adam Thompson tells us: +# Adam Thompson tells us: # Informer series - these are all portable units, resembling older # automatic bread-baking machines. The terminal looks like a `clamshell' # design, but isn't. The structure is similar to the Direct terminals, @@ -15946,7 +16855,7 @@ ep40|ep4000|execuport 4000, # color terminals built for IBM bisync protocols. # From: Paul Leondis ifmr|Informer D304, - am, + OTbs, am, cols#80, lines#24, clear=\EZ, cub1=^H, cud1=^J, cuf1=\EC, cup=\EY%p2%{32}%+%c%p1%{32}%+%c, cuu1=\EA, dch1=\E\\, @@ -15982,10 +16891,9 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys, sgr0=\E(\EH\003\EG0\EcD, smacs=\EH^B, smam=\Ed/, smcup=\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177, smir=\Eq, smln=\EA10, smxon=\Ec21, tbc=\E0, tsl=\Ez(, - uc=\EG8%p1%c\EG0, - use=adm+sgr, + uc=\EG8%p1%c\EG0, use=adm+sgr, teletec|Teletec Datascreen, - am, + OTbs, am, cols#80, lines#24, bel=^G, clear=^L, cr=^M, cub1=^H, cud1=^J, cuf1=^_, cuu1=^K, home=^^, ind=^J, @@ -15994,10 +16902,29 @@ teletec|Teletec Datascreen, # terminal from 1984/85. The function key definitions k0-k5 represent the # edit keypad: FIND, INSERT HERE, REMOVE, SELECT, PREV SCREEN, # NEXT SCREEN. The key definitions k6-k9 represent the PF1 to PF4 keys. +# +# Kenneth Randell writes on 31 Dec 1998: +# I had a couple of scopes (3221) like this once where I used to work, around +# the 1987 time frame if memory serves me correctly. These scopes were made +# by an outfit called LANPAR Technologies, and were meant to me DEC VT 220 +# compatible. The 3220 was a plain text terminal like the VT-220, the 3221 +# was a like the VT-240 (monochrome with Regis + Sixel graphics), and the 3222 +# was like the VT-241 (color with Regis + Sixel Graphics). These terminals +# (3221) cost about $1500 each, and one was always broken -- had to be sent +# back to the shop for repairs. +# The only real advantage these scopes had over the VT-240's were: +# 1) They were faster in the Regis display, or at least the ones I did +# 2) They had a handy debugging feature where you could split-screen the +# scope, the graphics would appear on the top, and the REGIS commands would +# appear on the bottom. I don't remember the VT-240s being able to do that. +# I would swear that LANPAR Technologies was in MA someplace, but since I +# don't work at the same place anymore, and those terminals and manuals were +# long since junked, I cannot be any more sure than that. +# # (v3220: removed obsolete ":kn#10:", # I added / based on the init string -- esr) v3220|LANPAR Vision II model 3220/3221/3222, - am, mir, xenl, + OTbs, am, mir, xenl, cols#80, it#8, lines#24, clear=\E[H\E[J, cub1=^H, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, @@ -17343,6 +18270,82 @@ v3220|LANPAR Vision II model 3220/3221/3222, # key mapping, leaving Potorti's entries more like he named them -TD # * remove enter/exit am-mode from cygwin -TD # +# 1999/10/30 +# * correct typos in several entries (missing '[' from CSI): +# mgr-sun, ncsa-m, vt320-k3, att505, avt-ns, as well as smir/rmir +# strings for avt-ns -TD +# * add 'dim' to ncv mask for linux (report by Klaus Weide). +# +# 1999/11/27 +# * correct kf1-kf4 in xterm-r6 which were vt100-style PF1-PF4 -TD +# * add hts to xterm-r6, and u6-u9 to xterm-r5 -TD +# * add xterm-88color and xterm-256color -TD +# +# 1999/12/4 +# * add "obsolete" termcap strings -TD +# * add kvt and gnome entries -TD +# +# 1999/12/11 +# * correct cup string for regent100 -TD +# +# 2000/1/1 +# * update mach, add mach-color based on Debian diffs for ncurses 5.0 -TD +# * add entries for xterm-hp, xterm-vt220, xterm-vt52 and xterm-noapp -TD +# * change OTrs capabilities to rs2 -TD +# * add obsolete and extended capabilities to 'screen' -TD +# +# 2000/1/5 +# * remove kf0 from rxvt, vt520, vt525 and ibm5151 since it conflicts +# with kf10 -TD +# * updated xterm-xf86-v40, making kdch1 correspond to vt220 'Remove', +# and adding kcbt -TD +# +# 2000/1/12 +# * remove incorrect khome/kend from xterm-xf86-v333, which was based on +# nonstandard resource settings -TD +# +# 2000/2/26 +# * minor fixes for xterm-*, based on Debian #58530 -TD +# +# 2000/3/4 +# * add several terminal types from esr's "11.0", as well as comments. +# bq300*, dku7102-old, dku7202, hft, lft, pcmw, pmcons, tws*, vip*, +# vt220-8bit, vt220-old, wy85-8bit +# +# 2000/3/18 +# * add several terminal types from esr's "11.0.1" (ansi-*). +# * update OTxx capabilities for changes on 2000/3/4. +# * revert part of vt220 change (request by Todd C Miller for OpenBSD) +# +# 2000/3/26 +# * move screen's AX extension to ecma+color, modify several entries to +# use that, adjusting ncv as needed -TD +# +# 2000/4/8 +# * add bsdos-pc-m, bsdos-pc-mono (Jeffrey C Honig) +# * correct spelling error in entry name: bq300-rv was given as bg300-rv +# in esr's version. +# +# 2000/4/15 +# * add cud, ech, etc., to beterm based on feedback from Rico Tudor -TD +# * correct color definition for ibm3164, make minor changes to other +# IBM terminal definitions based on recent terminfo descriptions -TD +# +# 2000/4/22 +# * add mgterm, from NetBSD -TD +# * add alias sun-cgsix for sun-ss5 as per NetBSD +# * change cons25w to use rs2 for reset rather than rs1 -TD +# * add rc/sc to aixterm based on manpage -TD +# +# 2000/5/13 +# * remove ncv from xterm-16color, xterm-256 color +# +# 2000/6/10 +# * add kmous capability to linux to use Joerg Schoen's gpm patch. +# +# 2000/7/1 +# * add Eterm (Michael Jennings) +# # The following sets edit modes for GNU EMACS. # Local Variables: # fill-prefix:"\t" diff --git a/mk-0th.awk b/mk-0th.awk index b7a40fdc..5173269e 100644 --- a/mk-0th.awk +++ b/mk-0th.awk @@ -1,6 +1,6 @@ -# $Id: mk-0th.awk,v 1.7 1998/02/11 12:13:52 tom Exp $ +# $Id: mk-0th.awk,v 1.8 2000/01/09 00:29:10 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -38,6 +38,12 @@ BEGIN { print "" print "# generated by mk-0th.awk" print "" + print ".SUFFIXES: .c .h .i" + print ".c.i :" + printf "\t$(CPP) $(CPPFLAGS) $< >$@\n" + print ".h.i :" + printf "\t$(CPP) $(CPPFLAGS) $< >$@\n" + print "" found = 0; } !/^[@#]/ { diff --git a/mk-1st.awk b/mk-1st.awk index e22d414f..63ec24b4 100644 --- a/mk-1st.awk +++ b/mk-1st.awk @@ -1,6 +1,6 @@ -# $Id: mk-1st.awk,v 1.39 1998/05/09 21:54:02 tom Exp $ +# $Id: mk-1st.awk,v 1.44 2000/07/07 00:27:51 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997 +# Author: Thomas E. Dickey 1996,1997,2000 # # Generate list of objects for a given model library # Variables: @@ -39,6 +39,7 @@ # 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) +# ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable) # DoLinks ("yes", "reverse" or "no", flag to add symbolic links) # rmSoLocs ("yes" or "no", flag to add extra clean target) # overwrite ("yes" or "no", flag to add link to libcurses.a @@ -50,43 +51,50 @@ # function symlink(src,dst) { if ( src != dst ) { - if ( DoLinks == "reverse" ) { - printf "rm -f %s; ", src - printf "$(LN_S) %s %s; ", dst, src - } else { - printf "rm -f %s; ", dst - printf "$(LN_S) %s %s; ", src, dst - } + printf "rm -f %s; ", dst + printf "$(LN_S) %s %s; ", src, dst } } -function sharedlinks(directory, add) { - if ( end_name != lib_name ) { - if ( DoLinks == "yes" ) { - abi_name = sprintf("%s.$(ABI_VERSION)", lib_name); - } else { - abi_name = end_name; - } - if (add) { - printf "\tcd %s && (", directory - if ( abi_name != end_name ) { - symlink(end_name, abi_name); +function rmlink(directory, dst) { + printf "\t-rm -f %s/%s\n", directory, dst +} +function removelinks(directory) { + rmlink(directory, end_name); + if ( DoLinks == "reverse" ) { + if ( ShlibVer == "rel" ) { + rmlink(directory, abi_name); + rmlink(directory, rel_name); + } else if ( ShlibVer == "abi" ) { + rmlink(directory, abi_name); } - symlink(abi_name, lib_name); - printf ")\n" - } else { - if ( abi_name != end_name ) { - printf "\t-@rm -f %s/%s\n", directory, abi_name + } else { + if ( ShlibVer == "rel" ) { + rmlink(directory, abi_name); + rmlink(directory, lib_name); + } else if ( ShlibVer == "abi" ) { + rmlink(directory, lib_name); } - printf "\t-@rm -f %s/%s\n", directory, lib_name - } } } -function removelinks() { - if ( end_name != lib_name ) { - if ( abi_name != end_name ) { - printf "\t-rm -f ../lib/%s\n", abi_name +function sharedlinks(directory) { + if ( ShlibVer != "auto" ) { + printf "\tcd %s && (", directory + if ( DoLinks == "reverse" ) { + if ( ShlibVer == "rel" ) { + symlink(lib_name, abi_name); + symlink(abi_name, rel_name); + } else if ( ShlibVer == "abi" ) { + symlink(lib_name, abi_name); + } + } else { + if ( ShlibVer == "rel" ) { + symlink(rel_name, abi_name); + symlink(abi_name, lib_name); + } else if ( ShlibVer == "abi" ) { + symlink(abi_name, lib_name); + } } - printf "\t-rm -f ../lib/%s\n", end_name + printf ")\n" } } BEGIN { @@ -114,7 +122,14 @@ BEGIN { } } } - !/^[@#]/ { + /^[@#]/ { + next + } + $1 ~ /trace/ { + if (traces != "all" && traces != MODEL && $1 != "lib_trace") + next + } + { if (using \ && ( $2 == "lib" \ || $2 == "progs" \ @@ -144,45 +159,40 @@ END { lib_name = sprintf("%s%s%s", prefix, name, suffix) if ( MODEL == "SHARED" ) { - if ( DoLinks == "yes" ) { - end_name = sprintf("%s.$(REL_VERSION)", lib_name); - } else if ( DoLinks == "reverse") { - tmp_name = sprintf("%s.$(ABI_VERSION)", lib_name); + abi_name = sprintf("%s.$(ABI_VERSION)", lib_name); + rel_name = sprintf("%s.$(REL_VERSION)", lib_name); + if ( DoLinks == "reverse") { end_name = lib_name; - lib_name = tmp_name; } else { - end_name = lib_name; + if ( ShlibVer == "rel" ) { + end_name = rel_name; + } else if ( ShlibVer == "abi" ) { + end_name = abi_name; + } else { + end_name = lib_name; + } } - printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS + 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 } else { printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(SHLIB_LIST)\n", OBJS } - sharedlinks("../lib", 1) - print "" - if ( end_name != lib_name ) { - printf "../lib/%s : ../lib/%s\n", end_name, lib_name - } + sharedlinks("../lib") print "" print "install \\" print "install.libs \\" printf "install.%s :: $(INSTALL_PREFIX)$(libdir) ../lib/%s\n", name, end_name - printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, end_name - if ( DoLinks == "reverse") { - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name - printf "\t$(INSTALL_LIB) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name - } else { - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", end_name - printf "\t$(INSTALL_LIB) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, end_name - } - sharedlinks("$(INSTALL_PREFIX)$(libdir)", 1) + printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s\n", end_name, end_name + printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", end_name + printf "\t$(INSTALL_LIB) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s\n", end_name, end_name + sharedlinks("$(INSTALL_PREFIX)$(libdir)") if ( overwrite == "yes" && name == "ncurses" ) { ovr_name = sprintf("libcurses%s", suffix) - printf "\t@echo linking %s to %s\n", lib_name, ovr_name - printf "\tcd $(INSTALL_PREFIX)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, lib_name, ovr_name + printf "\t@echo linking %s to %s\n", end_name, ovr_name + printf "\tcd $(INSTALL_PREFIX)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name } if ( ldconfig != "" ) { printf "\t- test -z \"$(INSTALL_PREFIX)\" && %s\n", ldconfig @@ -191,13 +201,12 @@ END { print "uninstall \\" print "uninstall.libs \\" printf "uninstall.%s ::\n", name - printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s \n", end_name - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", end_name - sharedlinks("$(INSTALL_PREFIX)$(libdir)", 0) + printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s\n", end_name + removelinks("$(INSTALL_PREFIX)$(libdir)") if ( overwrite == "yes" && name == "ncurses" ) { ovr_name = sprintf("libcurses%s", suffix) - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", ovr_name + printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", ovr_name } if ( rmSoLocs == "yes" ) { print "" @@ -220,12 +229,12 @@ END { print "install \\" print "install.libs \\" printf "install.%s :: $(INSTALL_PREFIX)$(libdir) ../lib/%s\n", name, lib_name - printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name - printf "\t$(INSTALL_DATA) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name + printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name, lib_name + printf "\t$(INSTALL_DATA) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name, lib_name if ( overwrite == "yes" && lib_name == "libncurses.a" ) { - printf "\t@echo linking libcurses.a to libncurses.a \n" - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a \n" + printf "\t@echo linking libcurses.a to libncurses.a\n" + printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a\n" printf "\t(cd $(INSTALL_PREFIX)$(libdir) && $(LN_S) libncurses.a libcurses.a)\n" } printf "\t$(RANLIB) $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name @@ -238,12 +247,12 @@ END { print "uninstall \\" print "uninstall.libs \\" printf "uninstall.%s ::\n", name - printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name + printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name if ( overwrite == "yes" && lib_name == "libncurses.a" ) { - printf "\t@echo linking libcurses.a to libncurses.a \n" - printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a \n" + printf "\t@echo linking libcurses.a to libncurses.a\n" + printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a\n" } if ( target == "vxworks" ) { @@ -253,13 +262,10 @@ END { } print "" print "clean ::" - printf "\t-rm -f ../lib/%s\n", lib_name + removelinks("../lib"); print "" print "mostlyclean::" printf "\t-rm -f $(%s_OBJS)\n", OBJS - print "" - print "clean ::" - removelinks(); } else if ( found == 2 ) { diff --git a/mk-2nd.awk b/mk-2nd.awk index 2d998b0c..e90f16d0 100644 --- a/mk-2nd.awk +++ b/mk-2nd.awk @@ -1,4 +1,4 @@ -# $Id: mk-2nd.awk,v 1.11 1998/10/17 21:54:21 Alexander.V.Lukyanov Exp $ +# $Id: mk-2nd.awk,v 1.12 2000/04/01 20:50:36 tom Exp $ ############################################################################## # Copyright (c) 1998 Free Software Foundation, Inc. # # # @@ -67,7 +67,14 @@ BEGIN { } } } - !/^[@#]/ { + /^[@#]/ { + next + } + $1 ~ /trace/ { + if (traces != "all" && traces != MODEL && $1 != "lib_trace") + next + } + { if ($0 != "" \ && using != 0) { found = 1 diff --git a/mkinstalldirs b/mkinstalldirs index b2e45ea2..8f0503e0 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -4,11 +4,12 @@ # Created: 1993-05-16 # Last modified: 1994-03-25 # Public domain +# -umask 022 errstatus=0 +umask 022 -for file in ${1+"$@"} ; do +for file in ${1+"$@"} ; do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift @@ -21,7 +22,10 @@ for file in ${1+"$@"} ; do if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? + case "$pathcomp" in + [a-zA-Z]: ) ;; # DOSISH systems + * ) mkdir "$pathcomp" || errstatus=$? ;; + esac fi pathcomp="$pathcomp/" diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index bed5ee95..41b66f69 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.63 1999/09/01 22:35:53 tom Exp $ +# $Id: Makefile.in,v 1.66 2000/05/28 01:39:56 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -129,7 +129,7 @@ AUTO_SRC = \ ./names.c \ ./unctrl.c -TEST_DEPS = @LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ +TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ TEST_ARGS = -L../lib -lncurses@DFT_ARG_SUFFIX@ TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@ @@ -145,7 +145,8 @@ tinfo = $(srcdir)/tinfo trace = $(srcdir)/trace ################################################################################ -all :: $(AUTO_SRC) ../lib $(LIBRARIES) +all \ +libs :: $(AUTO_SRC) ../lib $(LIBRARIES) sources: $(AUTO_SRC) diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk index 0f441924..3d5b2563 100644 --- a/ncurses/base/MKunctrl.awk +++ b/ncurses/base/MKunctrl.awk @@ -1,4 +1,4 @@ -# $Id: MKunctrl.awk,v 1.6 1998/06/06 18:18:07 tom Exp $ +# $Id: MKunctrl.awk,v 1.7 2000/04/01 19:49:26 tom Exp $ ############################################################################## # Copyright (c) 1998 Free Software Foundation, Inc. # # # @@ -50,6 +50,8 @@ END { printf "\"^\\%03o\"", ch + 64 } else if (ch == 127) { printf "\"^?\"" + } else if (ch >= 128 && ch < 160) { + printf "\"~\\%03o\"", ch - 64 } else { printf "\"\\%03o\"", ch gap = gap " " diff --git a/ncurses/base/lib_addch.c b/ncurses/base/lib_addch.c index 101d75ef..69c17c34 100644 --- a/ncurses/base/lib_addch.c +++ b/ncurses/base/lib_addch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $") +MODULE_ID("$Id: lib_addch.c,v 1.44 2000/05/20 21:13:11 tom Exp $") /* * Ugly microtweaking alert. Everything from here to end of module is @@ -56,40 +56,40 @@ MODULE_ID("$Id: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $") /* Return bit mask for clearing color pair number if given ch has color */ #define COLOR_MASK(ch) (~(chtype)((ch)&A_COLOR?A_COLOR:0)) -static inline chtype render_char(WINDOW *win, chtype ch) +static inline chtype +render_char(WINDOW *win, chtype ch) /* compute a rendition of the given char correct for the current context */ { - chtype a = win->_attrs; - - if (ch == ' ') - { - /* color in attrs has precedence over bkgd */ - ch = a | (win->_bkgd & COLOR_MASK(a)); - } - else - { - /* color in attrs has precedence over bkgd */ - a |= (win->_bkgd & A_ATTRIBUTES) & COLOR_MASK(a); - /* color in ch has precedence */ - ch |= (a & COLOR_MASK(ch)); - } - - TR(TRACE_VIRTPUT, ("bkg = %lx, attrs = %lx -> ch = %lx", win->_bkgd, - win->_attrs, ch)); - - return(ch); + chtype a = win->_attrs; + + if (ch == ' ') { + /* color in attrs has precedence over bkgd */ + ch = a | (win->_bkgd & COLOR_MASK(a)); + } else { + /* color in attrs has precedence over bkgd */ + a |= (win->_bkgd & A_ATTRIBUTES) & COLOR_MASK(a); + /* color in ch has precedence */ + ch |= (a & COLOR_MASK(ch)); + } + + TR(TRACE_VIRTPUT, ("bkg = %lx, attrs = %lx -> ch = %lx", win->_bkgd, + win->_attrs, ch)); + + return (ch); } -chtype _nc_background(WINDOW *win) +chtype +_nc_background(WINDOW *win) /* make render_char() visible while still allowing us to inline it below */ { - return (win->_bkgd); + return (win->_bkgd); } -chtype _nc_render(WINDOW *win, chtype ch) +chtype +_nc_render(WINDOW *win, chtype ch) /* make render_char() visible while still allowing us to inline it below */ { - return render_char(win, ch); + return render_char(win, ch); } /* check if position is legal; if not, return error */ @@ -105,149 +105,152 @@ chtype _nc_render(WINDOW *win, chtype ch) return(ERR); \ } #else -#define CHECK_POSITION(win, x, y) /* nothing */ +#define CHECK_POSITION(win, x, y) /* nothing */ #endif -static inline -int waddch_literal(WINDOW *win, chtype ch) +static inline int +waddch_literal(WINDOW *win, chtype ch) { - int x; - struct ldat *line; + int x; + struct ldat *line; + + x = win->_curx; + + CHECK_POSITION(win, x, win->_cury); + + /* + * If we're trying to add a character at the lower-right corner more + * than once, fail. (Moving the cursor will clear the flag). + */ +#if 0 /* Solaris 2.6 allows updating the corner more than once */ + if (win->_flags & _WRAPPED) { + if (x >= win->_maxx) + return (ERR); + win->_flags &= ~_WRAPPED; + } +#endif + + ch = render_char(win, ch); + TR(TRACE_VIRTPUT, ("win attr = %s", _traceattr(win->_attrs))); - x = win->_curx; + line = win->_line + win->_cury; - CHECK_POSITION(win, x, win->_cury); + CHANGED_CELL(line, x); + line->text[x++] = ch; + + TR(TRACE_VIRTPUT, ("(%d, %d) = %s", win->_cury, x, _tracechtype(ch))); + if (x > win->_maxx) { /* - * If we're trying to add a character at the lower-right corner more - * than once, fail. (Moving the cursor will clear the flag). + * The _WRAPPED flag is useful only for telling an application that + * we've just wrapped the cursor. We don't do anything with this flag + * except set it when wrapping, and clear it whenever we move the + * cursor. If we try to wrap at the lower-right corner of a window, we + * cannot move the cursor (since that wouldn't be legal). So we return + * an error (which is what SVr4 does). Unlike SVr4, we can + * successfully add a character to the lower-right corner (Solaris 2.6 + * does this also, however). */ - if (win->_flags & _WRAPPED) { - if (x >= win->_maxx) - return (ERR); - win->_flags &= ~_WRAPPED; - } - - ch = render_char(win, ch); - TR(TRACE_VIRTPUT, ("win attr = %s", _traceattr(win->_attrs))); - - line = win->_line+win->_cury; - - CHANGED_CELL(line,x); - - line->text[x++] = ch; - - TR(TRACE_VIRTPUT, ("(%d, %d) = %s", win->_cury, x, _tracechtype(ch))); - if (x > win->_maxx) { - /* - * The _WRAPPED flag is useful only for telling an application - * that we've just wrapped the cursor. We don't do anything - * with this flag except set it when wrapping, and clear it - * whenever we move the cursor. If we try to wrap at the - * lower-right corner of a window, we cannot move the cursor - * (since that wouldn't be legal). So we return an error - * (which is what SVr4 does). Unlike SVr4, we can successfully - * add a character to the lower-right corner. - */ - win->_flags |= _WRAPPED; - if (++win->_cury > win->_regbottom) { - win->_cury = win->_regbottom; - win->_curx = win->_maxx; - if (!win->_scroll) - return (ERR); - scroll(win); - } - win->_curx = 0; - return (OK); + win->_flags |= _WRAPPED; + if (++win->_cury > win->_regbottom) { + win->_cury = win->_regbottom; + win->_curx = win->_maxx; + if (!win->_scroll) + return (ERR); + scroll(win); } - win->_curx = x; - return OK; + win->_curx = 0; + return (OK); + } + win->_curx = x; + return OK; } -static inline -int waddch_nosync(WINDOW *win, const chtype ch) +static inline int +waddch_nosync(WINDOW *win, const chtype ch) /* the workhorse function -- add a character to the given window */ { - int x, y; - int t = 0; - const char *s = 0; - - if ((ch & A_ALTCHARSET) - || ((t = TextOf(ch)) > 127) - || ((s = unctrl(t))[1] == 0)) - return waddch_literal(win, ch); - - x = win->_curx; - y = win->_cury; - - switch (t) { - case '\t': - x += (TABSIZE-(x%TABSIZE)); - - /* - * Space-fill the tab on the bottom line so that we'll get the - * "correct" cursor position. - */ - if ((! win->_scroll && (y == win->_regbottom)) - || (x <= win->_maxx)) { - chtype blank = (' ' | AttrOf(ch)); - while (win->_curx < x) { - if (waddch_literal(win, blank) == ERR) - return(ERR); - } - break; - } else { - wclrtoeol(win); - win->_flags |= _WRAPPED; - if (++y > win->_regbottom) { - x = win->_maxx; - y--; - if (win->_scroll) { - scroll(win); - x = 0; - } - } else { - x = 0; - } - } - break; - case '\n': - wclrtoeol(win); - if (++y > win->_regbottom) { - y--; - if (win->_scroll) - scroll(win); - else - return (ERR); + int x, y; + int t = 0; + const char *s = 0; + + if ((ch & A_ALTCHARSET) + || ((t = TextOf(ch)) > 127) + || ((s = unctrl(t))[1] == 0)) + return waddch_literal(win, ch); + + x = win->_curx; + y = win->_cury; + + switch (t) { + case '\t': + x += (TABSIZE - (x % TABSIZE)); + + /* + * Space-fill the tab on the bottom line so that we'll get the + * "correct" cursor position. + */ + if ((!win->_scroll && (y == win->_regbottom)) + || (x <= win->_maxx)) { + chtype blank = (' ' | AttrOf(ch)); + while (win->_curx < x) { + if (waddch_literal(win, blank) == ERR) + return (ERR); + } + break; + } else { + wclrtoeol(win); + win->_flags |= _WRAPPED; + if (++y > win->_regbottom) { + x = win->_maxx; + y--; + if (win->_scroll) { + scroll(win); + x = 0; } - /* FALLTHRU */ - case '\r': + } else { x = 0; - win->_flags &= ~_WRAPPED; - break; - case '\b': - if (x == 0) - return (OK); - x--; - win->_flags &= ~_WRAPPED; - break; - default: - while (*s) - if (waddch_literal(win, (*s++)|AttrOf(ch)) == ERR) - return ERR; - return(OK); + } } - - win->_curx = x; - win->_cury = y; - - return(OK); + break; + case '\n': + wclrtoeol(win); + if (++y > win->_regbottom) { + y--; + if (win->_scroll) + scroll(win); + else + return (ERR); + } + /* FALLTHRU */ + case '\r': + x = 0; + win->_flags &= ~_WRAPPED; + break; + case '\b': + if (x == 0) + return (OK); + x--; + win->_flags &= ~_WRAPPED; + break; + default: + while (*s) + if (waddch_literal(win, (*s++) | AttrOf(ch)) == ERR) + return ERR; + return (OK); + } + + win->_curx = x; + win->_cury = y; + + return (OK); } -int _nc_waddch_nosync(WINDOW *win, const chtype c) +int +_nc_waddch_nosync(WINDOW *win, const chtype c) /* export copy of waddch_nosync() so the string-put functions can use it */ { - return(waddch_nosync(win, c)); + return (waddch_nosync(win, c)); } /* @@ -258,36 +261,38 @@ int _nc_waddch_nosync(WINDOW *win, const chtype c) /* These are actual entry points */ -int waddch(WINDOW *win, const chtype ch) +int +waddch(WINDOW *win, const chtype ch) { - int code = ERR; + int code = ERR; - TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win, _tracechtype(ch))); + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win, + _tracechtype(ch))); - if (win && (waddch_nosync(win, ch) != ERR)) - { - _nc_synchook(win); - code = OK; - } + if (win && (waddch_nosync(win, ch) != ERR)) { + _nc_synchook(win); + code = OK; + } - TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_RETURN("%d"), code)); - return(code); + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code)); + return (code); } -int wechochar(WINDOW *win, const chtype ch) +int +wechochar(WINDOW *win, const chtype ch) { - int code = ERR; - - TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win, _tracechtype(ch))); - - if (win && (waddch_nosync(win, ch) != 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); + int code = ERR; + + TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win, + _tracechtype(ch))); + + if (win && (waddch_nosync(win, ch) != 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); } diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c index 9ac55e42..0a721659 100644 --- a/ncurses/base/lib_addstr.c +++ b/ncurses/base/lib_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,64 +40,64 @@ #include -MODULE_ID("$Id: lib_addstr.c,v 1.16 1998/06/28 00:38:29 tom Exp $") +MODULE_ID("$Id: lib_addstr.c,v 1.17 2000/04/29 21:15:55 tom Exp $") int waddnstr(WINDOW *win, const char *const astr, int n) { -unsigned const char *str = (unsigned const char *)astr; -int code = ERR; + unsigned const char *str = (unsigned const char *) astr; + int code = ERR; - T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbuf(astr), n)); - - if (win && (str != 0)) { - T(("... current %s", _traceattr(win->_attrs))); - TR(TRACE_VIRTPUT, ("str is not null")); - code = OK; - if (n < 0) - n = (int)strlen(astr); - - while((n-- > 0) && (*str != '\0')) { + T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbuf(astr), n)); + + if (win && (str != 0)) { + T(("... current %s", _traceattr(win->_attrs))); + TR(TRACE_VIRTPUT, ("str is not null")); + code = OK; + if (n < 0) + n = (int) strlen(astr); + + while ((n-- > 0) && (*str != '\0')) { TR(TRACE_VIRTPUT, ("*str = %#x", *str)); - if (_nc_waddch_nosync(win, (chtype)*str++) == ERR) { - code = ERR; - break; + if (_nc_waddch_nosync(win, (chtype) * str++) == ERR) { + code = ERR; + break; } - } - _nc_synchook(win); } - TR(TRACE_VIRTPUT, ("waddnstr returns %d", code)); - returnCode(code); + _nc_synchook(win); + } + TR(TRACE_VIRTPUT, ("waddnstr returns %d", code)); + returnCode(code); } int -waddchnstr(WINDOW *win, const chtype *const astr, int n) +waddchnstr(WINDOW *win, const chtype * const astr, int n) { -short y = win->_cury; -short x = win->_curx; -int code = OK; -struct ldat *line; + NCURSES_SIZE_T y = win->_cury; + NCURSES_SIZE_T x = win->_curx; + int code = OK; + struct ldat *line; - T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n)); + T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n)); - if (!win) - returnCode(ERR); + if (!win) + returnCode(ERR); - if (n < 0) { - const chtype *str; - n = 0; - for (str=(const chtype *)astr; *str!=0; str++) - n++; - } - if (n > win->_maxx - x + 1) - n = win->_maxx - x + 1; - if (n == 0) - returnCode(code); + if (n < 0) { + const chtype *str; + n = 0; + for (str = (const chtype *) astr; *str != 0; str++) + n++; + } + if (n > win->_maxx - x + 1) + n = win->_maxx - x + 1; + if (n == 0) + returnCode(code); - line = &(win->_line[y]); - memcpy(line->text+x, astr, n*sizeof(*astr)); - CHANGED_RANGE(line, x, x+n-1); + line = &(win->_line[y]); + memcpy(line->text + x, astr, n * sizeof(*astr)); + CHANGED_RANGE(line, x, x + n - 1); - _nc_synchook(win); - returnCode(code); + _nc_synchook(win); + returnCode(code); } diff --git a/ncurses/base/lib_box.c b/ncurses/base/lib_box.c index bcd96416..8a682585 100644 --- a/ncurses/base/lib_box.c +++ b/ncurses/base/lib_box.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_box.c ** @@ -42,69 +40,80 @@ #include -MODULE_ID("$Id: lib_box.c,v 1.10 1998/02/11 12:13:56 tom Exp $") +MODULE_ID("$Id: lib_box.c,v 1.11 2000/04/29 21:12:37 tom Exp $") -int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, - chtype bs, chtype tl, chtype tr, chtype bl, chtype br) +int +wborder(WINDOW *win, + chtype ls, chtype rs, chtype ts, chtype bs, + chtype tl, chtype tr, chtype bl, chtype br) { -short i; -short endx, endy; + NCURSES_SIZE_T i; + NCURSES_SIZE_T endx, endy; T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"), - win, - _tracechtype2(1,ls), - _tracechtype2(2,rs), - _tracechtype2(3,ts), - _tracechtype2(4,bs), - _tracechtype2(5,tl), - _tracechtype2(6,tr), - _tracechtype2(7,bl), - _tracechtype2(8,br))); - - if (!win) - returnCode(ERR); - - if (ls == 0) ls = ACS_VLINE; - if (rs == 0) rs = ACS_VLINE; - if (ts == 0) ts = ACS_HLINE; - if (bs == 0) bs = ACS_HLINE; - if (tl == 0) tl = ACS_ULCORNER; - if (tr == 0) tr = ACS_URCORNER; - if (bl == 0) bl = ACS_LLCORNER; - if (br == 0) br = ACS_LRCORNER; - - ls = _nc_render(win, ls); - rs = _nc_render(win, rs); - ts = _nc_render(win, ts); - bs = _nc_render(win, bs); - tl = _nc_render(win, tl); - tr = _nc_render(win, tr); - bl = _nc_render(win, bl); - br = _nc_render(win, br); - - T(("using %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx", ls, rs, ts, bs, tl, tr, bl, br)); - - endx = win->_maxx; - endy = win->_maxy; - - for (i = 0; i <= endx; i++) { - win->_line[0].text[i] = ts; - win->_line[endy].text[i] = bs; - } - win->_line[endy].firstchar = win->_line[0].firstchar = 0; - win->_line[endy].lastchar = win->_line[0].lastchar = endx; - - for (i = 0; i <= endy; i++) { - win->_line[i].text[0] = ls; - win->_line[i].text[endx] = rs; - win->_line[i].firstchar = 0; - win->_line[i].lastchar = endx; - } - win->_line[0].text[0] = tl; - win->_line[0].text[endx] = tr; - win->_line[endy].text[0] = bl; - win->_line[endy].text[endx] = br; - - _nc_synchook(win); - returnCode(OK); + win, + _tracechtype2(1, ls), + _tracechtype2(2, rs), + _tracechtype2(3, ts), + _tracechtype2(4, bs), + _tracechtype2(5, tl), + _tracechtype2(6, tr), + _tracechtype2(7, bl), + _tracechtype2(8, br))); + + if (!win) + returnCode(ERR); + + if (ls == 0) + ls = ACS_VLINE; + if (rs == 0) + rs = ACS_VLINE; + if (ts == 0) + ts = ACS_HLINE; + if (bs == 0) + bs = ACS_HLINE; + if (tl == 0) + tl = ACS_ULCORNER; + if (tr == 0) + tr = ACS_URCORNER; + if (bl == 0) + bl = ACS_LLCORNER; + if (br == 0) + br = ACS_LRCORNER; + + ls = _nc_render(win, ls); + rs = _nc_render(win, rs); + ts = _nc_render(win, ts); + bs = _nc_render(win, bs); + tl = _nc_render(win, tl); + tr = _nc_render(win, tr); + bl = _nc_render(win, bl); + br = _nc_render(win, br); + + T(("using %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx", + ls, rs, ts, bs, tl, tr, bl, br)); + + endx = win->_maxx; + endy = win->_maxy; + + for (i = 0; i <= endx; i++) { + win->_line[0].text[i] = ts; + win->_line[endy].text[i] = bs; + } + win->_line[endy].firstchar = win->_line[0].firstchar = 0; + win->_line[endy].lastchar = win->_line[0].lastchar = endx; + + for (i = 0; i <= endy; i++) { + win->_line[i].text[0] = ls; + win->_line[i].text[endx] = rs; + win->_line[i].firstchar = 0; + win->_line[i].lastchar = endx; + } + win->_line[0].text[0] = tl; + win->_line[0].text[endx] = tr; + win->_line[endy].text[0] = bl; + win->_line[endy].text[endx] = br; + + _nc_synchook(win); + returnCode(OK); } diff --git a/ncurses/base/lib_clrbot.c b/ncurses/base/lib_clrbot.c index cec34161..d1e243f3 100644 --- a/ncurses/base/lib_clrbot.c +++ b/ncurses/base/lib_clrbot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,36 +40,37 @@ #include -MODULE_ID("$Id: lib_clrbot.c,v 1.14 1998/06/28 00:36:26 tom Exp $") +MODULE_ID("$Id: lib_clrbot.c,v 1.15 2000/04/29 21:15:26 tom Exp $") -int wclrtobot(WINDOW *win) +int +wclrtobot(WINDOW *win) { -int code = ERR; + int code = ERR; - T((T_CALLED("wclrtobot(%p)"), win)); + T((T_CALLED("wclrtobot(%p)"), win)); - if (win) { - short y; - short startx = win->_curx; - chtype blank = _nc_background(win); + if (win) { + NCURSES_SIZE_T y; + NCURSES_SIZE_T startx = win->_curx; + chtype blank = _nc_background(win); - T(("clearing from y = %d to y = %d with maxx = %d", win->_cury, win->_maxy, win->_maxx)); + T(("clearing from y = %d to y = %d with maxx = %d", + win->_cury, win->_maxy, win->_maxx)); - for (y = win->_cury; y <= win->_maxy; y++) { - struct ldat *line = &(win->_line[y]); - chtype *ptr = &(line->text[startx]); - chtype *end = &(line->text[win->_maxx]); + for (y = win->_cury; y <= win->_maxy; y++) { + struct ldat *line = &(win->_line[y]); + chtype *ptr = &(line->text[startx]); + chtype *end = &(line->text[win->_maxx]); - CHANGED_TO_EOL(line, startx, win->_maxx); + CHANGED_TO_EOL(line, startx, win->_maxx); - while (ptr <= end) - *ptr++ = blank; + while (ptr <= end) + *ptr++ = blank; - startx = 0; - } - _nc_synchook(win); - code = OK; + startx = 0; } - returnCode(code); + _nc_synchook(win); + code = OK; + } + returnCode(code); } - diff --git a/ncurses/base/lib_clreol.c b/ncurses/base/lib_clreol.c index 0c752227..a5d067cb 100644 --- a/ncurses/base/lib_clreol.c +++ b/ncurses/base/lib_clreol.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* ** lib_clreol.c ** @@ -41,51 +40,52 @@ #include -MODULE_ID("$Id: lib_clreol.c,v 1.15 1998/06/28 00:32:20 tom Exp $") +MODULE_ID("$Id: lib_clreol.c,v 1.16 2000/04/29 21:14:54 tom Exp $") -int wclrtoeol(WINDOW *win) +int +wclrtoeol(WINDOW *win) { -int code = ERR; + int code = ERR; - T((T_CALLED("wclrtoeol(%p)"), win)); + T((T_CALLED("wclrtoeol(%p)"), win)); - if (win) { - chtype blank; - chtype *ptr, *end; - struct ldat *line; - short y = win->_cury; - short x = win->_curx; + if (win) { + chtype blank; + chtype *ptr, *end; + struct ldat *line; + NCURSES_SIZE_T y = win->_cury; + NCURSES_SIZE_T x = win->_curx; - /* - * If we have just wrapped the cursor, the clear applies to the - * new line, unless we are at the lower right corner. - */ - if (win->_flags & _WRAPPED - && y < win->_maxy) { - win->_flags &= ~_WRAPPED; - } + /* + * If we have just wrapped the cursor, the clear applies to the + * new line, unless we are at the lower right corner. + */ + if (win->_flags & _WRAPPED + && y < win->_maxy) { + win->_flags &= ~_WRAPPED; + } - /* - * There's no point in clearing if we're not on a legal - * position, either. - */ - if (win->_flags & _WRAPPED - || y > win->_maxy - || x > win->_maxx) - returnCode(ERR); + /* + * There's no point in clearing if we're not on a legal + * position, either. + */ + if (win->_flags & _WRAPPED + || y > win->_maxy + || x > win->_maxx) + returnCode(ERR); - blank = _nc_background(win); - line = &win->_line[y]; - CHANGED_TO_EOL(line, x, win->_maxx); + blank = _nc_background(win); + line = &win->_line[y]; + CHANGED_TO_EOL(line, x, win->_maxx); - ptr = &(line->text[x]); - end = &(line->text[win->_maxx]); + ptr = &(line->text[x]); + end = &(line->text[win->_maxx]); - while (ptr <= end) - *ptr++ = blank; + while (ptr <= end) + *ptr++ = blank; - _nc_synchook(win); - code = OK; - } - returnCode(code); + _nc_synchook(win); + code = OK; + } + returnCode(code); } diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 297a14c3..71bee424 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,22 +34,22 @@ /* lib_color.c * * Handles color emulation of SYS V curses - * */ #include #include +#include -MODULE_ID("$Id: lib_color.c,v 1.36 1999/10/03 00:20:37 Philippe.Blain Exp $") +MODULE_ID("$Id: lib_color.c,v 1.51 2000/05/20 20:09:22 tom Exp $") /* * These should be screen structure members. They need to be globals for - * hystorical reasons. So we assign them in start_color() and also in + * historical reasons. So we assign them in start_color() and also in * set_term()'s screen-switching logic. */ -int COLOR_PAIRS; -int COLORS; +int COLOR_PAIRS = 0; +int COLORS = 0; /* * Given a RGB range of 0..1000, we'll normally set the individual values @@ -57,141 +57,179 @@ int COLORS; */ #define RGB_ON 680 #define RGB_OFF 0 - +/* *INDENT-OFF* */ static const color_t cga_palette[] = { - /* R G B */ - {RGB_OFF, RGB_OFF, RGB_OFF}, /* COLOR_BLACK */ - {RGB_ON, RGB_OFF, RGB_OFF}, /* COLOR_RED */ - {RGB_OFF, RGB_ON, RGB_OFF}, /* COLOR_GREEN */ - {RGB_ON, RGB_ON, RGB_OFF}, /* COLOR_YELLOW */ - {RGB_OFF, RGB_OFF, RGB_ON}, /* COLOR_BLUE */ - {RGB_ON, RGB_OFF, RGB_ON}, /* COLOR_MAGENTA */ - {RGB_OFF, RGB_ON, RGB_ON}, /* COLOR_CYAN */ - {RGB_ON, RGB_ON, RGB_ON}, /* COLOR_WHITE */ + /* R G B */ + {RGB_OFF, RGB_OFF, RGB_OFF}, /* COLOR_BLACK */ + {RGB_ON, RGB_OFF, RGB_OFF}, /* COLOR_RED */ + {RGB_OFF, RGB_ON, RGB_OFF}, /* COLOR_GREEN */ + {RGB_ON, RGB_ON, RGB_OFF}, /* COLOR_YELLOW */ + {RGB_OFF, RGB_OFF, RGB_ON}, /* COLOR_BLUE */ + {RGB_ON, RGB_OFF, RGB_ON}, /* COLOR_MAGENTA */ + {RGB_OFF, RGB_ON, RGB_ON}, /* COLOR_CYAN */ + {RGB_ON, RGB_ON, RGB_ON}, /* COLOR_WHITE */ }; + static const color_t hls_palette[] = { - /* H L S */ - {0, 0, 0}, /* COLOR_BLACK */ - {120, 50, 100}, /* COLOR_RED */ - {240, 50, 100}, /* COLOR_GREEN */ - {180, 50, 100}, /* COLOR_YELLOW */ - {330, 50, 100}, /* COLOR_BLUE */ - {60, 50, 100}, /* COLOR_MAGENTA */ - {300, 50, 100}, /* COLOR_CYAN */ - {0, 50, 100}, /* COLOR_WHITE */ + /* H L S */ + { 0, 0, 0}, /* COLOR_BLACK */ + { 120, 50, 100}, /* COLOR_RED */ + { 240, 50, 100}, /* COLOR_GREEN */ + { 180, 50, 100}, /* COLOR_YELLOW */ + { 330, 50, 100}, /* COLOR_BLUE */ + { 60, 50, 100}, /* COLOR_MAGENTA */ + { 300, 50, 100}, /* COLOR_CYAN */ + { 0, 50, 100}, /* COLOR_WHITE */ }; +/* *INDENT-ON* */ + +#ifdef NCURSES_EXT_FUNCS +/* + * These are called from _nc_do_color(), which in turn is called from + * vidattr - so we have to assume that SP may be null. + */ +static int +default_fg(void) +{ + return (SP != 0) ? SP->_default_fg : COLOR_WHITE; +} + +static int +default_bg(void) +{ + return SP != 0 ? SP->_default_bg : COLOR_BLACK; +} +#else +#define default_fg() COLOR_WHITE +#define default_bg() COLOR_BLACK +#endif /* * SVr4 curses is known to interchange color codes (1,4) and (3,6), possibly * to maintain compatibility with a pre-ANSI scheme. The same scheme is * also used in the FreeBSD syscons. */ -static int toggled_colors(int c) +static int +toggled_colors(int c) { if (c < 16) { static const int table[] = - { 0, 4, 2, 6, 1, 5, 3, 7, - 8, 12, 10, 14, 9, 13, 11, 15}; + {0, 4, 2, 6, 1, 5, 3, 7, + 8, 12, 10, 14, 9, 13, 11, 15}; c = table[c]; } return c; } -static void set_background_color(int bg, int (*outc)(int)) +static void +set_background_color(int bg, int (*outc) (int)) { - if (set_a_background) - { - TPUTS_TRACE("set_a_background"); - tputs(tparm(set_a_background, bg), 1, outc); - } - else - { - TPUTS_TRACE("set_background"); - tputs(tparm(set_background, toggled_colors(bg)), 1, outc); - } + if (set_a_background) { + TPUTS_TRACE("set_a_background"); + tputs(tparm(set_a_background, bg), 1, outc); + } else { + TPUTS_TRACE("set_background"); + tputs(tparm(set_background, toggled_colors(bg)), 1, outc); + } } -static void set_foreground_color(int fg, int (*outc)(int)) +static void +set_foreground_color(int fg, int (*outc) (int)) { - if (set_a_foreground) - { - TPUTS_TRACE("set_a_foreground"); - tputs(tparm(set_a_foreground, fg), 1, outc); - } - else - { - TPUTS_TRACE("set_foreground"); - tputs(tparm(set_foreground, toggled_colors(fg)), 1, outc); - } + if (set_a_foreground) { + TPUTS_TRACE("set_a_foreground"); + tputs(tparm(set_a_foreground, fg), 1, outc); + } else { + TPUTS_TRACE("set_foreground"); + tputs(tparm(set_foreground, toggled_colors(fg)), 1, outc); + } } -static bool set_original_colors(void) +static bool +set_original_colors(void) { - if (orig_pair != 0) { - TPUTS_TRACE("orig_pair"); - putp(orig_pair); - return TRUE; - } - else if (orig_colors != NULL) - { - TPUTS_TRACE("orig_colors"); - putp(orig_colors); - return TRUE; - } - return FALSE; + if (orig_pair != 0) { + TPUTS_TRACE("orig_pair"); + putp(orig_pair); + return TRUE; + } else if (orig_colors != NULL) { + TPUTS_TRACE("orig_colors"); + putp(orig_colors); + return TRUE; + } + return FALSE; } -int start_color(void) +int +start_color(void) { - T((T_CALLED("start_color()"))); + int n; + const color_t *tp; + + T((T_CALLED("start_color()"))); - if (set_original_colors() != TRUE) - { - set_foreground_color(COLOR_WHITE, _nc_outch); - set_background_color(COLOR_BLACK, _nc_outch); + if (set_original_colors() != TRUE) { + set_foreground_color(default_fg(), _nc_outch); + set_background_color(default_bg(), _nc_outch); + } + + if (VALID_NUMERIC(max_pairs)) + COLOR_PAIRS = SP->_pair_count = max_pairs; + else + returnCode(ERR); + if ((SP->_color_pairs = typeCalloc(unsigned short, max_pairs)) == 0) + returnCode(ERR); + SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg()); + if (VALID_NUMERIC(max_colors)) + COLORS = SP->_color_count = max_colors; + else + returnCode(ERR); + SP->_coloron = 1; + + if ((SP->_color_table = typeMalloc(color_t, COLORS)) == 0) + returnCode(ERR); + tp = (hue_lightness_saturation) ? hls_palette : cga_palette; + for (n = 0; n < COLORS; n++) { + if (n < 8) { + SP->_color_table[n] = tp[n]; + } else { + SP->_color_table[n] = tp[n % 8]; + if (hue_lightness_saturation) { + SP->_color_table[n].green = 100; + } else { + if (SP->_color_table[n].red) + SP->_color_table[n].red = 1000; + if (SP->_color_table[n].green) + SP->_color_table[n].green = 1000; + if (SP->_color_table[n].blue) + SP->_color_table[n].blue = 1000; + } } + } - if (max_pairs != -1) - COLOR_PAIRS = SP->_pair_count = max_pairs; - else - returnCode(ERR); - if ((SP->_color_pairs = typeCalloc(unsigned short, max_pairs)) == 0) - returnCode(ERR); - SP->_color_pairs[0] = PAIR_OF(COLOR_WHITE, COLOR_BLACK); - if (max_colors != -1) - COLORS = SP->_color_count = max_colors; - else - returnCode(ERR); - SP->_coloron = 1; - - if ((SP->_color_table = typeMalloc(color_t, COLORS)) == 0) - returnCode(ERR); - if (hue_lightness_saturation) - memcpy(SP->_color_table, hls_palette, sizeof(color_t) * COLORS); - else - memcpy(SP->_color_table, cga_palette, sizeof(color_t) * COLORS); - - T(("started color: COLORS = %d, COLOR_PAIRS = %d", COLORS, COLOR_PAIRS)); - - returnCode(OK); + T(("started color: COLORS = %d, COLOR_PAIRS = %d", COLORS, COLOR_PAIRS)); + + returnCode(OK); } /* This function was originally written by Daniel Weaver */ -static void rgb2hls(short r, short g, short b, short *h, short *l, short *s) +static void +rgb2hls(short r, short g, short b, short *h, short *l, short *s) /* convert RGB to HLS system */ { short min, max, t; - if ((min = g < r ? g : r) > b) min = b; - if ((max = g > r ? g : r) < b) max = b; + if ((min = g < r ? g : r) > b) + min = b; + if ((max = g > r ? g : r) < b) + max = b; /* calculate lightness */ *l = (min + max) / 20; - if (min == max) /* black, white and all shades of gray */ - { + if (min == max) { /* black, white and all shades of gray */ *h = 0; *s = 0; return; @@ -200,16 +238,16 @@ static void rgb2hls(short r, short g, short b, short *h, short *l, short *s) /* calculate saturation */ if (*l < 50) *s = ((max - min) * 100) / (max + min); - else *s = ((max - min) * 100) / (2000 - max - min); + else + *s = ((max - min) * 100) / (2000 - max - min); /* calculate hue */ if (r == max) t = 120 + ((g - b) * 60) / (max - min); + else if (g == max) + t = 240 + ((b - r) * 60) / (max - min); else - if (g == max) - t = 240 + ((b - r) * 60) / (max - min); - else - t = 360 + ((r - g) * 60) / (max - min); + t = 360 + ((r - g) * 60) / (max - min); *h = t % 360; } @@ -218,212 +256,227 @@ static void rgb2hls(short r, short g, short b, short *h, short *l, short *s) * Extension (1997/1/18) - Allow negative f/b values to set default color * values. */ -int init_pair(short pair, short f, short b) +int +init_pair(short pair, short f, short b) { - unsigned result; - - T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b)); - - if ((pair < 1) || (pair >= COLOR_PAIRS)) - returnCode(ERR); - if (SP->_default_color) - { - if (f < 0) - f = C_MASK; - if (b < 0) - b = C_MASK; - if (f >= COLORS && f != C_MASK) - returnCode(ERR); - if (b >= COLORS && b != C_MASK) - returnCode(ERR); - } - else + unsigned result; + + T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b)); + + if ((pair < 0) || (pair >= COLOR_PAIRS)) + returnCode(ERR); +#ifdef NCURSES_EXT_FUNCS + if (SP->_default_color) { + if (f < 0) + f = C_MASK; + if (b < 0) + b = C_MASK; + if (f >= COLORS && f != C_MASK) + returnCode(ERR); + if (b >= COLORS && b != C_MASK) + returnCode(ERR); + } else +#endif + { if ((f < 0) || (f >= COLORS) - || (b < 0) || (b >= COLORS)) - returnCode(ERR); - - /* - * When a pair's content is changed, replace its colors (if pair was - * initialized before a screen update is performed replacing original - * pair colors with the new ones). - */ - result = PAIR_OF(f,b); - if (SP->_color_pairs[pair] != 0 - && SP->_color_pairs[pair] != result) { - int y, x; - attr_t z = COLOR_PAIR(pair); - - for (y = 0; y <= curscr->_maxy; y++) { - struct ldat *ptr = &(curscr->_line[y]); - bool changed = FALSE; - for (x = 0; x <= curscr->_maxx; x++) { - if ((ptr->text[x] & A_COLOR) == z) { - /* Set the old cell to zero to ensure it will be - updated on the next doupdate() */ - ptr->text[x] = 0; - CHANGED_CELL(ptr,x); - changed = TRUE; - } + || (b < 0) || (b >= COLORS) + || (pair < 1)) + returnCode(ERR); + } + + /* + * When a pair's content is changed, replace its colors (if pair was + * initialized before a screen update is performed replacing original + * pair colors with the new ones). + */ + result = PAIR_OF(f, b); + if (SP->_color_pairs[pair] != 0 + && SP->_color_pairs[pair] != result) { + int y, x; + attr_t z = COLOR_PAIR(pair); + + for (y = 0; y <= curscr->_maxy; y++) { + struct ldat *ptr = &(curscr->_line[y]); + bool changed = FALSE; + for (x = 0; x <= curscr->_maxx; x++) { + if ((ptr->text[x] & A_COLOR) == z) { + /* Set the old cell to zero to ensure it will be + updated on the next doupdate() */ + ptr->text[x] = 0; + CHANGED_CELL(ptr, x); + changed = TRUE; } - if (changed) - _nc_make_oldhash(y); } + if (changed) + _nc_make_oldhash(y); } - SP->_color_pairs[pair] = result; - - if (initialize_pair) - { - const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette; - - T(("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)", - pair, - tp[f].red, tp[f].green, tp[f].blue, - tp[b].red, tp[b].green, tp[b].blue)); - - if (initialize_pair) - { - TPUTS_TRACE("initialize_pair"); - putp(tparm(initialize_pair, - pair, - tp[f].red, tp[f].green, tp[f].blue, - tp[b].red, tp[b].green, tp[b].blue)); - } + } + SP->_color_pairs[pair] = result; + if ((int) (SP->_current_attr & A_COLOR) == COLOR_PAIR(pair)) + SP->_current_attr |= A_COLOR; /* force attribute update */ + + if (initialize_pair) { + const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette; + + T(("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)", + pair, + tp[f].red, tp[f].green, tp[f].blue, + tp[b].red, tp[b].green, tp[b].blue)); + + if (initialize_pair) { + TPUTS_TRACE("initialize_pair"); + putp(tparm(initialize_pair, + pair, + tp[f].red, tp[f].green, tp[f].blue, + tp[b].red, tp[b].green, tp[b].blue)); } + } - returnCode(OK); + returnCode(OK); } -int init_color(short color, short r, short g, short b) +int +init_color(short color, short r, short g, short b) { - T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b)); - - if (initialize_color == NULL) - returnCode(ERR); - - if (color < 0 || color >= COLORS) - returnCode(ERR); - if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000) - returnCode(ERR); - - if (hue_lightness_saturation) - rgb2hls(r, g, b, - &SP->_color_table[color].red, - &SP->_color_table[color].green, - &SP->_color_table[color].blue); - else - { - SP->_color_table[color].red = r; - SP->_color_table[color].green = g; - SP->_color_table[color].blue = b; - } + T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b)); - if (initialize_color) - { - TPUTS_TRACE("initialize_color"); - putp(tparm(initialize_color, color, r, g, b)); - } - returnCode(OK); + if (initialize_color == NULL) + returnCode(ERR); + + if (color < 0 || color >= COLORS) + returnCode(ERR); + if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000) + returnCode(ERR); + + if (hue_lightness_saturation) + rgb2hls(r, g, b, + &SP->_color_table[color].red, + &SP->_color_table[color].green, + &SP->_color_table[color].blue); + else { + SP->_color_table[color].red = r; + SP->_color_table[color].green = g; + SP->_color_table[color].blue = b; + } + + if (initialize_color) { + TPUTS_TRACE("initialize_color"); + putp(tparm(initialize_color, color, r, g, b)); + } + returnCode(OK); } -bool can_change_color(void) +bool +can_change_color(void) { - T((T_CALLED("can_change_color()"))); - returnCode ((can_change != 0) ? TRUE : FALSE); + T((T_CALLED("can_change_color()"))); + returnCode((can_change != 0) ? TRUE : FALSE); } -bool has_colors(void) +bool +has_colors(void) { - T((T_CALLED("has_colors()"))); - returnCode (((max_colors != -1) && (max_pairs != -1) - && (((set_foreground != NULL) - && (set_background != NULL)) - || ((set_a_foreground != NULL) - && (set_a_background != NULL)) - || set_color_pair)) ? TRUE : FALSE); + T((T_CALLED("has_colors()"))); + returnCode((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)) ? TRUE : FALSE); } -int color_content(short color, short *r, short *g, short *b) +int +color_content(short color, short *r, short *g, short *b) { T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b)); if (color < 0 || color >= COLORS) returnCode(ERR); - if (r) *r = SP->_color_table[color].red; - if (g) *g = SP->_color_table[color].green; - if (b) *b = SP->_color_table[color].blue; + if (r) + *r = SP->_color_table[color].red; + if (g) + *g = SP->_color_table[color].green; + if (b) + *b = SP->_color_table[color].blue; returnCode(OK); } -int pair_content(short pair, short *f, short *b) +int +pair_content(short pair, short *f, short *b) { - T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b)); + T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b)); - if ((pair < 0) || (pair >= COLOR_PAIRS)) - returnCode(ERR); - if (f) *f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK); - if (b) *b = (SP->_color_pairs[pair] & C_MASK); + if ((pair < 0) || (pair >= COLOR_PAIRS)) + returnCode(ERR); + if (f) + *f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK); + if (b) + *b = (SP->_color_pairs[pair] & C_MASK); - returnCode(OK); + returnCode(OK); } -void _nc_do_color(int pair, bool reverse, int (*outc)(int)) +void +_nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int)) { - short fg, bg; + NCURSES_COLOR_T fg = C_MASK, bg = C_MASK; + NCURSES_COLOR_T old_fg, old_bg; - if (pair == 0) - { - if (orig_pair) - { - TPUTS_TRACE("orig_pair"); - tputs(orig_pair, 1, outc); - } - else if (set_color_pair) - { + if (pair < 0 || pair >= COLOR_PAIRS) { + return; + } else if (pair != 0) { + if (set_color_pair) { TPUTS_TRACE("set_color_pair"); tputs(tparm(set_color_pair, pair), 1, outc); - } - else - { - set_foreground_color(COLOR_WHITE, outc); - set_background_color(COLOR_BLACK, outc); + return; + } else if (SP != 0) { + pair_content(pair, &fg, &bg); } } - else - { - if (set_color_pair) - { - TPUTS_TRACE("set_color_pair"); - tputs(tparm(set_color_pair, pair), 1, outc); + + if (old_pair >= 0 && SP != 0) { + pair_content(old_pair, &old_fg, &old_bg); + if ((fg == C_MASK && old_fg != C_MASK) + || (bg == C_MASK && old_bg != C_MASK)) { +#ifdef NCURSES_EXT_FUNCS + /* + * A minor optimization - but extension. If "AX" is specified in + * the terminal description, treat it as screen's indicator of ECMA + * SGR 39 and SGR 49, and assume the two sequences are independent. + */ + if (SP->_has_sgr_39_49 && old_bg == C_MASK && old_fg != C_MASK) { + tputs("\033[39m", 1, outc); + } else if (SP->_has_sgr_39_49 && old_fg == C_MASK && old_bg != C_MASK) { + tputs("\033[49m", 1, outc); + } else +#endif + set_original_colors(); } - else - { - pair_content(pair, &fg, &bg); - if (reverse) { - short xx = fg; - fg = bg; - bg = xx; - } + } else { + set_original_colors(); + if (old_pair < 0) + return; + } - T(("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg)); +#ifdef NCURSES_EXT_FUNCS + if (fg == C_MASK) + fg = default_fg(); + if (bg == C_MASK) + bg = default_bg(); +#endif + + if (reverse) { + NCURSES_COLOR_T xx = fg; + fg = bg; + bg = xx; + } - if (fg == C_MASK || bg == C_MASK) - { - if (set_original_colors() != TRUE) - { - if (fg == C_MASK) - set_foreground_color(COLOR_WHITE, outc); - if (bg == C_MASK) - set_background_color(COLOR_BLACK, outc); - } - } - if (fg != C_MASK) - { - set_foreground_color(fg, outc); - } - if (bg != C_MASK) - { - set_background_color(bg, outc); - } - } + T(("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg)); + + if (fg != C_MASK) { + set_foreground_color(fg, outc); + } + if (bg != C_MASK) { + set_background_color(bg, outc); } } diff --git a/ncurses/base/lib_dft_fgbg.c b/ncurses/base/lib_dft_fgbg.c index a2dfbd21..7c090244 100644 --- a/ncurses/base/lib_dft_fgbg.c +++ b/ncurses/base/lib_dft_fgbg.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,34 +27,45 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1997 * + * Author: Thomas E. Dickey 1997,1999 * ****************************************************************************/ + #include #include -MODULE_ID("$Id: lib_dft_fgbg.c,v 1.3 1998/02/11 12:13:54 tom Exp $") +MODULE_ID("$Id: lib_dft_fgbg.c,v 1.13 2000/07/07 16:50:27 tom Exp $") /* * Modify the behavior of color-pair 0 so that the library doesn't assume that - * it is black on white. This is an extension to XSI curses. - * - * Invoke this function after 'start_color()'. + * it is white on black. This is an extension to XSI curses. */ int use_default_colors(void) { - T((T_CALLED("use_default_colors()"))); + T((T_CALLED("use_default_colors()"))); + returnCode(assume_default_colors(C_MASK, C_MASK)); +} - if (!SP->_coloron) - returnCode(ERR); +/* + * Modify the behavior of color-pair 0 so that the library assumes that it + * is something specific, possibly not white on black. + */ +int +assume_default_colors(int fg, int bg) +{ + T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg)); - if (!orig_pair && !orig_colors) - returnCode(ERR); + if (!orig_pair && !orig_colors) + returnCode(ERR); - if (initialize_pair) /* don't know how to handle this */ - returnCode(ERR); + if (initialize_pair) /* don't know how to handle this */ + returnCode(ERR); - SP->_default_color = TRUE; - SP->_color_pairs[0] = PAIR_OF(C_MASK, C_MASK); - returnCode(OK); + SP->_default_color = (fg < 0 || fg == C_MASK) || (bg < 0 || bg == C_MASK); + SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE); + SP->_default_fg = (fg >= 0) ? (fg & C_MASK) : C_MASK; + SP->_default_bg = (bg >= 0) ? (bg & C_MASK) : C_MASK; + if (SP->_color_pairs != 0) + init_pair(0, fg, bg); + returnCode(OK); } diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c index 324e7a28..28f0e5f9 100644 --- a/ncurses/base/lib_freeall.c +++ b/ncurses/base/lib_freeall.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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,94 +39,101 @@ extern int malloc_errfd; /* FIXME */ #endif -MODULE_ID("$Id: lib_freeall.c,v 1.15 1999/10/22 21:40:10 tom Exp $") +MODULE_ID("$Id: lib_freeall.c,v 1.16 1999/11/28 01:34:11 tom Exp $") -static void free_slk(SLK *p) +static void +free_slk(SLK *p) { - if (p != 0) { - FreeIfNeeded(p->ent); - FreeIfNeeded(p->buffer); - free(p); - } + if (p != 0) { + FreeIfNeeded(p->ent); + FreeIfNeeded(p->buffer); + free(p); + } } -static void free_tries(struct tries *p) +static void +free_tries(struct tries *p) { - struct tries *q; - - while (p != 0) { - q = p->sibling; - if (p->child != 0) - free_tries(p->child); - free(p); - p = q; - } + struct tries *q; + + while (p != 0) { + q = p->sibling; + if (p->child != 0) + free_tries(p->child); + free(p); + p = q; + } } /* * Free all ncurses data. This is used for testing only (there's no practical * use for it as an extension). */ -void _nc_freeall(void) +void +_nc_freeall(void) { - WINDOWLIST *p, *q; + WINDOWLIST *p, *q; #if NO_LEAKS - _nc_free_tparm(); + _nc_free_tparm(); #endif + if (SP != 0) { while (_nc_windows != 0) { - /* Delete only windows that're not a parent */ - for (p = _nc_windows; p != 0; p = p->next) { - bool found = FALSE; - - for (q = _nc_windows; q != 0; q = q->next) { - if ((p != q) - && (q->win->_flags & _SUBWIN) - && (p->win == q->win->_parent)) { - found = TRUE; - break; - } - } - - if (!found) { - delwin(p->win); - break; - } + /* Delete only windows that're not a parent */ + for (p = _nc_windows; p != 0; p = p->next) { + bool found = FALSE; + + for (q = _nc_windows; q != 0; q = q->next) { + if ((p != q) + && (q->win->_flags & _SUBWIN) + && (p->win == q->win->_parent)) { + found = TRUE; + break; + } } + + if (!found) { + delwin(p->win); + break; + } + } } - if (SP != 0) { - free_tries (SP->_keytry); - free_tries (SP->_key_ok); - free_slk(SP->_slk); - FreeIfNeeded(SP->_color_pairs); - FreeIfNeeded(SP->_color_table); + free_tries(SP->_keytry); + free_tries(SP->_key_ok); + free_slk(SP->_slk); + FreeIfNeeded(SP->_color_pairs); + FreeIfNeeded(SP->_color_table); #if !BROKEN_LINKER - FreeAndNull(SP); + FreeAndNull(SP); #endif - } - - if (cur_term != 0) { - _nc_free_termtype(&(cur_term->type)); - free(cur_term); - } + } + if (cur_term != 0) { + _nc_free_termtype(&(cur_term->type)); + free(cur_term); + } #ifdef TRACE - (void) _nc_trace_buf(-1, 0); + (void) _nc_trace_buf(-1, 0); #endif #if HAVE_LIBDBMALLOC - malloc_dump(malloc_errfd); + malloc_dump(malloc_errfd); #elif HAVE_LIBDMALLOC #elif HAVE_PURIFY - purify_all_inuse(); + purify_all_inuse(); #endif } -void _nc_free_and_exit(int code) +void +_nc_free_and_exit(int code) { - _nc_freeall(); - exit(code); + _nc_freeall(); + exit(code); } + #else -void _nc_freeall(void) { } +void +_nc_freeall(void) +{ +} #endif diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index b740885b..c5a5dc3e 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,143 +40,154 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.43 1999/03/08 02:35:10 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.48 2000/07/08 11:21:51 tom Exp $") #include -int ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ +int ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ #ifdef USE_EMX_MOUSE # include static int kbd_mouse_read(unsigned char *p) { -fd_set fdset; -int nums = SP->_ifd+1; - - for (;;) { - FD_ZERO(&fdset); - FD_SET(SP->_checkfd, &fdset); - if (SP->_mouse_fd >= 0) { - FD_SET(SP->_mouse_fd, &fdset); - if (SP->_mouse_fd > SP->_checkfd) - nums = SP->_mouse_fd+1; - } - if (select(nums, &fdset, NULL, NULL, NULL) >= 0) { - int n; - - if (FD_ISSET(SP->_mouse_fd, &fdset)) /* Prefer mouse */ - n = read(SP->_mouse_fd, p, 1); - else - n = read(SP->_ifd, p, 1); - return n; - } - if (errno != EINTR) - return -1; + fd_set fdset; + int nums = SP->_ifd + 1; + + for (;;) { + FD_ZERO(&fdset); + FD_SET(SP->_ifd, &fdset); + if (SP->_checkfd >= 0) { + FD_SET(SP->_checkfd, &fdset); + if (SP->_checkfd >= nums) + nums = SP->_checkfd + 1; } + if (SP->_mouse_fd >= 0) { + FD_SET(SP->_mouse_fd, &fdset); + if (SP->_mouse_fd >= nums) + nums = SP->_mouse_fd + 1; + } + if (select(nums, &fdset, NULL, NULL, NULL) >= 0) { + int n; + + if (SP->_mouse_fd >= 0 + && FD_ISSET(SP->_mouse_fd, &fdset)) { /* Prefer mouse */ + n = read(SP->_mouse_fd, p, 1); + } else { + n = read(SP->_ifd, p, 1); + } + return n; + } + if (errno != EINTR) { + return -1; + } + } } -#endif /* USE_EMX_MOUSE */ +#endif /* USE_EMX_MOUSE */ -static inline int fifo_peek(void) +static inline int +fifo_peek(void) { - int ch = SP->_fifo[peek]; - T(("peeking at %d", peek)); + int ch = SP->_fifo[peek]; + T(("peeking at %d", peek)); - p_inc(); - return ch; + p_inc(); + return ch; } - -static inline int fifo_pull(void) +static inline int +fifo_pull(void) { -int ch; - ch = SP->_fifo[head]; - T(("pulling %d from %d", ch, head)); + int ch; + ch = SP->_fifo[head]; + T(("pulling %d from %d", ch, head)); - if (peek == head) - { - h_inc(); - peek = head; - } - else - h_inc(); + if (peek == head) { + h_inc(); + peek = head; + } else + h_inc(); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) _nc_fifo_dump(); + if (_nc_tracing & TRACE_IEVENT) + _nc_fifo_dump(); #endif - return ch; + return ch; } -static inline int fifo_push(void) +static inline int +fifo_push(void) { -int n; -unsigned int ch; + int n; + unsigned int ch; - if (tail == -1) return ERR; + if (tail == -1) + return ERR; #ifdef HIDE_EINTR -again: - errno = 0; + again: + errno = 0; #endif #if USE_GPM_SUPPORT - if ((SP->_mouse_fd >= 0) - && (_nc_timed_wait(3, -1, (int *)0) & 2)) - { - SP->_mouse_event(SP); - ch = KEY_MOUSE; - n = 1; - } else + if ((SP->_mouse_fd >= 0) + && (_nc_timed_wait(3, -1, (int *) 0) & 2)) { + SP->_mouse_event(SP); + ch = KEY_MOUSE; + n = 1; + } else #endif - { - unsigned char c2=0; + { + unsigned char c2 = 0; #ifdef USE_EMX_MOUSE - n = kbd_mouse_read(&c2); + n = kbd_mouse_read(&c2); #else - n = read(SP->_ifd, &c2, 1); + n = read(SP->_ifd, &c2, 1); #endif - ch = c2 & 0xff; - } + ch = c2 & 0xff; + } #ifdef HIDE_EINTR - /* - * Under System V curses with non-restarting signals, getch() returns - * with value ERR when a handled signal keeps it from completing. - * If signals restart system calls, OTOH, the signal is invisible - * except to its handler. - * - * We don't want this difference to show. This piece of code - * tries to make it look like we always have restarting signals. - */ - if (n <= 0 && errno == EINTR) - goto again; + /* + * Under System V curses with non-restarting signals, getch() returns + * with value ERR when a handled signal keeps it from completing. + * If signals restart system calls, OTOH, the signal is invisible + * except to its handler. + * + * We don't want this difference to show. This piece of code + * tries to make it look like we always have restarting signals. + */ + if (n <= 0 && errno == EINTR) + goto again; #endif - if ((n == -1) || (n == 0)) - { - T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno)); - return ERR; - } - T(("read %d characters", n)); - - SP->_fifo[tail] = ch; - SP->_fifohold = 0; - if (head == -1) - head = peek = tail; - t_inc(); - T(("pushed %#x at %d", ch, tail)); + if ((n == -1) || (n == 0)) { + T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno)); + ch = ERR; + } + T(("read %d characters", n)); + + SP->_fifo[tail] = ch; + SP->_fifohold = 0; + if (head == -1) + head = peek = tail; + t_inc(); + T(("pushed %#x at %d", ch, tail)); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) _nc_fifo_dump(); + if (_nc_tracing & TRACE_IEVENT) + _nc_fifo_dump(); #endif - return ch; + return ch; } -static inline void fifo_clear(void) +static inline void +fifo_clear(void) { -int i; - for (i = 0; i < FIFO_SIZE; i++) - SP->_fifo[i] = 0; - head = -1; tail = peek = 0; + int i; + for (i = 0; i < FIFO_SIZE; i++) + SP->_fifo[i] = 0; + head = -1; + tail = peek = 0; } static int kgetch(WINDOW *); @@ -188,147 +199,158 @@ static int kgetch(WINDOW *); int wgetch(WINDOW *win) { -int ch; + int ch; - T((T_CALLED("wgetch(%p)"), win)); + T((T_CALLED("wgetch(%p)"), win)); - if (!win) - returnCode(ERR); + if (!win) + returnCode(ERR); - if (cooked_key_in_fifo()) - { - if (wgetch_should_refresh(win)) - wrefresh(win); + if (cooked_key_in_fifo()) { + if (wgetch_should_refresh(win)) + wrefresh(win); - ch = fifo_pull(); - T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch));) - returnCode(ch); - } + ch = fifo_pull(); + T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch))); + returnCode(ch); + } - /* - * Handle cooked mode. Grab a string from the screen, - * stuff its contents in the FIFO queue, and pop off - * the first character to return it. - */ - if (head == -1 && !SP->_raw && !SP->_cbreak) - { - char buf[MAXCOLUMNS], *sp; + /* + * Handle cooked mode. Grab a string from the screen, + * stuff its contents in the FIFO queue, and pop off + * the first character to return it. + */ + if (head == -1 && !SP->_raw && !SP->_cbreak) { + char buf[MAXCOLUMNS], *sp; - T(("filling queue in cooked mode")); + T(("filling queue in cooked mode")); - wgetnstr(win, buf, MAXCOLUMNS); + wgetnstr(win, buf, MAXCOLUMNS); - /* ungetch in reverse order */ - ungetch('\n'); - for (sp = buf+strlen(buf); sp>buf; sp--) - ungetch(sp[-1]); + /* ungetch in reverse order */ + ungetch('\n'); + for (sp = buf + strlen(buf); sp > buf; sp--) + ungetch(sp[-1]); - returnCode(fifo_pull()); - } + returnCode(fifo_pull()); + } - if (wgetch_should_refresh(win)) - wrefresh(win); + if (wgetch_should_refresh(win)) + wrefresh(win); - if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1)) - { - int delay; + if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1)) { + int delay; - T(("timed delay in wgetch()")); - if (SP->_cbreak > 1) - delay = (SP->_cbreak - 1) * 100; - else - delay = win->_delay; + T(("timed delay in wgetch()")); + if (SP->_cbreak > 1) + delay = (SP->_cbreak - 1) * 100; + else + delay = win->_delay; - T(("delay is %d milliseconds", delay)); + T(("delay is %d milliseconds", delay)); - if (head == -1) /* fifo is empty */ - if (!_nc_timed_wait(3, delay, (int *)0)) - returnCode(ERR); - /* else go on to read data available */ - } + if (head == -1) /* fifo is empty */ + if (!_nc_timed_wait(3, delay, (int *) 0)) + returnCode(ERR); + /* else go on to read data available */ + } - if (win->_use_keypad) - { - /* - * This is tricky. We only want to get special-key - * events one at a time. But we want to accumulate - * mouse events until either (a) the mouse logic tells - * us it's picked up a complete gesture, or (b) - * there's a detectable time lapse after one. - * - * Note: if the mouse code starts failing to compose - * press/release events into clicks, you should probably - * increase the wait with mouseinterval(). - */ - int runcount = 0; - - do { - ch = kgetch(win); - if (ch == KEY_MOUSE) - { - ++runcount; - if (SP->_mouse_inline(SP)) - break; - } - } while - (ch == KEY_MOUSE - && (_nc_timed_wait(3, SP->_maxclick, (int *)0) - || !SP->_mouse_parse(runcount))); - if (runcount > 0 && ch != KEY_MOUSE) - { - /* mouse event sequence ended by keystroke, push it */ - ungetch(ch); - ch = KEY_MOUSE; - } - } else { - if (head == -1) - fifo_push(); - ch = fifo_pull(); + if (win->_use_keypad) { + /* + * This is tricky. We only want to get special-key + * events one at a time. But we want to accumulate + * mouse events until either (a) the mouse logic tells + * us it's picked up a complete gesture, or (b) + * there's a detectable time lapse after one. + * + * Note: if the mouse code starts failing to compose + * press/release events into clicks, you should probably + * increase the wait with mouseinterval(). + */ + int runcount = 0; + + do { + ch = kgetch(win); + if (ch == KEY_MOUSE) { + ++runcount; + if (SP->_mouse_inline(SP)) + break; + } + } while + (ch == KEY_MOUSE + && (_nc_timed_wait(3, SP->_maxclick, (int *) 0) + || !SP->_mouse_parse(runcount))); + if (runcount > 0 && ch != KEY_MOUSE) { + /* mouse event sequence ended by keystroke, push it */ + ungetch(ch); + ch = KEY_MOUSE; } + } else { + if (head == -1) + fifo_push(); + ch = fifo_pull(); + } - if (ch == ERR) - { + if (ch == ERR) { #if USE_SIZECHANGE - if(SP->_sig_winch) - { - _nc_update_screensize(); - /* resizeterm can push KEY_RESIZE */ - if(cooked_key_in_fifo()) - { - ch = fifo_pull(); - T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch));) - returnCode(ch); - } + if (SP->_sig_winch) { + _nc_update_screensize(); + /* resizeterm can push KEY_RESIZE */ + if (cooked_key_in_fifo()) { + ch = fifo_pull(); + T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch))); + returnCode(ch); } -#endif - T(("wgetch returning ERR")); - returnCode(ERR); } - - /* - * Simulate ICRNL mode - */ - if ((ch == '\r') && SP->_nl) - ch = '\n'; - - /* Strip 8th-bit if so desired. We do this only for characters that - * are in the range 128-255, to provide compatibility with terminals - * that display only 7-bit characters. Note that 'ch' may be a - * function key at this point, so we mustn't strip _those_. - */ - if ((ch < KEY_MIN) && (ch & 0x80)) - if (!SP->_use_meta) - ch &= 0x7f; - - if (SP->_echo && ch < KEY_MIN && !(win->_flags & _ISPAD)) - wechochar(win, (chtype)ch); - - T(("wgetch returning : %#x = %s", ch, _trace_key(ch))); - - returnCode(ch); +#endif + T(("wgetch returning ERR")); + returnCode(ERR); + } + + /* + * If echo() is in effect, display the printable version of the + * key on the screen. Carriage return and backspace are treated + * specially by Solaris curses: + * + * If carriage return is defined as a function key in the + * terminfo, e.g., kent, then Solaris may return either ^J (or ^M + * if nonl() is set) or KEY_ENTER depending on the echo() mode. + * We echo before translating carriage return based on nonl(), + * since the visual result simply moves the cursor to column 0. + * + * Backspace is a different matter. Solaris curses does not + * translate it to KEY_BACKSPACE if kbs=^H. This does not depend + * on the stty modes, but appears to be a hardcoded special case. + * This is a difference from ncurses, which uses the terminfo entry. + * However, we provide the same visual result as Solaris, moving the + * cursor to the left. + */ + if (SP->_echo && !(win->_flags & _ISPAD)) { + chtype backup = (ch == KEY_BACKSPACE) ? '\b' : ch; + if (backup < KEY_MIN) + wechochar(win, backup); + } + + /* + * Simulate ICRNL mode + */ + if ((ch == '\r') && SP->_nl) + ch = '\n'; + + /* Strip 8th-bit if so desired. We do this only for characters that + * are in the range 128-255, to provide compatibility with terminals + * that display only 7-bit characters. Note that 'ch' may be a + * function key at this point, so we mustn't strip _those_. + */ + if ((ch < KEY_MIN) && (ch & 0x80)) + if (!SP->_use_meta) + ch &= 0x7f; + + T(("wgetch returning : %#x = %s", ch, _trace_key(ch))); + + returnCode(ch); } - /* ** int ** kgetch() @@ -347,68 +369,63 @@ int ch; static int kgetch(WINDOW *win GCC_UNUSED) { -struct tries *ptr; -int ch = 0; -int timeleft = ESCDELAY; - - TR(TRACE_IEVENT, ("kgetch(%p) called", win)); - - ptr = SP->_keytry; - - for(;;) - { - if (!raw_key_in_fifo()) - { - if(fifo_push() == ERR) - { - peek = head; /* the keys stay uninterpreted */ - return ERR; - } - } - ch = fifo_peek(); - if (ch >= KEY_MIN) - { - peek = head; - /* assume the key is the last in fifo */ - t_dec(); /* remove the key */ - return ch; - } - - TR(TRACE_IEVENT, ("ch: %s", _trace_key((unsigned char)ch))); - while ((ptr != NULL) && (ptr->ch != (unsigned char)ch)) - ptr = ptr->sibling; + struct tries *ptr; + int ch = 0; + int timeleft = ESCDELAY; + + TR(TRACE_IEVENT, ("kgetch(%p) called", win)); + + ptr = SP->_keytry; + + for (;;) { + if (!raw_key_in_fifo()) { + if (fifo_push() == ERR) { + peek = head; /* the keys stay uninterpreted */ + return ERR; + } + } + ch = fifo_peek(); + if (ch >= KEY_MIN) { + peek = head; + /* assume the key is the last in fifo */ + t_dec(); /* remove the key */ + return ch; + } + + TR(TRACE_IEVENT, ("ch: %s", _trace_key((unsigned char) ch))); + while ((ptr != NULL) && (ptr->ch != (unsigned char) ch)) + ptr = ptr->sibling; #ifdef TRACE - if (ptr == NULL) - {TR(TRACE_IEVENT, ("ptr is null"));} - else - TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d", - ptr, ptr->ch, ptr->value)); + if (ptr == NULL) { + TR(TRACE_IEVENT, ("ptr is null")); + } else + TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d", + ptr, ptr->ch, ptr->value)); #endif /* TRACE */ - if (ptr == NULL) - break; - - if (ptr->value != 0) { /* sequence terminated */ - TR(TRACE_IEVENT, ("end of sequence")); - if (peek == tail) - fifo_clear(); - else - head = peek; - return(ptr->value); - } - - ptr = ptr->child; - - if (!raw_key_in_fifo()) - { - TR(TRACE_IEVENT, ("waiting for rest of sequence")); - if (!_nc_timed_wait(3, timeleft, &timeleft)) { - TR(TRACE_IEVENT, ("ran out of time")); - break; - } - } + if (ptr == NULL) + break; + + if (ptr->value != 0) { /* sequence terminated */ + TR(TRACE_IEVENT, ("end of sequence")); + if (peek == tail) + fifo_clear(); + else + head = peek; + return (ptr->value); } - ch = fifo_pull(); - peek = head; - return ch; + + ptr = ptr->child; + + if (!raw_key_in_fifo()) { + TR(TRACE_IEVENT, ("waiting for rest of sequence")); + if (!_nc_timed_wait(3, timeleft, &timeleft)) { + TR(TRACE_IEVENT, ("ran out of time")); + break; + } + } + } + ch = fifo_pull(); + peek = head; + return ch; } diff --git a/ncurses/base/lib_hline.c b/ncurses/base/lib_hline.c index 3b0a602e..fd32d35a 100644 --- a/ncurses/base/lib_hline.c +++ b/ncurses/base/lib_hline.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_hline.c ** @@ -42,35 +40,38 @@ #include -MODULE_ID("$Id: lib_hline.c,v 1.4 1998/06/28 00:11:01 tom Exp $") +MODULE_ID("$Id: lib_hline.c,v 1.6 2000/07/04 14:08:09 Philippe.Blain Exp $") -int whline(WINDOW *win, chtype ch, int n) +int +whline(WINDOW *win, chtype ch, int n) { -int code = ERR; -short start; -short end; + int code = ERR; + NCURSES_SIZE_T start; + NCURSES_SIZE_T end; - T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n)); + T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n)); - if (win) { - struct ldat *line = &(win->_line[win->_cury]); + if (win) { + struct ldat *line = &(win->_line[win->_cury]); - start = win->_curx; - end = start + n - 1; - if (end > win->_maxx) - end = win->_maxx; + start = win->_curx; + end = start + n - 1; + if (end > win->_maxx) + end = win->_maxx; - CHANGED_RANGE(line, start, end); + CHANGED_RANGE(line, start, end); - if (ch == 0) - ch = ACS_HLINE; - ch = _nc_render(win, ch); + if (ch == 0) + ch = ACS_HLINE; + ch = _nc_render(win, ch); - while ( end >= start) { - line->text[end] = ch; - end--; - } - code = OK; + while (end >= start) { + line->text[end] = ch; + end--; } - returnCode(code); + + _nc_synchook(win); + code = OK; + } + returnCode(code); } diff --git a/ncurses/base/lib_insstr.c b/ncurses/base/lib_insstr.c index cba14731..a2275f94 100644 --- a/ncurses/base/lib_insstr.c +++ b/ncurses/base/lib_insstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_insstr.c ** @@ -43,39 +41,41 @@ #include #include -MODULE_ID("$Id: lib_insstr.c,v 1.13 1999/03/14 00:27:21 tom Exp $") +MODULE_ID("$Id: lib_insstr.c,v 1.14 2000/04/29 21:16:41 tom Exp $") -int winsnstr(WINDOW *win, const char *s, int n) +int +winsnstr(WINDOW *win, const char *s, int n) { -int code = ERR; -short oy; -short ox ; -const unsigned char *str = (const unsigned char *)s; -const unsigned char *cp; + 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("winsnstr(%p,%s,%d)"), win, _nc_visbuf(s), n)); + T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbuf(s), n)); - if (win && str) { - oy = win->_cury; ox = win->_curx; - for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) { + 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') - _nc_waddch_nosync(win, (chtype)(*cp)); + _nc_waddch_nosync(win, (chtype) (*cp)); else if (is7bits(*cp) && iscntrl(*cp)) { - winsch(win, ' ' + (chtype)(*cp)); - winsch(win, '^'); - win->_curx += 2; + winsch(win, ' ' + (chtype) (*cp)); + winsch(win, '^'); + win->_curx += 2; } else { - winsch(win, (chtype)(*cp)); - win->_curx++; + winsch(win, (chtype) (*cp)); + win->_curx++; } if (win->_curx > win->_maxx) - win->_curx = win->_maxx; - } - - win->_curx = ox; - win->_cury = oy; - _nc_synchook(win); - code = OK; + win->_curx = win->_maxx; } - returnCode(code); + + win->_curx = ox; + win->_cury = oy; + _nc_synchook(win); + code = OK; + } + returnCode(code); } diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index d34d4834..59db16d1 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -64,8 +64,7 @@ */ #ifdef __EMX__ -# include "io.h" -# include "fcntl.h" +# include # define INCL_DOS # define INCL_VIO # define INCL_KBD @@ -85,13 +84,13 @@ #endif #endif -MODULE_ID("$Id: lib_mouse.c,v 1.45 1999/10/22 21:39:02 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.52 2000/06/29 23:02:26 tom Exp $") #define MY_TRACE TRACE_ICALLS|TRACE_IEVENT #define INVALID_EVENT -1 -static int mousetype; +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 */ @@ -104,7 +103,7 @@ static Gpm_Connect gpm_connect; #endif #endif -static mmask_t eventmask; /* current event mask */ +static mmask_t eventmask; /* current event mask */ static bool _nc_mouse_parse(int); static void _nc_mouse_resume(SCREEN *); @@ -116,22 +115,23 @@ static void _nc_mouse_wrap(SCREEN *); * wgetch() may refer to the size and call _nc_mouse_parse() before circular * list overflow. */ -static MEVENT events[EV_MAX]; /* hold the last mouse event seen */ -static MEVENT *eventp = events; /* next free slot in event queue */ +static MEVENT events[EV_MAX]; /* hold the last mouse event seen */ +static MEVENT *eventp = events; /* next free slot in event queue */ #define NEXT(ep) ((ep == events + EV_MAX - 1) ? events : ep + 1) #define PREV(ep) ((ep == events) ? events + EV_MAX - 1 : ep - 1) #ifdef TRACE -static void _trace_slot(const char *tag) +static void +_trace_slot(const char *tag) { - MEVENT *ep; + MEVENT *ep; - _tracef(tag); + _tracef(tag); - for (ep = events; ep < events + EV_MAX; ep++) - _tracef("mouse event queue slot %ld = %s", - (long) (ep - events), - _tracemouse(ep)); + for (ep = events; ep < events + EV_MAX; ep++) + _tracef("mouse event queue slot %ld = %s", + (long) (ep - events), + _tracemouse(ep)); } #endif @@ -143,8 +143,8 @@ static void _trace_slot(const char *tag) static int mouse_wfd; static int mouse_thread; static int mouse_activated; -static char mouse_buttons[] = { 0, 1, 3, 2}; - +static char mouse_buttons[] = +{0, 1, 3, 2}; # define M_FD(sp) sp->_mouse_fd @@ -174,34 +174,34 @@ mouse_server(unsigned long ignored GCC_UNUSED) unsigned long ignore; /* open the handle for the mouse */ - if (MouOpen(NULL,&hmou) == 0) { + if (MouOpen(NULL, &hmou) == 0) { - if (MouSetEventMask(&mask,hmou) == 0 - && MouDrawPtr(hmou) == 0) { + if (MouSetEventMask(&mask, hmou) == 0 + && MouDrawPtr(hmou) == 0) { for (;;) { /* sit and wait on the event queue */ - if (MouReadEventQue(&mouev,&fWait,hmou)) - break; + if (MouReadEventQue(&mouev, &fWait, hmou)) + break; if (!mouse_activated) goto finish; /* * OS/2 numbers a 3-button mouse inconsistently from other * platforms: - * 1 = left - * 2 = right - * 3 = middle. + * 1 = left + * 2 = right + * 3 = middle. */ if ((mouev.fs ^ oldstate) & MOUSE_BN1_DOWN) - write_event(mouev.fs & MOUSE_BN1_DOWN, - mouse_buttons[1], mouev.col, mouev.row); + write_event(mouev.fs & MOUSE_BN1_DOWN, + mouse_buttons[1], mouev.col, mouev.row); if ((mouev.fs ^ oldstate) & MOUSE_BN2_DOWN) - write_event(mouev.fs & MOUSE_BN2_DOWN, - mouse_buttons[3], mouev.col, mouev.row); + write_event(mouev.fs & MOUSE_BN2_DOWN, + mouse_buttons[3], mouev.col, mouev.row); if ((mouev.fs ^ oldstate) & MOUSE_BN3_DOWN) - write_event(mouev.fs & MOUSE_BN3_DOWN, - mouse_buttons[2], mouev.col, mouev.row); + write_event(mouev.fs & MOUSE_BN3_DOWN, + mouse_buttons[2], mouev.col, mouev.row); finish: oldstate = mouev.fs; @@ -211,11 +211,11 @@ mouse_server(unsigned long ignored GCC_UNUSED) DosWrite(2, errmess, strlen(errmess), &ignore); MouClose(hmou); } - DosExit(EXIT_THREAD, 0L ); + DosExit(EXIT_THREAD, 0L); } static void server_state(const int state) -{ /* It would be nice to implement pointer-off and stop looping... */ +{ /* It would be nice to implement pointer-off and stop looping... */ mouse_activated = state; } @@ -223,44 +223,30 @@ server_state(const int state) static int initialized; -static void _nc_mouse_init(void) -/* initialize the mouse */ +static void +initialize_mousetype(void) { - int i; - - if (initialized) { - return; - } - initialized = TRUE; - - TR(MY_TRACE, ("_nc_mouse_init() called")); - - for (i = 0; i < EV_MAX; i++) - events[i].id = INVALID_EVENT; - - /* we know how to recognize mouse events under xterm */ - if (key_mouse != 0 - && getenv("DISPLAY") != 0) - mousetype = M_XTERM; + static const char *xterm_kmous = "\033[M"; + /* Try gpm first, because gpm may be configured to run in xterm */ #if USE_GPM_SUPPORT - else if (!strncmp(cur_term->type.term_names, "linux", 5)) - { - /* 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<= 0) { /* returns the file-descriptor */ - mousetype = M_GPM; - SP->_mouse_fd = gpm_fd; - } + /* 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; } #endif /* OS/2 VIO */ #ifdef USE_EMX_MOUSE - if (!mouse_thread && mousetype != M_XTERM && key_mouse) { + if (!mouse_thread + && strstr(cur_term->type.term_names, "xterm") == 0 + && key_mouse) { int handles[2]; if (pipe(handles) < 0) { perror("mouse pipe error"); @@ -283,19 +269,53 @@ static void _nc_mouse_init(void) setmode(handles[0], O_BINARY); setmode(handles[1], O_BINARY); /* Do not use CRT functions, we may single-threaded. */ - rc = DosCreateThread((unsigned long*)&mouse_thread, mouse_server, 0, 0, 8192); - if (rc) + rc = DosCreateThread((unsigned long *) &mouse_thread, + mouse_server, 0, 0, 8192); + if (rc) { printf("mouse thread error %d=%#x", rc, rc); - else + } else { mousetype = M_XTERM; + return; + } } } #endif - T(("_nc_mouse_init() set mousetype to %d", mousetype)); + /* we know how to recognize mouse events under "xterm" */ + if (key_mouse != 0) { + if (!strcmp(key_mouse, xterm_kmous)) { + mousetype = M_XTERM; + 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; + return; + } +} + +static void +_nc_mouse_init(void) +/* initialize the mouse */ +{ + int i; + + if (!initialized) { + initialized = TRUE; + + TR(MY_TRACE, ("_nc_mouse_init() called")); + + for (i = 0; i < EV_MAX; i++) + events[i].id = INVALID_EVENT; + + initialize_mousetype(); + + T(("_nc_mouse_init() set mousetype to %d", mousetype)); + } } -static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED) +static bool +_nc_mouse_event(SCREEN * sp GCC_UNUSED) /* query to see if there is a pending mouse event */ { #if USE_GPM_SUPPORT @@ -303,23 +323,27 @@ static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED) Gpm_Event ev; if (gpm_fd >= 0 - && _nc_timed_wait(2, 0, (int *)0) - && Gpm_GetEvent(&ev) == 1) - { + && (_nc_timed_wait(3, 0, (int *) 0) & 2) != 0 + && Gpm_GetEvent(&ev) == 1) { eventp->id = 0; /* there's only one mouse... */ 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; + 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; + 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; @@ -336,20 +360,20 @@ static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED) #endif /* xterm: never have to query, mouse events are in the keyboard stream */ - return(FALSE); /* no event waiting */ + return (FALSE); /* no event waiting */ } -static bool _nc_mouse_inline(SCREEN *sp) +static bool +_nc_mouse_inline(SCREEN * sp) /* mouse report received in the keyboard stream -- parse its info */ { TR(MY_TRACE, ("_nc_mouse_inline() called")); - if (mousetype == M_XTERM) - { - unsigned char kbuf[4]; - MEVENT *prev; - size_t grabbed; - int res; + if (mousetype == M_XTERM) { + unsigned char kbuf[4]; + MEVENT *prev; + size_t grabbed; + int res; /* This code requires that your xterm entry contain the kmous * capability and that it be set to the \E[M documented in the @@ -381,28 +405,27 @@ static bool _nc_mouse_inline(SCREEN *sp) * single clist item. It always does under Linux but often * fails to under Solaris. */ - for (grabbed = 0; grabbed < 3; grabbed += res) - { + for (grabbed = 0; grabbed < 3; grabbed += res) { - /* For VIO mouse we add extra bit 64 to disambiguate button-up. */ + /* For VIO mouse we add extra bit 64 to disambiguate button-up. */ #ifdef USE_EMX_MOUSE - res = read( M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3); + res = read(M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3); #else - res = read(sp->_ifd, kbuf + grabbed, 3-grabbed); + res = read(sp->_ifd, kbuf + grabbed, 3 - grabbed); #endif - if (res == -1) - break; + if (res == -1) + break; } kbuf[3] = '\0'; - TR(TRACE_IEVENT, ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf)); + TR(TRACE_IEVENT, + ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf)); eventp->id = 0; /* there's only one mouse... */ /* processing code goes here */ eventp->bstate = 0; - switch (kbuf[0] & 0x3) - { + switch (kbuf[0] & 0x3) { case 0x0: eventp->bstate = BUTTON1_PRESSED; #ifdef USE_EMX_MOUSE @@ -434,8 +457,8 @@ static bool _nc_mouse_inline(SCREEN *sp) */ eventp->bstate = (BUTTON1_RELEASED | - BUTTON2_RELEASED | - BUTTON3_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 @@ -444,11 +467,11 @@ static bool _nc_mouse_inline(SCREEN *sp) */ prev = PREV(eventp); if (!(prev->bstate & BUTTON1_PRESSED)) - eventp->bstate &=~ BUTTON1_RELEASED; + eventp->bstate &= ~BUTTON1_RELEASED; if (!(prev->bstate & BUTTON2_PRESSED)) - eventp->bstate &=~ BUTTON2_RELEASED; + eventp->bstate &= ~BUTTON2_RELEASED; if (!(prev->bstate & BUTTON3_PRESSED)) - eventp->bstate &=~ BUTTON3_RELEASED; + eventp->bstate &= ~BUTTON3_RELEASED; break; } @@ -464,21 +487,23 @@ static bool _nc_mouse_inline(SCREEN *sp) eventp->x = (kbuf[1] - ' ') - 1; eventp->y = (kbuf[2] - ' ') - 1; - TR(MY_TRACE, ("_nc_mouse_inline: primitive mouse-event %s has slot %ld", + TR(MY_TRACE, + ("_nc_mouse_inline: primitive mouse-event %s has slot %ld", _tracemouse(eventp), (long) (eventp - events))); /* bump the next-free pointer into the circular list */ eventp = NEXT(eventp); -#if 0 /* this return would be needed for QNX's mods to lib_getch.c */ - return(TRUE); +#if 0 /* this return would be needed for QNX's mods to lib_getch.c */ + return (TRUE); #endif } - return(FALSE); + return (FALSE); } -static void mouse_activate(bool on) +static void +mouse_activate(bool on) { if (!on && !initialized) return; @@ -508,11 +533,11 @@ static void mouse_activate(bool on) /* Make runtime binding to cut down on object size of applications that * do not use the mouse (e.g., 'clear'). */ - SP->_mouse_event = _nc_mouse_event; + SP->_mouse_event = _nc_mouse_event; SP->_mouse_inline = _nc_mouse_inline; - SP->_mouse_parse = _nc_mouse_parse; + SP->_mouse_parse = _nc_mouse_parse; SP->_mouse_resume = _nc_mouse_resume; - SP->_mouse_wrap = _nc_mouse_wrap; + SP->_mouse_wrap = _nc_mouse_wrap; } else { @@ -540,12 +565,13 @@ static void mouse_activate(bool on) * **************************************************************************/ -static bool _nc_mouse_parse(int runcount) +static bool +_nc_mouse_parse(int runcount) /* parse a run of atomic mouse events into a gesture */ { - MEVENT *ep, *runp, *next, *prev = PREV(eventp); - int n; - bool merge; + MEVENT *ep, *runp, *next, *prev = PREV(eventp); + int n; + bool merge; TR(MY_TRACE, ("_nc_mouse_parse(%d) called", runcount)); @@ -570,14 +596,14 @@ static bool _nc_mouse_parse(int runcount) * button basis, as long as the device-dependent mouse code puts stuff * on the queue in MEVENT format. */ - if (runcount == 1) - { - TR(MY_TRACE, ("_nc_mouse_parse: returning simple mouse event %s at slot %ld", - _tracemouse(prev), - (long) (prev - events))); + if (runcount == 1) { + TR(MY_TRACE, + ("_nc_mouse_parse: returning simple mouse event %s at slot %ld", + _tracemouse(prev), + (long) (prev - events))); return (prev->id >= 0) - ? ((prev->bstate & eventmask) ? TRUE : FALSE) - : FALSE; + ? ((prev->bstate & eventmask) ? TRUE : FALSE) + : FALSE; } /* find the start of the run */ @@ -587,12 +613,11 @@ static bool _nc_mouse_parse(int runcount) } #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) - { + if (_nc_tracing & TRACE_IEVENT) { _trace_slot("before mouse press/release merge:"); _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d", (long) (runp - events), - (long) ((eventp - events) + (EV_MAX-1)) % EV_MAX, + (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX, runcount); } #endif /* TRACE */ @@ -600,36 +625,31 @@ static bool _nc_mouse_parse(int runcount) /* first pass; merge press/release pairs */ do { merge = FALSE; - for (ep = runp; next = NEXT(ep), next != eventp; ep = next) - { + for (ep = runp; next = NEXT(ep), next != eventp; ep = next) { if (ep->x == next->x && ep->y == next->y - && (ep->bstate & (BUTTON1_PRESSED|BUTTON2_PRESSED|BUTTON3_PRESSED)) + && (ep->bstate & (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED)) && (!(ep->bstate & BUTTON1_PRESSED) == !(next->bstate & BUTTON1_RELEASED)) && (!(ep->bstate & BUTTON2_PRESSED) == !(next->bstate & BUTTON2_RELEASED)) && (!(ep->bstate & BUTTON3_PRESSED) == !(next->bstate & BUTTON3_RELEASED)) - ) - { + ) { if ((eventmask & BUTTON1_CLICKED) - && (ep->bstate & BUTTON1_PRESSED)) - { - ep->bstate &=~ BUTTON1_PRESSED; + && (ep->bstate & BUTTON1_PRESSED)) { + ep->bstate &= ~BUTTON1_PRESSED; ep->bstate |= BUTTON1_CLICKED; merge = TRUE; } if ((eventmask & BUTTON2_CLICKED) - && (ep->bstate & BUTTON2_PRESSED)) - { - ep->bstate &=~ BUTTON2_PRESSED; + && (ep->bstate & BUTTON2_PRESSED)) { + ep->bstate &= ~BUTTON2_PRESSED; ep->bstate |= BUTTON2_CLICKED; merge = TRUE; } if ((eventmask & BUTTON3_CLICKED) - && (ep->bstate & BUTTON3_PRESSED)) - { - ep->bstate &=~ BUTTON3_PRESSED; + && (ep->bstate & BUTTON3_PRESSED)) { + ep->bstate &= ~BUTTON3_PRESSED; ep->bstate |= BUTTON3_CLICKED; merge = TRUE; } @@ -641,12 +661,11 @@ static bool _nc_mouse_parse(int runcount) (merge); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) - { + if (_nc_tracing & TRACE_IEVENT) { _trace_slot("before mouse click merge:"); _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d", (long) (runp - events), - (long) ((eventp - events) + (EV_MAX-1)) % EV_MAX, + (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX, runcount); } #endif /* TRACE */ @@ -668,12 +687,11 @@ static bool _nc_mouse_parse(int runcount) * which would get us into portability trouble. */ do { - MEVENT *follower; + MEVENT *follower; merge = FALSE; for (ep = runp; next = NEXT(ep), next != eventp; ep = next) - if (ep->id != INVALID_EVENT) - { + if (ep->id != INVALID_EVENT) { if (next->id != INVALID_EVENT) continue; follower = NEXT(next); @@ -684,26 +702,22 @@ static bool _nc_mouse_parse(int runcount) if ((ep->bstate & (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED)) && (follower->bstate & - (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) - { + (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) { if ((eventmask & BUTTON1_DOUBLE_CLICKED) - && (follower->bstate & BUTTON1_CLICKED)) - { - follower->bstate &=~ BUTTON1_CLICKED; + && (follower->bstate & BUTTON1_CLICKED)) { + follower->bstate &= ~BUTTON1_CLICKED; follower->bstate |= BUTTON1_DOUBLE_CLICKED; merge = TRUE; } if ((eventmask & BUTTON2_DOUBLE_CLICKED) - && (follower->bstate & BUTTON2_CLICKED)) - { - follower->bstate &=~ BUTTON2_CLICKED; + && (follower->bstate & BUTTON2_CLICKED)) { + follower->bstate &= ~BUTTON2_CLICKED; follower->bstate |= BUTTON2_DOUBLE_CLICKED; merge = TRUE; } if ((eventmask & BUTTON3_DOUBLE_CLICKED) - && (follower->bstate & BUTTON3_CLICKED)) - { - follower->bstate &=~ BUTTON3_CLICKED; + && (follower->bstate & BUTTON3_CLICKED)) { + follower->bstate &= ~BUTTON3_CLICKED; follower->bstate |= BUTTON3_DOUBLE_CLICKED; merge = TRUE; } @@ -714,29 +728,25 @@ static bool _nc_mouse_parse(int runcount) /* merge double-click events forward */ if ((ep->bstate & (BUTTON1_DOUBLE_CLICKED - | BUTTON2_DOUBLE_CLICKED - | BUTTON3_DOUBLE_CLICKED)) + | BUTTON2_DOUBLE_CLICKED + | BUTTON3_DOUBLE_CLICKED)) && (follower->bstate & - (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) - { + (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) { if ((eventmask & BUTTON1_TRIPLE_CLICKED) - && (follower->bstate & BUTTON1_CLICKED)) - { - follower->bstate &=~ BUTTON1_CLICKED; + && (follower->bstate & BUTTON1_CLICKED)) { + follower->bstate &= ~BUTTON1_CLICKED; follower->bstate |= BUTTON1_TRIPLE_CLICKED; merge = TRUE; } if ((eventmask & BUTTON2_TRIPLE_CLICKED) - && (follower->bstate & BUTTON2_CLICKED)) - { - follower->bstate &=~ BUTTON2_CLICKED; + && (follower->bstate & BUTTON2_CLICKED)) { + follower->bstate &= ~BUTTON2_CLICKED; follower->bstate |= BUTTON2_TRIPLE_CLICKED; merge = TRUE; } if ((eventmask & BUTTON3_TRIPLE_CLICKED) - && (follower->bstate & BUTTON3_CLICKED)) - { - follower->bstate &=~ BUTTON3_CLICKED; + && (follower->bstate & BUTTON3_CLICKED)) { + follower->bstate &= ~BUTTON3_CLICKED; follower->bstate |= BUTTON3_TRIPLE_CLICKED; merge = TRUE; } @@ -748,12 +758,11 @@ static bool _nc_mouse_parse(int runcount) (merge); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) - { + if (_nc_tracing & TRACE_IEVENT) { _trace_slot("before mouse event queue compaction:"); _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d", (long) (runp - events), - (long) ((eventp - events) + (EV_MAX-1)) % EV_MAX, + (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX, runcount); } #endif /* TRACE */ @@ -766,28 +775,28 @@ static bool _nc_mouse_parse(int runcount) if (prev->id == INVALID_EVENT || !(prev->bstate & eventmask)) { eventp = prev; } - #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) - { + if (_nc_tracing & TRACE_IEVENT) { _trace_slot("after mouse event queue compaction:"); _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d", (long) (runp - events), - (long) ((eventp - events) + (EV_MAX-1)) % EV_MAX, + (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX, runcount); } for (ep = runp; ep != eventp; ep = NEXT(ep)) if (ep->id != INVALID_EVENT) - TR(MY_TRACE, ("_nc_mouse_parse: returning composite mouse event %s at slot %ld", - _tracemouse(ep), - (long) (ep - events))); + TR(MY_TRACE, + ("_nc_mouse_parse: returning composite mouse event %s at slot %ld", + _tracemouse(ep), + (long) (ep - events))); #endif /* TRACE */ /* after all this, do we have a valid event? */ - return(PREV(eventp)->id != INVALID_EVENT); + return (PREV(eventp)->id != INVALID_EVENT); } -static void _nc_mouse_wrap(SCREEN *sp GCC_UNUSED) +static void +_nc_mouse_wrap(SCREEN * sp GCC_UNUSED) /* release mouse -- called by endwin() before shellout/exit */ { TR(MY_TRACE, ("_nc_mouse_wrap() called")); @@ -799,13 +808,14 @@ static void _nc_mouse_wrap(SCREEN *sp GCC_UNUSED) break; #if USE_GPM_SUPPORT /* GPM: pass all mouse events to next client */ - case M_GPM: - break; + case M_GPM: + break; #endif } } -static void _nc_mouse_resume(SCREEN *sp GCC_UNUSED) +static void +_nc_mouse_resume(SCREEN * sp GCC_UNUSED) /* re-connect to mouse -- called by doupdate() after shellout */ { TR(MY_TRACE, ("_nc_mouse_resume() called")); @@ -823,22 +833,22 @@ static void _nc_mouse_resume(SCREEN *sp GCC_UNUSED) * **************************************************************************/ -int getmouse(MEVENT *aevent) +int +getmouse(MEVENT * aevent) /* grab a copy of the current mouse event */ { T((T_CALLED("getmouse(%p)"), aevent)); - if (aevent && (mousetype != M_NONE)) - { + if (aevent && (mousetype != M_NONE)) { /* compute the current-event pointer */ - MEVENT *prev = PREV(eventp); + MEVENT *prev = PREV(eventp); /* copy the event we find there */ *aevent = *prev; TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld", - _tracemouse(prev), - (long) (prev - events))); + _tracemouse(prev), + (long) (prev - events))); prev->id = INVALID_EVENT; /* so the queue slot becomes free */ returnCode(OK); @@ -846,7 +856,8 @@ int getmouse(MEVENT *aevent) returnCode(ERR); } -int ungetmouse(MEVENT *aevent) +int +ungetmouse(MEVENT * aevent) /* enqueue a synthesized mouse event to be seen by the next wgetch() */ { /* stick the given event in the next-free slot */ @@ -859,7 +870,8 @@ int ungetmouse(MEVENT *aevent) return ungetch(KEY_MOUSE); } -mmask_t mousemask(mmask_t newmask, mmask_t *oldmask) +mmask_t +mousemask(mmask_t newmask, mmask_t * oldmask) /* set the mouse event mask */ { mmask_t result = 0; @@ -873,16 +885,15 @@ mmask_t mousemask(mmask_t newmask, mmask_t *oldmask) returnCode(0); _nc_mouse_init(); - if ( mousetype != M_NONE ) - { + if (mousetype != M_NONE) { eventmask = newmask & (BUTTON_ALT | BUTTON_CTRL | BUTTON_SHIFT - | BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON1_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); + | BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON1_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); @@ -892,21 +903,22 @@ mmask_t mousemask(mmask_t newmask, mmask_t *oldmask) returnCode(result); } -bool wenclose(const WINDOW *win, int y, int x) +bool +wenclose(const WINDOW *win, int y, int x) /* check to see if given window encloses given screen location */ { - if (win) - { + if (win) { y -= win->_yoffset; return ((win->_begy <= y && - win->_begx <= x && - (win->_begx + win->_maxx) >= x && - (win->_begy + win->_maxy) >= y) ? TRUE : FALSE); + win->_begx <= x && + (win->_begx + win->_maxx) >= x && + (win->_begy + win->_maxy) >= y) ? TRUE : FALSE); } return FALSE; } -int mouseinterval(int maxclick) +int +mouseinterval(int maxclick) /* set the maximum mouse interval within which to recognize a click */ { int oldval; @@ -919,46 +931,44 @@ int mouseinterval(int maxclick) oldval = DEFAULT_MAXCLICK; } - return(oldval); + return (oldval); } /* This may be used by other routines to ask for the existence of mouse support */ -int _nc_has_mouse(void) { - return (mousetype==M_NONE ? 0:1); +int +_nc_has_mouse(void) +{ + return (mousetype == M_NONE ? 0 : 1); } -bool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen) +bool +wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen) { - bool result = FALSE; - - if (win && pY && pX) - { - int y = *pY; int x = *pX; - - if (to_screen) - { - y += win->_begy + win->_yoffset; - x += win->_begx; - if (wenclose(win,y,x)) - result = TRUE; - } - else - { - if (wenclose(win,y,x)) - { - y -= (win->_begy + win->_yoffset); - x -= win->_begx; - result = TRUE; + bool result = FALSE; + + if (win && pY && pX) { + int y = *pY; + int x = *pX; + + if (to_screen) { + y += win->_begy + win->_yoffset; + x += win->_begx; + if (wenclose(win, y, x)) + result = TRUE; + } else { + if (wenclose(win, y, x)) { + y -= (win->_begy + win->_yoffset); + x -= win->_begx; + result = TRUE; } } - if (result) - { - *pX = x; - *pY = y; + if (result) { + *pX = x; + *pY = y; } } - return(result); + return (result); } /* lib_mouse.c ends here */ diff --git a/ncurses/base/lib_move.c b/ncurses/base/lib_move.c index 6f5bddff..68415d6e 100644 --- a/ncurses/base/lib_move.c +++ b/ncurses/base/lib_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* ** lib_move.c ** @@ -41,23 +40,22 @@ #include -MODULE_ID("$Id: lib_move.c,v 1.8 1998/02/11 12:13:53 tom Exp $") +MODULE_ID("$Id: lib_move.c,v 1.9 2000/04/29 21:11:19 tom Exp $") int wmove(WINDOW *win, int y, int x) { - T((T_CALLED("wmove(%p,%d,%d)"), win, y, x)); - - if (win && - x >= 0 && x <= win->_maxx && - y >= 0 && y <= win->_maxy) - { - win->_curx = (short)x; - win->_cury = (short)y; - - win->_flags &= ~_WRAPPED; - win->_flags |= _HASMOVED; - returnCode(OK); - } else - returnCode(ERR); + T((T_CALLED("wmove(%p,%d,%d)"), win, y, x)); + + if (win && + x >= 0 && x <= win->_maxx && + y >= 0 && y <= win->_maxy) { + win->_curx = (NCURSES_SIZE_T) x; + win->_cury = (NCURSES_SIZE_T) y; + + win->_flags &= ~_WRAPPED; + win->_flags |= _HASMOVED; + returnCode(OK); + } else + returnCode(ERR); } diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index 9a4919bf..08e35cf5 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_newterm.c ** @@ -46,11 +44,12 @@ #define _POSIX_SOURCE #endif -#include /* clear_screen, cup & friends, cur_term */ +#include /* clear_screen, cup & friends, cur_term */ +#include -MODULE_ID("$Id: lib_newterm.c,v 1.41 1999/07/24 20:07:48 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.46 2000/07/01 22:26:22 tom Exp $") -#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ +#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 #endif @@ -62,20 +61,21 @@ MODULE_ID("$Id: lib_newterm.c,v 1.41 1999/07/24 20:07:48 tom Exp $") * The newterm function also initializes terminal settings, and since initscr * is supposed to behave as if it calls newterm, we do it here. */ -static inline int _nc_initscr(void) +static inline int +_nc_initscr(void) { - /* for extended XPG4 conformance requires cbreak() at this point */ - /* (SVr4 curses does this anyway) */ - cbreak(); + /* for extended XPG4 conformance requires cbreak() at this point */ + /* (SVr4 curses does this anyway) */ + cbreak(); #ifdef TERMIOS - cur_term->Nttyb.c_lflag &= ~(ECHO|ECHONL); - cur_term->Nttyb.c_iflag &= ~(ICRNL|INLCR|IGNCR); - cur_term->Nttyb.c_oflag &= ~(ONLCR); + cur_term->Nttyb.c_lflag &= ~(ECHO | ECHONL); + cur_term->Nttyb.c_iflag &= ~(ICRNL | INLCR | IGNCR); + cur_term->Nttyb.c_oflag &= ~(ONLCR); #else - cur_term->Nttyb.sg_flags &= ~(ECHO|CRMOD); + cur_term->Nttyb.sg_flags &= ~(ECHO | CRMOD); #endif - return _nc_set_tty_mode(&cur_term->Nttyb); + return _nc_set_tty_mode(&cur_term->Nttyb); } /* @@ -86,121 +86,138 @@ static inline int _nc_initscr(void) */ static int filter_mode = FALSE; -void filter(void) +void +filter(void) { filter_mode = TRUE; } -SCREEN * newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) +SCREEN * +newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp) { -int errret; -int slk_format = _nc_slk_format; -SCREEN* current; + int errret; + int slk_format = _nc_slk_format; + SCREEN *current; #ifdef TRACE -int t = _nc_getenv_num("NCURSES_TRACE"); + int t = _nc_getenv_num("NCURSES_TRACE"); - if (t >= 0) - trace(t); + if (t >= 0) + trace(t); #endif - T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp)); + T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp)); - /* this loads the capability entry, then sets LINES and COLS */ - if (setupterm(name, fileno(ofp), &errret) == ERR) - return 0; + /* this loads the capability entry, then sets LINES and COLS */ + if (setupterm(name, fileno(ofp), &errret) == ERR) + return 0; - /* implement filter mode */ - if (filter_mode) { - LINES = 1; + /* implement filter mode */ + if (filter_mode) { + LINES = 1; - if (init_tabs != -1) - TABSIZE = init_tabs; - else - TABSIZE = 8; + if (VALID_NUMERIC(init_tabs)) + TABSIZE = init_tabs; + else + TABSIZE = 8; - T(("TABSIZE = %d", TABSIZE)); + T(("TABSIZE = %d", TABSIZE)); - clear_screen = 0; - cursor_down = parm_down_cursor = 0; - cursor_address = 0; - cursor_up = parm_up_cursor = 0; - row_address = 0; + clear_screen = 0; + cursor_down = parm_down_cursor = 0; + cursor_address = 0; + cursor_up = parm_up_cursor = 0; + row_address = 0; - cursor_home = carriage_return; - } + cursor_home = carriage_return; + } - /* If we must simulate soft labels, grab off the line to be used. - We assume that we must simulate, if it is none of the standard - formats (4-4 or 3-2-3) for which there may be some hardware - support. */ - if (num_labels <= 0 || !SLK_STDFMT(slk_format)) - if (slk_format) - { - if (ERR==_nc_ripoffline(-SLK_LINES(slk_format), - _nc_slk_initialize)) - return 0; - } - /* this actually allocates the screen structure, and saves the - * original terminal settings. - */ - current = SP; - _nc_set_screen(0); - if (_nc_setupscreen(LINES, COLS, ofp) == ERR) { - _nc_set_screen(current); + /* If we must simulate soft labels, grab off the line to be used. + We assume that we must simulate, if it is none of the standard + formats (4-4 or 3-2-3) for which there may be some hardware + support. */ + if (num_labels <= 0 || !SLK_STDFMT(slk_format)) + if (slk_format) { + if (ERR == _nc_ripoffline(-SLK_LINES(slk_format), + _nc_slk_initialize)) return 0; } - - /* if the terminal type has real soft labels, set those up */ - if (slk_format && num_labels > 0 && SLK_STDFMT(slk_format)) - _nc_slk_initialize(stdscr, COLS); - - SP->_ifd = fileno(ifp); - SP->_checkfd = fileno(ifp); - typeahead(fileno(ifp)); + /* this actually allocates the screen structure, and saves the + * original terminal settings. + */ + current = SP; + _nc_set_screen(0); + if (_nc_setupscreen(LINES, COLS, ofp) == ERR) { + _nc_set_screen(current); + return 0; + } + + /* if the terminal type has real soft labels, set those up */ + if (slk_format && num_labels > 0 && SLK_STDFMT(slk_format)) + _nc_slk_initialize(stdscr, COLS); + + SP->_ifd = fileno(ifp); + SP->_checkfd = fileno(ifp); + typeahead(fileno(ifp)); #ifdef TERMIOS - SP->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 && - !(cur_term->Ottyb.c_iflag & ISTRIP)); + SP->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 && + !(cur_term->Ottyb.c_iflag & ISTRIP)); #else - SP->_use_meta = FALSE; + SP->_use_meta = FALSE; #endif - SP->_endwin = FALSE; - - /* Check whether we can optimize scrolling under dumb terminals in case - * we do not have any of these capabilities, scrolling optimization - * will be useless. - */ - SP->_scrolling = ((scroll_forward && scroll_reverse) || - ((parm_rindex || parm_insert_line || insert_line) && - (parm_index || parm_delete_line || delete_line))); - - baudrate(); /* sets a field in the SP structure */ - - SP->_keytry = 0; - - /* - * Check for mismatched graphic-rendition capabilities. Most SVr4 - * terminfo trees contain entries that have rmul or rmso equated to - * sgr0 (Solaris curses copes with those entries). We do this only for - * curses, since many termcap applications assume that smso/rmso and - * smul/rmul are paired, and will not function properly if we remove - * rmso or rmul. Curses applications shouldn't be looking at this - * detail. - */ + SP->_endwin = FALSE; + + /* Check whether we can optimize scrolling under dumb terminals in case + * we do not have any of these capabilities, scrolling optimization + * will be useless. + */ + SP->_scrolling = ((scroll_forward && scroll_reverse) || + ((parm_rindex || parm_insert_line || insert_line) && + (parm_index || parm_delete_line || delete_line))); + + baudrate(); /* sets a field in the SP structure */ + + SP->_keytry = 0; + + /* + * Check for mismatched graphic-rendition capabilities. Most SVr4 + * terminfo trees contain entries that have rmul or rmso equated to + * sgr0 (Solaris curses copes with those entries). We do this only for + * curses, since many termcap applications assume that smso/rmso and + * smul/rmul are paired, and will not function properly if we remove + * rmso or rmul. Curses applications shouldn't be looking at this + * detail. + */ #define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode)) - SP->_use_rmso = SGR0_TEST(exit_standout_mode); - SP->_use_rmul = SGR0_TEST(exit_underline_mode); + SP->_use_rmso = SGR0_TEST(exit_standout_mode); + SP->_use_rmul = SGR0_TEST(exit_underline_mode); + +#ifdef USE_WIDEC_SUPPORT + /* + * XFree86 xterm can be configured to support UTF-8 based on environment + * variable settings. + */ + { + char *s; + if (((s = getenv("LC_ALL")) != 0 + || (s = getenv("LC_CTYPE")) != 0 + || (s = getenv("LANG")) != 0) + && strstr(s, "UTF-8") != 0) { + SP->_outch = _nc_utf8_outch; + } + } +#endif - /* compute movement costs so we can do better move optimization */ - _nc_mvcur_init(); + /* compute movement costs so we can do better move optimization */ + _nc_mvcur_init(); - /* initialize terminal to a sane state */ - _nc_screen_init(); + /* initialize terminal to a sane state */ + _nc_screen_init(); - /* Initialize the terminal line settings. */ - _nc_initscr(); + /* Initialize the terminal line settings. */ + _nc_initscr(); - _nc_signal_handler(TRUE); + _nc_signal_handler(TRUE); - T((T_RETURN("%p"), SP)); - return(SP); + T((T_RETURN("%p"), SP)); + return (SP); } diff --git a/ncurses/base/lib_newwin.c b/ncurses/base/lib_newwin.c index d7fc02b3..ececa58a 100644 --- a/ncurses/base/lib_newwin.c +++ b/ncurses/base/lib_newwin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_newwin.c ** @@ -42,230 +40,247 @@ #include -MODULE_ID("$Id: lib_newwin.c,v 1.21 1999/10/03 00:42:03 tom Exp $") +MODULE_ID("$Id: lib_newwin.c,v 1.24 2000/04/29 18:49:51 tom Exp $") -void _nc_freewin(WINDOW *win) +void +_nc_freewin(WINDOW *win) { -WINDOWLIST *p, *q; -int i; - - if (win != 0) { - for (p = _nc_windows, q = 0; p != 0; q = p, p = p->next) { - if (p->win == win) { - if (q == 0) - _nc_windows = p->next; - else - q->next = p->next; - free(p); - - if (! (win->_flags & _SUBWIN)) { - for (i = 0; i <= win->_maxy && win->_line[i].text; i++) - FreeIfNeeded(win->_line[i].text); - } - free(win->_line); - free(win); - - if (win == curscr) curscr = 0; - if (win == stdscr) stdscr = 0; - if (win == newscr) newscr = 0; - - T(("...deleted win=%p", win)); - break; - } + WINDOWLIST *p, *q; + int i; + + if (win != 0) { + for (p = _nc_windows, q = 0; p != 0; q = p, p = p->next) { + if (p->win == win) { + if (q == 0) + _nc_windows = p->next; + else + q->next = p->next; + free(p); + + if (!(win->_flags & _SUBWIN)) { + for (i = 0; i <= win->_maxy; i++) + FreeIfNeeded(win->_line[i].text); } + free(win->_line); + free(win); + + if (win == curscr) + curscr = 0; + if (win == stdscr) + stdscr = 0; + if (win == newscr) + newscr = 0; + + T(("...deleted win=%p", win)); + break; + } } + } } -WINDOW * newwin(int num_lines, int num_columns, int begy, int begx) +WINDOW * +newwin(int num_lines, int num_columns, int begy, int begx) { -WINDOW *win; -chtype *ptr; -int i; + WINDOW *win; + chtype *ptr; + int i; - T((T_CALLED("newwin(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx)); + T((T_CALLED("newwin(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx)); - if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0) - returnWin(0); + if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0) + returnWin(0); - if (num_lines == 0) - num_lines = SP->_lines_avail - begy; - if (num_columns == 0) - num_columns = screen_columns - begx; + if (num_lines == 0) + num_lines = SP->_lines_avail - begy; + if (num_columns == 0) + num_columns = screen_columns - begx; - if (num_columns + begx > SP->_columns || num_lines + begy > SP->_lines_avail) - returnWin(0); + if (num_columns + begx > SP->_columns || num_lines + begy > SP->_lines_avail) + returnWin(0); - if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0) - returnWin(0); + if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0) + returnWin(0); - for (i = 0; i < num_lines; i++) { - if ((win->_line[i].text = typeCalloc(chtype, (unsigned)num_columns)) == 0) { - _nc_freewin(win); - returnWin(0); - } - for (ptr = win->_line[i].text; ptr < win->_line[i].text + num_columns; ) - *ptr++ = ' '; + for (i = 0; i < num_lines; i++) { + win->_line[i].text = typeCalloc(chtype, (unsigned) num_columns); + if (win->_line[i].text == 0) { + _nc_freewin(win); + returnWin(0); } + for (ptr = win->_line[i].text; ptr < win->_line[i].text + + num_columns;) + *ptr++ = ' '; + } - T(("newwin: returned window is %p", win)); + T(("newwin: returned window is %p", win)); - returnWin(win); + returnWin(win); } -WINDOW * derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx) +WINDOW * +derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx) { -WINDOW *win; -int i; -int flags = _SUBWIN; + WINDOW *win; + int i; + int flags = _SUBWIN; - T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), orig, num_lines, num_columns, begy, begx)); + T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), orig, num_lines, num_columns, + begy, begx)); - /* - ** make sure window fits inside the original one - */ - if ( begy < 0 || begx < 0 || orig == 0 || num_lines < 0 || num_columns < 0) - returnWin(0); - if ( begy + num_lines > orig->_maxy + 1 - || begx + num_columns > orig->_maxx + 1) - returnWin(0); + /* + ** make sure window fits inside the original one + */ + if (begy < 0 || begx < 0 || orig == 0 || num_lines < 0 || num_columns < 0) + returnWin(0); + if (begy + num_lines > orig->_maxy + 1 + || begx + num_columns > orig->_maxx + 1) + returnWin(0); - if (num_lines == 0) - num_lines = orig->_maxy + 1 - begy; + if (num_lines == 0) + num_lines = orig->_maxy + 1 - begy; - if (num_columns == 0) - num_columns = orig->_maxx + 1 - begx; + if (num_columns == 0) + num_columns = orig->_maxx + 1 - begx; - if (orig->_flags & _ISPAD) - flags |= _ISPAD; + if (orig->_flags & _ISPAD) + flags |= _ISPAD; - if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy, orig->_begx + begx, flags)) == 0) - returnWin(0); + if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy, + orig->_begx + begx, flags)) == 0) + returnWin(0); - win->_pary = begy; - win->_parx = begx; - win->_attrs = orig->_attrs; - win->_bkgd = orig->_bkgd; + win->_pary = begy; + win->_parx = begx; + win->_attrs = orig->_attrs; + win->_bkgd = orig->_bkgd; - for (i = 0; i < num_lines; i++) - win->_line[i].text = &orig->_line[begy++].text[begx]; + for (i = 0; i < num_lines; i++) + win->_line[i].text = &orig->_line[begy++].text[begx]; - win->_parent = orig; + win->_parent = orig; - T(("derwin: returned window is %p", win)); + T(("derwin: returned window is %p", win)); - returnWin(win); + returnWin(win); } - -WINDOW *subwin(WINDOW *w, int l, int c, int y, int x) +WINDOW * +subwin(WINDOW *w, int l, int c, int y, int x) { - T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), w, l, c, y, x)); - T(("parent has begy = %d, begx = %d", w->_begy, w->_begx)); + T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), w, l, c, y, x)); + T(("parent has begy = %d, begx = %d", w->_begy, w->_begx)); + + returnWin(derwin(w, l, c, y - w->_begy, x - w->_begx)); +} - returnWin(derwin(w, l, c, y - w->_begy, x - w->_begx)); +static bool +dimension_limit(int value) +{ + NCURSES_SIZE_T test = value; + return (test == value && value > 0); } WINDOW * _nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags) { -int i; -WINDOWLIST *wp; -WINDOW *win; -bool is_pad = (flags & _ISPAD); - - T(("_nc_makenew(%d,%d,%d,%d)", num_lines, num_columns, begy, begx)); - - if (num_lines <= 0 || num_columns <= 0) - return 0; - - if ((wp = typeCalloc(WINDOWLIST, 1)) == 0) - return 0; - - if ((win = typeCalloc(WINDOW, 1)) == 0) - return 0; - - if ((win->_line = typeCalloc(struct ldat, ((unsigned)num_lines))) == 0) { - free(win); - return 0; - } - - win->_curx = 0; - win->_cury = 0; - win->_maxy = num_lines - 1; - win->_maxx = num_columns - 1; - win->_begy = begy; - win->_begx = begx; - win->_yoffset = SP->_topstolen; - - win->_flags = flags; - win->_attrs = A_NORMAL; - win->_bkgd = BLANK; - - win->_clear = is_pad ? FALSE : (num_lines == screen_lines && num_columns == screen_columns); - win->_idlok = FALSE; - win->_idcok = TRUE; - win->_scroll = FALSE; - win->_leaveok = FALSE; - win->_use_keypad = FALSE; - win->_delay = -1; - win->_immed = FALSE; - win->_sync = 0; - win->_parx = -1; - win->_pary = -1; - win->_parent = 0; - - win->_regtop = 0; - win->_regbottom = num_lines - 1; - - win->_pad._pad_y = -1; - win->_pad._pad_x = -1; - win->_pad._pad_top = -1; - win->_pad._pad_bottom = -1; - win->_pad._pad_left = -1; - win->_pad._pad_right = -1; - - for (i = 0; i < num_lines; i++) - { - /* - * This used to do - * - * win->_line[i].firstchar = win->_line[i].lastchar = _NOCHANGE; - * - * which marks the whole window unchanged. That's how - * SVr1 curses did it, but SVr4 curses marks the whole new - * window changed. - * - * With the old SVr1-like code, say you have stdscr full of - * characters, then create a new window with newwin(), - * then do a printw(win, "foo ");, the trailing spaces are - * completely ignored by the following refreshes. So, you - * get "foojunkjunk" on the screen instead of "foo " as - * you actually intended. - * - * SVr4 doesn't do this. Instead the spaces are actually written. - * So that's how we want ncurses to behave. - */ - win->_line[i].firstchar = 0; - win->_line[i].lastchar = num_columns-1; - - if_USE_SCROLL_HINTS(win->_line[i].oldindex = i); - } - - if (!is_pad && (begx + num_columns == screen_columns)) { - win->_flags |= _ENDLINE; - - if (begx == 0 && num_lines == screen_lines && begy == 0) - win->_flags |= _FULLWIN; - - if (begy + num_lines == screen_lines) - win->_flags |= _SCROLLWIN; - } - - wp->next = _nc_windows; - wp->win = win; - _nc_windows = wp; - - T((T_CREATE("window %p"), win)); - - return(win); + int i; + WINDOWLIST *wp; + WINDOW *win; + bool is_pad = (flags & _ISPAD); + + T(("_nc_makenew(%d,%d,%d,%d)", num_lines, num_columns, begy, begx)); + + if (!dimension_limit(num_lines) || !dimension_limit(num_columns)) + return 0; + + if ((wp = typeCalloc(WINDOWLIST, 1)) == 0) + return 0; + + if ((win = typeCalloc(WINDOW, 1)) == 0) + return 0; + + if ((win->_line = typeCalloc(struct ldat, ((unsigned) num_lines))) == 0) { + free(win); + return 0; + } + + win->_curx = 0; + win->_cury = 0; + win->_maxy = num_lines - 1; + win->_maxx = num_columns - 1; + win->_begy = begy; + win->_begx = begx; + win->_yoffset = SP->_topstolen; + + win->_flags = flags; + win->_attrs = A_NORMAL; + win->_bkgd = BLANK; + + win->_clear = is_pad ? FALSE : (num_lines == screen_lines && num_columns + == screen_columns); + win->_idlok = FALSE; + win->_idcok = TRUE; + win->_scroll = FALSE; + win->_leaveok = FALSE; + win->_use_keypad = FALSE; + win->_delay = -1; + win->_immed = FALSE; + win->_sync = 0; + win->_parx = -1; + win->_pary = -1; + win->_parent = 0; + + win->_regtop = 0; + win->_regbottom = num_lines - 1; + + win->_pad._pad_y = -1; + win->_pad._pad_x = -1; + win->_pad._pad_top = -1; + win->_pad._pad_bottom = -1; + win->_pad._pad_left = -1; + win->_pad._pad_right = -1; + + for (i = 0; i < num_lines; i++) { + /* + * This used to do + * + * win->_line[i].firstchar = win->_line[i].lastchar = _NOCHANGE; + * + * which marks the whole window unchanged. That's how + * SVr1 curses did it, but SVr4 curses marks the whole new + * window changed. + * + * With the old SVr1-like code, say you have stdscr full of + * characters, then create a new window with newwin(), + * then do a printw(win, "foo ");, the trailing spaces are + * completely ignored by the following refreshes. So, you + * get "foojunkjunk" on the screen instead of "foo " as + * you actually intended. + * + * SVr4 doesn't do this. Instead the spaces are actually written. + * So that's how we want ncurses to behave. + */ + win->_line[i].firstchar = 0; + win->_line[i].lastchar = num_columns - 1; + + if_USE_SCROLL_HINTS(win->_line[i].oldindex = i); + } + + if (!is_pad && (begx + num_columns == screen_columns)) { + win->_flags |= _ENDLINE; + + if (begx == 0 && num_lines == screen_lines && begy == 0) + win->_flags |= _FULLWIN; + + if (begy + num_lines == screen_lines) + win->_flags |= _SCROLLWIN; + } + + wp->next = _nc_windows; + wp->win = win; + _nc_windows = wp; + + T((T_CREATE("window %p"), win)); + + return (win); } diff --git a/ncurses/base/lib_nl.c b/ncurses/base/lib_nl.c index 75d4a638..bfaffdef 100644 --- a/ncurses/base/lib_nl.c +++ b/ncurses/base/lib_nl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * nl.c * @@ -43,37 +42,38 @@ #include -MODULE_ID("$Id: lib_nl.c,v 1.4 1999/10/22 22:31:51 tom Exp $") +MODULE_ID("$Id: lib_nl.c,v 1.6 2000/02/13 00:59:39 tom Exp $") #ifdef __EMX__ #include -#include #endif -int nl(void) +int +nl(void) { - T((T_CALLED("nl()"))); + T((T_CALLED("nl()"))); - SP->_nl = TRUE; + SP->_nl = TRUE; #ifdef __EMX__ - _nc_flush(); - _fsetmode(NC_OUTPUT, "t"); + _nc_flush(); + _fsetmode(NC_OUTPUT, "t"); #endif - returnCode(OK); + returnCode(OK); } -int nonl(void) +int +nonl(void) { - T((T_CALLED("nonl()"))); + T((T_CALLED("nonl()"))); - SP->_nl = FALSE; + SP->_nl = FALSE; #ifdef __EMX__ - _nc_flush(); - _fsetmode(NC_OUTPUT, "b"); + _nc_flush(); + _fsetmode(NC_OUTPUT, "b"); #endif - returnCode(OK); + returnCode(OK); } diff --git a/ncurses/base/lib_pad.c b/ncurses/base/lib_pad.c index d4e341c0..af7dd3b5 100644 --- a/ncurses/base/lib_pad.c +++ b/ncurses/base/lib_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * lib_pad.c * newpad -- create a new pad @@ -41,240 +40,253 @@ #include -MODULE_ID("$Id: lib_pad.c,v 1.27 1998/06/28 00:10:16 tom Exp $") +MODULE_ID("$Id: lib_pad.c,v 1.29 2000/04/29 21:19:44 tom Exp $") -WINDOW *newpad(int l, int c) +WINDOW * +newpad(int l, int c) { -WINDOW *win; -chtype *ptr; -int i; + WINDOW *win; + chtype *ptr; + int i; - T((T_CALLED("newpad(%d, %d)"), l, c)); + T((T_CALLED("newpad(%d, %d)"), l, c)); - if (l <= 0 || c <= 0) - returnWin(0); + if (l <= 0 || c <= 0) + returnWin(0); - if ((win = _nc_makenew(l,c,0,0,_ISPAD)) == NULL) - returnWin(0); + if ((win = _nc_makenew(l, c, 0, 0, _ISPAD)) == NULL) + returnWin(0); - for (i = 0; i < l; i++) { - if_USE_SCROLL_HINTS(win->_line[i].oldindex = _NEWINDEX); - if ((win->_line[i].text = typeCalloc(chtype, ((size_t)c))) == 0) { - _nc_freewin(win); - returnWin(0); - } - for (ptr = win->_line[i].text; ptr < win->_line[i].text + c; ) - *ptr++ = ' '; + for (i = 0; i < l; i++) { + if_USE_SCROLL_HINTS(win->_line[i].oldindex = _NEWINDEX); + if ((win->_line[i].text = typeCalloc(chtype, ((size_t) c))) == 0) { + _nc_freewin(win); + returnWin(0); } + for (ptr = win->_line[i].text; ptr < win->_line[i].text + c;) + *ptr++ = ' '; + } - returnWin(win); + returnWin(win); } -WINDOW *subpad(WINDOW *orig, int l, int c, int begy, int begx) +WINDOW * +subpad(WINDOW *orig, int l, int c, int begy, int begx) { -WINDOW *win = (WINDOW *)0; + WINDOW *win = (WINDOW *) 0; - T((T_CALLED("subpad(%d, %d)"), l, c)); + T((T_CALLED("subpad(%d, %d)"), l, c)); - if (orig) { - if (!(orig->_flags & _ISPAD) || ((win = derwin(orig, l, c, begy, begx)) == NULL)) + if (orig) { + if (!(orig->_flags & _ISPAD) + || ((win = derwin(orig, l, c, begy, begx)) == NULL)) returnWin(0); - } - returnWin(win); + } + returnWin(win); } -int prefresh(WINDOW *win, int pminrow, int pmincol, - int sminrow, int smincol, int smaxrow, int smaxcol) +int +prefresh(WINDOW *win, int pminrow, int pmincol, + int sminrow, int smincol, int smaxrow, int smaxcol) { - T((T_CALLED("prefresh()"))); - if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol) != ERR - && doupdate() != ERR) { - returnCode(OK); - } - returnCode(ERR); + T((T_CALLED("prefresh()"))); + if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow, + smaxcol) != ERR + && doupdate() != ERR) { + returnCode(OK); + } + returnCode(ERR); } -int pnoutrefresh(WINDOW *win, int pminrow, int pmincol, - int sminrow, int smincol, int smaxrow, int smaxcol) +int +pnoutrefresh(WINDOW *win, int pminrow, int pmincol, + int sminrow, int smincol, int smaxrow, int smaxcol) { -const int my_len = 2; /* parameterize the threshold for hardscroll */ -short i, j; -short m, n; -short pmaxrow; -short pmaxcol; -short displaced; -bool wide; - - T((T_CALLED("pnoutrefresh(%p, %d, %d, %d, %d, %d, %d)"), - win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)); - - if (win == 0) - returnCode(ERR); - - if (!(win->_flags & _ISPAD)) - returnCode(ERR); + const int my_len = 2; /* parameterize the threshold for hardscroll */ + NCURSES_SIZE_T i, j; + NCURSES_SIZE_T m, n; + NCURSES_SIZE_T pmaxrow; + NCURSES_SIZE_T pmaxcol; + NCURSES_SIZE_T displaced; + bool wide; + + T((T_CALLED("pnoutrefresh(%p, %d, %d, %d, %d, %d, %d)"), + win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)); + + if (win == 0) + returnCode(ERR); - /* negative values are interpreted as zero */ - if (pminrow < 0) pminrow = 0; - if (pmincol < 0) pmincol = 0; - if (sminrow < 0) sminrow = 0; - if (smincol < 0) smincol = 0; + if (!(win->_flags & _ISPAD)) + returnCode(ERR); + /* negative values are interpreted as zero */ + if (pminrow < 0) + pminrow = 0; + if (pmincol < 0) + pmincol = 0; + if (sminrow < 0) + sminrow = 0; + if (smincol < 0) + smincol = 0; + + pmaxrow = pminrow + smaxrow - sminrow; + pmaxcol = pmincol + smaxcol - smincol; + + T((" pminrow + smaxrow - sminrow %d, win->_maxy %d", pmaxrow, win->_maxy)); + T((" pmincol + smaxcol - smincol %d, win->_maxx %d", pmaxcol, win->_maxx)); + + /* + * Trim the caller's screen size back to the actual limits. + */ + if (pmaxrow > win->_maxy) { + smaxrow -= (pmaxrow - win->_maxy); pmaxrow = pminrow + smaxrow - sminrow; + } + if (pmaxcol > win->_maxx) { + smaxcol -= (pmaxcol - win->_maxx); pmaxcol = pmincol + smaxcol - smincol; + } - T((" pminrow + smaxrow - sminrow %d, win->_maxy %d", pmaxrow, win->_maxy)); - T((" pmincol + smaxcol - smincol %d, win->_maxx %d", pmaxcol, win->_maxx)); + if (smaxrow > screen_lines + || smaxcol > screen_columns + || sminrow > smaxrow + || smincol > smaxcol) + returnCode(ERR); - /* - * Trim the caller's screen size back to the actual limits. - */ - if (pmaxrow > win->_maxy) { - smaxrow -= (pmaxrow - win->_maxy); - pmaxrow = pminrow + smaxrow - sminrow; - } - if (pmaxcol > win->_maxx) { - smaxcol -= (pmaxcol - win->_maxx); - pmaxcol = pmincol + smaxcol - smincol; + T(("pad being refreshed")); + + if (win->_pad._pad_y >= 0) { + displaced = pminrow - win->_pad._pad_y + - (sminrow - win->_pad._pad_top); + T(("pad being shifted by %d line(s)", displaced)); + } else + displaced = 0; + + /* + * For pure efficiency, we'd want to transfer scrolling information + * from the pad to newscr whenever the window is wide enough that + * its update will dominate the cost of the update for the horizontal + * band of newscr that it occupies. Unfortunately, this threshold + * tends to be complex to estimate, and in any case scrolling the + * whole band and rewriting the parts outside win's image would look + * really ugly. So. What we do is consider the pad "wide" if it + * either (a) occupies the whole width of newscr, or (b) occupies + * all but at most one column on either vertical edge of the screen + * (this caters to fussy people who put boxes around full-screen + * windows). Note that changing this formula will not break any code, + * merely change the costs of various update cases. + */ + wide = (smincol < my_len && smaxcol > (newscr->_maxx - my_len)); + + for (i = pminrow, m = sminrow + win->_yoffset; + i <= pmaxrow && m <= newscr->_maxy; + i++, m++) { + register struct ldat *nline = &newscr->_line[m]; + register struct ldat *oline = &win->_line[i]; + + for (j = pmincol, n = smincol; j <= pmaxcol; j++, n++) { + if (oline->text[j] != nline->text[n]) { + nline->text[n] = oline->text[j]; + CHANGED_CELL(nline, n); + } } - if (smaxrow > screen_lines - || smaxcol > screen_columns - || sminrow > smaxrow - || smincol > smaxcol) - returnCode(ERR); - - T(("pad being refreshed")); - - if (win->_pad._pad_y >= 0) { - displaced = pminrow - win->_pad._pad_y - -(sminrow - win->_pad._pad_top); - T(("pad being shifted by %d line(s)", displaced)); - } else - displaced = 0; - - /* - * For pure efficiency, we'd want to transfer scrolling information - * from the pad to newscr whenever the window is wide enough that - * its update will dominate the cost of the update for the horizontal - * band of newscr that it occupies. Unfortunately, this threshold - * tends to be complex to estimate, and in any case scrolling the - * whole band and rewriting the parts outside win's image would look - * really ugly. So. What we do is consider the pad "wide" if it - * either (a) occupies the whole width of newscr, or (b) occupies - * all but at most one column on either vertical edge of the screen - * (this caters to fussy people who put boxes around full-screen - * windows). Note that changing this formula will not break any code, - * merely change the costs of various update cases. - */ - wide = (smincol < my_len && smaxcol > (newscr->_maxx - my_len)); - - for (i = pminrow, m = sminrow + win->_yoffset; - i <= pmaxrow && m <= newscr->_maxy; - i++, m++) { - register struct ldat *nline = &newscr->_line[m]; - register struct ldat *oline = &win->_line[i]; - - for (j = pmincol, n = smincol; j <= pmaxcol; j++, n++) { - if (oline->text[j] != nline->text[n]) { - nline->text[n] = oline->text[j]; - CHANGED_CELL(nline,n); - } - } - #if USE_SCROLL_HINTS - if (wide) { - int nind = m + displaced; - if (oline->oldindex < 0 - || nind < sminrow - || nind > smaxrow) { + if (wide) { + int nind = m + displaced; + if (oline->oldindex < 0 + || nind < sminrow + || nind > smaxrow) { + nind = _NEWINDEX; + } else if (displaced) { + register struct ldat *pline = &curscr->_line[nind]; + for (j = 0; j <= my_len; j++) { + int k = newscr->_maxx - j; + if (pline->text[j] != nline->text[j] + || pline->text[k] != nline->text[k]) { nind = _NEWINDEX; - } else if (displaced) { - register struct ldat *pline = &curscr->_line[nind]; - for (j = 0; j <= my_len; j++) { - int k = newscr->_maxx - j; - if (pline->text[j] != nline->text[j] - || pline->text[k] != nline->text[k]) { - nind = _NEWINDEX; - break; - } - } + break; } - - nline->oldindex = nind; } -#endif /* USE_SCROLL_HINTS */ - oline->firstchar = oline->lastchar = _NOCHANGE; - if_USE_SCROLL_HINTS(oline->oldindex = i); - } + } - /* - * Clean up debris from scrolling or resizing the pad, so we do not - * accidentally pick up the index value during the next call to this - * procedure. The only rows that should have an index value are those - * that are displayed during this cycle. - */ + nline->oldindex = nind; + } +#endif /* USE_SCROLL_HINTS */ + oline->firstchar = oline->lastchar = _NOCHANGE; + if_USE_SCROLL_HINTS(oline->oldindex = i); + } + + /* + * Clean up debris from scrolling or resizing the pad, so we do not + * accidentally pick up the index value during the next call to this + * procedure. The only rows that should have an index value are those + * that are displayed during this cycle. + */ #if USE_SCROLL_HINTS - for (i = pminrow-1; (i >= 0) && (win->_line[i].oldindex >= 0); i--) - win->_line[i].oldindex = _NEWINDEX; - for (i = pmaxrow+1; (i <= win->_maxy) && (win->_line[i].oldindex >= 0); i++) - win->_line[i].oldindex = _NEWINDEX; + for (i = pminrow - 1; (i >= 0) && (win->_line[i].oldindex >= 0); i--) + win->_line[i].oldindex = _NEWINDEX; + for (i = pmaxrow + 1; (i <= win->_maxy) + && (win->_line[i].oldindex >= 0); i++) + win->_line[i].oldindex = _NEWINDEX; #endif - win->_begx = smincol; - win->_begy = sminrow; + win->_begx = smincol; + win->_begy = sminrow; + + if (win->_clear) { + win->_clear = FALSE; + newscr->_clear = TRUE; + } + + /* + * Use the pad's current position, if it will be visible. + * If not, don't do anything; it's not an error. + */ + if (win->_leaveok == FALSE + && win->_cury >= pminrow + && win->_curx >= pmincol + && win->_cury <= pmaxrow + && win->_curx <= pmaxcol) { + newscr->_cury = win->_cury - pminrow + win->_begy + win->_yoffset; + newscr->_curx = win->_curx - pmincol + win->_begx; + } + newscr->_leaveok = win->_leaveok; + win->_flags &= ~_HASMOVED; + + /* + * Update our cache of the line-numbers that we displayed from the pad. + * We will use this on subsequent calls to this function to derive + * values to stuff into 'oldindex[]' -- for scrolling optimization. + */ + win->_pad._pad_y = pminrow; + win->_pad._pad_x = pmincol; + win->_pad._pad_top = sminrow; + win->_pad._pad_left = smincol; + win->_pad._pad_bottom = smaxrow; + win->_pad._pad_right = smaxcol; + + returnCode(OK); +} - if (win->_clear) { - win->_clear = FALSE; - newscr->_clear = TRUE; - } +int +pechochar(WINDOW *pad, const chtype ch) +{ + T((T_CALLED("pechochar(%p, %s)"), pad, _tracechtype(ch))); - /* - * Use the pad's current position, if it will be visible. - * If not, don't do anything; it's not an error. - */ - if (win->_leaveok == FALSE - && win->_cury >= pminrow - && win->_curx >= pmincol - && win->_cury <= pmaxrow - && win->_curx <= pmaxcol) { - newscr->_cury = win->_cury - pminrow + win->_begy + win->_yoffset; - newscr->_curx = win->_curx - pmincol + win->_begx; - } - win->_flags &= ~_HASMOVED; - - /* - * Update our cache of the line-numbers that we displayed from the pad. - * We will use this on subsequent calls to this function to derive - * values to stuff into 'oldindex[]' -- for scrolling optimization. - */ - win->_pad._pad_y = pminrow; - win->_pad._pad_x = pmincol; - win->_pad._pad_top = sminrow; - win->_pad._pad_left = smincol; - win->_pad._pad_bottom = smaxrow; - win->_pad._pad_right = smaxcol; + if (pad == 0) + returnCode(ERR); - returnCode(OK); -} + if (!(pad->_flags & _ISPAD)) + returnCode(wechochar(pad, ch)); -int pechochar(WINDOW *pad, const chtype ch) -{ - T((T_CALLED("pechochar(%p, %s)"), pad, _tracechtype(ch))); - - if (pad == 0) - returnCode(ERR); - - if (!(pad->_flags & _ISPAD)) - returnCode(wechochar(pad,ch)); - - waddch(pad, ch); - 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); - - returnCode(OK); + waddch(pad, ch); + 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); + + returnCode(OK); } diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c index 88e3b75a..910664b0 100644 --- a/ncurses/base/lib_refresh.c +++ b/ncurses/base/lib_refresh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * lib_refresh.c * @@ -42,142 +40,144 @@ #include -MODULE_ID("$Id: lib_refresh.c,v 1.24 1999/07/31 11:36:37 juergen Exp $") +MODULE_ID("$Id: lib_refresh.c,v 1.25 2000/04/29 21:17:08 tom Exp $") -int wrefresh(WINDOW *win) +int +wrefresh(WINDOW *win) { -int code; - - T((T_CALLED("wrefresh(%p)"), win)); - - if (win == curscr) { - curscr->_clear = TRUE; - code = doupdate(); - } else if ((code = wnoutrefresh(win)) == OK) { - if (win->_clear) - newscr->_clear = TRUE; - code = doupdate(); - /* - * Reset the clearok() flag in case it was set for the special - * case in hardscroll.c (if we don't reset it here, we'll get 2 - * refreshes because the flag is copied from stdscr to newscr). - * Resetting the flag shouldn't do any harm, anyway. - */ - win->_clear = FALSE; - } - returnCode(code); -} - -int wnoutrefresh(WINDOW *win) -{ -short limit_x; -short i, j; -short begx; -short begy; -short m, n; -bool wide; - - T((T_CALLED("wnoutrefresh(%p)"), win)); -#ifdef TRACE - if (_nc_tracing & TRACE_UPDATE) - _tracedump("...win", win); -#endif /* TRACE */ - - /* - * This function will break badly if we try to refresh a pad. - */ - if ((win == 0) - || (win->_flags & _ISPAD)) - returnCode(ERR); + int code; - /* put them here so "win == 0" won't break our code */ - begx = win->_begx; - begy = win->_begy; - - newscr->_bkgd = win->_bkgd; - newscr->_attrs = win->_attrs; - - /* merge in change information from all subwindows of this window */ - wsyncdown(win); + T((T_CALLED("wrefresh(%p)"), win)); + if (win == curscr) { + curscr->_clear = TRUE; + code = doupdate(); + } else if ((code = wnoutrefresh(win)) == OK) { + if (win->_clear) + newscr->_clear = TRUE; + code = doupdate(); /* - * For pure efficiency, we'd want to transfer scrolling information - * from the window to newscr whenever the window is wide enough that - * its update will dominate the cost of the update for the horizontal - * band of newscr that it occupies. Unfortunately, this threshold - * tends to be complex to estimate, and in any case scrolling the - * whole band and rewriting the parts outside win's image would look - * really ugly. So. What we do is consider the window "wide" if it - * either (a) occupies the whole width of newscr, or (b) occupies - * all but at most one column on either vertical edge of the screen - * (this caters to fussy people who put boxes around full-screen - * windows). Note that changing this formula will not break any code, - * merely change the costs of various update cases. + * Reset the clearok() flag in case it was set for the special + * case in hardscroll.c (if we don't reset it here, we'll get 2 + * refreshes because the flag is copied from stdscr to newscr). + * Resetting the flag shouldn't do any harm, anyway. */ - wide = (begx <= 1 && win->_maxx >= (newscr->_maxx - 1)); - - win->_flags &= ~_HASMOVED; + win->_clear = FALSE; + } + returnCode(code); +} - /* - * Microtweaking alert! This double loop is one of the genuine - * hot spots in the code. Even gcc doesn't seem to do enough - * common-subexpression chunking to make it really tense, - * so we'll force the issue. - */ +int +wnoutrefresh(WINDOW *win) +{ + NCURSES_SIZE_T limit_x; + NCURSES_SIZE_T i, j; + NCURSES_SIZE_T begx; + NCURSES_SIZE_T begy; + NCURSES_SIZE_T m, n; + bool wide; + + T((T_CALLED("wnoutrefresh(%p)"), win)); +#ifdef TRACE + if (_nc_tracing & TRACE_UPDATE) + _tracedump("...win", win); +#endif /* TRACE */ - /* limit(n) */ + /* + * This function will break badly if we try to refresh a pad. + */ + if ((win == 0) + || (win->_flags & _ISPAD)) + returnCode(ERR); + + /* put them here so "win == 0" won't break our code */ + begx = win->_begx; + begy = win->_begy; + + newscr->_bkgd = win->_bkgd; + newscr->_attrs = win->_attrs; + + /* merge in change information from all subwindows of this window */ + wsyncdown(win); + + /* + * For pure efficiency, we'd want to transfer scrolling information + * from the window to newscr whenever the window is wide enough that + * its update will dominate the cost of the update for the horizontal + * band of newscr that it occupies. Unfortunately, this threshold + * tends to be complex to estimate, and in any case scrolling the + * whole band and rewriting the parts outside win's image would look + * really ugly. So. What we do is consider the window "wide" if it + * either (a) occupies the whole width of newscr, or (b) occupies + * all but at most one column on either vertical edge of the screen + * (this caters to fussy people who put boxes around full-screen + * windows). Note that changing this formula will not break any code, + * merely change the costs of various update cases. + */ + wide = (begx <= 1 && win->_maxx >= (newscr->_maxx - 1)); + + win->_flags &= ~_HASMOVED; + + /* + * Microtweaking alert! This double loop is one of the genuine + * hot spots in the code. Even gcc doesn't seem to do enough + * common-subexpression chunking to make it really tense, + * so we'll force the issue. + */ + + /* limit(n) */ + limit_x = win->_maxx; + /* limit(j) */ + if (limit_x > win->_maxx) limit_x = win->_maxx; - /* limit(j) */ - if (limit_x > win->_maxx) - limit_x = win->_maxx; - - for (i = 0, m = begy + win->_yoffset; - i <= win->_maxy && m <= newscr->_maxy; - i++, m++) { - register struct ldat *nline = &newscr->_line[m]; - register struct ldat *oline = &win->_line[i]; - if (oline->firstchar != _NOCHANGE) { - int last = oline->lastchar; + for (i = 0, m = begy + win->_yoffset; + i <= win->_maxy && m <= newscr->_maxy; + i++, m++) { + register struct ldat *nline = &newscr->_line[m]; + register struct ldat *oline = &win->_line[i]; - if (last > limit_x) - last = limit_x; + if (oline->firstchar != _NOCHANGE) { + int last = oline->lastchar; - for (j = oline->firstchar, n = j + begx; j <= last; j++, n++) { - if (oline->text[j] != nline->text[n]) { - nline->text[n] = oline->text[j]; - CHANGED_CELL(nline, n); - } - } + if (last > limit_x) + last = limit_x; + for (j = oline->firstchar, n = j + begx; j <= last; j++, n++) { + if (oline->text[j] != nline->text[n]) { + nline->text[n] = oline->text[j]; + CHANGED_CELL(nline, n); } + } + } #if USE_SCROLL_HINTS - if (wide) { - int oind = oline->oldindex; + if (wide) { + int oind = oline->oldindex; - nline->oldindex = (oind == _NEWINDEX) ? _NEWINDEX : begy + oind + win->_yoffset; - } + nline->oldindex = (oind == _NEWINDEX) ? _NEWINDEX : begy + oind + + win->_yoffset; + } #endif /* USE_SCROLL_HINTS */ - oline->firstchar = oline->lastchar = _NOCHANGE; - if_USE_SCROLL_HINTS(oline->oldindex = i); - } + oline->firstchar = oline->lastchar = _NOCHANGE; + if_USE_SCROLL_HINTS(oline->oldindex = i); + } - if (win->_clear) { - win->_clear = FALSE; - newscr->_clear = TRUE; - } + if (win->_clear) { + win->_clear = FALSE; + newscr->_clear = TRUE; + } + + if (!win->_leaveok) { + newscr->_cury = win->_cury + win->_begy + win->_yoffset; + newscr->_curx = win->_curx + win->_begx; + } + newscr->_leaveok = win->_leaveok; - if (! win->_leaveok) { - newscr->_cury = win->_cury + win->_begy + win->_yoffset; - newscr->_curx = win->_curx + win->_begx; - } - newscr->_leaveok = win->_leaveok; - #ifdef TRACE - if (_nc_tracing & TRACE_UPDATE) - _tracedump("newscr", newscr); + if (_nc_tracing & TRACE_UPDATE) + _tracedump("newscr", newscr); #endif /* TRACE */ - returnCode(OK); + returnCode(OK); } diff --git a/ncurses/base/lib_scroll.c b/ncurses/base/lib_scroll.c index 197bb221..c2e3831d 100644 --- a/ncurses/base/lib_scroll.c +++ b/ncurses/base/lib_scroll.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_scroll.c ** @@ -44,75 +42,79 @@ #include -MODULE_ID("$Id: lib_scroll.c,v 1.16 1998/02/11 12:13:55 tom Exp $") +MODULE_ID("$Id: lib_scroll.c,v 1.17 2000/04/29 21:10:51 tom Exp $") -void _nc_scroll_window(WINDOW *win, int const n, short const top, short const bottom, chtype blank) +void +_nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top, + NCURSES_SIZE_T const bottom, chtype blank) { -int line, j; -size_t to_copy = (size_t)(sizeof(chtype) * (win->_maxx + 1)); - - TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %d, %d)", win, n, top,bottom)); - - /* - * This used to do a line-text pointer-shuffle instead of text copies. - * That (a) doesn't work when the window is derived and doesn't have - * its own storage, (b) doesn't save you a lot on modern machines - * anyway. Your typical memcpy implementations are coded in - * assembler using a tight BLT loop; for the size of copies we're - * talking here, the total execution time is dominated by the one-time - * setup cost. So there is no point in trying to be excessively - * clever -- esr. - */ - - /* shift n lines downwards */ - if (n < 0) { - for (line = bottom; line >= top-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 < top-n; line++) { - for (j = 0; j <= win->_maxx; j ++) - win->_line[line].text[j] = blank; - if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); - } - } - - /* shift n lines upwards */ - if (n > 0) { - for (line = top; line <= bottom-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 = bottom; line > bottom-n; line--) { - for (j = 0; j <= win->_maxx; j ++) - win->_line[line].text[j] = blank; - if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); - } + int line, j; + size_t to_copy = (size_t) (sizeof(chtype) * (win->_maxx + 1)); + + TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %d, %d)", win, n, top, bottom)); + + /* + * This used to do a line-text pointer-shuffle instead of text copies. + * That (a) doesn't work when the window is derived and doesn't have + * its own storage, (b) doesn't save you a lot on modern machines + * anyway. Your typical memcpy implementations are coded in + * assembler using a tight BLT loop; for the size of copies we're + * talking here, the total execution time is dominated by the one-time + * setup cost. So there is no point in trying to be excessively + * clever -- esr. + */ + + /* shift n lines downwards */ + if (n < 0) { + for (line = bottom; line >= top - 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 < top - n; line++) { + for (j = 0; j <= win->_maxx; j++) + win->_line[line].text[j] = blank; + if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); + } + } + + /* shift n lines upwards */ + if (n > 0) { + for (line = top; line <= bottom - 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 = bottom; line > bottom - n; line--) { + for (j = 0; j <= win->_maxx; j++) + win->_line[line].text[j] = blank; + if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX); } - touchline(win, top, bottom-top+1); + } + touchline(win, top, bottom - top + 1); } int wscrl(WINDOW *win, int n) { - T((T_CALLED("wscrl(%p,%d)"), win, n)); + T((T_CALLED("wscrl(%p,%d)"), win, n)); - if (!win || !win->_scroll) - returnCode(ERR); + if (!win || !win->_scroll) + returnCode(ERR); - if (n == 0) - returnCode(OK); + if (n == 0) + returnCode(OK); - if ((n > (win->_regbottom - win->_regtop)) || - (-n > (win->_regbottom - win->_regtop))) - returnCode(ERR); + if ((n > (win->_regbottom - win->_regtop)) || + (-n > (win->_regbottom - win->_regtop))) + returnCode(ERR); - _nc_scroll_window(win, n, win->_regtop, win->_regbottom, _nc_background(win)); + _nc_scroll_window(win, n, win->_regtop, win->_regbottom, _nc_background(win)); - _nc_synchook(win); - returnCode(OK); + _nc_synchook(win); + returnCode(OK); } diff --git a/ncurses/base/lib_scrreg.c b/ncurses/base/lib_scrreg.c index ddeab249..b47c047f 100644 --- a/ncurses/base/lib_scrreg.c +++ b/ncurses/base/lib_scrreg.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_scrreg.c ** @@ -42,21 +40,21 @@ #include -MODULE_ID("$Id: lib_scrreg.c,v 1.7 1998/02/11 12:13:53 tom Exp $") +MODULE_ID("$Id: lib_scrreg.c,v 1.8 2000/04/29 21:13:04 tom Exp $") -int wsetscrreg(WINDOW *win, int top, int bottom) +int +wsetscrreg(WINDOW *win, int top, int bottom) { - T((T_CALLED("wsetscrreg(%p,%d,%d)"), win, top, bottom)); - - if (win && - top >= 0 && top <= win->_maxy && - bottom >= 0 && bottom <= win->_maxy && - bottom > top) - { - win->_regtop = (short)top; - win->_regbottom = (short)bottom; - - returnCode(OK); - } else - returnCode(ERR); + T((T_CALLED("wsetscrreg(%p,%d,%d)"), win, top, bottom)); + + if (win && + top >= 0 && top <= win->_maxy && + bottom >= 0 && bottom <= win->_maxy && + bottom > top) { + win->_regtop = (NCURSES_SIZE_T) top; + win->_regbottom = (NCURSES_SIZE_T) bottom; + + returnCode(OK); + } else + returnCode(ERR); } diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index 443236cf..b4d547fc 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,276 +40,352 @@ #include -#include /* cur_term */ +#include /* cur_term */ +#include -MODULE_ID("$Id: lib_set_term.c,v 1.46 1999/07/24 20:05:49 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.55 2000/07/02 00:22:18 tom Exp $") -SCREEN * set_term(SCREEN *screenp) +SCREEN * +set_term(SCREEN * screenp) { -SCREEN *oldSP; + SCREEN *oldSP; - T((T_CALLED("set_term(%p)"), screenp)); + T((T_CALLED("set_term(%p)"), screenp)); - oldSP = SP; - _nc_set_screen(screenp); + oldSP = SP; + _nc_set_screen(screenp); - set_curterm(SP->_term); - curscr = SP->_curscr; - newscr = SP->_newscr; - stdscr = SP->_stdscr; - COLORS = SP->_color_count; - COLOR_PAIRS = SP->_pair_count; - memcpy(acs_map, SP->_acs_map, sizeof(chtype)*ACS_LEN); + set_curterm(SP->_term); + curscr = SP->_curscr; + newscr = SP->_newscr; + stdscr = SP->_stdscr; + COLORS = SP->_color_count; + COLOR_PAIRS = SP->_pair_count; + memcpy(acs_map, SP->_acs_map, sizeof(chtype) * ACS_LEN); - T((T_RETURN("%p"), oldSP)); - return(oldSP); + T((T_RETURN("%p"), oldSP)); + return (oldSP); } -static void _nc_free_keytry(struct tries *kt) +static void +_nc_free_keytry(struct tries *kt) { - if (kt != 0) { - _nc_free_keytry(kt->child); - _nc_free_keytry(kt->sibling); - free(kt); - } + if (kt != 0) { + _nc_free_keytry(kt->child); + _nc_free_keytry(kt->sibling); + free(kt); + } } /* * Free the storage associated with the given SCREEN sp. */ -void delscreen(SCREEN *sp) +void +delscreen(SCREEN * sp) { - SCREEN **scan = &_nc_screen_chain; + SCREEN **scan = &_nc_screen_chain; - T((T_CALLED("delscreen(%p)"), sp)); + T((T_CALLED("delscreen(%p)"), sp)); - while(*scan) - { - if (*scan == sp) - { - *scan = sp->_next_screen; - break; - } - scan = &(*scan)->_next_screen; + while (*scan) { + if (*scan == sp) { + *scan = sp->_next_screen; + break; } + scan = &(*scan)->_next_screen; + } + + _nc_freewin(sp->_curscr); + _nc_freewin(sp->_newscr); + _nc_freewin(sp->_stdscr); + _nc_free_keytry(sp->_keytry); + _nc_free_keytry(sp->_key_ok); + + FreeIfNeeded(sp->_color_table); + FreeIfNeeded(sp->_color_pairs); + + FreeIfNeeded(sp->oldhash); + FreeIfNeeded(sp->newhash); + + del_curterm(sp->_term); + + /* + * If the associated output stream has been closed, we can discard the + * set-buffer. Limit the error check to EBADF, since fflush may fail + * for other reasons than trying to operate upon a closed stream. + */ + if (sp->_ofp != 0 + && sp->_setbuf != 0 + && fflush(sp->_ofp) != 0 + && errno == EBADF) { + free(sp->_setbuf); + } + + free(sp); + + /* + * If this was the current screen, reset everything that the + * application might try to use (except cur_term, which may have + * multiple references in different screens). + */ + if (sp == SP) { + curscr = 0; + newscr = 0; + stdscr = 0; + COLORS = 0; + COLOR_PAIRS = 0; + _nc_set_screen(0); + } + returnVoid; +} - _nc_freewin(sp->_curscr); - _nc_freewin(sp->_newscr); - _nc_freewin(sp->_stdscr); - _nc_free_keytry(sp->_keytry); - _nc_free_keytry(sp->_key_ok); - - FreeIfNeeded(sp->_color_table); - FreeIfNeeded(sp->_color_pairs); +static ripoff_t rippedoff[5]; +static ripoff_t *rsp = rippedoff; +#define N_RIPS SIZEOF(rippedoff) - FreeIfNeeded(sp->oldhash); - FreeIfNeeded(sp->newhash); +static bool +no_mouse_event(SCREEN * sp GCC_UNUSED) +{ + return FALSE; +} - del_curterm(sp->_term); +static bool +no_mouse_inline(SCREEN * sp GCC_UNUSED) +{ + return FALSE; +} - free(sp); +static bool +no_mouse_parse(int code GCC_UNUSED) +{ + return TRUE; +} - /* - * If this was the current screen, reset everything that the - * application might try to use (except cur_term, which may have - * multiple references in different screens). - */ - if (sp == SP) { - curscr = 0; - newscr = 0; - stdscr = 0; - COLORS = 0; - COLOR_PAIRS = 0; - _nc_set_screen(0); - } - returnVoid; +static void +no_mouse_resume(SCREEN * sp GCC_UNUSED) +{ } -static ripoff_t rippedoff[5]; -static ripoff_t *rsp = rippedoff; -#define N_RIPS SIZEOF(rippedoff) +static void +no_mouse_wrap(SCREEN * sp GCC_UNUSED) +{ +} -static bool no_mouse_event (SCREEN *sp GCC_UNUSED) { return FALSE; } -static bool no_mouse_inline(SCREEN *sp GCC_UNUSED) { return FALSE; } -static bool no_mouse_parse (int code GCC_UNUSED) { return TRUE; } -static void no_mouse_resume(SCREEN *sp GCC_UNUSED) { } -static void no_mouse_wrap (SCREEN *sp GCC_UNUSED) { } +#if defined(NCURSES_EXT_FUNCS) && defined(USE_COLORFGBG) +static char * +extract_fgbg(char *src, int *result) +{ + char *dst = 0; + long value = strtol(src, &dst, 0); + + if (dst == 0) { + dst = src; + } else if (value >= 0) { + *result = value % max_colors; + } + while (*dst != 0 && *dst != ';') + dst++; + if (*dst == ';') + dst++; + return dst; +} +#endif -int _nc_setupscreen(short slines, short const scolumns, FILE *output) +int +_nc_setupscreen(short slines, short const scolumns, FILE * output) /* OS-independent screen initializations */ { -int bottom_stolen = 0; -size_t i; - - assert(SP==0); /* has been reset in newterm() ! */ - if (!_nc_alloc_screen()) - return ERR; - - SP->_next_screen = _nc_screen_chain; - _nc_screen_chain = SP; - - _nc_set_buffer(output, TRUE); - SP->_term = cur_term; - SP->_lines = slines; - SP->_lines_avail = slines; - SP->_columns = scolumns; - SP->_cursrow = -1; - SP->_curscol = -1; - SP->_nl = TRUE; - SP->_raw = FALSE; - SP->_cbreak = 0; - SP->_echo = TRUE; - SP->_fifohead = -1; - SP->_endwin = TRUE; - SP->_ofp = output; - SP->_cursor = -1; /* cannot know real cursor shape */ + int bottom_stolen = 0; + size_t i; + + assert(SP == 0); /* has been reset in newterm() ! */ + if (!_nc_alloc_screen()) + return ERR; + + SP->_next_screen = _nc_screen_chain; + _nc_screen_chain = SP; + + _nc_set_buffer(output, TRUE); + SP->_term = cur_term; + SP->_lines = slines; + SP->_lines_avail = slines; + SP->_columns = scolumns; + SP->_cursrow = -1; + SP->_curscol = -1; + SP->_nl = TRUE; + SP->_raw = FALSE; + SP->_cbreak = 0; + SP->_echo = TRUE; + SP->_fifohead = -1; + SP->_endwin = TRUE; + SP->_ofp = output; + SP->_cursor = -1; /* cannot know real cursor shape */ #ifdef NCURSES_NO_PADDING - SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0; + SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0; + TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used", + SP->_no_padding ? " not" : "")); #endif - - SP->_maxclick = DEFAULT_MAXCLICK; - SP->_mouse_event = no_mouse_event; - SP->_mouse_inline = no_mouse_inline; - SP->_mouse_parse = no_mouse_parse; - SP->_mouse_resume = no_mouse_resume; - SP->_mouse_wrap = no_mouse_wrap; - SP->_mouse_fd = -1; - - /* initialize the panel hooks */ - SP->_panelHook.top_panel = (struct panel*)0; - SP->_panelHook.bottom_panel = (struct panel*)0; - SP->_panelHook.stdscr_pseudo_panel = (struct panel*)0; - +#ifdef NCURSES_EXT_FUNCS + SP->_default_color = FALSE; + SP->_has_sgr_39_49 = FALSE; + SP->_default_fg = COLOR_WHITE; + SP->_default_bg = COLOR_BLACK; +#ifdef USE_COLORFGBG + /* + * If rxvt's $COLORFGBG variable is set, use it to specify the assumed + * default colors. Note that rxvt (mis)uses bold colors, equating a bold + * color to that value plus 8. We'll only use the non-bold color for now - + * decide later if it is worth having default attributes as well. + */ + if (getenv("COLORFGBG") != 0) { + char *p = getenv("COLORFGBG"); + p = extract_fgbg(p, &(SP->_default_fg)); + p = extract_fgbg(p, &(SP->_default_bg)); + } +#endif +#endif /* NCURSES_EXT_FUNCS */ + + SP->_maxclick = DEFAULT_MAXCLICK; + SP->_mouse_event = no_mouse_event; + SP->_mouse_inline = no_mouse_inline; + SP->_mouse_parse = no_mouse_parse; + SP->_mouse_resume = no_mouse_resume; + SP->_mouse_wrap = no_mouse_wrap; + SP->_mouse_fd = -1; + + /* initialize the panel hooks */ + SP->_panelHook.top_panel = (struct panel *) 0; + SP->_panelHook.bottom_panel = (struct panel *) 0; + SP->_panelHook.stdscr_pseudo_panel = (struct panel *) 0; + + /* + * If we've no magic cookie support, we suppress attributes that xmc + * would affect, i.e., the attributes that affect the rendition of a + * space. Note that this impacts the alternate character set mapping + * as well. + */ + if (magic_cookie_glitch > 0) { + + SP->_xmc_triggers = termattrs() & ( + A_ALTCHARSET | + A_BLINK | + A_BOLD | + A_REVERSE | + A_STANDOUT | + A_UNDERLINE + ); + SP->_xmc_suppress = SP->_xmc_triggers & (chtype) ~ (A_BOLD); + + T(("magic cookie attributes %s", _traceattr(SP->_xmc_suppress))); +#if USE_XMC_SUPPORT /* - * If we've no magic cookie support, we suppress attributes that xmc - * would affect, i.e., the attributes that affect the rendition of a - * space. Note that this impacts the alternate character set mapping - * as well. + * To keep this simple, suppress all of the optimization hooks + * except for clear_screen and the cursor addressing. */ - if (magic_cookie_glitch > 0) { - - SP->_xmc_triggers = termattrs() & ( - A_ALTCHARSET | - A_BLINK | - A_BOLD | - A_REVERSE | - A_STANDOUT | - A_UNDERLINE - ); - SP->_xmc_suppress = SP->_xmc_triggers & (chtype)~(A_BOLD); - - T(("magic cookie attributes %s", _traceattr(SP->_xmc_suppress))); -#if USE_XMC_SUPPORT - /* - * To keep this simple, suppress all of the optimization hooks - * except for clear_screen and the cursor addressing. - */ - clr_eol = 0; - clr_eos = 0; - set_attributes = 0; + clr_eol = 0; + clr_eos = 0; + set_attributes = 0; #else - magic_cookie_glitch = -1; - acs_chars = 0; + magic_cookie_glitch = ABSENT_NUMERIC; + acs_chars = 0; #endif - } - _nc_init_acs(); - memcpy(SP->_acs_map, acs_map, sizeof(chtype)*ACS_LEN); + } + _nc_init_acs(); + memcpy(SP->_acs_map, acs_map, sizeof(chtype) * ACS_LEN); - _nc_idcok = TRUE; - _nc_idlok = FALSE; + _nc_idcok = TRUE; + _nc_idlok = FALSE; - _nc_windows = 0; /* no windows yet */ + _nc_windows = 0; /* no windows yet */ - SP->oldhash = 0; - SP->newhash = 0; + SP->oldhash = 0; + SP->newhash = 0; - T(("creating newscr")); - if ((newscr = newwin(slines, scolumns, 0, 0)) == 0) - return ERR; + T(("creating newscr")); + if ((newscr = newwin(slines, scolumns, 0, 0)) == 0) + return ERR; - T(("creating curscr")); - if ((curscr = newwin(slines, scolumns, 0, 0)) == 0) - return ERR; + T(("creating curscr")); + if ((curscr = newwin(slines, scolumns, 0, 0)) == 0) + return ERR; - SP->_newscr = newscr; - SP->_curscr = curscr; + SP->_newscr = newscr; + SP->_curscr = curscr; #if USE_SIZECHANGE - SP->_resize = resizeterm; + SP->_resize = resizeterm; #endif - newscr->_clear = TRUE; - curscr->_clear = FALSE; - - for (i=0, rsp = rippedoff; rsp->line && (i < N_RIPS); rsp++, i++) { - if (rsp->hook) { - WINDOW *w; - int count = (rsp->line < 0) ? -rsp->line : rsp->line; - - if (rsp->line < 0) { - w = newwin(count,scolumns,SP->_lines_avail - count,0); - if (w) { - rsp->w = w; - rsp->hook(w, scolumns); - bottom_stolen += count; - } - else + newscr->_clear = TRUE; + curscr->_clear = FALSE; + + for (i = 0, rsp = rippedoff; rsp->line && (i < N_RIPS); rsp++, i++) { + if (rsp->hook) { + WINDOW *w; + int count = (rsp->line < 0) ? -rsp->line : rsp->line; + + if (rsp->line < 0) { + w = newwin(count, scolumns, SP->_lines_avail - count, 0); + if (w) { + rsp->w = w; + rsp->hook(w, scolumns); + bottom_stolen += count; + } else return ERR; - } else { - w = newwin(count,scolumns, 0, 0); - if (w) { - rsp->w = w; - rsp->hook(w, scolumns); - SP->_topstolen += count; - } - else + } else { + w = newwin(count, scolumns, 0, 0); + if (w) { + rsp->w = w; + rsp->hook(w, scolumns); + SP->_topstolen += count; + } else return ERR; - } - SP->_lines_avail -= count; - } - rsp->line = 0; + } + SP->_lines_avail -= count; } - /* reset the stack */ - rsp = rippedoff; + rsp->line = 0; + } + /* reset the stack */ + rsp = rippedoff; - T(("creating stdscr")); - assert ((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines); - if ((stdscr = newwin(LINES = SP->_lines_avail, scolumns, 0, 0)) == 0) - return ERR; - SP->_stdscr = stdscr; + T(("creating stdscr")); + assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines); + if ((stdscr = newwin(LINES = SP->_lines_avail, scolumns, 0, 0)) == 0) + return ERR; + SP->_stdscr = stdscr; - def_shell_mode(); - def_prog_mode(); + def_shell_mode(); + def_prog_mode(); - return OK; + return OK; } /* The internal implementation interprets line as the number of lines to rip off from the top or bottom. */ int -_nc_ripoffline(int line, int (*init)(WINDOW *,int)) +_nc_ripoffline(int line, int (*init) (WINDOW *, int)) { if (line == 0) - return(OK); + return (OK); if (rsp >= rippedoff + N_RIPS) - return(ERR); + return (ERR); rsp->line = line; rsp->hook = init; - rsp->w = 0; + rsp->w = 0; rsp++; - return(OK); + return (OK); } int -ripoffline(int line, int (*init)(WINDOW *, int)) +ripoffline(int line, int (*init) (WINDOW *, int)) { T((T_CALLED("ripoffline(%d,%p)"), line, init)); if (line == 0) returnCode(OK); - returnCode(_nc_ripoffline ((line<0) ? -1 : 1, init)); + returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init)); } diff --git a/ncurses/base/lib_slk.c b/ncurses/base/lib_slk.c index 9b9b09a4..21eae687 100644 --- a/ncurses/base/lib_slk.c +++ b/ncurses/base/lib_slk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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,13 +41,13 @@ #include #include /* num_labels, label_*, plab_norm */ -MODULE_ID("$Id: lib_slk.c,v 1.16 1999/03/03 23:44:22 juergen Exp $") +MODULE_ID("$Id: lib_slk.c,v 1.17 1999/10/30 23:00:16 tom Exp $") /* * We'd like to move these into the screen context structure, but cannot, * because slk_init() is called before initscr()/newterm(). */ -int _nc_slk_format; /* one more than format specified in slk_init() */ +int _nc_slk_format = 0; /* one more than format specified in slk_init() */ /* * Paint the info line for the PC style SLK emulation. diff --git a/ncurses/base/lib_vline.c b/ncurses/base/lib_vline.c index 007ef55c..e48b864f 100644 --- a/ncurses/base/lib_vline.c +++ b/ncurses/base/lib_vline.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* ** lib_vline.c ** @@ -42,36 +40,37 @@ #include -MODULE_ID("$Id: lib_vline.c,v 1.4 1998/06/28 00:10:12 tom Exp $") +MODULE_ID("$Id: lib_vline.c,v 1.5 2000/04/29 21:14:11 tom Exp $") -int wvline(WINDOW *win, chtype ch, int n) +int +wvline(WINDOW *win, chtype ch, int n) { -int code = ERR; -short row, col; -short end; + int code = ERR; + NCURSES_SIZE_T row, col; + NCURSES_SIZE_T end; - T((T_CALLED("wvline(%p,%s,%d)"), win, _tracechtype(ch), n)); + T((T_CALLED("wvline(%p,%s,%d)"), win, _tracechtype(ch), n)); - if (win) { - row = win->_cury; - col = win->_curx; - end = row + n - 1; - if (end > win->_maxy) - end = win->_maxy; + if (win) { + row = win->_cury; + col = win->_curx; + end = row + n - 1; + if (end > win->_maxy) + end = win->_maxy; - if (ch == 0) - ch = ACS_VLINE; - ch = _nc_render(win, ch); + if (ch == 0) + ch = ACS_VLINE; + ch = _nc_render(win, ch); - while(end >= row) { - struct ldat *line = &(win->_line[end]); - line->text[col] = ch; - CHANGED_CELL(line, col); - end--; - } - - _nc_synchook(win); - code = OK; + while (end >= row) { + struct ldat *line = &(win->_line[end]); + line->text[col] = ch; + CHANGED_CELL(line, col); + end--; } - returnCode(code); + + _nc_synchook(win); + code = OK; + } + returnCode(code); } diff --git a/ncurses/base/version.c b/ncurses/base/version.c index 74d46ae9..a2fe4d86 100644 --- a/ncurses/base/version.c +++ b/ncurses/base/version.c @@ -32,7 +32,7 @@ #include -MODULE_ID("$Id: version.c,v 1.1 1999/10/23 13:28:49 tom Exp $") +MODULE_ID("$Id: version.c,v 1.2 1999/12/04 21:27:23 tom Exp $") const char * curses_version(void) @@ -40,9 +40,8 @@ curses_version(void) static char my_version[80]; T((T_CALLED("curses_version()"))); - sprintf(my_version, "ncurses %d.%d.%d", - NCURSES_VERSION_MAJOR, - NCURSES_VERSION_MINOR, + sprintf(my_version, "ncurses %s.%d", + NCURSES_VERSION, NCURSES_VERSION_PATCH); returnPtr(my_version); } diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index 1b91476c..8121ff15 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,7 +32,7 @@ #include -MODULE_ID("$Id: wresize.c,v 1.12 1999/02/27 18:57:31 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.16 2000/03/05 00:14:35 tom Exp $") /* * Reallocate a curses WINDOW struct to either shrink or grow to the specified @@ -47,120 +47,133 @@ MODULE_ID("$Id: wresize.c,v 1.12 1999/02/27 18:57:31 tom Exp $") int wresize(WINDOW *win, int ToLines, int ToCols) { - register int row; - int size_x, size_y; - struct ldat *pline; - chtype blank; + register int row; + int size_x, size_y; + struct ldat *pline; + chtype blank; #ifdef TRACE - T((T_CALLED("wresize(%p,%d,%d)"), win, ToLines, ToCols)); - if (win) { - TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)", - win->_begy, win->_begx, - win->_maxy, win->_maxx, - win->_regtop, win->_regbottom)); - if (_nc_tracing & TRACE_UPDATE) + T((T_CALLED("wresize(%p,%d,%d)"), win, ToLines, ToCols)); + if (win) { + TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)", + win->_begy, win->_begx, + win->_maxy, win->_maxx, + win->_regtop, win->_regbottom)); + if (_nc_tracing & TRACE_UPDATE) _tracedump("...before", win); - } + } #endif - if (!win || --ToLines < 0 || --ToCols < 0) - returnCode(ERR); + if (!win || --ToLines < 0 || --ToCols < 0) + returnCode(ERR); - size_x = win->_maxx; - size_y = win->_maxy; + size_x = win->_maxx; + size_y = win->_maxy; - if (ToLines == size_y - && ToCols == size_x) - returnCode(OK); - - pline = (win->_flags & _SUBWIN) ? win->_parent->_line : 0; + if (ToLines == size_y + && ToCols == size_x) + returnCode(OK); + if ((win->_flags & _SUBWIN)) { /* - * If the number of lines has changed, adjust the size of the overall - * vector: + * Check if the new limits will fit into the parent window's size. If + * not, do not resize. We could adjust the location of the subwindow, + * but the application may not like that. */ - if (ToLines != size_y) { - if (! (win->_flags & _SUBWIN)) { - for (row = ToLines+1; row <= size_y; row++) - free((char *)(win->_line[row].text)); - } - - win->_line = ld_ALLOC(win->_line, ToLines+1); - if (win->_line == 0) - returnCode(ERR); - - for (row = size_y+1; row <= ToLines; row++) { - win->_line[row].text = 0; - win->_line[row].firstchar = 0; - win->_line[row].lastchar = ToCols; - if ((win->_flags & _SUBWIN)) { - win->_line[row].text = - &pline[win->_begy + row].text[win->_begx]; - } - } + if (win->_pary + ToLines > win->_parent->_maxy + || win->_parx + ToCols > win->_parent->_maxx) { + returnCode(ERR); } - - /* - * Adjust the width of the columns: - */ - blank = _nc_background(win); - for (row = 0; row <= ToLines; row++) { - chtype *s = win->_line[row].text; - int begin = (s == 0) ? 0 : size_x + 1; - int end = ToCols; - - if_USE_SCROLL_HINTS(win->_line[row].oldindex = row); - - if (ToCols != size_x || s == 0) { - if (! (win->_flags & _SUBWIN)) { - win->_line[row].text = s = c_ALLOC(s, ToCols+1); - if (win->_line[row].text == 0) - returnCode(ERR); - } else if (s == 0) { - win->_line[row].text = s = - &pline[win->_begy + row].text[win->_begx]; - } - - if (end >= begin) { /* growing */ - if (win->_line[row].firstchar < begin) - win->_line[row].firstchar = begin; - win->_line[row].lastchar = ToCols; - do { - s[end] = blank; - } while (--end >= begin); - } else { /* shrinking */ - win->_line[row].firstchar = 0; - win->_line[row].lastchar = ToCols; - } - } + pline = win->_parent->_line; + } else { + pline = 0; + } + + /* + * If the number of lines has changed, adjust the size of the overall + * vector: + */ + if (ToLines != size_y) { + if (!(win->_flags & _SUBWIN)) { + for (row = ToLines + 1; row <= size_y; row++) + free((char *) (win->_line[row].text)); } - /* - * Finally, adjust the parameters showing screen size and cursor - * position: - */ - win->_maxx = ToCols; - win->_maxy = ToLines; - - if (win->_regtop > win->_maxy) - win->_regtop = win->_maxy; - if (win->_regbottom > win->_maxy - || win->_regbottom == size_y) - win->_regbottom = win->_maxy; - - if (win->_curx > win->_maxx) - win->_curx = win->_maxx; - if (win->_cury > win->_maxy) - win->_cury = win->_maxy; + win->_line = ld_ALLOC(win->_line, ToLines + 1); + if (win->_line == 0) + returnCode(ERR); + + for (row = size_y + 1; row <= ToLines; row++) { + win->_line[row].text = 0; + win->_line[row].firstchar = 0; + win->_line[row].lastchar = ToCols; + if ((win->_flags & _SUBWIN)) { + win->_line[row].text = + &pline[win->_pary + row].text[win->_parx]; + } + } + } + + /* + * Adjust the width of the columns: + */ + blank = _nc_background(win); + for (row = 0; row <= ToLines; row++) { + chtype *s = win->_line[row].text; + int begin = (s == 0) ? 0 : size_x + 1; + int end = ToCols; + + if_USE_SCROLL_HINTS(win->_line[row].oldindex = row); + + if (ToCols != size_x || s == 0) { + if (!(win->_flags & _SUBWIN)) { + win->_line[row].text = s = c_ALLOC(s, ToCols + 1); + if (win->_line[row].text == 0) + returnCode(ERR); + } else if (s == 0) { + win->_line[row].text = s = + &pline[win->_pary + row].text[win->_parx]; + } + + if (end >= begin) { /* growing */ + if (win->_line[row].firstchar < begin) + win->_line[row].firstchar = begin; + win->_line[row].lastchar = ToCols; + do { + s[end] = blank; + } while (--end >= begin); + } else { /* shrinking */ + win->_line[row].firstchar = 0; + win->_line[row].lastchar = ToCols; + } + } + } + + /* + * Finally, adjust the parameters showing screen size and cursor + * position: + */ + win->_maxx = ToCols; + win->_maxy = ToLines; + + if (win->_regtop > win->_maxy) + win->_regtop = win->_maxy; + if (win->_regbottom > win->_maxy + || win->_regbottom == size_y) + win->_regbottom = win->_maxy; + + if (win->_curx > win->_maxx) + win->_curx = win->_maxx; + if (win->_cury > win->_maxy) + win->_cury = win->_maxy; #ifdef TRACE - TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)", - win->_begy, win->_begx, - win->_maxy, win->_maxx, - win->_regtop, win->_regbottom)); - if (_nc_tracing & TRACE_UPDATE) - _tracedump("...after:", win); + TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)", + win->_begy, win->_begx, + win->_maxy, win->_maxx, + win->_regtop, win->_regbottom)); + if (_nc_tracing & TRACE_UPDATE) + _tracedump("...after:", win); #endif - returnCode(OK); + returnCode(OK); } diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 76a92305..d3d5f296 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,7 +33,7 @@ /* - * $Id: curses.priv.h,v 1.144 1999/10/22 23:15:37 tom Exp $ + * $Id: curses.priv.h,v 1.162 2000/06/24 21:06:10 tom Exp $ * * curses.priv.h * @@ -97,8 +97,13 @@ extern int errno; #include /* Some systems have a broken 'select()', but workable 'poll()'. Use that */ -#if HAVE_POLL && HAVE_SYS_STROPTS_H && HAVE_POLL_H +#if HAVE_WORKING_POLL #define USE_FUNC_POLL 1 +#ifdef HAVE_POLL_H +#include +#else +#include +#endif #else #define USE_FUNC_POLL 0 #endif @@ -305,7 +310,7 @@ struct screen { int _cuu_cost; /* cost of (parm_cursor_up) */ int _hpa_cost; /* cost of (column_address) */ int _vpa_cost; /* cost of (row_address) */ - /* used in lib_doupdate.c, must be chars */ + /* used in tty_update.c, must be chars */ int _ed_cost; /* cost of (clr_eos) */ int _el_cost; /* cost of (clr_eol) */ int _el1_cost; /* cost of (clr_bol) */ @@ -317,6 +322,8 @@ struct screen { int _rep_cost; /* cost of (repeat_char) */ int _hpa_ch_cost; /* cost of (column_address) */ int _cup_ch_cost; /* cost of (cursor_address) */ + int _cuf_ch_cost; /* cost of (parm_cursor_right) */ + int _inline_cost; /* cost of inline-move */ int _smir_cost; /* cost of (enter_insert_mode) */ int _rmir_cost; /* cost of (exit_insert_mode) */ int _ip_cost; /* cost of (insert_padding) */ @@ -332,7 +339,12 @@ struct screen { int _color_count; /* count of colors in palette */ unsigned short *_color_pairs; /* screen's color pair list */ int _pair_count; /* count of color pairs */ - int _default_color; /* use default colors */ +#ifdef NCURSES_EXT_FUNCS + bool _default_color; /* use default colors */ + bool _has_sgr_39_49; /* has ECMA default color support */ + int _default_fg; /* assumed default foreground */ + int _default_bg; /* assumed default background */ +#endif chtype _xmc_suppress; /* attributes to suppress if xmc */ chtype _xmc_triggers; /* attributes to process if xmc */ chtype _acs_map[ACS_LEN]; @@ -390,6 +402,7 @@ struct screen { unsigned long *oldhash, *newhash; bool _cleanup; /* cleanup after int/quit signal */ + int (*_outch)(int); /* output handler if not putc */ }; extern SCREEN *_nc_screen_chain; @@ -454,6 +467,14 @@ typedef struct { #define F_OK 0 /* Test for existence. */ #endif +#if HAVE_FCNTL_H +#include /* may define O_BINARY */ +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #define TextOf(c) ((c) & (chtype)A_CHARTEXT) #define AttrOf(c) ((c) & (chtype)A_ATTRIBUTES) @@ -484,10 +505,12 @@ typedef struct { line->lastchar = end #define SIZEOF(v) (sizeof(v)/sizeof(v[0])) -#define typeMalloc(type,elts) (type *)malloc((elts)*sizeof(type)) -#define typeCalloc(type,elts) (type *)calloc((elts),sizeof(type)) -#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type)) -#define FreeIfNeeded(p) if(p != 0) free(p) + +#define FreeIfNeeded(p) if ((p) != 0) free(p) + +/* FreeAndNull() is not a comma-separated expression because some compilers + * do not accept a mixture of void with values. + */ #define FreeAndNull(p) free(p); p = 0 #include @@ -540,15 +563,15 @@ extern const char *_nc_visbuf2(int, const char *); #define XMC_CHANGES(c) ((c) & SP->_xmc_suppress) -#define toggle_attr_on(S,at) \ +#define toggle_attr_on(S,at) {\ if (PAIR_NUMBER(at) > 0)\ (S) = ((S) & ALL_BUT_COLOR) | (at);\ else\ (S) |= (at);\ - T(("new attribute is %s", _traceattr((S)))) + T(("new attribute is %s", _traceattr((S))));} -#define toggle_attr_off(S,at) \ +#define toggle_attr_off(S,at) {\ if (IGNORE_COLOR_OFF == TRUE) {\ if (PAIR_NUMBER(at) == 0xff) /* turn off color */\ (S) &= ~(at);\ @@ -560,7 +583,7 @@ extern const char *_nc_visbuf2(int, const char *); else /* leave color alone */\ (S) &= ~(at);\ }\ - T(("new attribute is %s", _traceattr((S)))); + T(("new attribute is %s", _traceattr((S))));} #define DelCharCost(count) \ ((parm_dch != 0) \ @@ -593,19 +616,10 @@ extern const char *_nc_visbuf2(int, const char *); } #else #define UpdateAttrs(c) if (SP->_current_attr != AttrOf(c)) \ - vidattr(AttrOf(c)); + vidattr(AttrOf(c)) #endif -/* - * Check whether the given character can be output by clearing commands. This - * includes test for being a space and not including any 'bad' attributes, such - * as A_REVERSE. All attribute flags which don't affect appearance of a space - * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded. - */ -#define can_clear_with(ch) \ - ((ch & ~(NONBLANK_ATTR|(back_color_erase ? A_COLOR:0))) == BLANK) - -#ifdef NCURSES_EXPANDED +#if defined(NCURSES_EXPANDED) && defined(NCURSES_EXT_FUNCS) #undef toggle_attr_on #define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at) @@ -615,10 +629,6 @@ extern void _nc_toggle_attr_on(attr_t *, attr_t); #define toggle_attr_off(S,at) _nc_toggle_attr_off(&(S), at) extern void _nc_toggle_attr_off(attr_t *, attr_t); -#undef can_clear_with -#define can_clear_with(ch) _nc_can_clear_with(ch) -extern int _nc_can_clear_with(chtype); - #undef DelCharCost #define DelCharCost(count) _nc_DelCharCost(count) extern int _nc_DelCharCost(int); @@ -641,13 +651,6 @@ extern void _nc_expanded(void); #define getcwd(buf,len) getwd(buf) #endif -/* doalloc.c */ -extern void *_nc_doalloc(void *, size_t); -#if !HAVE_STRDUP -#define strdup _nc_strdup -extern char *_nc_strdup(const char *); -#endif - /* doupdate.c */ #if USE_XMC_SUPPORT extern void _nc_do_xmc_glitch(attr_t); @@ -687,7 +690,7 @@ extern int _nc_has_mouse(void); extern char * _nc_printf_string(const char *fmt, va_list ap); /* tries.c */ -extern void _nc_add_to_try(struct tries **tree, char *str, unsigned short code); +extern void _nc_add_to_try(struct tries **tree, const char *str, unsigned short code); extern char *_nc_expand_try(struct tries *tree, unsigned short code, int *count, size_t len); extern int _nc_remove_key(struct tries **tree, unsigned short code); extern int _nc_remove_string(struct tries **tree, char *string); @@ -707,18 +710,19 @@ extern int _nc_outch(int); extern int _nc_setupscreen(short, short const, FILE *); extern int _nc_timed_wait(int, int, int *); extern int _nc_waddch_nosync(WINDOW *, const chtype); -extern void _nc_do_color(int, bool, int (*)(int)); +extern void _nc_do_color(int, int, bool, int (*)(int)); extern void _nc_freeall(void); extern void _nc_freewin(WINDOW *win); extern void _nc_hash_map(void); extern void _nc_init_keytry(void); extern void _nc_keep_tic_dir(const char *); extern void _nc_make_oldhash(int i); +extern void _nc_flush(void); extern void _nc_outstr(const char *str); extern void _nc_scroll_oldhash(int n, int top, int bot); extern void _nc_scroll_optimize(void); extern void _nc_scroll_window(WINDOW *, int const, short const, short const, chtype); -extern void _nc_set_buffer(FILE *ofp, bool buffered); +extern void _nc_set_buffer(FILE *, bool); extern void _nc_signal_handler(bool); extern void _nc_synchook(WINDOW *win); extern void _nc_trace_tries(struct tries *tree); @@ -727,6 +731,10 @@ extern void _nc_trace_tries(struct tries *tree); extern void _nc_update_screensize(void); #endif +#ifdef USE_WIDEC_SUPPORT +extern int _nc_utf8_outch(int); +#endif + /* scroll indices */ extern int *_nc_oldnums; @@ -737,7 +745,6 @@ extern int *_nc_oldnums; _nc_set_buffer(SP->_ofp, flag) #define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout) -#define _nc_flush() (void)fflush(NC_OUTPUT) /* * On systems with a broken linker, define 'SP' as a function to force the diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses index 83a1e0e7..82f3e06f 100644 --- a/ncurses/llib-lncurses +++ b/ncurses/llib-lncurses @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996,1997,1998,1999 * + * Author: Thomas E. Dickey 1996-2000 * ****************************************************************************/ /* LINTLIBRARY */ @@ -42,6 +42,10 @@ int *_nc_oldnums; void _nc_scroll_optimize(void) { /* void */ } +#undef _nc_linedump +void _nc_linedump(void) + { /* void */ } + /* ./tty/hashmap.c */ #include @@ -196,6 +200,8 @@ int wclrtoeol( /* ./base/lib_color.c */ +#include + #undef COLOR_PAIRS int COLOR_PAIRS; #undef COLORS @@ -245,6 +251,7 @@ int pair_content( #undef _nc_do_color void _nc_do_color( + int old_pair, int pair, bool reverse, int (*outc)( @@ -446,6 +453,10 @@ int echochar( const chtype z) { return(*(int *)0); } +#undef erase +int erase(void) + { return(*(int *)0); } + #undef getbkgd chtype getbkgd( WINDOW *z) @@ -888,6 +899,18 @@ void timeout( int z) { /* void */ } +#undef touchline +int touchline( + WINDOW *a1, + int a2, + int z) + { return(*(int *)0); } + +#undef touchwin +int touchwin( + WINDOW *z) + { return(*(int *)0); } + #undef untouchwin int untouchwin( WINDOW *z) @@ -1059,8 +1082,6 @@ int winchnstr( /* ./base/lib_initscr.c */ -#include - #undef initscr WINDOW *initscr(void) { return(*(WINDOW **)0); } @@ -1192,6 +1213,9 @@ int mvcur( int xnew) { return(*(int *)0); } +#undef _nc_optimize_enable +int _nc_optimize_enable; + /* ./base/lib_mvwin.c */ #undef mvwin @@ -1677,21 +1701,47 @@ int wtouchln( /* ./trace/lib_traceatr.c */ -#undef _nc_lib_traceatr -void _nc_lib_traceatr(void) - { /* void */ } +#undef _traceattr2 +char *_traceattr2( + int bufnum, + attr_t newmode) + { return(*(char **)0); } + +#undef _traceattr +char *_traceattr( + attr_t newmode) + { return(*(char **)0); } + +#undef _nc_retrace_attr_t +attr_t _nc_retrace_attr_t( + attr_t code) + { return(*(attr_t *)0); } + +#undef _tracechtype2 +char *_tracechtype2( + int bufnum, + chtype ch) + { return(*(char **)0); } + +#undef _tracechtype +char *_tracechtype( + chtype ch) + { return(*(char **)0); } /* ./trace/lib_tracedmp.c */ -#undef _nc_lib_tracedmp -void _nc_lib_tracedmp(void) +#undef _tracedump +void _tracedump( + const char *name, + WINDOW *win) { /* void */ } /* ./trace/lib_tracemse.c */ -#undef _nc_lib_tracemouse -void _nc_lib_tracemouse(void) - { /* void */ } +#undef _tracemouse +char *_tracemouse( + MEVENT const *ep) + { return(*(char **)0); } /* ./tty/lib_tstp.c */ @@ -1705,6 +1755,10 @@ void _nc_signal_handler( /* ./base/lib_ungetch.c */ +#undef _nc_fifo_dump +void _nc_fifo_dump(void) + { /* void */ } + #undef ungetch int ungetch( int ch) @@ -1819,6 +1873,7 @@ char *_nc_printf_string( /* ./tty/tty_update.c */ #include +#include #undef doupdate int doupdate(void) @@ -1936,6 +1991,12 @@ int keyok( int use_default_colors(void) { return(*(int *)0); } +#undef assume_default_colors +int assume_default_colors( + int fg, + int bg) + { return(*(int *)0); } + /* ./base/lib_freeall.c */ #include @@ -2017,7 +2078,7 @@ int _nc_access( #undef _nc_add_to_try void _nc_add_to_try( struct tries **tree, - char *str, + const char *str, unsigned short code) { /* void */ } @@ -2191,7 +2252,7 @@ ENTRY *_nc_tail; #undef _nc_free_entries void _nc_free_entries( - ENTRY *head) + ENTRY *headp) { /* void */ } #undef _nc_entry_match @@ -2211,7 +2272,8 @@ void _nc_read_entry_source( { /* void */ } #undef _nc_resolve_uses -int _nc_resolve_uses(void) +int _nc_resolve_uses( + bool fullresolve) { return(*(int *)0); } /* ./tinfo/comp_scan.c */ @@ -2226,6 +2288,10 @@ long _nc_comment_start; long _nc_comment_end; #undef _nc_start_line long _nc_start_line; +#undef _nc_curr_token +struct token _nc_curr_token; +#undef _nc_disable_period +bool _nc_disable_period; #undef _nc_get_token int _nc_get_token(void) @@ -2233,7 +2299,8 @@ int _nc_get_token(void) #undef _nc_trans_string char _nc_trans_string( - char *ptr) + char *ptr, + char *last) { return(*(char *)0); } #undef _nc_push_token @@ -2301,11 +2368,10 @@ char *_nc_home_terminfo(void) #include -#endif +#undef _nc_tinfo_fkeys +struct tinfo_fkeys _nc_tinfo_fkeys[]; -#undef _nc_tinfo_fkeysf -struct tinfo_fkeys *_nc_tinfo_fkeysf(void) - { return(*(struct tinfo_fkeys **)0); } +#endif #undef _nc_init_keytry void _nc_init_keytry(void) @@ -2645,6 +2711,10 @@ int delay_output( int ms) { return(*(int *)0); } +#undef _nc_flush +void _nc_flush(void) + { /* void */ } + #undef _nc_outch int _nc_outch( int ch) @@ -2665,10 +2735,12 @@ int tputs( /* ./trace/lib_trace.c */ -#include - #undef _nc_tracing unsigned _nc_tracing; +#undef _nc_tputs_trace +const char *_nc_tputs_trace = {0}; +#undef _nc_outchars +long _nc_outchars; #undef trace void trace( @@ -2686,8 +2758,34 @@ const char *_nc_visbuf( const char *buf) { return(*(const char **)0); } +#undef _tracef +void _tracef( + const char *fmt, + ...) + { /* void */ } + +#undef _nc_retrace_int +int _nc_retrace_int( + int code) + { return(*(int *)0); } + +#undef _nc_retrace_ptr +char *_nc_retrace_ptr( + char *code) + { return(*(char **)0); } + +#undef _nc_retrace_win +WINDOW *_nc_retrace_win( + WINDOW *code) + { return(*(WINDOW **)0); } + /* ./trace/lib_tracebits.c */ +typedef struct { + unsigned int val; + const char *name; +} BITNAMES; + #undef _nc_tracebits char *_nc_tracebits(void) { return(*(char **)0); } @@ -2774,8 +2872,6 @@ char *const strnames[] = {0}; char *const strfnames[] = {0}; /* ./tinfo/parse_entry.c */ -#undef _nc_curr_token -struct token _nc_curr_token; #undef _nc_parse_entry int _nc_parse_entry( @@ -2790,7 +2886,10 @@ int _nc_capcmp( const char *t) { return(*(int *)0); } -typedef struct {const char *from; const char *to;} assoc; +typedef struct { + const char *from; + const char *to; +} assoc; /* ./tinfo/read_entry.c */ diff --git a/ncurses/modules b/ncurses/modules index 4b9c5dfe..12ed6a5f 100644 --- a/ncurses/modules +++ b/ncurses/modules @@ -1,6 +1,6 @@ -# $Id: modules,v 1.70 1999/10/23 12:39:12 tom Exp $ +# $Id: modules,v 1.72 2000/02/13 01:03:28 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999 Free Software Foundation, Inc. # +# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -27,7 +27,7 @@ # authorization. # ############################################################################## # -# Author: Thomas E. Dickey 1996,1997,1998 +# Author: Thomas E. Dickey 1996-1998 # @ base @@ -165,7 +165,7 @@ lib_napms lib $(tinfo) lib_options lib $(tinfo) ../include/term.h lib_raw lib $(tinfo) ../include/term.h lib_setup lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h -lib_termcap lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h +lib_termcap lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h $(INCDIR)/capdefaults.c lib_termname lib $(tinfo) $(INCDIR)/tic.h lib_ti lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h lib_tparm lib $(tinfo) ../include/term.h $(INCDIR)/tic.h @@ -177,7 +177,7 @@ lib_ttyflags lib $(tinfo) ../include/term.h lib_twait lib $(serial) name_match lib $(tinfo) ../include/term.h $(INCDIR)/tic.h names lib . -parse_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h ../include/parametrized.h +parse_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h ../include/parametrized.h $(INCDIR)/capdefaults.c read_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h read_termcap lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h setbuf lib $(tinfo) diff --git a/ncurses/tinfo/add_tries.c b/ncurses/tinfo/add_tries.c index 95a9e965..601fb663 100644 --- a/ncurses/tinfo/add_tries.c +++ b/ncurses/tinfo/add_tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,86 +39,87 @@ #include -MODULE_ID("$Id: add_tries.c,v 1.1 1998/11/08 00:04:18 tom Exp $") +MODULE_ID("$Id: add_tries.c,v 1.2 2000/03/18 22:23:56 tom Exp $") #define SET_TRY(dst,src) if ((dst->ch = *src++) == 128) dst->ch = '\0' #define CMP_TRY(a,b) ((a)? (a == b) : (b == 128)) -void _nc_add_to_try(struct tries **tree, char *str, unsigned short code) +void +_nc_add_to_try(struct tries **tree, const char *str, unsigned short code) { - static bool out_of_memory = FALSE; - struct tries *ptr, *savedptr; - unsigned char *txt = (unsigned char *)str; - - if (txt == 0 || *txt == '\0' || out_of_memory || code == 0) - return; - - if ((*tree) != 0) { - ptr = savedptr = (*tree); - - for (;;) { - unsigned char cmp = *txt; - - while (!CMP_TRY(ptr->ch, cmp) - && ptr->sibling != 0) - ptr = ptr->sibling; - - if (CMP_TRY(ptr->ch, cmp)) { - if (*(++txt) == '\0') { - ptr->value = code; - return; - } - if (ptr->child != 0) - ptr = ptr->child; - else - break; - } else { - if ((ptr->sibling = typeCalloc(struct tries,1)) == 0) { - out_of_memory = TRUE; - return; - } - - savedptr = ptr = ptr->sibling; - SET_TRY(ptr,txt); - ptr->value = 0; - - break; - } - } /* end for (;;) */ - } else { /* (*tree) == 0 :: First sequence to be added */ - savedptr = ptr = (*tree) = typeCalloc(struct tries,1); - - if (ptr == 0) { - out_of_memory = TRUE; - return; + static bool out_of_memory = FALSE; + struct tries *ptr, *savedptr; + unsigned const char *txt = (unsigned const char *) str; + + if (txt == 0 || *txt == '\0' || out_of_memory || code == 0) + return; + + if ((*tree) != 0) { + ptr = savedptr = (*tree); + + for (;;) { + unsigned char cmp = *txt; + + while (!CMP_TRY(ptr->ch, cmp) + && ptr->sibling != 0) + ptr = ptr->sibling; + + if (CMP_TRY(ptr->ch, cmp)) { + if (*(++txt) == '\0') { + ptr->value = code; + return; + } + if (ptr->child != 0) + ptr = ptr->child; + else + break; + } else { + if ((ptr->sibling = typeCalloc(struct tries, 1)) == 0) { + out_of_memory = TRUE; + return; } - SET_TRY(ptr,txt); + savedptr = ptr = ptr->sibling; + SET_TRY(ptr, txt); ptr->value = 0; + + break; + } + } /* end for (;;) */ + } else { /* (*tree) == 0 :: First sequence to be added */ + savedptr = ptr = (*tree) = typeCalloc(struct tries, 1); + + if (ptr == 0) { + out_of_memory = TRUE; + return; } - /* at this point, we are adding to the try. ptr->child == 0 */ + SET_TRY(ptr, txt); + ptr->value = 0; + } - while (*txt) { - ptr->child = typeCalloc(struct tries,1); + /* at this point, we are adding to the try. ptr->child == 0 */ - ptr = ptr->child; + while (*txt) { + ptr->child = typeCalloc(struct tries, 1); - if (ptr == 0) { - out_of_memory = TRUE; + ptr = ptr->child; - while ((ptr = savedptr) != 0) { - savedptr = ptr->child; - free(ptr); - } + if (ptr == 0) { + out_of_memory = TRUE; - return; - } + while ((ptr = savedptr) != 0) { + savedptr = ptr->child; + free(ptr); + } - SET_TRY(ptr,txt); - ptr->value = 0; + return; } - ptr->value = code; - return; + SET_TRY(ptr, txt); + ptr->value = 0; + } + + ptr->value = code; + return; } diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index 570b48a9..17489372 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * alloc_entry.c -- allocation functions for terminfo entries * @@ -48,149 +47,152 @@ #include #include -MODULE_ID("$Id: alloc_entry.c,v 1.30 1999/03/01 02:03:45 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.32 2000/03/12 00:16:31 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 #define MAX_STRTAB 4096 /* documented maximum entry size */ -static char stringbuf[MAX_STRTAB]; /* buffer for string capabilities */ -static size_t next_free; /* next free character in stringbuf */ +static char stringbuf[MAX_STRTAB]; /* buffer for string capabilities */ +static size_t next_free; /* next free character in stringbuf */ -void _nc_init_entry(TERMTYPE *const tp) +void +_nc_init_entry(TERMTYPE * const tp) /* initialize a terminal type data block */ { -int i; + int i; #if NCURSES_XNAMES - tp->num_Booleans = BOOLCOUNT; - tp->num_Numbers = NUMCOUNT; - tp->num_Strings = STRCOUNT; - tp->ext_Booleans = 0; - tp->ext_Numbers = 0; - tp->ext_Strings = 0; + tp->num_Booleans = BOOLCOUNT; + tp->num_Numbers = NUMCOUNT; + tp->num_Strings = STRCOUNT; + tp->ext_Booleans = 0; + tp->ext_Numbers = 0; + tp->ext_Strings = 0; #endif - if (tp->Booleans == 0) - tp->Booleans = typeMalloc(char,BOOLCOUNT); - if (tp->Numbers == 0) - tp->Numbers = typeMalloc(short,NUMCOUNT); - if (tp->Strings == 0) - tp->Strings = typeMalloc(char *,STRCOUNT); + if (tp->Booleans == 0) + tp->Booleans = typeMalloc(char, BOOLCOUNT); + if (tp->Numbers == 0) + tp->Numbers = typeMalloc(short, NUMCOUNT); + if (tp->Strings == 0) + tp->Strings = typeMalloc(char *, STRCOUNT); - for_each_boolean(i,tp) - tp->Booleans[i] = FALSE; + for_each_boolean(i, tp) + tp->Booleans[i] = FALSE; - for_each_number(i,tp) - tp->Numbers[i] = ABSENT_NUMERIC; + for_each_number(i, tp) + tp->Numbers[i] = ABSENT_NUMERIC; - for_each_string(i,tp) - tp->Strings[i] = ABSENT_STRING; + for_each_string(i, tp) + tp->Strings[i] = ABSENT_STRING; - next_free = 0; + next_free = 0; } -ENTRY *_nc_copy_entry(ENTRY *oldp) +ENTRY * +_nc_copy_entry(ENTRY * oldp) { - ENTRY *newp = typeCalloc(ENTRY,1); + ENTRY *newp = typeCalloc(ENTRY, 1); - if (newp != 0) { - *newp = *oldp; - _nc_copy_termtype(&(newp->tterm), &(oldp->tterm)); - } - return newp; + if (newp != 0) { + *newp = *oldp; + _nc_copy_termtype(&(newp->tterm), &(oldp->tterm)); + } + return newp; } -char *_nc_save_str(const char *const string) +char * +_nc_save_str(const char *const string) /* save a copy of string in the string buffer */ { -size_t old_next_free = next_free; -size_t len = strlen(string) + 1; - - if (next_free + len < MAX_STRTAB) - { - strcpy(&stringbuf[next_free], string); - DEBUG(7, ("Saved string %s", _nc_visbuf(string))); - DEBUG(7, ("at location %d", (int) next_free)); - next_free += len; - } - return(stringbuf + old_next_free); + size_t old_next_free = next_free; + size_t len = strlen(string) + 1; + + if (next_free + len < MAX_STRTAB) { + strcpy(&stringbuf[next_free], string); + DEBUG(7, ("Saved string %s", _nc_visbuf(string))); + DEBUG(7, ("at location %d", (int) next_free)); + next_free += len; + } + return (stringbuf + old_next_free); } -void _nc_wrap_entry(ENTRY *const ep) +void +_nc_wrap_entry(ENTRY * const ep) /* copy the string parts to allocated storage, preserving pointers to it */ { -int offsets[MAX_ENTRY_SIZE/2], useoffsets[MAX_USES]; -int i, n; -TERMTYPE *tp = &(ep->tterm); - - n = tp->term_names - stringbuf; - for_each_string(i, &(ep->tterm)) { - if (tp->Strings[i] == ABSENT_STRING) - offsets[i] = ABSENT_OFFSET; - else if (tp->Strings[i] == CANCELLED_STRING) - offsets[i] = CANCELLED_OFFSET; - else - offsets[i] = tp->Strings[i] - stringbuf; - } + int offsets[MAX_ENTRY_SIZE / 2], useoffsets[MAX_USES]; + int i, n; + TERMTYPE *tp = &(ep->tterm); + + n = tp->term_names - stringbuf; + for_each_string(i, &(ep->tterm)) { + if (tp->Strings[i] == ABSENT_STRING) + offsets[i] = ABSENT_OFFSET; + else if (tp->Strings[i] == CANCELLED_STRING) + offsets[i] = CANCELLED_OFFSET; + else + offsets[i] = tp->Strings[i] - stringbuf; + } - for (i=0; i < ep->nuses; i++) { - if (ep->uses[i].parent == (void *)0) - useoffsets[i] = ABSENT_OFFSET; - else - useoffsets[i] = (char *)(ep->uses[i].parent) - stringbuf; - } + for (i = 0; i < ep->nuses; i++) { + if (ep->uses[i].name == 0) + useoffsets[i] = ABSENT_OFFSET; + else + useoffsets[i] = ep->uses[i].name - stringbuf; + } - if ((tp->str_table = typeMalloc(char, next_free)) == (char *)0) - _nc_err_abort("Out of memory"); - (void) memcpy(tp->str_table, stringbuf, next_free); - - tp->term_names = tp->str_table + n; - for_each_string(i, &(ep->tterm)) { - if (offsets[i] == ABSENT_OFFSET) - tp->Strings[i] = ABSENT_STRING; - else if (offsets[i] == CANCELLED_OFFSET) - tp->Strings[i] = CANCELLED_STRING; - else - tp->Strings[i] = tp->str_table + offsets[i]; - } + if ((tp->str_table = typeMalloc(char, next_free)) == (char *) 0) + _nc_err_abort("Out of memory"); + (void) memcpy(tp->str_table, stringbuf, next_free); + + tp->term_names = tp->str_table + n; + for_each_string(i, &(ep->tterm)) { + if (offsets[i] == ABSENT_OFFSET) + tp->Strings[i] = ABSENT_STRING; + else if (offsets[i] == CANCELLED_OFFSET) + tp->Strings[i] = CANCELLED_STRING; + else + tp->Strings[i] = tp->str_table + offsets[i]; + } #if NCURSES_XNAMES - if ((n = NUM_EXT_NAMES(tp)) != 0) { - unsigned length = 0; - for (i = 0; i < n; i++) { - length += strlen(tp->ext_Names[i]) + 1; - offsets[i] = tp->ext_Names[i] - stringbuf; - } - if ((tp->ext_str_table = typeMalloc(char, length)) == 0) - _nc_err_abort("Out of memory"); - for (i = 0, length = 0; i < n; i++) { - tp->ext_Names[i] = tp->ext_str_table + length; - strcpy(tp->ext_Names[i], stringbuf + offsets[i]); - length += strlen(tp->ext_Names[i]) + 1; - } + if ((n = NUM_EXT_NAMES(tp)) != 0) { + unsigned length = 0; + for (i = 0; i < n; i++) { + length += strlen(tp->ext_Names[i]) + 1; + offsets[i] = tp->ext_Names[i] - stringbuf; + } + if ((tp->ext_str_table = typeMalloc(char, length)) == 0) + _nc_err_abort("Out of memory"); + for (i = 0, length = 0; i < n; i++) { + tp->ext_Names[i] = tp->ext_str_table + length; + strcpy(tp->ext_Names[i], stringbuf + offsets[i]); + length += strlen(tp->ext_Names[i]) + 1; } + } #endif - for (i=0; i < ep->nuses; i++) { - if (useoffsets[i] == ABSENT_OFFSET) - ep->uses[i].parent = (void *)0; - else - ep->uses[i].parent = (char *)(tp->str_table + useoffsets[i]); - } + for (i = 0; i < ep->nuses; i++) { + if (useoffsets[i] == ABSENT_OFFSET) + ep->uses[i].name = 0; + else + ep->uses[i].name = (tp->str_table + useoffsets[i]); + } } -void _nc_merge_entry(TERMTYPE *const to, TERMTYPE *const from) +void +_nc_merge_entry(TERMTYPE * const to, TERMTYPE * const from) /* merge capabilities from `from' entry into `to' entry */ { - int i; + int i; #if NCURSES_XNAMES _nc_align_termtype(to, from); #endif - for_each_boolean(i, from) - { - int mergebool = from->Booleans[i]; + for_each_boolean(i, from) { + int mergebool = from->Booleans[i]; if (mergebool == CANCELLED_BOOLEAN) to->Booleans[i] = FALSE; @@ -198,9 +200,8 @@ void _nc_merge_entry(TERMTYPE *const to, TERMTYPE *const from) to->Booleans[i] = mergebool; } - for_each_number(i, from) - { - int mergenum = from->Numbers[i]; + for_each_number(i, from) { + int mergenum = from->Numbers[i]; if (mergenum == CANCELLED_NUMERIC) to->Numbers[i] = ABSENT_NUMERIC; @@ -213,9 +214,8 @@ void _nc_merge_entry(TERMTYPE *const to, TERMTYPE *const from) * storage. This is OK right now, but will be a problem if we * we ever want to deallocate entries. */ - for_each_string(i, from) - { - char *mergestring = from->Strings[i]; + for_each_string(i, from) { + char *mergestring = from->Strings[i]; if (mergestring == CANCELLED_STRING) to->Strings[i] = ABSENT_STRING; diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c index a1bf9b07..660381a3 100644 --- a/ncurses/tinfo/alloc_ttype.c +++ b/ncurses/tinfo/alloc_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -30,7 +30,6 @@ * Author: Thomas E. Dickey 1999 * ****************************************************************************/ - /* * align_ttype.c -- functions for TERMTYPE * @@ -44,14 +43,15 @@ #include #include -MODULE_ID("$Id: alloc_ttype.c,v 1.6 1999/03/01 22:10:44 tom Exp $") +MODULE_ID("$Id: alloc_ttype.c,v 1.8 2000/03/25 17:03:11 tom Exp $") #if NCURSES_XNAMES /* * Merge the a/b lists into dst. Both a/b are sorted (see _nc_extend_names()), * so we do not have to worry about order dependencies. */ -static int merge_names(char **dst, char **a, int na, char **b, int nb) +static int +merge_names(char **dst, char **a, int na, char **b, int nb) { int n = 0; while (na && nb) { @@ -78,7 +78,8 @@ static int merge_names(char **dst, char **a, int na, char **b, int nb) return n; } -static bool find_name(char **table, int length, char *name) +static bool +find_name(char **table, int length, char *name) { while (length-- > 0) { if (!strcmp(*table++, name)) { @@ -90,7 +91,9 @@ static bool find_name(char **table, int length, char *name) return FALSE; } -static void realign_data(TERMTYPE *to, char **ext_Names, int ext_Booleans, int ext_Numbers, int ext_Strings) +static void +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); @@ -98,9 +101,9 @@ static void realign_data(TERMTYPE *to, char **ext_Names, int ext_Booleans, int e if (to->ext_Booleans != ext_Booleans) { to->num_Booleans += (ext_Booleans - to->ext_Booleans); to->Booleans = typeRealloc(char, to->num_Booleans, to->Booleans); - for (n = to->ext_Booleans-1, - m = ext_Booleans-1, - base = to->num_Booleans - (m+1); m >= 0; m--) { + for (n = to->ext_Booleans - 1, + m = ext_Booleans - 1, + base = to->num_Booleans - (m + 1); m >= 0; m--) { if (find_name(to->ext_Names, limit, ext_Names[m])) { to->Booleans[base + m] = to->Booleans[base + n--]; } else { @@ -112,24 +115,24 @@ static void realign_data(TERMTYPE *to, char **ext_Names, int ext_Booleans, int e if (to->ext_Numbers != ext_Numbers) { to->num_Numbers += (ext_Numbers - to->ext_Numbers); to->Numbers = typeRealloc(short, to->num_Numbers, to->Numbers); - for (n = to->ext_Numbers-1, - m = ext_Numbers-1, - base = to->num_Numbers - (m+1); m >= 0; m--) { - if (find_name(to->ext_Names, limit, ext_Names[m+ext_Booleans])) { + for (n = to->ext_Numbers - 1, + m = ext_Numbers - 1, + base = to->num_Numbers - (m + 1); m >= 0; m--) { + if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans])) { to->Numbers[base + m] = to->Numbers[base + n--]; } else { to->Numbers[base + m] = ABSENT_NUMERIC; } } - to->ext_Numbers = ext_Numbers; + to->ext_Numbers = ext_Numbers; } if (to->ext_Strings != ext_Strings) { to->num_Strings += (ext_Strings - to->ext_Strings); - to->Strings = typeRealloc(char*, to->num_Strings, to->Strings); - for (n = to->ext_Strings-1, - m = ext_Strings-1, - base = to->num_Strings - (m+1); m >= 0; m--) { - if (find_name(to->ext_Names, limit, ext_Names[m+ext_Booleans+ext_Numbers])) { + to->Strings = typeRealloc(char *, to->num_Strings, to->Strings); + for (n = to->ext_Strings - 1, + m = ext_Strings - 1, + base = to->num_Strings - (m + 1); m >= 0; m--) { + if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans + ext_Numbers])) { to->Strings[base + m] = to->Strings[base + n--]; } else { to->Strings[base + m] = ABSENT_STRING; @@ -142,7 +145,8 @@ static void realign_data(TERMTYPE *to, char **ext_Names, int ext_Booleans, int e /* * Returns the first index in ext_Names[] for the given token-type */ -static int _nc_first_ext_name(TERMTYPE *tp, int token_type) +static int +_nc_first_ext_name(TERMTYPE * tp, int token_type) { int first; @@ -166,20 +170,21 @@ static int _nc_first_ext_name(TERMTYPE *tp, int token_type) /* * Returns the last index in ext_Names[] for the given token-type */ -static int _nc_last_ext_name(TERMTYPE *tp, int token_type) +static int +_nc_last_ext_name(TERMTYPE * tp, int token_type) { int last; switch (token_type) { case BOOLEAN: - last = tp->ext_Booleans; + last = tp->ext_Booleans; break; case NUMBER: - last = tp->ext_Booleans + tp->ext_Numbers; + last = tp->ext_Booleans + tp->ext_Numbers; break; default: case STRING: - last = NUM_EXT_NAMES(tp); + last = NUM_EXT_NAMES(tp); break; } return last; @@ -188,11 +193,12 @@ static int _nc_last_ext_name(TERMTYPE *tp, int token_type) /* * Lookup an entry from extended-names, returning -1 if not found */ -static int _nc_find_ext_name(TERMTYPE *tp, char *name, int token_type) +static int +_nc_find_ext_name(TERMTYPE * tp, char *name, int token_type) { unsigned j; unsigned first = _nc_first_ext_name(tp, token_type); - unsigned last = _nc_last_ext_name(tp, token_type); + unsigned last = _nc_last_ext_name(tp, token_type); for (j = first; j < last; j++) { if (!strcmp(name, tp->ext_Names[j])) { @@ -206,7 +212,8 @@ static int _nc_find_ext_name(TERMTYPE *tp, char *name, int token_type) * Translate an index into ext_Names[] into the corresponding index into data * (e.g., Booleans[]). */ -static int _nc_ext_data_index(TERMTYPE *tp, int n, int token_type) +static int +_nc_ext_data_index(TERMTYPE * tp, int n, int token_type) { switch (token_type) { case BOOLEAN: @@ -214,12 +221,12 @@ static int _nc_ext_data_index(TERMTYPE *tp, int n, int token_type) break; case NUMBER: n += (tp->num_Numbers - tp->ext_Numbers) - - (tp->ext_Booleans); + - (tp->ext_Booleans); break; default: case STRING: n += (tp->num_Strings - tp->ext_Strings) - - (tp->ext_Booleans + tp->ext_Numbers); + - (tp->ext_Booleans + tp->ext_Numbers); } return n; } @@ -228,7 +235,8 @@ static int _nc_ext_data_index(TERMTYPE *tp, int n, int token_type) * Adjust tables to remove (not free) an extended name and its corresponding * data. */ -static void _nc_del_ext_name(TERMTYPE *tp, char *name, int token_type) +static void +_nc_del_ext_name(TERMTYPE * tp, char *name, int token_type) { int j; int first, last; @@ -236,28 +244,28 @@ static void _nc_del_ext_name(TERMTYPE *tp, char *name, int token_type) if ((first = _nc_find_ext_name(tp, name, token_type)) >= 0) { last = NUM_EXT_NAMES(tp) - 1; for (j = first; j < last; j++) { - tp->ext_Names[j] = tp->ext_Names[j+1]; + tp->ext_Names[j] = tp->ext_Names[j + 1]; } first = _nc_ext_data_index(tp, first, token_type); switch (token_type) { case BOOLEAN: last = tp->num_Booleans - 1; for (j = first; j < last; j++) - tp->Booleans[j] = tp->Booleans[j+1]; + tp->Booleans[j] = tp->Booleans[j + 1]; tp->ext_Booleans -= 1; tp->num_Booleans -= 1; break; case NUMBER: last = tp->num_Numbers - 1; for (j = first; j < last; j++) - tp->Numbers[j] = tp->Numbers[j+1]; + tp->Numbers[j] = tp->Numbers[j + 1]; tp->ext_Numbers -= 1; tp->num_Numbers -= 1; break; case STRING: last = tp->num_Strings - 1; for (j = first; j < last; j++) - tp->Strings[j] = tp->Strings[j+1]; + tp->Strings[j] = tp->Strings[j + 1]; tp->ext_Strings -= 1; tp->num_Strings -= 1; break; @@ -269,10 +277,11 @@ static void _nc_del_ext_name(TERMTYPE *tp, char *name, int token_type) * Adjust tables to insert an extended name, making room for new data. The * index into the corresponding data array is returned. */ -static int _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type) +static int +_nc_ins_ext_name(TERMTYPE * tp, char *name, int token_type) { unsigned first = _nc_first_ext_name(tp, token_type); - unsigned last = _nc_last_ext_name(tp, token_type); + unsigned last = _nc_last_ext_name(tp, token_type); unsigned total = NUM_EXT_NAMES(tp) + 1; unsigned j, k; @@ -287,8 +296,8 @@ static int _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type) } tp->ext_Names = typeRealloc(char *, total, tp->ext_Names); - for (k = total-1; k > j; k--) - tp->ext_Names[k] = tp->ext_Names[k-1]; + for (k = total - 1; k > j; k--) + tp->ext_Names[k] = tp->ext_Names[k - 1]; tp->ext_Names[j] = name; j = _nc_ext_data_index(tp, j, token_type); @@ -297,22 +306,22 @@ static int _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type) tp->ext_Booleans += 1; tp->num_Booleans += 1; tp->Booleans = typeRealloc(char, tp->num_Booleans, tp->Booleans); - for (k = tp->num_Booleans-1; k > j; k--) - tp->Booleans[k] = tp->Booleans[k-1]; + for (k = tp->num_Booleans - 1; k > j; k--) + tp->Booleans[k] = tp->Booleans[k - 1]; break; case NUMBER: tp->ext_Numbers += 1; tp->num_Numbers += 1; tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers); - for (k = tp->num_Numbers-1; k > j; k--) - tp->Numbers[k] = tp->Numbers[k-1]; + for (k = tp->num_Numbers - 1; k > j; k--) + tp->Numbers[k] = tp->Numbers[k - 1]; break; case STRING: tp->ext_Strings += 1; tp->num_Strings += 1; tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings); - for (k = tp->num_Strings-1; k > j; k--) - tp->Strings[k] = tp->Strings[k-1]; + for (k = tp->num_Strings - 1; k > j; k--) + tp->Strings[k] = tp->Strings[k - 1]; break; } return j; @@ -323,13 +332,14 @@ static int _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type) * as a boolean or number. We'll get this as a special case when we get a * cancellation of a name that is inherited from another entry. */ -static void adjust_cancels(TERMTYPE *to, TERMTYPE *from) +static void +adjust_cancels(TERMTYPE * to, TERMTYPE * from) { int first = to->ext_Booleans + to->ext_Numbers; - int last = first + to->ext_Strings; + int last = first + to->ext_Strings; int j, k; - for (j = first; j < last; ) { + for (j = first; j < last;) { char *name = to->ext_Names[j]; unsigned j_str = to->num_Strings - first - to->ext_Strings; @@ -338,7 +348,8 @@ static void adjust_cancels(TERMTYPE *to, TERMTYPE *from) _nc_del_ext_name(to, name, STRING); k = _nc_ins_ext_name(to, name, BOOLEAN); to->Booleans[k] = FALSE; - } else if ((k = _nc_find_ext_name(from, to->ext_Names[j], NUMBER)) >= 0) { + } else if ((k = _nc_find_ext_name(from, to->ext_Names[j], + NUMBER)) >= 0) { _nc_del_ext_name(to, name, STRING); k = _nc_ins_ext_name(to, name, NUMBER); to->Numbers[k] = CANCELLED_NUMERIC; @@ -349,7 +360,8 @@ static void adjust_cancels(TERMTYPE *to, TERMTYPE *from) } } -void _nc_align_termtype(TERMTYPE *to, TERMTYPE *from) +void +_nc_align_termtype(TERMTYPE * to, TERMTYPE * from) { int na = NUM_EXT_NAMES(to); int nb = NUM_EXT_NAMES(from); @@ -358,13 +370,14 @@ void _nc_align_termtype(TERMTYPE *to, TERMTYPE *from) char **ext_Names; int ext_Booleans, ext_Numbers, ext_Strings; - DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", na, to->term_names, nb, from->term_names)); + DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", na, to->term_names, + nb, from->term_names)); if (na != 0 || nb != 0) { if ((na == nb) /* check if the arrays are equivalent */ - && (to->ext_Booleans == from->ext_Booleans) - && (to->ext_Numbers == from->ext_Numbers) - && (to->ext_Strings == from->ext_Strings)) { + &&(to->ext_Booleans == from->ext_Booleans) + && (to->ext_Numbers == from->ext_Numbers) + && (to->ext_Strings == from->ext_Strings)) { for (n = 0, same = TRUE; n < na; n++) { if (strcmp(to->ext_Names[n], from->ext_Names[n])) { same = FALSE; @@ -380,7 +393,7 @@ void _nc_align_termtype(TERMTYPE *to, TERMTYPE *from) * into it, updating to's counts for booleans, etc. Fortunately we do * this only for the terminfo compiler (tic) and comparer (infocmp). */ - ext_Names = typeMalloc(char *, na+nb); + ext_Names = typeMalloc(char *, na + nb); if (to->ext_Strings && (from->ext_Booleans + from->ext_Numbers)) adjust_cancels(to, from); @@ -389,62 +402,65 @@ void _nc_align_termtype(TERMTYPE *to, TERMTYPE *from) adjust_cancels(from, to); ext_Booleans = merge_names(ext_Names, - to->ext_Names, - to->ext_Booleans, - from->ext_Names, - from->ext_Booleans); - ext_Numbers = merge_names(ext_Names + ext_Booleans, - to->ext_Names - + to->ext_Booleans, - to->ext_Numbers, - from->ext_Names - + from->ext_Booleans, - from->ext_Numbers); - ext_Strings = merge_names(ext_Names + ext_Numbers + ext_Booleans, - to->ext_Names - + to->ext_Booleans - + to->ext_Numbers, - to->ext_Strings, - from->ext_Names - + from->ext_Booleans - + from->ext_Numbers, - from->ext_Strings); + to->ext_Names, + to->ext_Booleans, + from->ext_Names, + from->ext_Booleans); + ext_Numbers = merge_names(ext_Names + ext_Booleans, + to->ext_Names + + to->ext_Booleans, + to->ext_Numbers, + from->ext_Names + + from->ext_Booleans, + from->ext_Numbers); + ext_Strings = merge_names(ext_Names + ext_Numbers + ext_Booleans, + to->ext_Names + + to->ext_Booleans + + to->ext_Numbers, + to->ext_Strings, + from->ext_Names + + from->ext_Booleans + + from->ext_Numbers, + from->ext_Strings); /* * Now we must reallocate the Booleans, etc., to allow the data to be * overlaid. */ if (na != (ext_Booleans + ext_Numbers + ext_Strings)) { realign_data(to, ext_Names, ext_Booleans, ext_Numbers, ext_Strings); - free(to->ext_Names); + FreeIfNeeded(to->ext_Names); to->ext_Names = ext_Names; - DEBUG(2, ("realigned %d extended names for '%s' (to)", NUM_EXT_NAMES(to), to->term_names)); + DEBUG(2, ("realigned %d extended names for '%s' (to)", + NUM_EXT_NAMES(to), to->term_names)); } if (nb != (ext_Booleans + ext_Numbers + ext_Strings)) { nb = (ext_Booleans + ext_Numbers + ext_Strings); realign_data(from, ext_Names, ext_Booleans, ext_Numbers, ext_Strings); from->ext_Names = typeRealloc(char *, nb, from->ext_Names); memcpy(from->ext_Names, ext_Names, sizeof(char *) * nb); - DEBUG(2, ("realigned %d extended names for '%s' (from)", NUM_EXT_NAMES(from), from->term_names)); + DEBUG(2, ("realigned %d extended names for '%s' (from)", + NUM_EXT_NAMES(from), from->term_names)); } } } #endif -void _nc_copy_termtype(TERMTYPE *dst, TERMTYPE *src) +void +_nc_copy_termtype(TERMTYPE * dst, TERMTYPE * src) { int i; - *dst = *src; /* ...to copy the sizes and string-tables */ - dst->Booleans = typeMalloc(char, NUM_BOOLEANS(dst)); - dst->Numbers = typeMalloc(short, NUM_NUMBERS(dst)); - dst->Strings = typeMalloc(char *, NUM_STRINGS(dst)); + *dst = *src; /* ...to copy the sizes and string-tables */ + dst->Booleans = typeMalloc(char, NUM_BOOLEANS(dst)); + dst->Numbers = typeMalloc(short, NUM_NUMBERS(dst)); + dst->Strings = typeMalloc(char *, NUM_STRINGS(dst)); /* FIXME: use memcpy for these and similar loops */ - for_each_boolean(i,dst) + for_each_boolean(i, dst) dst->Booleans[i] = src->Booleans[i]; - for_each_number(i,dst) + for_each_number(i, dst) dst->Numbers[i] = src->Numbers[i]; - for_each_string(i,dst) + for_each_string(i, dst) dst->Strings[i] = src->Strings[i]; /* FIXME: we probably should also copy str_table and ext_str_table, @@ -455,6 +471,8 @@ void _nc_copy_termtype(TERMTYPE *dst, TERMTYPE *src) if ((i = NUM_EXT_NAMES(src)) != 0) { dst->ext_Names = typeMalloc(char *, i); memcpy(dst->ext_Names, src->ext_Names, i * sizeof(char *)); + } else { + dst->ext_Names = 0; } #endif diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index d0881ecd..da138268 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * captoinfo.c --- conversion between termcap and terminfo formats * @@ -94,10 +92,9 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.24 1999/07/24 20:06:13 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.37 2000/04/01 20:07:34 tom Exp $") #define MAX_PUSHED 16 /* max # args we can push onto the stack */ -#define MAX_ENTRY 2048 /* maximum chars in a translated capability */ static int stack[MAX_PUSHED]; /* the stack */ static int stackptr; /* the next empty place on the stack */ @@ -108,43 +105,47 @@ static int seenr; /* seen a %r */ static int param; /* current parameter */ static char *dp; /* pointer to end of the converted string */ -static char *my_string; +static char *my_string; static size_t my_length; -static char *init_string(void) +static char * +init_string(void) /* initialize 'my_string', 'my_length' */ { - if (my_string == 0) - my_string = typeMalloc(char, my_length = 256); - if (my_string == 0) - _nc_err_abort("Out of memory"); + if (my_string == 0) + my_string = typeMalloc(char, my_length = 256); + if (my_string == 0) + _nc_err_abort("Out of memory"); - *my_string = '\0'; - return my_string; + *my_string = '\0'; + return my_string; } -static char *save_string(char *d, const char *const s) +static char * +save_string(char *d, const char *const s) { - size_t have = (d - my_string); - size_t need = have + strlen(s) + 2; - if (need > my_length) { - my_string = (char *)realloc(my_string, my_length = (need + need)); - if (my_string == 0) - _nc_err_abort("Out of memory"); - d = my_string + have; - } - (void) strcpy(d, s); - return d + strlen(d); + size_t have = (d - my_string); + size_t need = have + strlen(s) + 2; + if (need > my_length) { + my_string = (char *) realloc(my_string, my_length = (need + need)); + if (my_string == 0) + _nc_err_abort("Out of memory"); + d = my_string + have; + } + (void) strcpy(d, s); + return d + strlen(d); } -static inline char *save_char(char *s, char c) +static inline char * +save_char(char *s, char c) { - static char temp[2]; - temp[0] = c; - return save_string(s, temp); + static char temp[2]; + temp[0] = c; + return save_string(s, temp); } -static void push(void) +static void +push(void) /* push onstack on to the stack */ { if (stackptr > MAX_PUSHED) @@ -153,7 +154,8 @@ static void push(void) stack[stackptr++] = onstack; } -static void pop(void) +static void +pop(void) /* pop the top of the stack into onstack */ { if (stackptr == 0) { @@ -161,21 +163,21 @@ static void pop(void) _nc_warning("I'm confused"); else onstack = 0; - } - else + } else onstack = stack[--stackptr]; param++; } -static int cvtchar(register const char *sp) +static int +cvtchar(register const char *sp) /* convert a character to a terminfo push */ { unsigned char c = 0; int len; - switch(*sp) { + switch (*sp) { case '\\': - switch(*++sp) { + switch (*++sp) { case '\'': case '$': case '\\': @@ -192,8 +194,7 @@ static int cvtchar(register const char *sp) case '2': case '3': len = 1; - while (isdigit(*sp)) - { + while (isdigit(*sp)) { c = 8 * c + (*sp++ - '0'); len++; } @@ -213,65 +214,68 @@ static int cvtchar(register const char *sp) len = 1; } if (isgraph(c) && c != ',' && c != '\'' && c != '\\' && c != ':') { - *dp++ = '%'; *dp++ = '\''; *dp++ = c; *dp++ = '\''; + dp = save_string(dp, "%\'"); + dp = save_char(dp, c); + dp = save_char(dp, '\''); } else { - *dp++ = '%'; *dp++ = '{'; + dp = save_string(dp, "%{"); if (c > 99) - *dp++ = c / 100 + '0'; + dp = save_char(dp, c / 100 + '0'); if (c > 9) - *dp++ = ((int)(c / 10)) % 10 + '0'; - *dp++ = c % 10 + '0'; - *dp++ = '}'; + dp = save_char(dp, ((int) (c / 10)) % 10 + '0'); + dp = save_char(dp, c % 10 + '0'); + dp = save_char(dp, '}'); } return len; } -static void getparm(int parm, int n) +static void +getparm(int parm, int n) /* push n copies of param on the terminfo stack if not already there */ { - if (seenr) { - if (parm == 1) - parm = 2; - else if (parm == 2) - parm = 1; - } - if (onstack == parm) { - if (n > 1) { - _nc_warning("string may not be optimal"); - *dp++ = '%'; *dp++ = 'P'; *dp++ = 'a'; - while(n--) { - *dp++ = '%'; *dp++ = 'g'; *dp++ = 'a'; - } - } - return; + if (seenr) { + if (parm == 1) + parm = 2; + else if (parm == 2) + parm = 1; + } + if (onstack == parm) { + if (n > 1) { + _nc_warning("string may not be optimal"); + dp = save_string(dp, "%Pa"); + while (n--) { + dp = save_string(dp, "%ga"); + } } - if (onstack != 0) - push(); + return; + } + if (onstack != 0) + push(); - onstack = parm; + onstack = parm; - while(n--) { /* %p0 */ - *dp++ = '%'; *dp++ = 'p'; *dp++ = '0' + parm; - } + while (n--) { + dp = save_string(dp, "%p"); + dp = save_char(dp, '0' + parm); + } - if (seenn && parm < 3) { /* %{96}%^ */ - *dp++ = '%'; *dp++ = '{'; *dp++ = '9'; *dp++ = '6'; *dp++ = '}'; - *dp++ = '%'; *dp++ = '^'; - } + if (seenn && parm < 3) { + dp = save_string(dp, "%{96}%^"); + } - if (seenm && parm < 3) { /* %{127}%^ */ - *dp++ = '%'; *dp++ = '{'; *dp++ = '1'; *dp++ = '2'; *dp++ = '7'; - *dp++ = '}'; *dp++ = '%'; *dp++ = '^'; - } + if (seenm && parm < 3) { + dp = save_string(dp, "%{127}%^"); + } } -char *_nc_captoinfo( +char * +_nc_captoinfo( /* convert a termcap string to terminfo format */ -register const char *cap, /* relevant terminfo capability index */ -register const char *s, /* string value of the capability */ -int const parametrized) /* do % translations if 1, pad translations if >=0 */ + register const char *cap, /* relevant terminfo capability index */ + register const char *s, /* string value of the capability */ + int const parametrized /* do % translations if 1, pad translations if >=0 */ +) { - static char line[MAX_ENTRY]; const char *capstart; stackptr = 0; @@ -281,27 +285,29 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ seenr = 0; param = 1; - dp = line; + dp = init_string(); /* skip the initial padding (if we haven't been told not to) */ capstart = 0; if (s == 0) s = ""; if (parametrized >= 0 && isdigit(*s)) - for (capstart = s; ; s++) + for (capstart = s;; s++) if (!(isdigit(*s) || *s == '*' || *s == '.')) break; - while(*s != '\0') { - switch(*s) { + while (*s != '\0') { + switch (*s) { case '%': s++; if (parametrized < 1) { - *dp++ = '%'; + dp = save_char(dp, '%'); break; } - switch(*s++) { - case '%': *dp++ = '%'; break; + switch (*s++) { + case '%': + dp = save_char(dp, '%'); + break; case 'r': if (seenr++ == 1) { _nc_warning("saw %%r twice in %s", cap); @@ -317,37 +323,33 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ _nc_warning("saw %%n twice in %s", cap); } break; - case 'i': *dp++ = '%'; *dp++ = 'i'; break; + case 'i': + dp = save_string(dp, "%i"); + break; case '6': case 'B': - getparm(param, 2); - /* %{6}%*%+ */ - *dp++ = '%'; *dp++ = '{'; *dp++ = '6'; - *dp++ = '}'; *dp++ = '%'; *dp++ = '*'; - *dp++ = '%'; *dp++ = '+'; + getparm(param, 1); + dp = save_string(dp, "%{10}%/%{16}%*"); + getparm(param, 1); + dp = save_string(dp, "%{10}%m%+"); break; case '8': case 'D': getparm(param, 2); - /* %{2}%*%- */ - *dp++ = '%'; *dp++ = '{'; *dp++ = '2'; - *dp++ = '}'; *dp++ = '%'; *dp++ = '*'; - *dp++ = '%'; *dp++ = '-'; + dp = save_string(dp, "%{2}%*%-"); break; case '>': getparm(param, 2); /* %?%{x}%>%t%{y}%+%; */ - *dp++ = '%'; *dp++ = '?'; + dp = save_string(dp, "%?"); s += cvtchar(s); - *dp++ = '%'; *dp++ = '>'; - *dp++ = '%'; *dp++ = 't'; + dp = save_string(dp, "%>%t"); s += cvtchar(s); - *dp++ = '%'; *dp++ = '+'; - *dp++ = '%'; *dp++ = ';'; + dp = save_string(dp, "%+%;"); break; case 'a': if ((*s == '=' || *s == '+' || *s == '-' - || *s == '*' || *s == '/') + || *s == '*' || *s == '/') && (s[1] == 'p' || s[1] == 'c') && s[2] != '\0') { int l; @@ -363,18 +365,18 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ l++; } else l += cvtchar(s + 2); - switch(*s) { + switch (*s) { case '+': - *dp++ = '%'; *dp++ = '+'; + dp = save_string(dp, "%+"); break; case '-': - *dp++ = '%'; *dp++ = '-'; + dp = save_string(dp, "%-"); break; case '*': - *dp++ = '%'; *dp++ = '*'; + dp = save_string(dp, "%*"); break; case '/': - *dp++ = '%'; *dp++ = '/'; + dp = save_string(dp, "%/"); break; case '=': if (seenr) { @@ -384,8 +386,7 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ onstack = 1; else onstack = param; - } - else + } else onstack = param; break; } @@ -394,39 +395,37 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ } getparm(param, 1); s += cvtchar(s); - *dp++ = '%'; *dp++ = '+'; + dp = save_string(dp, "%+"); break; case '+': getparm(param, 1); s += cvtchar(s); - *dp++ = '%'; *dp++ = '+'; - *dp++ = '%'; *dp++ = 'c'; + dp = save_string(dp, "%+%c"); pop(); break; case 's': #ifdef WATERLOO s += cvtchar(s); getparm(param, 1); - *dp++ = '%'; *dp++ = '-'; + dp = save_string(dp, "%-"); #else getparm(param, 1); - *dp++ = '%'; *dp++ = 's'; + dp = save_string(dp, "%s"); pop(); #endif /* WATERLOO */ break; case '-': s += cvtchar(s); getparm(param, 1); - *dp++ = '%'; *dp++ = '-'; - *dp++ = '%'; *dp++ = 'c'; + dp = save_string(dp, "%-%c"); pop(); break; case '.': getparm(param, 1); - *dp++ = '%'; *dp++ = 'c'; + dp = save_string(dp, "%c"); pop(); break; - case '0': /* not clear any of the historical termcaps did this */ + case '0': /* not clear any of the historical termcaps did this */ if (*s == '3') goto see03; else if (*s != '2') @@ -434,19 +433,18 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ /* FALLTHRU */ case '2': getparm(param, 1); - *dp++ = '%'; /* *dp++ = '0'; */ - *dp++ = '2'; *dp++ = 'd'; + dp = save_string(dp, "%2d"); pop(); break; - case '3': see03: + case '3': + see03: getparm(param, 1); - *dp++ = '%'; /* *dp++ = '0'; */ - *dp++ = '3'; *dp++ = 'd'; + dp = save_string(dp, "%3d"); pop(); break; case 'd': getparm(param, 1); - *dp++ = '%'; *dp++ = 'd'; + dp = save_string(dp, "%d"); pop(); break; case 'f': @@ -456,61 +454,82 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ param--; break; case '\\': - *dp++ = '%'; - *dp++ = '\\'; + dp = save_string(dp, "%\\"); break; - default: invalid: - *dp++ = '%'; + default: + invalid: + dp = save_char(dp, '%'); s--; - _nc_warning("unknown %% code %s in %s", - _tracechar(*s), cap); + _nc_warning("unknown %% code %s (%#x) in %s", + unctrl(*s), (*s) & 0xff, cap); break; } break; #ifdef REVISIBILIZE case '\\': - *dp++ = *s++; *dp++ = *s++; break; + dp = save_char(dp, *s++); + dp = save_char(dp, *s++); + break; case '\n': - *dp++ = '\\'; *dp++ = 'n'; s++; break; + dp = save_string(dp, "\\n"); + s++; + break; case '\t': - *dp++ = '\\'; *dp++ = 't'; s++; break; + dp = save_string(dp, "\\t"); + s++; + break; case '\r': - *dp++ = '\\'; *dp++ = 'r'; s++; break; + dp = save_string(dp, "\\r"); + s++; + break; case '\200': - *dp++ = '\\'; *dp++ = '0'; s++; break; + dp = save_string(dp, "\\0"); + s++; + break; case '\f': - *dp++ = '\\'; *dp++ = 'f'; s++; break; + dp = save_string(dp, "\\f"); + s++; + break; case '\b': - *dp++ = '\\'; *dp++ = 'b'; s++; break; + dp = save_string(dp, "\\b"); + s++; + break; case ' ': - *dp++ = '\\'; *dp++ = 's'; s++; break; + dp = save_string(dp, "\\s"); + s++; + break; case '^': - *dp++ = '\\'; *dp++ = '^'; s++; break; + dp = save_string(dp, "\\^"); + s++; + break; case ':': - *dp++ = '\\'; *dp++ = ':'; s++; break; + dp = save_string(dp, "\\:"); + s++; + break; case ',': - *dp++ = '\\'; *dp++ = ','; s++; break; + dp = save_string(dp, "\\,"); + s++; + break; default: if (*s == '\033') { - *dp++ = '\\'; - *dp++ = 'E'; + dp = save_string(dp, "\\E"); s++; } else if (*s > 0 && *s < 32) { - *dp++ = '^'; - *dp++ = *s + '@'; + dp = save_char(dp, '^'); + dp = save_char(dp, *s + '@'); s++; } else if (*s <= 0 || *s >= 127) { - *dp++ = '\\'; - *dp++ = ((*s & 0300) >> 6) + '0'; - *dp++ = ((*s & 0070) >> 3) + '0'; - *dp++ = (*s & 0007) + '0'; + dp = save_char(dp, '\\'); + dp = save_char(dp, ((*s & 0300) >> 6) + '0'); + dp = save_char(dp, ((*s & 0070) >> 3) + '0'); + dp = save_char(dp, (*s & 0007) + '0'); s++; } else - *dp++ = *s++; + dp = save_char(dp, *s++); break; #else default: - *dp++ = *s++; + dp = save_char(dp, *s++); break; #endif } @@ -520,21 +539,76 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ * Now, if we stripped off some leading padding, add it at the end * of the string as mandatory padding. */ - if (capstart) - { - *dp++ = '$'; - *dp++ = '<'; - for (s = capstart; ; s++) + if (capstart) { + dp = save_string(dp, "$<"); + for (s = capstart;; s++) if (isdigit(*s) || *s == '*' || *s == '.') - *dp++ = *s; + dp = save_char(dp, *s); else break; - *dp++ = '/'; - *dp++ = '>'; + dp = save_string(dp, "/>"); + } + + (void) save_char(dp, '\0'); + return (my_string); +} + +/* + * Check for an expression that corresponds to "%B" (BCD): + * (parameter / 10) * 16 + (parameter % 10) + */ +static int +bcd_expression(const char *str) +{ + /* leave this non-const for HPUX */ + static char fmt[] = "%%p%c%%{10}%%/%%{16}%%*%%p%c%%{10}%%m%%+"; + int len = 0; + char ch1, ch2; + + if (sscanf(str, fmt, &ch1, &ch2) == 2 + && isdigit(ch1) + && isdigit(ch2) + && (ch1 == ch2)) { + len = 28; +#ifndef NDEBUG + { + char buffer[80]; + int tst; + sprintf(buffer, fmt, ch1, ch2); + tst = strlen(buffer) - 1; + assert(len == tst); + } +#endif } + return len; +} + +static char * +save_tc_char(char *bufptr, int c1) +{ + char temp[80]; - *dp = '\0'; - return(line); + if (is7bits(c1) && isprint(c1)) { + if (c1 == ':' || c1 == '\\') + bufptr = save_char(bufptr, '\\'); + bufptr = save_char(bufptr, c1); + } else { + if (c1 == (c1 & 0x1f)) /* iscntrl() returns T on 255 */ + (void) strcpy(temp, unctrl(c1)); + else + (void) sprintf(temp, "\\%03o", c1); + bufptr = save_string(bufptr, temp); + } + return bufptr; +} + +static char * +save_tc_inequality(char *bufptr, int c1, int c2) +{ + bufptr = save_string(bufptr, "%>"); + bufptr = save_tc_char(bufptr, c1); + bufptr = save_tc_char(bufptr, c2); + return bufptr; } /* @@ -555,23 +629,25 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ * %m exclusive-or all parameters with 0177 (not in 4.4BSD) */ -char *_nc_infotocap( +char * +_nc_infotocap( /* convert a terminfo string to termcap format */ -register const char *cap GCC_UNUSED, /* relevant termcap capability index */ -register const char *str, /* string value of the capability */ -int const parametrized) /* do % translations if 1, pad translations if >=0 */ + register const char *cap GCC_UNUSED, /* relevant termcap capability index */ + register const char *str, /* string value of the capability */ + int const parametrized /* do % translations if 1, pad translations if >=0 */ +) { - int seenone = 0, seentwo = 0, saw_m = 0, saw_n = 0; + int seenone = 0, seentwo = 0, saw_m = 0, saw_n = 0; const char *padding; const char *trimmed = 0; char ch1 = 0, ch2 = 0; char *bufptr = init_string(); - char temp[256]; + int len; + bool syntax_error = FALSE; /* we may have to move some trailing mandatory padding up front */ padding = str + strlen(str) - 1; - if (*padding == '>' && *--padding == '/') - { + if (*padding == '>' && *--padding == '/') { --padding; while (isdigit(*padding) || *padding == '.' || *padding == '*') padding--; @@ -583,101 +659,62 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ bufptr = save_char(bufptr, *padding++); } - for (; *str && str != trimmed; str++) - { - int c1, c2; - char *cp = 0; + for (; *str && str != trimmed; str++) { + int c1, c2; + char *cp = 0; - if (str[0] == '\\' && (str[1] == '^' || str[1] == ',')) - { + if (str[0] == '\\' && (str[1] == '^' || str[1] == ',')) { bufptr = save_char(bufptr, *++str); - } - else if (str[0] == '$' && str[1] == '<') /* discard padding */ - { + } else if (str[0] == '$' && str[1] == '<') { /* discard padding */ str += 2; - while (isdigit(*str) || *str == '.' || *str == '*' || *str == '/' || *str == '>') + while (isdigit(*str) || *str == '.' || *str == '*' || *str == + '/' || *str == '>') str++; --str; - } - else if (*str != '%' || (parametrized < 1)) + } else if (str[0] == '%' && str[1] == '%') { /* escaped '%' */ + bufptr = save_string(bufptr, "%%"); + } else if (*str != '%' || (parametrized < 1)) { bufptr = save_char(bufptr, *str); - else if (sscanf(str, "%%?%%{%d}%%>%%t%%{%d}%%+%%;", &c1,&c2) == 2) - { + } else if (sscanf(str, "%%?%%{%d}%%>%%t%%{%d}%%+%%;", &c1, &c2) == 2) { str = strchr(str, ';'); - (void) sprintf(temp, "%%>%s%s", unctrl(c1), unctrl(c2)); - bufptr = save_string(bufptr, temp); - } - else if (sscanf(str, "%%?%%{%d}%%>%%t%%'%c'%%+%%;", &c1,&ch2) == 2) - { + bufptr = save_tc_inequality(bufptr, c1, c2); + } else if (sscanf(str, "%%?%%{%d}%%>%%t%%'%c'%%+%%;", &c1, &ch2) == 2) { str = strchr(str, ';'); - (void) sprintf(temp, "%%>%s%c", unctrl(c1), ch2); - bufptr = save_string(bufptr, temp); - } - else if (sscanf(str, "%%?%%'%c'%%>%%t%%{%d}%%+%%;", &ch1,&c2) == 2) - { + bufptr = save_tc_inequality(bufptr, c1, c2); + } else if (sscanf(str, "%%?%%'%c'%%>%%t%%{%d}%%+%%;", &ch1, &c2) == 2) { str = strchr(str, ';'); - (void) sprintf(temp, "%%>%c%c", ch1, c2); - bufptr = save_string(bufptr, temp); - } - else if (sscanf(str, "%%?%%'%c'%%>%%t%%'%c'%%+%%;", &ch1, &ch2) == 2) - { + bufptr = save_tc_inequality(bufptr, c1, c2); + } else if (sscanf(str, "%%?%%'%c'%%>%%t%%'%c'%%+%%;", &ch1, &ch2) == 2) { str = strchr(str, ';'); - (void) sprintf(temp, "%%>%c%c", ch1, ch2); - bufptr = save_string(bufptr, temp); - } - else if (strncmp(str, "%{6}%*%+", 8) == 0) - { - str += 7; - (void) sprintf(temp, "%%B"); - bufptr = save_string(bufptr, temp); - } - else if ((sscanf(str, "%%{%d}%%+%%c", &c1) == 1 - || sscanf(str, "%%'%c'%%+%%c", &ch1) == 1) - && (cp = strchr(str, '+'))) - { + bufptr = save_tc_inequality(bufptr, c1, c2); + } else if ((len = bcd_expression(str)) != 0) { + str += len; + bufptr = save_string(bufptr, "%B"); + } else if ((sscanf(str, "%%{%d}%%+%%c", &c1) == 1 + || sscanf(str, "%%'%c'%%+%%c", &ch1) == 1) + && (cp = strchr(str, '+'))) { str = cp + 2; - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, '+'); + bufptr = save_string(bufptr, "%+"); if (ch1) c1 = ch1; - if (is7bits(c1) && isprint(c1)) - bufptr = save_char(bufptr, (char)c1); - else - { - if (c1 == (c1 & 0x1f)) /* iscntrl() returns T on 255 */ - (void) strcpy(temp, unctrl(c1)); - else - (void) sprintf(temp, "\\%03o", c1); - bufptr = save_string(bufptr, temp); - } + bufptr = save_tc_char(bufptr, c1); } - else if (strncmp(str, "%{2}%*%-", 8) == 0) - { + /* FIXME: this "works" for 'delta' */ + else if (strncmp(str, "%{2}%*%-", 8) == 0) { str += 7; - (void) sprintf(temp, "%%D"); - bufptr = save_string(bufptr, temp); - } - else if (strncmp(str, "%{96}%^", 7) == 0) - { + bufptr = save_string(bufptr, "%D"); + } else if (strncmp(str, "%{96}%^", 7) == 0) { str += 6; - if (saw_m++ == 0) - { - (void) sprintf(temp, "%%n"); - bufptr = save_string(bufptr, temp); + if (saw_m++ == 0) { + bufptr = save_string(bufptr, "%n"); } - } - else if (strncmp(str, "%{127}%^", 8) == 0) - { + } else if (strncmp(str, "%{127}%^", 8) == 0) { str += 7; - if (saw_n++ == 0) - { - (void) sprintf(temp, "%%m"); - bufptr = save_string(bufptr, temp); + if (saw_n++ == 0) { + bufptr = save_string(bufptr, "%m"); } - } - else - { + } else { /* cm-style format element */ str++; switch (*str) { case '%': @@ -697,90 +734,80 @@ int const parametrized) /* do % translations if 1, pad translations if >=0 */ bufptr = save_char(bufptr, '%'); while (isdigit(*str)) bufptr = save_char(bufptr, *str++); - if (*str == 'd') - str++; - else - _nc_warning("numeric prefix is missing trailing d in %s", - cap); - --str; + if (strchr("doxX.", *str)) { + if (*str != 'd') /* termcap doesn't have octal, hex */ + return 0; + } break; case 'd': - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, 'd'); + bufptr = save_string(bufptr, "%d"); break; case 'c': - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, '.'); + bufptr = save_string(bufptr, "%."); break; - /* - * %s isn't in termcap, but it's convenient to pass it through - * so we can represent things like terminfo pfkey strings in - * termcap notation. - */ + /* + * %s isn't in termcap, but it's convenient to pass it through + * so we can represent things like terminfo pfkey strings in + * termcap notation. + */ case 's': - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, 's'); + bufptr = save_string(bufptr, "%s"); break; case 'p': str++; if (*str == '1') seenone = 1; - else if (*str == '2') - { - if (!seenone && !seentwo) - { - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, 'r'); + else if (*str == '2') { + if (!seenone && !seentwo) { + bufptr = save_string(bufptr, "%r"); seentwo++; } - } - else if (*str >= '3') - return(0); + } else if (*str >= '3') + return (0); break; case 'i': - bufptr = save_char(bufptr, '%'); - bufptr = save_char(bufptr, 'i'); + bufptr = save_string(bufptr, "%i"); break; default: - return(0); - - } /* endswitch (*str) */ - } /* endelse (*str == '%') */ + bufptr = save_char(bufptr, *str); + syntax_error = TRUE; + break; + } /* endswitch (*str) */ + } /* endelse (*str == '%') */ if (*str == '\0') break; - } /* endwhile (*str) */ + } /* endwhile (*str) */ - return(my_string); + return (syntax_error ? NULL : my_string); } #ifdef MAIN int curr_line; -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { int c, tc = FALSE; while ((c = getopt(argc, argv, "c")) != EOF) - switch (c) - { + switch (c) { case 'c': tc = TRUE; break; } curr_line = 0; - for (;;) - { - char buf[BUFSIZ]; + for (;;) { + char buf[BUFSIZ]; ++curr_line; if (fgets(buf, sizeof(buf), stdin) == 0) @@ -788,20 +815,17 @@ int main(int argc, char *argv[]) buf[strlen(buf) - 1] = '\0'; _nc_set_source(buf); - if (tc) - { - char *cp = _nc_infotocap("to termcap", buf, 1); + if (tc) { + char *cp = _nc_infotocap("to termcap", buf, 1); if (cp) (void) fputs(cp, stdout); - } - else + } else (void) fputs(_nc_captoinfo("to terminfo", buf, 1), stdout); (void) putchar('\n'); } - return(0); + return (0); } #endif /* MAIN */ /* captoinfo.c ends here */ - diff --git a/ncurses/tinfo/comp_error.c b/ncurses/tinfo/comp_error.c index 2b2d5030..3767063d 100644 --- a/ncurses/tinfo/comp_error.c +++ b/ncurses/tinfo/comp_error.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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,11 +41,11 @@ #include -MODULE_ID("$Id: comp_error.c,v 1.16 1998/08/01 23:39:51 tom Exp $") +MODULE_ID("$Id: comp_error.c,v 1.17 1999/10/30 23:00:16 tom Exp $") -bool _nc_suppress_warnings; -int _nc_curr_line; /* current line # in input */ -int _nc_curr_col; /* current column # in input */ +bool _nc_suppress_warnings = FALSE; +int _nc_curr_line = 0; /* current line # in input */ +int _nc_curr_col = 0; /* current column # in input */ static const char *sourcename; static char termtype[MAX_NAME_SIZE+1]; diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index be419ca3..ca58bb57 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * comp_parse.c -- parser driver loop and use handling. * @@ -54,10 +52,10 @@ #include #include -MODULE_ID("$Id: comp_parse.c,v 1.34 1999/02/27 22:13:02 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.40 2000/04/15 16:57:08 tom Exp $") static void sanity_check(TERMTYPE *); -void (*_nc_check_termtype)(TERMTYPE *) = sanity_check; +void (*_nc_check_termtype) (TERMTYPE *) = sanity_check; /**************************************************************************** * @@ -80,31 +78,32 @@ void (*_nc_check_termtype)(TERMTYPE *) = sanity_check; * _nc_head _nc_tail */ -ENTRY *_nc_head, *_nc_tail; +ENTRY *_nc_head = 0, *_nc_tail = 0; -static void enqueue(ENTRY *ep) +static void +enqueue(ENTRY * ep) /* add an entry to the in-core list */ { - ENTRY *newp = _nc_copy_entry(ep); + ENTRY *newp = _nc_copy_entry(ep); - if (newp == NULL) - _nc_err_abort("Out of memory"); + if (newp == 0) + _nc_err_abort("Out of memory"); - newp->last = _nc_tail; - _nc_tail = newp; + newp->last = _nc_tail; + _nc_tail = newp; - newp->next = (ENTRY *)NULL; - if (newp->last) - newp->last->next = newp; + newp->next = 0; + if (newp->last) + newp->last->next = newp; } -void _nc_free_entries(ENTRY *head) +void +_nc_free_entries(ENTRY * headp) /* free the allocated storage consumed by list entries */ { - ENTRY *ep, *next; + ENTRY *ep, *next; - for (ep = head; ep; ep = next) - { + for (ep = headp; ep; ep = next) { /* * This conditional lets us disconnect storage from the list. * To do this, copy an entry out of the list, then null out @@ -116,27 +115,28 @@ void _nc_free_entries(ENTRY *head) next = ep->next; free(ep); - if (ep == _nc_head) _nc_head = 0; - if (ep == _nc_tail) _nc_tail = 0; + if (ep == _nc_head) + _nc_head = 0; + if (ep == _nc_tail) + _nc_tail = 0; } } -bool _nc_entry_match(char *n1, char *n2) +bool +_nc_entry_match(char *n1, char *n2) /* do any of the aliases in a pair of terminal names match? */ { - char *pstart, *qstart, *pend, *qend; - char nc1[MAX_NAME_SIZE+1], nc2[MAX_NAME_SIZE+1]; + char *pstart, *qstart, *pend, *qend; + char nc1[MAX_NAME_SIZE + 1], nc2[MAX_NAME_SIZE + 1]; - if (strchr(n1, '|') == NULL) - { + if (strchr(n1, '|') == 0) { (void) strncpy(nc1, n1, sizeof(nc1) - 2); nc1[sizeof(nc1) - 2] = '\0'; (void) strcat(nc1, "|"); n1 = nc1; } - if (strchr(n2, '|') == NULL) - { + if (strchr(n2, '|') == 0) { (void) strncpy(nc2, n2, sizeof(nc2) - 2); nc2[sizeof(nc2) - 2] = '\0'; (void) strcat(nc2, "|"); @@ -145,11 +145,11 @@ bool _nc_entry_match(char *n1, char *n2) for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1) for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1) - if ((pend-pstart == qend-qstart) - && memcmp(pstart, qstart, (size_t)(pend-pstart)) == 0) - return(TRUE); + if ((pend - pstart == qend - qstart) + && memcmp(pstart, qstart, (size_t) (pend - pstart)) == 0) + return (TRUE); - return(FALSE); + return (FALSE); } /**************************************************************************** @@ -158,21 +158,24 @@ bool _nc_entry_match(char *n1, char *n2) * ****************************************************************************/ -void _nc_read_entry_source(FILE *fp, char *buf, - int literal, bool silent, - bool (*hook)(ENTRY *)) +void +_nc_read_entry_source(FILE * fp, char *buf, + int literal, bool silent, + bool(*hook) (ENTRY *)) /* slurp all entries in the given file into core */ { - ENTRY thisentry; - bool oldsuppress = _nc_suppress_warnings; - int immediate = 0; + ENTRY thisentry; + bool oldsuppress = _nc_suppress_warnings; + int immediate = 0; if (silent) _nc_suppress_warnings = TRUE; /* shut the lexer up, too */ - memset(&thisentry, 0, sizeof(thisentry)); - for (_nc_reset_input(fp, buf); _nc_parse_entry(&thisentry, literal, silent) != ERR; ) - { + _nc_reset_input(fp, buf); + for (;;) { + memset(&thisentry, 0, sizeof(thisentry)); + if (_nc_parse_entry(&thisentry, literal, silent) == ERR) + break; if (!isalnum(thisentry.tterm.term_names[0])) _nc_err_abort("terminal names must start with letter or digit"); @@ -181,14 +184,13 @@ void _nc_read_entry_source(FILE *fp, char *buf, * use references to disk, so as to avoid chewing up a lot of * core when the resolution code could fetch entries off disk. */ - if (hook != NULLHOOK && (*hook)(&thisentry)) + if (hook != NULLHOOK && (*hook) (&thisentry)) immediate++; else enqueue(&thisentry); } - if (_nc_tail) - { + if (_nc_tail) { /* set up the head pointer */ for (_nc_head = _nc_tail; _nc_head->last; _nc_head = _nc_head->last) continue; @@ -204,12 +206,13 @@ void _nc_read_entry_source(FILE *fp, char *buf, _nc_suppress_warnings = oldsuppress; } -int _nc_resolve_uses(void) +int +_nc_resolve_uses(bool fullresolve) /* try to resolve all use capabilities */ { - ENTRY *qp, *rp, *lastread = NULL; - bool keepgoing; - int i, j, unresolved, total_unresolved, multiples; + ENTRY *qp, *rp, *lastread = 0; + bool keepgoing; + int i, j, unresolved, total_unresolved, multiples; DEBUG(2, ("RESOLUTION BEGINNING")); @@ -217,48 +220,41 @@ int _nc_resolve_uses(void) * Check for multiple occurrences of the same name. */ multiples = 0; - for_entry_list(qp) - { + for_entry_list(qp) { int matchcount = 0; for_entry_list(rp) if (qp > rp - && _nc_entry_match(qp->tterm.term_names, rp->tterm.term_names)) - { - matchcount++; - if (matchcount == 1) - { - (void) fprintf(stderr, "Name collision between %s", - _nc_first_name(qp->tterm.term_names)); - multiples++; - } - if (matchcount >= 1) - (void) fprintf(stderr, " %s", _nc_first_name(rp->tterm.term_names)); + && _nc_entry_match(qp->tterm.term_names, rp->tterm.term_names)) { + matchcount++; + if (matchcount == 1) { + (void) fprintf(stderr, "Name collision between %s", + _nc_first_name(qp->tterm.term_names)); + multiples++; } + if (matchcount >= 1) + (void) fprintf(stderr, " %s", _nc_first_name(rp->tterm.term_names)); + } if (matchcount >= 1) (void) putc('\n', stderr); } if (multiples > 0) - return(FALSE); + return (FALSE); DEBUG(2, ("NO MULTIPLE NAME OCCURRENCES")); /* - * First resolution stage: replace names in use arrays with entry - * pointers. By doing this, we avoid having to do the same name - * match once for each time a use entry is itself unresolved. + * First resolution stage: compute link pointers corresponding to names. */ total_unresolved = 0; _nc_curr_col = -1; - for_entry_list(qp) - { + for_entry_list(qp) { unresolved = 0; - for (i = 0; i < qp->nuses; i++) - { - bool foundit; - char *child = _nc_first_name(qp->tterm.term_names); - char *lookfor = (char *)(qp->uses[i].parent); - long lookline = qp->uses[i].line; + for (i = 0; i < qp->nuses; i++) { + bool foundit; + char *child = _nc_first_name(qp->tterm.term_names); + char *lookfor = qp->uses[i].name; + long lookline = qp->uses[i].line; foundit = FALSE; @@ -267,146 +263,142 @@ int _nc_resolve_uses(void) /* first, try to resolve from in-core records */ for_entry_list(rp) if (rp != qp - && _nc_name_match(rp->tterm.term_names, lookfor, "|")) - { - DEBUG(2, ("%s: resolving use=%s (in core)", - child, lookfor)); + && _nc_name_match(rp->tterm.term_names, lookfor, "|")) { + DEBUG(2, ("%s: resolving use=%s (in core)", + child, lookfor)); - qp->uses[i].parent = rp; - foundit = TRUE; - } + qp->uses[i].link = rp; + foundit = TRUE; + } /* if that didn't work, try to merge in a compiled entry */ - if (!foundit) - { - TERMTYPE thisterm; - char filename[PATH_MAX]; + if (!foundit) { + TERMTYPE thisterm; + char filename[PATH_MAX]; memset(&thisterm, 0, sizeof(thisterm)); - if (_nc_read_entry(lookfor, filename, &thisterm) == 1) - { + if (_nc_read_entry(lookfor, filename, &thisterm) == 1) { DEBUG(2, ("%s: resolving use=%s (compiled)", - child, lookfor)); + child, lookfor)); - rp = typeMalloc(ENTRY,1); - if (rp == NULL) + rp = typeMalloc(ENTRY, 1); + if (rp == 0) _nc_err_abort("Out of memory"); rp->tterm = thisterm; rp->nuses = 0; rp->next = lastread; lastread = rp; - qp->uses[i].parent = rp; + qp->uses[i].link = rp; foundit = TRUE; } } /* no good, mark this one unresolvable and complain */ - if (!foundit) - { + if (!foundit) { unresolved++; total_unresolved++; _nc_curr_line = lookline; _nc_warning("resolution of use=%s failed", lookfor); - qp->uses[i].parent = (ENTRY *)NULL; + qp->uses[i].link = 0; } } } - if (total_unresolved) - { + if (total_unresolved) { /* free entries read in off disk */ _nc_free_entries(lastread); - return(FALSE); + return (FALSE); } DEBUG(2, ("NAME RESOLUTION COMPLETED OK")); /* - * OK, at this point all (char *) references have been successfully - * replaced by (ENTRY *) pointers. Time to do the actual merges. + * OK, at this point all (char *) references in `name' mwmbers + * have been successfully converred to (ENTRY *) pointers in + * `link' members. Time to do the actual merges. */ - do { - TERMTYPE merged; - - keepgoing = FALSE; - - for_entry_list(qp) - { - if (qp->nuses > 0) - { - DEBUG(2, ("%s: attempting merge", _nc_first_name(qp->tterm.term_names))); - /* - * If any of the use entries we're looking for is - * incomplete, punt. We'll catch this entry on a - * subsequent pass. - */ - for (i = 0; i < qp->nuses; i++) - if (((ENTRY *)qp->uses[i].parent)->nuses) - { - DEBUG(2, ("%s: use entry %d unresolved", - _nc_first_name(qp->tterm.term_names), i)); - goto incomplete; - } - - /* - * First, make sure there's no garbage in the merge block. - * as a side effect, copy into the merged entry the name - * field and string table pointer. - */ - _nc_copy_termtype(&merged, &(qp->tterm)); - - /* - * Now merge in each use entry in the proper - * (reverse) order. - */ - for (; qp->nuses; qp->nuses--) - _nc_merge_entry(&merged, - &((ENTRY *)qp->uses[qp->nuses-1].parent)->tterm); - - /* - * Now merge in the original entry. - */ - _nc_merge_entry(&merged, &qp->tterm); - - /* - * Replace the original entry with the merged one. - */ - FreeIfNeeded(qp->tterm.Booleans); - FreeIfNeeded(qp->tterm.Numbers); - FreeIfNeeded(qp->tterm.Strings); - qp->tterm = merged; - - /* - * We know every entry is resolvable because name resolution - * didn't bomb. So go back for another pass. - */ - /* FALLTHRU */ - incomplete: - keepgoing = TRUE; + if (fullresolve) { + do { + TERMTYPE merged; + + keepgoing = FALSE; + + for_entry_list(qp) { + if (qp->nuses > 0) { + DEBUG(2, ("%s: attempting merge", + _nc_first_name(qp->tterm.term_names))); + /* + * If any of the use entries we're looking for is + * incomplete, punt. We'll catch this entry on a + * subsequent pass. + */ + for (i = 0; i < qp->nuses; i++) + if (qp->uses[i].link->nuses) { + DEBUG(2, ("%s: use entry %d unresolved", + _nc_first_name(qp->tterm.term_names), i)); + goto incomplete; + } + + /* + * First, make sure there's no garbage in the + * merge block. as a side effect, copy into + * the merged entry the name field and string + * table pointer. + */ + _nc_copy_termtype(&merged, &(qp->tterm)); + + /* + * Now merge in each use entry in the proper + * (reverse) order. + */ + for (; qp->nuses; qp->nuses--) + _nc_merge_entry(&merged, + &qp->uses[qp->nuses - 1].link->tterm); + + /* + * Now merge in the original entry. + */ + _nc_merge_entry(&merged, &qp->tterm); + + /* + * Replace the original entry with the merged one. + */ + FreeIfNeeded(qp->tterm.Booleans); + FreeIfNeeded(qp->tterm.Numbers); + FreeIfNeeded(qp->tterm.Strings); + qp->tterm = merged; + + /* + * We know every entry is resolvable because name resolution + * didn't bomb. So go back for another pass. + */ + /* FALLTHRU */ + incomplete: + keepgoing = TRUE; + } } - } - } while - (keepgoing); + } while + (keepgoing); - DEBUG(2, ("MERGES COMPLETED OK")); + 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 (qp->tterm.Booleans[j] == CANCELLED_BOOLEAN) - qp->tterm.Booleans[j] = FALSE; - for_each_number(j, &(qp->tterm)) - if (qp->tterm.Numbers[j] == CANCELLED_NUMERIC) + /* + * 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 (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) + for_each_string(j, &(qp->tterm)) + if (qp->tterm.Strings[j] == CANCELLED_STRING) qp->tterm.Strings[j] = ABSENT_STRING; + } } /* @@ -418,19 +410,18 @@ int _nc_resolve_uses(void) DEBUG(2, ("RESOLUTION FINISHED")); - if (_nc_check_termtype != 0) - { - _nc_curr_col = -1; - for_entry_list(qp) - { - _nc_curr_line = qp->startline; - _nc_set_type(_nc_first_name(qp->tterm.term_names)); - _nc_check_termtype(&qp->tterm); + if (fullresolve) + if (_nc_check_termtype != 0) { + _nc_curr_col = -1; + for_entry_list(qp) { + _nc_curr_line = qp->startline; + _nc_set_type(_nc_first_name(qp->tterm.term_names)); + _nc_check_termtype(&qp->tterm); + } + DEBUG(2, ("SANITY CHECK FINISHED")); } - DEBUG(2, ("SANITY CHECK FINISHED")); - } - return(TRUE); + return (TRUE); } /* @@ -442,14 +433,14 @@ int _nc_resolve_uses(void) #undef CUR #define CUR tp-> -static void sanity_check(TERMTYPE *tp) +static void +sanity_check(TERMTYPE * tp) { - if (!PRESENT(exit_attribute_mode)) - { -#ifdef __UNUSED__ /* this casts too wide a net */ - bool terminal_entry = !strchr(tp->term_names, '+'); + if (!PRESENT(exit_attribute_mode)) { +#ifdef __UNUSED__ /* this casts too wide a net */ + bool terminal_entry = !strchr(tp->term_names, '+'); if (terminal_entry && - (PRESENT(set_attributes) + (PRESENT(set_attributes) || PRESENT(enter_standout_mode) || PRESENT(enter_underline_mode) || PRESENT(enter_blink_mode) @@ -460,31 +451,31 @@ static void sanity_check(TERMTYPE *tp) || PRESENT(enter_reverse_mode))) _nc_warning("no exit_attribute_mode"); #endif /* __UNUSED__ */ - PAIRED(enter_standout_mode, exit_standout_mode) - PAIRED(enter_underline_mode, exit_underline_mode) + PAIRED(enter_standout_mode, exit_standout_mode) + PAIRED(enter_underline_mode, exit_underline_mode) } - /* listed in structure-member order of first argument */ - PAIRED(enter_alt_charset_mode, exit_alt_charset_mode) - ANDMISSING(enter_alt_charset_mode, acs_chars) - ANDMISSING(exit_alt_charset_mode, acs_chars) - ANDMISSING(enter_blink_mode, exit_attribute_mode) - ANDMISSING(enter_bold_mode, exit_attribute_mode) - PAIRED(exit_ca_mode, enter_ca_mode) - PAIRED(enter_delete_mode, exit_delete_mode) - ANDMISSING(enter_dim_mode, exit_attribute_mode) - PAIRED(enter_insert_mode, exit_insert_mode) - ANDMISSING(enter_secure_mode, exit_attribute_mode) - ANDMISSING(enter_protected_mode, exit_attribute_mode) - ANDMISSING(enter_reverse_mode, exit_attribute_mode) - PAIRED(from_status_line, to_status_line) - PAIRED(meta_off, meta_on) - - PAIRED(prtr_on, prtr_off) - PAIRED(save_cursor, restore_cursor) - PAIRED(enter_xon_mode, exit_xon_mode) - PAIRED(enter_am_mode, exit_am_mode) - ANDMISSING(label_off, label_on) - PAIRED(display_clock, remove_clock) - ANDMISSING(set_color_pair, initialize_pair) + /* listed in structure-member order of first argument */ + PAIRED(enter_alt_charset_mode, exit_alt_charset_mode); + ANDMISSING(enter_alt_charset_mode, acs_chars); + ANDMISSING(exit_alt_charset_mode, acs_chars); + ANDMISSING(enter_blink_mode, exit_attribute_mode); + ANDMISSING(enter_bold_mode, exit_attribute_mode); + PAIRED(exit_ca_mode, enter_ca_mode); + PAIRED(enter_delete_mode, exit_delete_mode); + ANDMISSING(enter_dim_mode, exit_attribute_mode); + PAIRED(enter_insert_mode, exit_insert_mode); + ANDMISSING(enter_secure_mode, exit_attribute_mode); + ANDMISSING(enter_protected_mode, exit_attribute_mode); + ANDMISSING(enter_reverse_mode, exit_attribute_mode); + PAIRED(from_status_line, to_status_line); + PAIRED(meta_off, meta_on); + + PAIRED(prtr_on, prtr_off); + PAIRED(save_cursor, restore_cursor); + PAIRED(enter_xon_mode, exit_xon_mode); + PAIRED(enter_am_mode, exit_am_mode); + ANDMISSING(label_off, label_on); + PAIRED(display_clock, remove_clock); + ANDMISSING(set_color_pair, initialize_pair); } diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 15293088..56ba1d1a 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -47,9 +47,10 @@ #include #include +#include #include -MODULE_ID("$Id: comp_scan.c,v 1.34 1998/11/01 00:56:39 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.45 2000/07/08 00:43:55 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -59,11 +60,14 @@ MODULE_ID("$Id: comp_scan.c,v 1.34 1998/11/01 00:56:39 tom Exp $") #define iswhite(ch) (ch == ' ' || ch == '\t') -int _nc_syntax; /* termcap or terminfo? */ -long _nc_curr_file_pos; /* file offset of current line */ -long _nc_comment_start; /* start of comment range before name */ -long _nc_comment_end; /* end of comment range before name */ -long _nc_start_line; /* start line of current entry */ +int _nc_syntax = 0; /* termcap or terminfo? */ +long _nc_curr_file_pos = 0; /* file offset of current line */ +long _nc_comment_start = 0; /* start of comment range before name */ +long _nc_comment_end = 0; /* end of comment range before name */ +long _nc_start_line = 0; /* start line of current entry */ + +struct token _nc_curr_token = +{0, 0, 0}; /***************************************************************************** * @@ -74,21 +78,26 @@ long _nc_start_line; /* start line of current entry */ static bool first_column; /* See 'next_char()' below */ static char separator; /* capability separator */ static int pushtype; /* type of pushback token */ -static char pushname[MAX_NAME_SIZE+1]; +static char pushname[MAX_NAME_SIZE + 1]; + +#ifdef NCURSES_EXT_FUNCS +bool _nc_disable_period = FALSE; /* used by tic -a option */ +#endif -static int last_char(void); -static int next_char(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 */ -static inline int eat_escaped_newline(int ch) +static inline int +eat_escaped_newline(int ch) { - if (ch == '\\') - while ((ch = next_char()) == '\n' || iswhite(ch)) - continue; - return ch; + if (ch == '\\') + while ((ch = next_char()) == '\n' || iswhite(ch)) + continue; + return ch; } /* @@ -124,316 +133,306 @@ static inline int eat_escaped_newline(int ch) * */ -int _nc_get_token(void) +int +_nc_get_token(void) { -static const char terminfo_punct[] = "@%&*!#"; -long number; -int type; -int ch; -char * numchk; -char numbuf[80]; -unsigned found; -static char buffer[MAX_ENTRY_SIZE]; -char *ptr; -int dot_flag = FALSE; -long token_start; - - if (pushtype != NO_PUSHBACK) - { - int retval = pushtype; - - _nc_set_type(pushname); - DEBUG(3, ("pushed-back token: `%s', class %d", - _nc_curr_token.tk_name, pushtype)); - - pushtype = NO_PUSHBACK; - pushname[0] = '\0'; - - /* currtok wasn't altered by _nc_push_token() */ - return(retval); - } - - if (end_of_stream()) - return(EOF); + static const char terminfo_punct[] = "@%&*!#"; + long number; + int type; + int ch; + char *numchk; + char numbuf[80]; + unsigned found; + static char buffer[MAX_ENTRY_SIZE]; + char *ptr; + int dot_flag = FALSE; + long token_start; + + if (pushtype != NO_PUSHBACK) { + int retval = pushtype; + + _nc_set_type(pushname); + DEBUG(3, ("pushed-back token: `%s', class %d", + _nc_curr_token.tk_name, pushtype)); -start_token: - token_start = stream_pos(); - while ((ch = next_char()) == '\n' || iswhite(ch)) - continue; + pushtype = NO_PUSHBACK; + pushname[0] = '\0'; - ch = eat_escaped_newline(ch); + /* currtok wasn't altered by _nc_push_token() */ + return (retval); + } - if (ch == EOF) - type = EOF; - else { - /* if this is a termcap entry, skip a leading separator */ - if (separator == ':' && ch == ':') - ch = next_char(); + if (end_of_stream()) + return (EOF); - if (ch == '.') { - dot_flag = TRUE; - DEBUG(8, ("dot-flag set")); + start_token: + token_start = stream_pos(); + while ((ch = next_char()) == '\n' || iswhite(ch)) + continue; - while ((ch = next_char())=='.' || iswhite(ch)) - continue; - } + ch = eat_escaped_newline(ch); - if (ch == EOF) { - type = EOF; - goto end_of_token; - } + if (ch == EOF) + type = EOF; + else { + /* if this is a termcap entry, skip a leading separator */ + if (separator == ':' && ch == ':') + ch = next_char(); - /* have to make some punctuation chars legal for terminfo */ - if (!isalnum(ch) && !strchr(terminfo_punct, (char)ch)) { - _nc_warning("Illegal character (expected alphanumeric or %s) - %s", - terminfo_punct, _tracechar((chtype)ch)); - _nc_panic_mode(separator); - goto start_token; - } + if (ch == '.' +#ifdef NCURSES_EXT_FUNCS + && !_nc_disable_period +#endif + ) { + dot_flag = TRUE; + DEBUG(8, ("dot-flag set")); - ptr = buffer; - *(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; - while ((ch = next_char()) != '\n') - { - if (ch == EOF) - _nc_err_abort("premature EOF"); - else if (ch == ':' && last_char() != ',') - { - _nc_syntax = SYN_TERMCAP; - separator = ':'; - break; - } - else if (ch == ',') - { - _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 allows commas to - * be embedded in description fields of - * either syntax. - */ - /* FALLTHRU */ - } - else - ch = eat_escaped_newline(ch); - - *ptr++ = ch; - } - ptr[0] = '\0'; - if (_nc_syntax == ERR) - { - /* - * Grrr...what we ought to do here is barf, - * complaining that the entry is malformed. - * But because a couple of name fields in the - * 8.2 termcap file end with |\, we just have - * to assume it's termcap syntax. - */ - _nc_syntax = SYN_TERMCAP; - separator = ':'; - } - else if (_nc_syntax == SYN_TERMINFO) - { - /* throw away trailing /, *$/ */ - for (--ptr; iswhite(*ptr) || *ptr == ','; ptr--) - continue; - ptr[1] = '\0'; - } + while ((ch = next_char()) == '.' || iswhite(ch)) + continue; + } - /* - * This is the soonest we have the terminal name - * fetched. Set up for following warning messages. - */ - ptr = strchr(buffer, '|'); - if (ptr == (char *)NULL) - ptr = buffer + strlen(buffer); - ch = *ptr; - *ptr = '\0'; - _nc_set_type(buffer); - *ptr = ch; - - /* - * Compute the boundary between the aliases and the - * description field for syntax-checking purposes. - */ - desc = strrchr(buffer, '|'); - if (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 (!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(*ptr)) - { - _nc_warning("whitespace in name or alias field"); - break; - } - else if (*ptr == '/') - { - _nc_warning("slashes aren't allowed in names or aliases"); - break; - } - else if (strchr("$[]!*?", *ptr)) - { - _nc_warning("dubious character `%c' in name or alias field", *ptr); - break; - } - } + if (ch == EOF) { + type = EOF; + goto end_of_token; + } - ptr = buffer; + /* have to make some punctuation chars legal for terminfo */ + if (!isalnum(ch) +#ifdef NCURSES_EXT_FUNCS + && !(ch == '.' && _nc_disable_period) +#endif + && !strchr(terminfo_punct, (char) ch)) { + _nc_warning("Illegal character (expected alphanumeric or %s) - %s", + terminfo_punct, unctrl(ch)); + _nc_panic_mode(separator); + goto start_token; + } - _nc_curr_token.tk_name = buffer; - type = NAMES; - } else { - while ((ch = next_char()) != EOF) { - if (!isalnum(ch)) { - if (_nc_syntax == SYN_TERMINFO) { - if (ch != '_') - break; - } else { /* allow ';' for "k;" */ - if (ch != ';') - break; - } - } - *(ptr++) = ch; - } + ptr = buffer; + *(ptr++) = ch; - *ptr++ = '\0'; - switch (ch) { - case ',': - case ':': - if (ch != separator) - _nc_err_abort("Separator inconsistent with syntax"); - _nc_curr_token.tk_name = buffer; - type = BOOLEAN; - break; - case '@': - if ((ch = next_char()) != separator) - _nc_warning("Missing separator after `%s', have %s", - buffer, _tracechar((chtype)ch)); - _nc_curr_token.tk_name = buffer; - type = CANCEL; - break; - - case '#': - found = 0; - while (isalnum(ch = next_char())) { - numbuf[found++] = ch; - if (found >= sizeof(numbuf)-1) - break; - } - numbuf[found] = '\0'; - number = strtol(numbuf, &numchk, 0); - if (numchk == numbuf) - _nc_warning("no value given for `%s'", buffer); - if ((*numchk != '\0') || (ch != separator)) - _nc_warning("Missing separator"); - _nc_curr_token.tk_name = buffer; - _nc_curr_token.tk_valnumber = number; - type = NUMBER; - break; - - case '=': - ch = _nc_trans_string(ptr); - if (ch != separator) - _nc_warning("Missing separator"); - _nc_curr_token.tk_name = buffer; - _nc_curr_token.tk_valstring = ptr; - type = STRING; - break; - - case EOF: - type = EOF; - break; - default: - /* just to get rid of the compiler warning */ - type = UNDEF; - _nc_warning("Illegal character - %s", - _tracechar((chtype)ch)); - } - } /* end else (first_column == FALSE) */ - } /* end else (ch != EOF) */ + if (first_column) { + char *desc; -end_of_token: + _nc_comment_start = token_start; + _nc_comment_end = _nc_curr_file_pos; + _nc_start_line = _nc_curr_line; -#ifdef TRACE - if (dot_flag == TRUE) - DEBUG(8, ("Commented out ")); - - if (_nc_tracing & TRACE_IEVENT) - { - fprintf(stderr, "Token: "); - switch (type) - { - case BOOLEAN: - fprintf(stderr, "Boolean; name='%s'\n", - _nc_curr_token.tk_name); + _nc_syntax = ERR; + while ((ch = next_char()) != '\n') { + if (ch == EOF) + _nc_err_abort("premature EOF"); + else if (ch == ':' && last_char() != ',') { + _nc_syntax = SYN_TERMCAP; + separator = ':'; break; + } else if (ch == ',') { + _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 allows commas to + * be embedded in description fields of + * either syntax. + */ + /* FALLTHRU */ + } else + ch = eat_escaped_newline(ch); + + *ptr++ = ch; + } + ptr[0] = '\0'; + if (_nc_syntax == ERR) { + /* + * Grrr...what we ought to do here is barf, + * complaining that the entry is malformed. + * But because a couple of name fields in the + * 8.2 termcap file end with |\, we just have + * to assume it's termcap syntax. + */ + _nc_syntax = SYN_TERMCAP; + separator = ':'; + } else if (_nc_syntax == SYN_TERMINFO) { + /* throw away trailing /, *$/ */ + for (--ptr; iswhite(*ptr) || *ptr == ','; ptr--) + continue; + ptr[1] = '\0'; + } - case NUMBER: - fprintf(stderr, "Number; name='%s', value=%d\n", - _nc_curr_token.tk_name, - _nc_curr_token.tk_valnumber); + /* + * This is the soonest we have the terminal name + * fetched. Set up for following warning messages. + */ + ptr = strchr(buffer, '|'); + if (ptr == (char *) NULL) + ptr = buffer + strlen(buffer); + ch = *ptr; + *ptr = '\0'; + _nc_set_type(buffer); + *ptr = ch; + + /* + * Compute the boundary between the aliases and the + * description field for syntax-checking purposes. + */ + desc = strrchr(buffer, '|'); + if (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 (!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(*ptr)) { + _nc_warning("whitespace in name or alias field"); break; - - case STRING: - fprintf(stderr, "String; name='%s', value=%s\n", - _nc_curr_token.tk_name, - _nc_visbuf(_nc_curr_token.tk_valstring)); + } else if (*ptr == '/') { + _nc_warning("slashes aren't allowed in names or aliases"); break; - - case CANCEL: - fprintf(stderr, "Cancel; name='%s'\n", - _nc_curr_token.tk_name); + } else if (strchr("$[]!*?", *ptr)) { + _nc_warning("dubious character `%c' in name or alias field", *ptr); break; + } + } - case NAMES: + ptr = buffer; - fprintf(stderr, "Names; value='%s'\n", - _nc_curr_token.tk_name); - break; + _nc_curr_token.tk_name = buffer; + type = NAMES; + } else { + while ((ch = next_char()) != EOF) { + if (!isalnum(ch)) { + if (_nc_syntax == SYN_TERMINFO) { + if (ch != '_') + break; + } else { /* allow ';' for "k;" */ + if (ch != ';') + break; + } + } + *(ptr++) = ch; + } - case EOF: - fprintf(stderr, "End of file\n"); - break; + *ptr++ = '\0'; + switch (ch) { + case ',': + case ':': + if (ch != separator) + _nc_err_abort("Separator inconsistent with syntax"); + _nc_curr_token.tk_name = buffer; + type = BOOLEAN; + break; + case '@': + if ((ch = next_char()) != separator) + _nc_warning("Missing separator after `%s', have %s", + buffer, unctrl(ch)); + _nc_curr_token.tk_name = buffer; + type = CANCEL; + break; - default: - _nc_warning("Bad token type"); + case '#': + found = 0; + while (isalnum(ch = next_char())) { + numbuf[found++] = ch; + if (found >= sizeof(numbuf) - 1) + break; + } + numbuf[found] = '\0'; + number = strtol(numbuf, &numchk, 0); + if (numchk == numbuf) + _nc_warning("no value given for `%s'", buffer); + if ((*numchk != '\0') || (ch != separator)) + _nc_warning("Missing separator"); + _nc_curr_token.tk_name = buffer; + _nc_curr_token.tk_valnumber = number; + type = NUMBER; + break; + + case '=': + ch = _nc_trans_string(ptr, buffer + sizeof(buffer)); + if (ch != separator) + _nc_warning("Missing separator"); + _nc_curr_token.tk_name = buffer; + _nc_curr_token.tk_valstring = ptr; + type = STRING; + break; + + case EOF: + type = EOF; + break; + default: + /* just to get rid of the compiler warning */ + type = UNDEF; + _nc_warning("Illegal character - %s", unctrl(ch)); } + } /* end else (first_column == FALSE) */ + } /* end else (ch != EOF) */ + + end_of_token: + +#ifdef TRACE + if (dot_flag == TRUE) + DEBUG(8, ("Commented out ")); + + if (_nc_tracing >= DEBUG_LEVEL(7)) { + switch (type) { + case BOOLEAN: + _tracef("Token: Boolean; name='%s'", + _nc_curr_token.tk_name); + break; + + case NUMBER: + _tracef("Token: Number; name='%s', value=%d", + _nc_curr_token.tk_name, + _nc_curr_token.tk_valnumber); + break; + + case STRING: + _tracef("Token: String; name='%s', value=%s", + _nc_curr_token.tk_name, + _nc_visbuf(_nc_curr_token.tk_valstring)); + break; + + case CANCEL: + _tracef("Token: Cancel; name='%s'", + _nc_curr_token.tk_name); + break; + + case NAMES: + + _tracef("Token: Names; value='%s'", + _nc_curr_token.tk_name); + break; + + case EOF: + _tracef("Token: End of file"); + break; + + default: + _nc_warning("Bad token type"); } + } #endif - if (dot_flag == TRUE) /* if commented out, use the next one */ - type = _nc_get_token(); + if (dot_flag == TRUE) /* if commented out, use the next one */ + type = _nc_get_token(); - DEBUG(3, ("token: `%s', class %d", _nc_curr_token.tk_name, type)); + DEBUG(3, ("token: `%s', class %d", _nc_curr_token.tk_name, type)); - return(type); + return (type); } /* @@ -456,120 +455,150 @@ end_of_token: */ char -_nc_trans_string(char *ptr) +_nc_trans_string(char *ptr, char *last) { -int count = 0; -int number; -int i, c; -chtype ch, last_ch = '\0'; -bool ignored = FALSE; - - while ((ch = c = next_char()) != (chtype)separator && c != EOF) { - if ((_nc_syntax == SYN_TERMCAP) && c == '\n') - break; - if (ch == '^' && last_ch != '%') { - ch = c = next_char(); - if (c == EOF) - _nc_err_abort("Premature EOF"); - - if (! (is7bits(ch) && isprint(ch))) { - _nc_warning("Illegal ^ character - %s", - _tracechar((unsigned char)ch)); - } - if (ch == '?') { - *(ptr++) = '\177'; - } else { - if ((ch &= 037) == 0) - ch = 128; - *(ptr++) = (char)(ch); - } + int count = 0; + int number; + int i, c; + chtype ch, last_ch = '\0'; + bool ignored = FALSE; + bool long_warning = FALSE; + + while ((ch = c = next_char()) != (chtype) separator && c != EOF) { + if (ptr == (last - 1)) + break; + if ((_nc_syntax == SYN_TERMCAP) && c == '\n') + break; + if (ch == '^' && last_ch != '%') { + ch = c = next_char(); + if (c == EOF) + _nc_err_abort("Premature EOF"); + + if (!(is7bits(ch) && isprint(ch))) { + _nc_warning("Illegal ^ character - %s", unctrl(ch)); + } + if (ch == '?') { + *(ptr++) = '\177'; + if (_nc_tracing) + _nc_warning("Allow ^? as synonym for \\177"); + } else { + if ((ch &= 037) == 0) + ch = 128; + *(ptr++) = (char) (ch); } - else if (ch == '\\') { - ch = c = next_char(); - if (c == EOF) - _nc_err_abort("Premature EOF"); - - if (ch >= '0' && ch <= '7') { - number = ch - '0'; - for (i=0; i < 2; i++) { - ch = c = next_char(); - if (c == EOF) - _nc_err_abort("Premature EOF"); - - if (c < '0' || c > '7') { - if (isdigit(c)) { - _nc_warning("Non-octal digit `%c' in \\ sequence", c); - /* allow the digit; it'll do less harm */ - } else { - push_back((char)c); - break; - } + } else if (ch == '\\') { + ch = c = next_char(); + if (c == EOF) + _nc_err_abort("Premature EOF"); + + if (ch >= '0' && ch <= '7') { + number = ch - '0'; + for (i = 0; i < 2; i++) { + ch = c = next_char(); + if (c == EOF) + _nc_err_abort("Premature EOF"); + + if (c < '0' || c > '7') { + if (isdigit(c)) { + _nc_warning("Non-octal digit `%c' in \\ sequence", c); + /* allow the digit; it'll do less harm */ + } else { + push_back((char) c); + break; } - - number = number * 8 + c - '0'; } - if (number == 0) - number = 0200; - *(ptr++) = (char) number; - } else { - switch (c) { - case 'E': - case 'e': *(ptr++) = '\033'; break; + number = number * 8 + c - '0'; + } + + if (number == 0) + number = 0200; + *(ptr++) = (char) number; + } else { + switch (c) { + case 'E': + case 'e': + *(ptr++) = '\033'; + break; - case 'a': *(ptr++) = '\007'; break; + case 'a': + *(ptr++) = '\007'; + break; - case 'l': - case 'n': *(ptr++) = '\n'; break; + case 'l': + case 'n': + *(ptr++) = '\n'; + break; - case 'r': *(ptr++) = '\r'; break; + case 'r': + *(ptr++) = '\r'; + break; - case 'b': *(ptr++) = '\010'; break; + case 'b': + *(ptr++) = '\010'; + break; - case 's': *(ptr++) = ' '; break; + case 's': + *(ptr++) = ' '; + break; - case 'f': *(ptr++) = '\014'; break; + case 'f': + *(ptr++) = '\014'; + break; - case 't': *(ptr++) = '\t'; break; + case 't': + *(ptr++) = '\t'; + break; - case '\\': *(ptr++) = '\\'; break; + case '\\': + *(ptr++) = '\\'; + break; - case '^': *(ptr++) = '^'; break; + case '^': + *(ptr++) = '^'; + break; - case ',': *(ptr++) = ','; break; + case ',': + *(ptr++) = ','; + break; - case ':': *(ptr++) = ':'; break; + case ':': + *(ptr++) = ':'; + break; - case '\n': - continue; + case '\n': + continue; - default: - _nc_warning("Illegal character %s in \\ sequence", - _tracechar((unsigned char)ch)); - *(ptr++) = (char)ch; - } /* endswitch (ch) */ - } /* endelse (ch < '0' || ch > '7') */ - } /* end else if (ch == '\\') */ - else if (ch == '\n' && (_nc_syntax == SYN_TERMINFO)) { - /* newlines embedded in a terminfo string are ignored */ - ignored = TRUE; - } else { - *(ptr++) = (char)ch; - } + default: + _nc_warning("Illegal character %s in \\ sequence", + unctrl(ch)); + *(ptr++) = (char) ch; + } /* endswitch (ch) */ + } /* endelse (ch < '0' || ch > '7') */ + } + /* end else if (ch == '\\') */ + else if (ch == '\n' && (_nc_syntax == SYN_TERMINFO)) { + /* newlines embedded in a terminfo string are ignored */ + ignored = TRUE; + } else { + *(ptr++) = (char) ch; + } - if (!ignored) { - last_ch = ch; - count ++; - } - ignored = FALSE; + if (!ignored) { + last_ch = ch; + count++; + } + ignored = FALSE; - if (count > MAXCAPLEN) - _nc_warning("Very long string found. Missing separator?"); - } /* end while */ + if (count > MAXCAPLEN && !long_warning) { + _nc_warning("Very long string found. Missing separator?"); + long_warning = TRUE; + } + } /* end while */ - *ptr = '\0'; + *ptr = '\0'; - return(ch); + return (ch); } /* @@ -579,7 +608,8 @@ bool ignored = FALSE; * get_token() call. */ -void _nc_push_token(int tokclass) +void +_nc_push_token(int tokclass) { /* * This implementation is kind of bogus, it will fail if we ever do @@ -591,23 +621,24 @@ void _nc_push_token(int tokclass) _nc_get_type(pushname); DEBUG(3, ("pushing token: `%s', class %d", - _nc_curr_token.tk_name, pushtype)); + _nc_curr_token.tk_name, pushtype)); } /* * Panic mode error recovery - skip everything until a "ch" is found. */ -void _nc_panic_mode(char ch) +void +_nc_panic_mode(char ch) { - int c; - - for (;;) { - c = next_char(); - if (c == ch) - return; - if (c == EOF) - return; - } + int c; + + for (;;) { + c = next_char(); + if (c == ch) + return; + if (c == EOF) + return; + } } /***************************************************************************** @@ -630,16 +661,17 @@ static FILE *yyin; /* scanner's input file descriptor */ * non-null. */ -void _nc_reset_input(FILE *fp, char *buf) +void +_nc_reset_input(FILE * fp, char *buf) { - pushtype = NO_PUSHBACK; - pushname[0] = '\0'; - yyin = fp; - bufstart = bufptr = buf; - _nc_curr_file_pos = 0L; - if (fp != 0) - _nc_curr_line = 0; - _nc_curr_col = 0; + pushtype = NO_PUSHBACK; + pushname[0] = '\0'; + yyin = fp; + bufstart = bufptr = buf; + _nc_curr_file_pos = 0L; + if (fp != 0) + _nc_curr_line = 0; + _nc_curr_col = 0; } /* @@ -650,12 +682,12 @@ void _nc_reset_input(FILE *fp, char *buf) static int last_char(void) { - size_t len = strlen(bufptr); - while (len--) { - if (!isspace(bufptr[len])) - return bufptr[len]; - } - return 0; + size_t len = strlen(bufptr); + while (len--) { + if (!isspace(bufptr[len])) + return bufptr[len]; + } + return 0; } /* @@ -675,17 +707,14 @@ last_char(void) static int next_char(void) { - if (!yyin) - { + if (!yyin) { if (*bufptr == '\0') - return(EOF); + return (EOF); if (*bufptr == '\n') { _nc_curr_line++; _nc_curr_col = 0; } - } - else if (!bufptr || !*bufptr) - { + } else if (!bufptr || !*bufptr) { /* * In theory this could be recoded to do its I/O one * character at a time, saving the buffer space. In @@ -697,15 +726,15 @@ next_char(void) size_t len; do { - _nc_curr_file_pos = ftell(yyin); + _nc_curr_file_pos = ftell(yyin); - if ((bufstart = fgets(line, LEXBUFSIZ, yyin)) != NULL) { - _nc_curr_line++; - _nc_curr_col = 0; - } - bufptr = bufstart; - } while - (bufstart != NULL && line[0] == '#'); + if ((bufstart = fgets(line, LEXBUFSIZ, yyin)) != NULL) { + _nc_curr_line++; + _nc_curr_col = 0; + } + bufptr = bufstart; + } while + (bufstart != NULL && line[0] == '#'); if (bufstart == NULL) return (EOF); @@ -718,10 +747,10 @@ next_char(void) * files on OS/2, etc. */ if ((len = strlen(bufptr)) > 1) { - if (bufptr[len-1] == '\n' - && bufptr[len-2] == '\r') { - bufptr[len-2] = '\n'; - bufptr[len-1] = '\0'; + if (bufptr[len - 1] == '\n' + && bufptr[len - 2] == '\r') { + bufptr[len - 2] = '\n'; + bufptr[len - 1] = '\0'; } } } @@ -729,28 +758,31 @@ next_char(void) first_column = (bufptr == bufstart); _nc_curr_col++; - return(*bufptr++); + return (*bufptr++); } -static void push_back(char c) +static void +push_back(char c) /* push a character back onto the input stream */ { if (bufptr == bufstart) - _nc_syserr_abort("Can't backspace off beginning of line"); + _nc_syserr_abort("Can't backspace off beginning of line"); *--bufptr = c; } -static long stream_pos(void) +static long +stream_pos(void) /* return our current character position in the input stream */ { return (yyin ? ftell(yyin) : (bufptr ? bufptr - bufstart : 0)); } -static bool end_of_stream(void) +static bool +end_of_stream(void) /* are we at end of input? */ { return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0')) - ? TRUE : FALSE); + ? TRUE : FALSE); } /* comp_scan.c ends here */ diff --git a/ncurses/tinfo/free_ttype.c b/ncurses/tinfo/free_ttype.c index 203ec89e..aba1aeb9 100644 --- a/ncurses/tinfo/free_ttype.c +++ b/ncurses/tinfo/free_ttype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -44,20 +44,20 @@ #include #include -MODULE_ID("$Id: free_ttype.c,v 1.2 1999/03/01 00:30:35 tom Exp $") +MODULE_ID("$Id: free_ttype.c,v 1.5 2000/07/08 00:43:58 tom Exp $") void _nc_free_termtype(TERMTYPE *ptr) { - FreeIfNeeded(ptr->str_table); - FreeIfNeeded(ptr->term_names); + FreeIfNeeded(ptr->str_table); + FreeIfNeeded(ptr->term_names); + FreeIfNeeded(ptr->Booleans); + FreeIfNeeded(ptr->Numbers); + FreeIfNeeded(ptr->Strings); #if NCURSES_XNAMES - FreeIfNeeded(ptr->ext_str_table); - FreeIfNeeded(ptr->Booleans); - FreeIfNeeded(ptr->Numbers); - FreeIfNeeded(ptr->Strings); - FreeIfNeeded(ptr->ext_Names); + FreeIfNeeded(ptr->ext_str_table); + FreeIfNeeded(ptr->ext_Names); #endif - memset(ptr, 0, sizeof(TERMTYPE)); + memset(ptr, 0, sizeof(TERMTYPE)); } #if NCURSES_XNAMES @@ -65,8 +65,8 @@ bool _nc_user_definable = TRUE; int use_extended_names(bool flag) { - int oldflag = _nc_user_definable; - _nc_user_definable = flag; - return oldflag; + int oldflag = _nc_user_definable; + _nc_user_definable = flag; + return oldflag; } #endif diff --git a/ncurses/tinfo/init_keytry.c b/ncurses/tinfo/init_keytry.c index a720da18..1134480f 100644 --- a/ncurses/tinfo/init_keytry.c +++ b/ncurses/tinfo/init_keytry.c @@ -32,7 +32,7 @@ /* cursor_visible,cursor_normal,cursor_invisible */ #include /* struct tinfo_fkeys */ -MODULE_ID("$Id: init_keytry.c,v 1.2 1999/09/11 17:32:57 Jeffrey.Honig Exp $") +MODULE_ID("$Id: init_keytry.c,v 1.3 2000/03/12 02:55:50 Todd.C.Miller Exp $") /* ** _nc_init_keytry() @@ -41,7 +41,7 @@ MODULE_ID("$Id: init_keytry.c,v 1.2 1999/09/11 17:32:57 Jeffrey.Honig Exp $") ** */ -#ifdef BROKEN_LINKER +#if BROKEN_LINKER #undef _nc_tinfo_fkeys #endif @@ -51,7 +51,7 @@ MODULE_ID("$Id: init_keytry.c,v 1.2 1999/09/11 17:32:57 Jeffrey.Honig Exp $") /* LINT_PREPRO #endif*/ -#ifdef BROKEN_LINKER +#if BROKEN_LINKER struct tinfo_fkeys *_nc_tinfo_fkeysf(void) { return _nc_tinfo_fkeys; diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c index d3c782e8..6f077915 100644 --- a/ncurses/tinfo/lib_acs.c +++ b/ncurses/tinfo/lib_acs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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,9 +36,9 @@ #include #include /* ena_acs, acs_chars */ -MODULE_ID("$Id: lib_acs.c,v 1.15 1999/02/18 11:31:43 tom Exp $") +MODULE_ID("$Id: lib_acs.c,v 1.16 1999/10/30 23:00:16 tom Exp $") -chtype acs_map[ACS_LEN]; +chtype acs_map[ACS_LEN] = { 0 }; void _nc_init_acs(void) { diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c index 3250147c..7d0aa127 100644 --- a/ncurses/tinfo/lib_cur_term.c +++ b/ncurses/tinfo/lib_cur_term.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999 Free 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,9 +40,9 @@ #include /* TTY, cur_term */ #include /* ospeed */ -MODULE_ID("$Id: lib_cur_term.c,v 1.8 1999/07/24 20:08:19 tom Exp $") +MODULE_ID("$Id: lib_cur_term.c,v 1.9 1999/10/30 23:00:16 tom Exp $") -TERMINAL *cur_term; +TERMINAL *cur_term = 0; TERMINAL *set_curterm(TERMINAL *termp) { diff --git a/ncurses/tinfo/lib_napms.c b/ncurses/tinfo/lib_napms.c index a85304bf..1bd5c647 100644 --- a/ncurses/tinfo/lib_napms.c +++ b/ncurses/tinfo/lib_napms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * lib_napms.c * @@ -43,9 +42,10 @@ #if HAVE_NANOSLEEP #include +#if HAVE_SYS_TIME_H +#include /* needed for MacOS X DP3 */ +#endif #elif USE_FUNC_POLL -#include -#include #if HAVE_SYS_TIME_H #include #endif @@ -58,31 +58,32 @@ #endif #endif -MODULE_ID("$Id: lib_napms.c,v 1.6 1999/10/21 23:01:41 tom Exp $") +MODULE_ID("$Id: lib_napms.c,v 1.9 2000/04/29 23:42:56 tom Exp $") -int napms(int ms) +int +napms(int ms) { - T((T_CALLED("napms(%d)"), ms)); + T((T_CALLED("napms(%d)"), ms)); #if HAVE_NANOSLEEP - { - struct timespec ts; - ts.tv_sec = ms / 1000; - ts.tv_nsec = (ms % 1000) * 1000000; - nanosleep(&ts, NULL); - } + { + struct timespec ts; + ts.tv_sec = ms / 1000; + ts.tv_nsec = (ms % 1000) * 1000000; + nanosleep(&ts, NULL); + } #elif USE_FUNC_POLL - { - struct pollfd fds[1]; - poll(fds, 0, ms); - } + { + struct pollfd fds[1]; + poll(fds, 0, ms); + } #elif HAVE_SELECT - { - struct timeval tval; - tval.tv_sec = ms / 1000; - tval.tv_usec = (ms % 1000) * 1000; - select(0, NULL, NULL, NULL, &tval); - } + { + struct timeval tval; + tval.tv_sec = ms / 1000; + tval.tv_usec = (ms % 1000) * 1000; + select(0, NULL, NULL, NULL, &tval); + } #endif - returnCode(OK); + returnCode(OK); } diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index 0bc14156..b58602af 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* ** lib_options.c ** @@ -41,168 +40,163 @@ #include -#include /* keypad_xmit, keypad_local, meta_on, meta_off */ - /* cursor_visible,cursor_normal,cursor_invisible */ +#include -MODULE_ID("$Id: lib_options.c,v 1.36 1999/10/22 21:38:57 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.39 2000/03/12 00:19:11 tom Exp $") -int idlok(WINDOW *win, bool flag) +int +idlok(WINDOW *win, bool flag) { - T((T_CALLED("idlok(%p,%d)"), win, flag)); + T((T_CALLED("idlok(%p,%d)"), win, flag)); - if (win) { - _nc_idlok = win->_idlok = flag && (has_il() || change_scroll_region); - returnCode(OK); - } - else - returnCode(ERR); + if (win) { + _nc_idlok = win->_idlok = (flag && (has_il() || change_scroll_region)); + returnCode(OK); + } else + returnCode(ERR); } - -void idcok(WINDOW *win, bool flag) +void +idcok(WINDOW *win, bool flag) { - T((T_CALLED("idcok(%p,%d)"), win, flag)); + T((T_CALLED("idcok(%p,%d)"), win, flag)); - if (win) - _nc_idcok = win->_idcok = flag && has_ic(); + if (win) + _nc_idcok = win->_idcok = (flag && has_ic()); - returnVoid; + returnVoid; } -int halfdelay(int t) +int +halfdelay(int t) { - T((T_CALLED("halfdelay(%d)"), t)); + T((T_CALLED("halfdelay(%d)"), t)); - if (t < 1 || t > 255) - returnCode(ERR); + if (t < 1 || t > 255) + returnCode(ERR); - cbreak(); - SP->_cbreak = t+1; - returnCode(OK); + cbreak(); + SP->_cbreak = t + 1; + returnCode(OK); } -int nodelay(WINDOW *win, bool flag) +int +nodelay(WINDOW *win, bool flag) { - T((T_CALLED("nodelay(%p,%d)"), win, flag)); + T((T_CALLED("nodelay(%p,%d)"), win, flag)); - if (win) { - if (flag == TRUE) + if (win) { + if (flag == TRUE) win->_delay = 0; - else win->_delay = -1; - returnCode(OK); - } else - returnCode(ERR); + win->_delay = -1; + returnCode(OK); + } else + returnCode(ERR); } -int notimeout(WINDOW *win, bool f) +int +notimeout(WINDOW *win, bool f) { - T((T_CALLED("notimout(%p,%d)"), win, f)); + T((T_CALLED("notimout(%p,%d)"), win, f)); - if (win) { - win->_notimeout = f; - returnCode(OK); - } - else - returnCode(ERR); + if (win) { + win->_notimeout = f; + returnCode(OK); + } else + returnCode(ERR); } -void wtimeout(WINDOW *win, int delay) +void +wtimeout(WINDOW *win, int delay) { - T((T_CALLED("wtimeout(%p,%d)"), win, delay)); + T((T_CALLED("wtimeout(%p,%d)"), win, delay)); - if (win) { - win->_delay = delay; - } + if (win) { + win->_delay = delay; + } } -int keypad(WINDOW *win, bool flag) +int +keypad(WINDOW *win, bool flag) { - T((T_CALLED("keypad(%p,%d)"), win, flag)); + T((T_CALLED("keypad(%p,%d)"), win, flag)); - if (win) { - win->_use_keypad = flag; - returnCode(_nc_keypad(flag)); - } - else - returnCode(ERR); + if (win) { + win->_use_keypad = flag; + returnCode(_nc_keypad(flag)); + } else + returnCode(ERR); } - -int meta(WINDOW *win GCC_UNUSED, bool flag) +int +meta(WINDOW *win GCC_UNUSED, bool flag) { - /* 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); - } - returnCode(OK); + /* 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); + } + returnCode(OK); } /* curs_set() moved here to narrow the kernel interface */ -int curs_set(int vis) +int +curs_set(int vis) { -int cursor = SP->_cursor; - - T((T_CALLED("curs_set(%d)"), vis)); - - if (vis < 0 || vis > 2) - returnCode(ERR); - - if (vis == cursor) - returnCode(cursor); - - switch(vis) { - case 2: - if (cursor_visible) - { - TPUTS_TRACE("cursor_visible"); - putp(cursor_visible); - } - else - returnCode(ERR); - break; - case 1: - if (cursor_normal) - { - TPUTS_TRACE("cursor_normal"); - putp(cursor_normal); - } - else - returnCode(ERR); - break; - case 0: - if (cursor_invisible) - { - TPUTS_TRACE("cursor_invisible"); - putp(cursor_invisible); - } - else - returnCode(ERR); - break; - } - SP->_cursor = vis; - _nc_flush(); - - returnCode(cursor==-1 ? 1 : cursor); + int cursor = SP->_cursor; + + T((T_CALLED("curs_set(%d)"), vis)); + + if (vis < 0 || vis > 2) + returnCode(ERR); + + if (vis == cursor) + returnCode(cursor); + + switch (vis) { + case 2: + if (cursor_visible) { + TPUTS_TRACE("cursor_visible"); + putp(cursor_visible); + } else + returnCode(ERR); + break; + case 1: + if (cursor_normal) { + TPUTS_TRACE("cursor_normal"); + putp(cursor_normal); + } else + returnCode(ERR); + break; + case 0: + if (cursor_invisible) { + TPUTS_TRACE("cursor_invisible"); + putp(cursor_invisible); + } else + returnCode(ERR); + break; + } + SP->_cursor = vis; + _nc_flush(); + + returnCode(cursor == -1 ? 1 : cursor); } -int typeahead(int fd) +int +typeahead(int fd) { - T((T_CALLED("typeahead(%d)"), fd)); - SP->_checkfd = fd; - returnCode(OK); + T((T_CALLED("typeahead(%d)"), fd)); + SP->_checkfd = fd; + returnCode(OK); } /* @@ -213,18 +207,20 @@ int typeahead(int fd) */ #ifdef NCURSES_EXT_FUNCS -static int has_key_internal(int keycode, struct tries *tp) +static int +has_key_internal(int keycode, struct tries *tp) { if (tp == 0) - return(FALSE); + return (FALSE); else if (tp->value == keycode) - return(TRUE); + return (TRUE); else - return(has_key_internal(keycode, tp->child) - || has_key_internal(keycode, tp->sibling)); + return (has_key_internal(keycode, tp->child) + || has_key_internal(keycode, tp->sibling)); } -int has_key(int keycode) +int +has_key(int keycode) { T((T_CALLED("has_key(%d)"), keycode)); returnCode(has_key_internal(keycode, SP->_keytry)); @@ -238,24 +234,22 @@ int has_key(int keycode) * flush, then the next wgetch may get the escape sequence that corresponds to * the terminal state _before_ switching modes. */ -int _nc_keypad(bool flag) +int +_nc_keypad(bool flag) { - if (flag && keypad_xmit) - { - TPUTS_TRACE("keypad_xmit"); - putp(keypad_xmit); - _nc_flush(); - } - else if (! flag && keypad_local) - { - TPUTS_TRACE("keypad_local"); - putp(keypad_local); - _nc_flush(); - } - - if (flag && !SP->_tried) { - _nc_init_keytry(); - SP->_tried = TRUE; - } - return(OK); + if (flag && keypad_xmit) { + TPUTS_TRACE("keypad_xmit"); + putp(keypad_xmit); + _nc_flush(); + } else if (!flag && keypad_local) { + TPUTS_TRACE("keypad_local"); + putp(keypad_local); + _nc_flush(); + } + + if (flag && !SP->_tried) { + _nc_init_keytry(); + SP->_tried = TRUE; + } + return (OK); } diff --git a/ncurses/tinfo/lib_raw.c b/ncurses/tinfo/lib_raw.c index 61b422c1..6033ed9c 100644 --- a/ncurses/tinfo/lib_raw.c +++ b/ncurses/tinfo/lib_raw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * raw.c * @@ -47,21 +46,20 @@ */ #include -#include /* cur_term */ +#include /* cur_term */ -MODULE_ID("$Id: lib_raw.c,v 1.3 1999/03/06 22:28:24 tom Exp $") +MODULE_ID("$Id: lib_raw.c,v 1.7 2000/02/13 01:01:26 tom Exp $") #if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE) #define _POSIX_SOURCE #endif #if HAVE_SYS_TERMIO_H -#include /* needed for ISC */ +#include /* needed for ISC */ #endif #ifdef __EMX__ #include -#include #endif #define COOKED_INPUT (IXON|BRKINT|PARMRK) @@ -74,160 +72,165 @@ MODULE_ID("$Id: lib_raw.c,v 1.3 1999/03/06 22:28:24 tom Exp $") #define AFTER(s) #endif /* TRACE */ -int raw(void) +int +raw(void) { - T((T_CALLED("raw()"))); - if (SP != 0 && cur_term != 0) { + T((T_CALLED("raw()"))); + if (SP != 0 && cur_term != 0) { - SP->_raw = TRUE; - SP->_cbreak = 1; + SP->_raw = TRUE; + SP->_cbreak = 1; #ifdef __EMX__ - setmode(SP->_ifd, O_BINARY); + setmode(SP->_ifd, O_BINARY); #endif #ifdef TERMIOS - BEFORE("raw"); - cur_term->Nttyb.c_lflag &= ~(ICANON|ISIG); - cur_term->Nttyb.c_iflag &= ~(COOKED_INPUT); - cur_term->Nttyb.c_cc[VMIN] = 1; - cur_term->Nttyb.c_cc[VTIME] = 0; - AFTER("raw"); + BEFORE("raw"); + cur_term->Nttyb.c_lflag &= ~(ICANON | ISIG | IEXTEN); + cur_term->Nttyb.c_iflag &= ~(COOKED_INPUT); + cur_term->Nttyb.c_cc[VMIN] = 1; + cur_term->Nttyb.c_cc[VTIME] = 0; + AFTER("raw"); #else - cur_term->Nttyb.sg_flags |= RAW; + cur_term->Nttyb.sg_flags |= RAW; #endif - returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); - } - returnCode(ERR); + returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); + } + returnCode(ERR); } -int cbreak(void) +int +cbreak(void) { - T((T_CALLED("cbreak()"))); + T((T_CALLED("cbreak()"))); - SP->_cbreak = 1; + SP->_cbreak = 1; #ifdef __EMX__ - setmode(SP->_ifd, O_BINARY); + setmode(SP->_ifd, O_BINARY); #endif #ifdef TERMIOS - BEFORE("cbreak"); - cur_term->Nttyb.c_lflag &= ~ICANON; - cur_term->Nttyb.c_iflag &= ~ICRNL; - cur_term->Nttyb.c_lflag |= ISIG; - cur_term->Nttyb.c_cc[VMIN] = 1; - cur_term->Nttyb.c_cc[VTIME] = 0; - AFTER("cbreak"); + BEFORE("cbreak"); + cur_term->Nttyb.c_lflag &= ~ICANON; + cur_term->Nttyb.c_iflag &= ~ICRNL; + cur_term->Nttyb.c_lflag |= ISIG; + cur_term->Nttyb.c_cc[VMIN] = 1; + cur_term->Nttyb.c_cc[VTIME] = 0; + AFTER("cbreak"); #else - cur_term->Nttyb.sg_flags |= CBREAK; + cur_term->Nttyb.sg_flags |= CBREAK; #endif - returnCode(_nc_set_tty_mode( &cur_term->Nttyb)); + returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); } -void qiflush(void) +void +qiflush(void) { - T((T_CALLED("qiflush()"))); + T((T_CALLED("qiflush()"))); - /* - * Note: this implementation may be wrong. See the comment under - * intrflush(). - */ + /* + * Note: this implementation may be wrong. See the comment under + * intrflush(). + */ #ifdef TERMIOS - BEFORE("qiflush"); - cur_term->Nttyb.c_lflag &= ~(NOFLSH); - AFTER("qiflush"); - (void)_nc_set_tty_mode( &cur_term->Nttyb); - returnVoid; + BEFORE("qiflush"); + cur_term->Nttyb.c_lflag &= ~(NOFLSH); + AFTER("qiflush"); + (void) _nc_set_tty_mode(&cur_term->Nttyb); + returnVoid; #endif } - -int noraw(void) +int +noraw(void) { - T((T_CALLED("noraw()"))); + T((T_CALLED("noraw()"))); - SP->_raw = FALSE; - SP->_cbreak = 0; + SP->_raw = FALSE; + SP->_cbreak = 0; #ifdef __EMX__ - setmode(SP->_ifd, O_TEXT); + setmode(SP->_ifd, O_TEXT); #endif #ifdef TERMIOS - BEFORE("noraw"); - cur_term->Nttyb.c_lflag |= ISIG|ICANON; - cur_term->Nttyb.c_iflag |= COOKED_INPUT; - AFTER("noraw"); + BEFORE("noraw"); + cur_term->Nttyb.c_lflag |= ISIG | ICANON | + (cur_term->Ottyb.c_lflag & IEXTEN); + cur_term->Nttyb.c_iflag |= COOKED_INPUT; + AFTER("noraw"); #else - cur_term->Nttyb.sg_flags &= ~(RAW|CBREAK); + cur_term->Nttyb.sg_flags &= ~(RAW | CBREAK); #endif - returnCode(_nc_set_tty_mode( &cur_term->Nttyb)); + returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); } - -int nocbreak(void) +int +nocbreak(void) { - T((T_CALLED("nocbreak()"))); + T((T_CALLED("nocbreak()"))); - SP->_cbreak = 0; + SP->_cbreak = 0; #ifdef __EMX__ - setmode(SP->_ifd, O_TEXT); + setmode(SP->_ifd, O_TEXT); #endif #ifdef TERMIOS - BEFORE("nocbreak"); - cur_term->Nttyb.c_lflag |= ICANON; - cur_term->Nttyb.c_iflag |= ICRNL; - AFTER("nocbreak"); + BEFORE("nocbreak"); + cur_term->Nttyb.c_lflag |= ICANON; + cur_term->Nttyb.c_iflag |= ICRNL; + AFTER("nocbreak"); #else - cur_term->Nttyb.sg_flags &= ~CBREAK; + cur_term->Nttyb.sg_flags &= ~CBREAK; #endif - returnCode(_nc_set_tty_mode( &cur_term->Nttyb)); + returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); } -void noqiflush(void) +void +noqiflush(void) { - T((T_CALLED("noqiflush()"))); + T((T_CALLED("noqiflush()"))); - /* - * Note: this implementation may be wrong. See the comment under - * intrflush(). - */ + /* + * Note: this implementation may be wrong. See the comment under + * intrflush(). + */ #ifdef TERMIOS - BEFORE("noqiflush"); - cur_term->Nttyb.c_lflag |= NOFLSH; - AFTER("noqiflush"); - (void)_nc_set_tty_mode( &cur_term->Nttyb); - returnVoid; + BEFORE("noqiflush"); + cur_term->Nttyb.c_lflag |= NOFLSH; + AFTER("noqiflush"); + (void) _nc_set_tty_mode(&cur_term->Nttyb); + returnVoid; #endif } -int intrflush(WINDOW *win GCC_UNUSED, bool flag) +int +intrflush(WINDOW *win GCC_UNUSED, bool flag) { - T((T_CALLED("intrflush(%d)"), flag)); + T((T_CALLED("intrflush(%d)"), flag)); - /* - * This call does the same thing as the qiflush()/noqiflush() - * pair. We know for certain that SVr3 intrflush() tweaks the - * NOFLSH bit; on the other hand, the match (in the SVr4 man - * pages) between the language describing NOFLSH in termio(7) - * and the language describing qiflush()/noqiflush() in - * curs_inopts(3x) is too exact to be coincidence. - */ + /* + * This call does the same thing as the qiflush()/noqiflush() pair. We + * know for certain that SVr3 intrflush() tweaks the NOFLSH bit; on the + * other hand, the match (in the SVr4 man pages) between the language + * describing NOFLSH in termio(7) and the language describing + * qiflush()/noqiflush() in curs_inopts(3x) is too exact to be coincidence. + */ #ifdef TERMIOS - BEFORE("intrflush"); - if (flag) - cur_term->Nttyb.c_lflag &= ~(NOFLSH); - else - cur_term->Nttyb.c_lflag |= (NOFLSH); - AFTER("intrflush"); - returnCode(_nc_set_tty_mode( &cur_term->Nttyb)); + BEFORE("intrflush"); + if (flag) + cur_term->Nttyb.c_lflag &= ~(NOFLSH); + else + cur_term->Nttyb.c_lflag |= (NOFLSH); + AFTER("intrflush"); + returnCode(_nc_set_tty_mode(&cur_term->Nttyb)); #else - returnCode(ERR); + returnCode(ERR); #endif } diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 64aa73fa..50c330eb 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * Terminal setup routines common to termcap and terminfo: * @@ -40,16 +39,16 @@ */ #include -#include /* for MAX_NAME_SIZE */ +#include /* for MAX_NAME_SIZE */ #include #if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE) #define _POSIX_SOURCE #endif -#include /* lines, columns, cur_term */ +#include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.55 1999/08/21 23:06:08 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.59 2000/02/13 01:01:26 tom Exp $") /**************************************************************************** * @@ -95,120 +94,116 @@ static int _use_env = TRUE; static void do_prototype(void); -void use_env(bool f) +void +use_env(bool f) { - _use_env = f; + _use_env = f; } -int LINES, COLS, TABSIZE; +int LINES = 0, COLS = 0, TABSIZE = 0; -static void _nc_get_screensize(int *linep, int *colp) +static void +_nc_get_screensize(int *linep, int *colp) /* Obtain lines/columns values from the environment and/or terminfo entry */ { - /* figure out the size of the screen */ - T(("screen size: terminfo lines = %d columns = %d", lines, columns)); + /* figure out the size of the screen */ + T(("screen size: terminfo lines = %d columns = %d", lines, columns)); - if (!_use_env) - { - *linep = (int)lines; - *colp = (int)columns; - } - else /* usually want to query LINES and COLUMNS from environment */ - { - int value; + if (!_use_env) { + *linep = (int) lines; + *colp = (int) columns; + } else { /* usually want to query LINES and COLUMNS from environment */ + int value; - *linep = *colp = 0; + *linep = *colp = 0; - /* first, look for environment variables */ - if ((value = _nc_getenv_num("LINES")) > 0) { - *linep = value; - } - if ((value = _nc_getenv_num("COLUMNS")) > 0) { - *colp = value; - } - T(("screen size: environment LINES = %d COLUMNS = %d",*linep,*colp)); + /* first, look for environment variables */ + if ((value = _nc_getenv_num("LINES")) > 0) { + *linep = value; + } + if ((value = _nc_getenv_num("COLUMNS")) > 0) { + *colp = value; + } + T(("screen size: environment LINES = %d COLUMNS = %d", *linep, *colp)); #ifdef __EMX__ - if (*linep <= 0 || *colp <= 0) - { - int screendata[2]; - _scrsize(screendata); - *colp = screendata[0]; - *linep = screendata[1]; - T(("EMX screen size: environment LINES = %d COLUMNS = %d",*linep,*colp)); - } + if (*linep <= 0 || *colp <= 0) { + int screendata[2]; + _scrsize(screendata); + *colp = screendata[0]; + *linep = screendata[1]; + T(("EMX screen size: environment LINES = %d COLUMNS = %d", + *linep, *colp)); + } #endif #if HAVE_SIZECHANGE - /* if that didn't work, maybe we can try asking the OS */ - if (*linep <= 0 || *colp <= 0) - { - if (isatty(cur_term->Filedes)) - { - STRUCT_WINSIZE size; - - errno = 0; - do { - if (ioctl(cur_term->Filedes, IOCTL_WINSIZE, &size) < 0 - && errno != EINTR) - goto failure; - } while - (errno == EINTR); - - /* - * Solaris lets users override either dimension with an - * environment variable. - */ - if (*linep <= 0) - *linep = WINSIZE_ROWS(size); - if (*colp <= 0) - *colp = WINSIZE_COLS(size); - } - /* FALLTHRU */ - failure:; + /* if that didn't work, maybe we can try asking the OS */ + if (*linep <= 0 || *colp <= 0) { + if (isatty(cur_term->Filedes)) { + STRUCT_WINSIZE size; + + errno = 0; + do { + if (ioctl(cur_term->Filedes, IOCTL_WINSIZE, &size) < 0 + && errno != EINTR) + goto failure; + } while + (errno == EINTR); + + /* + * Solaris lets users override either dimension with an + * environment variable. + */ + if (*linep <= 0) + *linep = WINSIZE_ROWS(size); + if (*colp <= 0) + *colp = WINSIZE_COLS(size); } + /* FALLTHRU */ + failure:; + } #endif /* HAVE_SIZECHANGE */ - /* if we can't get dynamic info about the size, use static */ - if (*linep <= 0 || *colp <= 0) - if (lines > 0 && columns > 0) - { - *linep = (int)lines; - *colp = (int)columns; - } - - /* the ultimate fallback, assume fixed 24x80 size */ - if (*linep <= 0 || *colp <= 0) - { - *linep = 24; - *colp = 80; + /* if we can't get dynamic info about the size, use static */ + if (*linep <= 0 || *colp <= 0) + if (lines > 0 && columns > 0) { + *linep = (int) lines; + *colp = (int) columns; } - /* - * Put the derived values back in the screen-size caps, so - * tigetnum() and tgetnum() will do the right thing. - */ - lines = (short)(*linep); - columns = (short)(*colp); + /* the ultimate fallback, assume fixed 24x80 size */ + if (*linep <= 0 || *colp <= 0) { + *linep = 24; + *colp = 80; } - T(("screen size is %dx%d", *linep, *colp)); + /* + * Put the derived values back in the screen-size caps, so + * tigetnum() and tgetnum() will do the right thing. + */ + lines = (short) (*linep); + columns = (short) (*colp); + } + + T(("screen size is %dx%d", *linep, *colp)); - if (init_tabs != -1) - TABSIZE = (int)init_tabs; - else - TABSIZE = 8; - T(("TABSIZE = %d", TABSIZE)); + if (VALID_NUMERIC(init_tabs)) + TABSIZE = (int) init_tabs; + else + TABSIZE = 8; + T(("TABSIZE = %d", TABSIZE)); } #if USE_SIZECHANGE -void _nc_update_screensize(void) +void +_nc_update_screensize(void) { - int my_lines, my_cols; + int my_lines, my_cols; - _nc_get_screensize(&my_lines, &my_cols); - if (SP != 0 && SP->_resize != 0) - SP->_resize(my_lines, my_cols); + _nc_get_screensize(&my_lines, &my_cols); + if (SP != 0 && SP->_resize != 0) + SP->_resize(my_lines, my_cols); } #endif @@ -235,52 +230,53 @@ void _nc_update_screensize(void) } #if USE_DATABASE -static int grab_entry(const char *const tn, TERMTYPE *const tp) +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 */ { - char filename[PATH_MAX]; - int status; + char filename[PATH_MAX]; + int status; - /* - * $TERM shouldn't contain pathname delimiters. - */ - if (strchr(tn, '/')) - return 0; + /* + * $TERM shouldn't contain pathname delimiters. + */ + if (strchr(tn, '/')) + return 0; - if ((status = _nc_read_entry(tn, filename, tp)) != 1) { + if ((status = _nc_read_entry(tn, filename, tp)) != 1) { #ifndef PURE_TERMINFO - /* - * Try falling back on the termcap file. - * Note: allowing this call links the entire terminfo/termcap - * compiler into the startup code. It's preferable to build a - * real terminfo database and use that. - */ - status = _nc_read_termcap_entry(tn, tp); -#endif /* PURE_TERMINFO */ - - } - /* - * If we have an entry, force all of the cancelled strings to null - * pointers so we don't have to test them in the rest of the library. - * (The terminfo compiler bypasses this logic, since it must know if - * a string is cancelled, for merging entries). + * Try falling back on the termcap file. + * Note: allowing this call links the entire terminfo/termcap + * compiler into the startup code. It's preferable to build a + * real terminfo database and use that. */ - if (status == 1) { - int n; - for_each_boolean(n,tp) - if (!VALID_BOOLEAN(tp->Booleans[n])) - tp->Booleans[n] = FALSE; - for_each_string(n,tp) - if (tp->Strings[n] == CANCELLED_STRING) - tp->Strings[n] = ABSENT_STRING; - } - return(status); + status = _nc_read_termcap_entry(tn, tp); +#endif /* PURE_TERMINFO */ + + } + + /* + * If we have an entry, force all of the cancelled strings to null + * pointers so we don't have to test them in the rest of the library. + * (The terminfo compiler bypasses this logic, since it must know if + * a string is cancelled, for merging entries). + */ + if (status == 1) { + int n; + for_each_boolean(n, tp) + if (!VALID_BOOLEAN(tp->Booleans[n])) + tp->Booleans[n] = FALSE; + for_each_string(n, tp) + if (tp->Strings[n] == CANCELLED_STRING) + tp->Strings[n] = ABSENT_STRING; + } + return (status); } #endif -char ttytype[NAMESIZE]; +char ttytype[NAMESIZE] = ""; /* * setupterm(termname, Filedes, errret) @@ -290,107 +286,103 @@ char ttytype[NAMESIZE]; * */ -int setupterm(NCURSES_CONST char *tname, int Filedes, int *errret) +int +setupterm(NCURSES_CONST char *tname, int Filedes, int *errret) { -struct term *term_ptr; -int status; + struct term *term_ptr; + int status; - T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, errret)); + T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, errret)); - if (tname == 0) { - tname = getenv("TERM"); - if (tname == 0 || *tname == '\0') { - ret_error0(-1, "TERM environment variable not set.\n"); - } - } - if (strlen(tname) > MAX_NAME_SIZE) { - ret_error(-1, "TERM environment must be <= %d characters.\n", - MAX_NAME_SIZE); + if (tname == 0) { + tname = getenv("TERM"); + if (tname == 0 || *tname == '\0') { + ret_error0(-1, "TERM environment variable not set.\n"); } + } + if (strlen(tname) > MAX_NAME_SIZE) { + ret_error(-1, "TERM environment must be <= %d characters.\n", + MAX_NAME_SIZE); + } - T(("your terminal name is %s", tname)); + T(("your terminal name is %s", tname)); - term_ptr = typeCalloc(TERMINAL, 1); + term_ptr = typeCalloc(TERMINAL, 1); - if (term_ptr == 0) { - ret_error0(-1, "Not enough memory to create terminal structure.\n") ; - } + if (term_ptr == 0) { + ret_error0(-1, "Not enough memory to create terminal structure.\n"); + } #if USE_DATABASE - 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); - - 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); - } - - /* - * 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); - - if (command_character && getenv("CC")) - do_prototype(); - - strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1); - ttytype[NAMESIZE - 1] = '\0'; - - /* - * 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; - - _nc_get_screensize(&LINES, &COLS); - - if (errret) - *errret = 1; + /* try fallback list if entry on disk */ + if (status != 1) { + const TERMTYPE *fallback = _nc_fallback(tname); - T((T_CREATE("screen %s %dx%d"), tname, LINES, COLS)); - - if (generic_type) { - ret_error(0, "'%s': I need something more specific.\n", tname); - } - if (hard_copy) { - ret_error(1, "'%s': I can't handle hardcopy terminals.\n", tname); + if (fallback) { + term_ptr->type = *fallback; + status = 1; } - returnCode(OK); + } + + 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); + + if (command_character && getenv("CC")) + do_prototype(); + + strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1); + ttytype[NAMESIZE - 1] = '\0'; + + /* + * 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; + + _nc_get_screensize(&LINES, &COLS); + + if (errret) + *errret = 1; + + T((T_CREATE("screen %s %dx%d"), tname, LINES, COLS)); + + if (generic_type) { + ret_error(0, "'%s': I need something more specific.\n", tname); + } + if (hard_copy) { + ret_error(1, "'%s': I can't handle hardcopy terminals.\n", tname); + } + returnCode(OK); } /* @@ -404,19 +396,19 @@ int status; 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; - } + 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 8238b368..c4740013 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,15 +39,15 @@ #define __INTERNAL_CAPS_VISIBLE #include -MODULE_ID("$Id: lib_termcap.c,v 1.29 1999/09/05 01:06:43 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.36 2000/02/13 01:01:26 tom Exp $") /* some of the code in here was contributed by: Magnus Bengtsson, d6mbeng@dtek.chalmers.se */ -char *UP; -char *BC; +char *UP = 0; +char *BC = 0; /*************************************************************************** * @@ -64,29 +64,30 @@ char *BC; * ***************************************************************************/ -int tgetent(char *bufp GCC_UNUSED, const char *name) +int +tgetent(char *bufp GCC_UNUSED, const char *name) { -int errcode; + int errcode; - T((T_CALLED("tgetent()"))); + T((T_CALLED("tgetent()"))); - setupterm((NCURSES_CONST char *)name, STDOUT_FILENO, &errcode); + setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode); - if (errcode == 1) { + if (errcode == 1) { - if (cursor_left) - if ((backspaces_with_bs = !strcmp(cursor_left, "\b")) == 0) - backspace_if_not_bs = cursor_left; + if (cursor_left) + if ((backspaces_with_bs = !strcmp(cursor_left, "\b")) == 0) + backspace_if_not_bs = cursor_left; - /* we're required to export these */ - if (pad_char != NULL) - PC = pad_char[0]; - if (cursor_up != NULL) - UP = cursor_up; - if (backspace_if_not_bs != NULL) - BC = backspace_if_not_bs; + /* we're required to export these */ + if (pad_char != NULL) + PC = pad_char[0]; + if (cursor_up != NULL) + UP = cursor_up; + if (backspace_if_not_bs != NULL) + BC = backspace_if_not_bs; - (void) baudrate(); /* sets ospeed as a side-effect */ + (void) baudrate(); /* sets ospeed as a side-effect */ /* LINT_PREPRO #if 0*/ @@ -94,8 +95,8 @@ int errcode; /* LINT_PREPRO #endif*/ - } - returnCode(errcode); + } + returnCode(errcode); } /*************************************************************************** @@ -107,22 +108,23 @@ int errcode; * ***************************************************************************/ -int tgetflag(NCURSES_CONST char *id) +int +tgetflag(NCURSES_CONST char *id) { -int i; - - T((T_CALLED("tgetflag(%s)"), id)); - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_boolean(i, tp) { - const char *capname = ExtBoolname(tp, i, boolcodes); - if (!strncmp(id, capname, 2)) { - /* setupterm forces invalid booleans to false */ - returnCode(tp->Booleans[i]); - } + int i; + + T((T_CALLED("tgetflag(%s)"), id)); + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_boolean(i, tp) { + const char *capname = ExtBoolname(tp, i, boolcodes); + if (!strncmp(id, capname, 2)) { + /* setupterm forces invalid booleans to false */ + returnCode(tp->Booleans[i]); } } - returnCode(0); /* Solaris does this */ + } + returnCode(0); /* Solaris does this */ } /*************************************************************************** @@ -134,23 +136,24 @@ int i; * ***************************************************************************/ -int tgetnum(NCURSES_CONST char *id) +int +tgetnum(NCURSES_CONST char *id) { -int i; - - T((T_CALLED("tgetnum(%s)"), id)); - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_number(i, tp) { - const char *capname = ExtNumname(tp, i, numcodes); - if (!strncmp(id, capname, 2)) { - if (!VALID_NUMERIC(tp->Numbers[i])) - return -1; - returnCode(tp->Numbers[i]); - } + int i; + + T((T_CALLED("tgetnum(%s)"), id)); + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_number(i, tp) { + const char *capname = ExtNumname(tp, i, numcodes); + if (!strncmp(id, capname, 2)) { + if (!VALID_NUMERIC(tp->Numbers[i])) + returnCode(ABSENT_NUMERIC); + returnCode(tp->Numbers[i]); } } - returnCode(ERR); + } + returnCode(ABSENT_NUMERIC); } /*************************************************************************** @@ -162,30 +165,30 @@ int i; * ***************************************************************************/ -char *tgetstr(NCURSES_CONST char *id, char **area) +char * +tgetstr(NCURSES_CONST char *id, char **area) { -int i; - - T((T_CALLED("tgetstr(%s,%p)"), id, area)); - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_string(i, tp) { - const char *capname = ExtStrname(tp, i, strcodes); - T(("trying %s", capname)); - if (!strncmp(id, capname, 2)) { - T(("found match : %s", _nc_visbuf(tp->Strings[i]))); - /* setupterm forces cancelled strings to null */ - if (area != 0 - && *area != 0 - && VALID_STRING(tp->Strings[i])) { - (void) strcpy(*area, tp->Strings[i]); - *area += strlen(*area) + 1; - } - returnPtr(tp->Strings[i]); + int i; + + T((T_CALLED("tgetstr(%s,%p)"), id, area)); + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_string(i, tp) { + const char *capname = ExtStrname(tp, i, strcodes); + if (!strncmp(id, capname, 2)) { + TR(TRACE_DATABASE,("found match : %s", _nc_visbuf(tp->Strings[i]))); + /* setupterm forces canceled strings to null */ + if (area != 0 + && *area != 0 + && VALID_STRING(tp->Strings[i])) { + (void) strcpy(*area, tp->Strings[i]); + *area += strlen(*area) + 1; } + returnPtr(tp->Strings[i]); } } - returnPtr(NULL); + } + returnPtr(NULL); } /* @@ -197,8 +200,9 @@ int i; * */ -char *tgoto(const char *string, int x, int y) +char * +tgoto(const char *string, int x, int y) { - T((T_CALLED("tgoto(%s,%d,%d)"), string, x, y)); - returnPtr(tparm((NCURSES_CONST char *)string, y, x)); + T((T_CALLED("tgoto(%s,%d,%d)"), string, x, y)); + returnPtr(tparm((NCURSES_CONST char *) string, y, x)); } diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c index 7b2b2f91..def5ba6d 100644 --- a/ncurses/tinfo/lib_ti.c +++ b/ncurses/tinfo/lib_ti.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,71 +31,73 @@ * and: Eric S. Raymond * ****************************************************************************/ - #include #include #include -MODULE_ID("$Id: lib_ti.c,v 1.16 1999/02/28 23:11:28 tom Exp $") +MODULE_ID("$Id: lib_ti.c,v 1.20 2000/02/13 01:01:26 tom Exp $") -int tigetflag(NCURSES_CONST char *str) +int +tigetflag(NCURSES_CONST char *str) { -int i; - - T((T_CALLED("tigetflag(%s)"), str)); - - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_boolean(i,tp) { - const char *capname = ExtBoolname(tp, i, boolnames); - if (!strcmp(str, capname)) { - /* setupterm forces invalid booleans to false */ - returnCode(tp->Booleans[i]); - } + int i; + + T((T_CALLED("tigetflag(%s)"), str)); + + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_boolean(i, tp) { + const char *capname = ExtBoolname(tp, i, boolnames); + if (!strcmp(str, capname)) { + /* setupterm forces invalid booleans to false */ + returnCode(tp->Booleans[i]); } } + } - returnCode(ABSENT_BOOLEAN); + returnCode(ABSENT_BOOLEAN); } -int tigetnum(NCURSES_CONST char *str) +int +tigetnum(NCURSES_CONST char *str) { -int i; - - T((T_CALLED("tigetnum(%s)"), str)); - - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_number(i, tp) { - const char *capname = ExtNumname(tp, i, numnames); - if (!strcmp(str, capname)) { - if (!VALID_NUMERIC(tp->Numbers[i])) - return -1; - returnCode(tp->Numbers[i]); - } + int i; + + T((T_CALLED("tigetnum(%s)"), str)); + + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_number(i, tp) { + const char *capname = ExtNumname(tp, i, numnames); + if (!strcmp(str, capname)) { + if (!VALID_NUMERIC(tp->Numbers[i])) + returnCode(ABSENT_NUMERIC); + returnCode(tp->Numbers[i]); } } + } - returnCode(CANCELLED_NUMERIC); /* Solaris returns a -1 instead */ + returnCode(CANCELLED_NUMERIC); /* Solaris returns a -1 instead */ } -char *tigetstr(NCURSES_CONST char *str) +char * +tigetstr(NCURSES_CONST char *str) { -int i; - - T((T_CALLED("tigetstr(%s)"), str)); - - if (cur_term != 0) { - TERMTYPE *tp = &(cur_term->type); - for_each_string(i, tp) { - const char *capname = ExtStrname(tp, i, strnames); - if (!strcmp(str, capname)) { - /* setupterm forces cancelled strings to null */ - returnPtr(tp->Strings[i]); - } + int i; + + T((T_CALLED("tigetstr(%s)"), str)); + + if (cur_term != 0) { + TERMTYPE *tp = &(cur_term->type); + for_each_string(i, tp) { + const char *capname = ExtStrname(tp, i, strnames); + if (!strcmp(str, capname)) { + /* setupterm forces cancelled strings to null */ + returnPtr(tp->Strings[i]); } } + } - returnPtr(CANCELLED_STRING); + returnPtr(CANCELLED_STRING); } diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c index d3fd4627..f17d8382 100644 --- a/ncurses/tinfo/lib_tputs.c +++ b/ncurses/tinfo/lib_tputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * tputs.c * delay_output() @@ -42,210 +41,278 @@ #include #include -#include /* padding_baud_rate, xon_xoff */ -#include /* ospeed */ +#include /* padding_baud_rate, xon_xoff */ +#include /* ospeed */ #include -MODULE_ID("$Id: lib_tputs.c,v 1.41 1999/10/22 23:31:24 tom Exp $") +MODULE_ID("$Id: lib_tputs.c,v 1.47 2000/05/27 23:08:41 tom Exp $") -char PC; /* used by termcap library */ -speed_t ospeed; /* used by termcap library */ +char PC = 0; /* used by termcap library */ +speed_t ospeed = 0; /* used by termcap library */ -int _nc_nulls_sent; /* used by 'tack' program */ +int _nc_nulls_sent = 0; /* used by 'tack' program */ -static int (*my_outch)(int c) = _nc_outch; +static int (*my_outch) (int c) = _nc_outch; -int delay_output(int ms) +int +delay_output(int ms) { - T((T_CALLED("delay_output(%d)"), ms)); + T((T_CALLED("delay_output(%d)"), ms)); - if (no_pad_char) - napms(ms); - else { - register int nullcount; + if (no_pad_char) { + _nc_flush(); + napms(ms); + } else { + register int nullcount; - nullcount = (ms * _nc_baudrate(ospeed)) / 10000; - for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--) - my_outch(PC); - if (my_outch == _nc_outch) - _nc_flush(); - } + nullcount = (ms * _nc_baudrate(ospeed)) / 10000; + for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--) + my_outch(PC); + if (my_outch == _nc_outch) + _nc_flush(); + } - returnCode(OK); + returnCode(OK); } -int _nc_outch(int ch) +void +_nc_flush(void) +{ + (void)fflush(NC_OUTPUT); +} + +int +_nc_outch(int ch) { #ifdef TRACE - _nc_outchars++; + _nc_outchars++; #endif /* TRACE */ - if (SP != 0 - && SP->_cleanup) { - char tmp = ch; - /* - * POSIX says write() is safe in a signal handler, but the - * buffered I/O is not. - */ - write(fileno(NC_OUTPUT), &tmp, 1); - } else { - putc(ch, NC_OUTPUT); - } - return OK; + if (SP != 0 + && SP->_cleanup) { + char tmp = ch; + /* + * POSIX says write() is safe in a signal handler, but the + * buffered I/O is not. + */ + write(fileno(NC_OUTPUT), &tmp, 1); + } else { + putc(ch, NC_OUTPUT); + } + return OK; } -int putp(const char *string) +#ifdef USE_WIDEC_SUPPORT +/* + * Reference: The Unicode Standard 2.0 + * + * No surrogates supported (we're storing only one 16-bit Unicode value per + * cell). + */ +int +_nc_utf8_outch(int ch) { - return tputs(string, 1, _nc_outch); + static const unsigned byteMask = 0xBF; + static const unsigned otherMark = 0x80; + static const unsigned firstMark[] = + {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC}; + + int result[7], *ptr; + int count = 0; + + if (ch < 0x80) + count = 1; + else if (ch < 0x800) + count = 2; + else if (ch < 0x10000) + count = 3; + else if (ch < 0x200000) + count = 4; + else if (ch < 0x4000000) + count = 5; + else if (ch <= 0x7FFFFFFF) + count = 6; + else { + count = 2; + ch = 0xFFFD; + } + ptr = result + count; + switch (count) { + case 6: + *--ptr = (ch | otherMark) & byteMask; + ch >>= 6; + case 5: + *--ptr = (ch | otherMark) & byteMask; + ch >>= 6; + case 4: + *--ptr = (ch | otherMark) & byteMask; + ch >>= 6; + case 3: + *--ptr = (ch | otherMark) & byteMask; + ch >>= 6; + case 2: + *--ptr = (ch | otherMark) & byteMask; + ch >>= 6; + case 1: + *--ptr = (ch | firstMark[count]); + } + while (count--) + _nc_outch(*ptr++); + return OK; } +#endif -int tputs(const char *string, int affcnt, int (*outc)(int)) +int +putp(const char *string) { -bool always_delay; -bool normal_delay; -int number; + return tputs(string, 1, _nc_outch); +} + +int +tputs(const char *string, int affcnt, int (*outc) (int)) +{ + bool always_delay; + bool normal_delay; + int number; #ifdef BSD_TPUTS -int trailpad; + int trailpad; #endif /* BSD_TPUTS */ #ifdef TRACE -char addrbuf[32]; - - if (_nc_tracing & TRACE_TPUTS) - { - if (outc == _nc_outch) - (void) strcpy(addrbuf, "_nc_outch"); - else - (void) sprintf(addrbuf, "%p", outc); - if (_nc_tputs_trace) { - TR(TRACE_MAXIMUM, ("tputs(%s = %s, %d, %s) called", _nc_tputs_trace, _nc_visbuf(string), affcnt, addrbuf)); - } - else { - TR(TRACE_MAXIMUM, ("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf)); - } - _nc_tputs_trace = (char *)NULL; + char addrbuf[32]; + + if (_nc_tracing & TRACE_TPUTS) { + if (outc == _nc_outch) + (void) strcpy(addrbuf, "_nc_outch"); + else + (void) sprintf(addrbuf, "%p", outc); + if (_nc_tputs_trace) { + _tracef("tputs(%s = %s, %d, %s) called", _nc_tputs_trace, + _nc_visbuf(string), affcnt, addrbuf); + } else { + _tracef("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf); } + _nc_tputs_trace = (char *) NULL; + } #endif /* TRACE */ - - if (!VALID_STRING(string)) - return ERR; - if (cur_term == 0) { - always_delay = FALSE; - normal_delay = TRUE; - } else { - always_delay = (string == bell) || (string == flash_screen); - normal_delay = - !xon_xoff - && padding_baud_rate + if (!VALID_STRING(string)) + return ERR; + + if (cur_term == 0) { + always_delay = FALSE; + normal_delay = TRUE; + } else { + always_delay = (string == bell) || (string == flash_screen); + normal_delay = + !xon_xoff + && padding_baud_rate #ifdef NCURSES_NO_PADDING - && (SP == 0 || !(SP->_no_padding)) + && (SP == 0 || !(SP->_no_padding)) #endif - && (_nc_baudrate(ospeed) >= padding_baud_rate); - } + && (_nc_baudrate(ospeed) >= padding_baud_rate); + } #ifdef BSD_TPUTS - /* - * This ugly kluge deals with the fact that some ancient BSD programs - * (like nethack) actually do the likes of tputs("50") to get delays. - */ - trailpad = 0; - if (isdigit(*string)) { + /* + * This ugly kluge deals with the fact that some ancient BSD programs + * (like nethack) actually do the likes of tputs("50") to get delays. + */ + trailpad = 0; + if (isdigit(*string)) { + while (isdigit(*string)) { + trailpad = trailpad * 10 + (*string - '0'); + string++; + } + trailpad *= 10; + if (*string == '.') { + string++; + if (isdigit(*string)) { + trailpad += (*string - '0'); + string++; + } + while (isdigit(*string)) + string++; + } + + if (*string == '*') { + trailpad *= affcnt; + string++; + } + } +#endif /* BSD_TPUTS */ + + my_outch = outc; /* redirect delay_output() */ + while (*string) { + if (*string != '$') + (*outc) (*string); + else { + string++; + if (*string != '<') { + (*outc) ('$'); + if (*string) + (*outc) (*string); + } else { + bool mandatory; + + string++; + if ((!isdigit(*string) && *string != '.') || !strchr(string, '>')) { + (*outc) ('$'); + (*outc) ('<'); + continue; + } + + number = 0; while (isdigit(*string)) { - trailpad = trailpad * 10 + (*string - '0'); - string++; + number = number * 10 + (*string - '0'); + string++; } - trailpad *= 10; + number *= 10; if (*string == '.') { + string++; + if (isdigit(*string)) { + number += (*string - '0'); + string++; + } + while (isdigit(*string)) string++; - if (isdigit(*string)) { - trailpad += (*string - '0'); - string++; - } - while (isdigit(*string)) - string++; } - if (*string == '*') { - trailpad *= affcnt; + mandatory = FALSE; + while (*string == '*' || *string == '/') { + if (*string == '*') { + number *= affcnt; + string++; + } else { /* if (*string == '/') */ + mandatory = TRUE; string++; + } } - } -#endif /* BSD_TPUTS */ - my_outch = outc; /* redirect delay_output() */ - while (*string) { - if (*string != '$') - (*outc)(*string); - else { - string++; - if (*string != '<') { - (*outc)('$'); - if (*string) - (*outc)(*string); - } else { - bool mandatory; - - string++; - if ((!isdigit(*string) && *string != '.') || !strchr(string, '>')) { - (*outc)('$'); - (*outc)('<'); - continue; - } - - number = 0; - while (isdigit(*string)) { - number = number * 10 + (*string - '0'); - string++; - } - number *= 10; - if (*string == '.') { - string++; - if (isdigit(*string)) { - number += (*string - '0'); - string++; - } - while (isdigit(*string)) - string++; - } - - mandatory = FALSE; - while (*string == '*' || *string == '/') - { - if (*string == '*') { - number *= affcnt; - string++; - } - else /* if (*string == '/') */ { - mandatory = TRUE; - string++; - } - } - - if (number > 0 - && (always_delay - || normal_delay - || mandatory)) - delay_output(number/10); - - } /* endelse (*string == '<') */ - } /* endelse (*string == '$') */ - - if (*string == '\0') - break; + if (number > 0 + && (always_delay + || normal_delay + || mandatory)) + delay_output(number / 10); - string++; - } + } /* endelse (*string == '<') */ + } /* endelse (*string == '$') */ + + if (*string == '\0') + break; + + string++; + } #ifdef BSD_TPUTS - /* - * Emit any BSD-style prefix padding that we've accumulated now. - */ - if (trailpad > 0 - && (always_delay || normal_delay)) - delay_output(trailpad/10); + /* + * Emit any BSD-style prefix padding that we've accumulated now. + */ + if (trailpad > 0 + && (always_delay || normal_delay)) + delay_output(trailpad / 10); #endif /* BSD_TPUTS */ - my_outch = _nc_outch; - return OK; + my_outch = _nc_outch; + return OK; } diff --git a/ncurses/tinfo/make_keys.c b/ncurses/tinfo/make_keys.c index a1fd1d0b..703ca5de 100644 --- a/ncurses/tinfo/make_keys.c +++ b/ncurses/tinfo/make_keys.c @@ -37,7 +37,7 @@ */ #include -MODULE_ID("$Id: make_keys.c,v 1.7 1999/09/11 17:32:57 Jeffrey.Honig Exp $") +MODULE_ID("$Id: make_keys.c,v 1.8 2000/03/12 02:55:50 Todd.C.Miller Exp $") #include @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) "", "/* This file was generated by MAKE_KEYS */", "", - "#ifdef BROKEN_LINKER", + "#if BROKEN_LINKER", "static", "#endif", "struct tinfo_fkeys _nc_tinfo_fkeys[] = {", diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c index 07f3868e..1aff562d 100644 --- a/ncurses/tinfo/parse_entry.c +++ b/ncurses/tinfo/parse_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * parse_entry.c -- compile one terminfo or termcap entry * @@ -48,24 +47,23 @@ #define __INTERNAL_CAPS_VISIBLE #include -MODULE_ID("$Id: parse_entry.c,v 1.39 1999/03/01 02:28:51 tom Exp $") +MODULE_ID("$Id: parse_entry.c,v 1.44 2000/04/30 00:17:42 tom Exp $") #ifdef LINT -static short const parametrized[] = { 0 }; +static short const parametrized[] = +{0}; #else #include #endif -struct token _nc_curr_token; - -static void postprocess_termcap(TERMTYPE *, bool); -static void postprocess_terminfo(TERMTYPE *); -static struct name_table_entry const * lookup_fullname(const char *name); +static void postprocess_termcap(TERMTYPE *, bool); +static void postprocess_terminfo(TERMTYPE *); +static struct name_table_entry const *lookup_fullname(const char *name); #if NCURSES_XNAMES -static struct name_table_entry const * -_nc_extend_names(ENTRY *entryp, char *name, int token_type) +static struct name_table_entry const * +_nc_extend_names(ENTRY * entryp, char *name, int token_type) { static struct name_table_entry temp; TERMTYPE *tp = &(entryp->tterm); @@ -77,20 +75,20 @@ _nc_extend_names(ENTRY *entryp, char *name, int token_type) switch (token_type) { case BOOLEAN: - first = 0; - last = tp->ext_Booleans; + first = 0; + last = tp->ext_Booleans; offset = tp->ext_Booleans; tindex = tp->num_Booleans; break; case NUMBER: - first = tp->ext_Booleans; - last = tp->ext_Numbers + first; + first = tp->ext_Booleans; + last = tp->ext_Numbers + first; offset = tp->ext_Booleans + tp->ext_Numbers; tindex = tp->num_Numbers; break; case STRING: - first = tp->ext_Booleans + tp->ext_Numbers; - last = tp->ext_Strings + first; + first = tp->ext_Booleans + tp->ext_Numbers; + last = tp->ext_Strings + first; offset = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings; tindex = tp->num_Strings; break; @@ -98,7 +96,7 @@ _nc_extend_names(ENTRY *entryp, char *name, int token_type) actual = NUM_EXT_NAMES(tp); for (n = 0; n < actual; n++) { if (!strcmp(name, tp->ext_Names[n])) { - if (n > (unsigned)(tp->ext_Booleans + tp->ext_Numbers)) { + if (n > (unsigned) (tp->ext_Booleans + tp->ext_Numbers)) { token_type = STRING; } else if (n > tp->ext_Booleans) { token_type = NUMBER; @@ -125,9 +123,15 @@ _nc_extend_names(ENTRY *entryp, char *name, int token_type) offset = n; tindex = n - first; switch (token_type) { - case BOOLEAN: tindex += BOOLCOUNT; break; - case NUMBER: tindex += NUMCOUNT; break; - case STRING: tindex += STRCOUNT; break; + case BOOLEAN: + tindex += BOOLCOUNT; + break; + case NUMBER: + tindex += NUMCOUNT; + break; + case STRING: + tindex += STRCOUNT; + break; } break; } @@ -138,35 +142,35 @@ _nc_extend_names(ENTRY *entryp, char *name, int token_type) tp->ext_Booleans += 1; tp->num_Booleans += 1; tp->Booleans = typeRealloc(char, tp->num_Booleans, tp->Booleans); - for (last = tp->num_Booleans-1; last > tindex; last--) - tp->Booleans[last] = tp->Booleans[last-1]; + for (last = tp->num_Booleans - 1; last > tindex; last--) + tp->Booleans[last] = tp->Booleans[last - 1]; break; case NUMBER: tp->ext_Numbers += 1; tp->num_Numbers += 1; tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers); - for (last = tp->num_Numbers-1; last > tindex; last--) - tp->Numbers[last] = tp->Numbers[last-1]; + for (last = tp->num_Numbers - 1; last > tindex; last--) + tp->Numbers[last] = tp->Numbers[last - 1]; break; case STRING: tp->ext_Strings += 1; tp->num_Strings += 1; tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings); - for (last = tp->num_Strings-1; last > tindex; last--) - tp->Strings[last] = tp->Strings[last-1]; + for (last = tp->num_Strings - 1; last > tindex; last--) + tp->Strings[last] = tp->Strings[last - 1]; break; } actual = NUM_EXT_NAMES(tp); - tp->ext_Names = typeRealloc(char *, actual, tp->ext_Names); + tp->ext_Names = typeRealloc(char *, actual, tp->ext_Names); while (--actual > offset) - tp->ext_Names[actual] = tp->ext_Names[actual-1]; + tp->ext_Names[actual] = tp->ext_Names[actual - 1]; tp->ext_Names[offset] = _nc_save_str(name); } - temp.nte_name = tp->ext_Names[offset]; - temp.nte_type = token_type; + temp.nte_name = tp->ext_Names[offset]; + temp.nte_type = token_type; temp.nte_index = tindex; - temp.nte_link = -1; + temp.nte_link = -1; return &temp; } @@ -191,16 +195,17 @@ _nc_extend_names(ENTRY *entryp, char *name, int token_type) * push back token */ -int _nc_parse_entry(struct entry *entryp, int literal, bool silent) +int +_nc_parse_entry(struct entry *entryp, int literal, bool silent) { - int token_type; - struct name_table_entry const *entry_ptr; - char *ptr, namecpy[MAX_NAME_SIZE+1]; + int token_type; + struct name_table_entry const *entry_ptr; + char *ptr, namecpy[MAX_NAME_SIZE + 1]; token_type = _nc_get_token(); if (token_type == EOF) - return(EOF); + return (EOF); if (token_type != NAMES) _nc_err_abort("Entry does not start with terminal names in column one"); @@ -213,8 +218,7 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) /* junk the 2-character termcap name, if present */ ptr = _nc_curr_token.tk_name; - if (ptr[2] == '|') - { + if (ptr[2] == '|') { ptr = _nc_curr_token.tk_name + 3; _nc_curr_token.tk_name[2] = '\0'; } @@ -233,30 +237,29 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) /* check for overly-long names and aliases */ (void) strncpy(namecpy, entryp->tterm.term_names, MAX_NAME_SIZE); namecpy[MAX_NAME_SIZE] = '\0'; - if ((ptr = strrchr(namecpy, '|')) != (char *)0) + if ((ptr = strrchr(namecpy, '|')) != (char *) 0) *ptr = '\0'; ptr = strtok(namecpy, "|"); if (strlen(ptr) > MAX_ALIAS) _nc_warning("primary name may be too long"); - while ((ptr = strtok((char *)0, "|")) != (char *)0) + while ((ptr = strtok((char *) 0, "|")) != (char *) 0) if (strlen(ptr) > MAX_ALIAS) _nc_warning("alias `%s' may be too long", ptr); entryp->nuses = 0; for (token_type = _nc_get_token(); - token_type != EOF && token_type != NAMES; - token_type = _nc_get_token()) - { + token_type != EOF && token_type != NAMES; + token_type = _nc_get_token()) { if (strcmp(_nc_curr_token.tk_name, "use") == 0 || strcmp(_nc_curr_token.tk_name, "tc") == 0) { - entryp->uses[entryp->nuses].parent = (void *)_nc_save_str(_nc_curr_token.tk_valstring); + entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring); entryp->uses[entryp->nuses].line = _nc_curr_line; entryp->nuses++; } else { /* normal token lookup */ entry_ptr = _nc_find_entry(_nc_curr_token.tk_name, - _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table); + _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table); /* * Our kluge to handle aliasing. The reason it's done @@ -266,43 +269,37 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) * making this case fast, aliased caps aren't common now * and will get rarer. */ - if (entry_ptr == NOTFOUND) - { - const struct alias *ap; + if (entry_ptr == NOTFOUND) { + const struct alias *ap; - if (_nc_syntax == SYN_TERMCAP) - { + if (_nc_syntax == SYN_TERMCAP) { for (ap = _nc_capalias_table; ap->from; ap++) - if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) - { - if (ap->to == (char *)0) - { + if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) { + if (ap->to == (char *) 0) { _nc_warning("%s (%s termcap extension) ignored", - ap->from, ap->source); + ap->from, ap->source); goto nexttok; } entry_ptr = _nc_find_entry(ap->to, _nc_cap_hash_table); if (entry_ptr && !silent) - _nc_warning("%s (%s termcap extension) aliased to %s", ap->from, ap->source, ap->to); + _nc_warning("%s (%s termcap extension) aliased to %s", + ap->from, ap->source, ap->to); break; } - } - else /* if (_nc_syntax == SYN_TERMINFO) */ - { + } else { /* if (_nc_syntax == SYN_TERMINFO) */ for (ap = _nc_infoalias_table; ap->from; ap++) - if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) - { - if (ap->to == (char *)0) - { + if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) { + if (ap->to == (char *) 0) { _nc_warning("%s (%s terminfo extension) ignored", - ap->from, ap->source); + ap->from, ap->source); goto nexttok; } entry_ptr = _nc_find_entry(ap->to, _nc_info_hash_table); if (entry_ptr && !silent) - _nc_warning("%s (%s terminfo extension) aliased to %s", ap->from, ap->source, ap->to); + _nc_warning("%s (%s terminfo extension) aliased to %s", + ap->from, ap->source, ap->to); break; } @@ -311,16 +308,17 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) } } } - #if NCURSES_XNAMES /* * If we have extended-names active, we will automatically * define a name based on its context. */ if (entry_ptr == NOTFOUND - && _nc_user_definable - && (entry_ptr = _nc_extend_names(entryp, _nc_curr_token.tk_name, token_type)) != 0) { - _nc_warning("extended capability '%s'", _nc_curr_token.tk_name); + && _nc_user_definable + && (entry_ptr = _nc_extend_names(entryp, + _nc_curr_token.tk_name, token_type)) != 0) { + if (_nc_tracing >= DEBUG_LEVEL(1)) + _nc_warning("extended capability '%s'", _nc_curr_token.tk_name); } #endif /* NCURSES_XNAMES */ @@ -328,13 +326,12 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) if (entry_ptr == NOTFOUND) { if (!silent) _nc_warning("unknown capability '%s'", - _nc_curr_token.tk_name); + _nc_curr_token.tk_name); continue; } /* deal with bad type/value combinations. */ - if (token_type != CANCEL && entry_ptr->nte_type != token_type) - { + if (token_type != CANCEL && entry_ptr->nte_type != token_type) { /* * Nasty special cases here handle situations in which type * information can resolve name clashes. Normal lookup @@ -348,39 +345,36 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) /* tell max_attributes from arrow_key_map */ if (token_type == NUMBER && !strcmp("ma", _nc_curr_token.tk_name)) entry_ptr = _nc_find_type_entry("ma", NUMBER, - _nc_get_table(_nc_syntax != 0)); + _nc_get_table(_nc_syntax != 0)); /* map terminfo's string MT to MT */ - else if (token_type==STRING &&!strcmp("MT",_nc_curr_token.tk_name)) + else if (token_type == STRING && !strcmp("MT", _nc_curr_token.tk_name)) entry_ptr = _nc_find_type_entry("MT", STRING, - _nc_get_table(_nc_syntax != 0)); + _nc_get_table(_nc_syntax != 0)); /* treat strings without following "=" as empty strings */ - else if (token_type==BOOLEAN && entry_ptr->nte_type==STRING) + else if (token_type == BOOLEAN && entry_ptr->nte_type == STRING) token_type = STRING; /* we couldn't recover; skip this token */ - else - { - if (!silent) - { + else { + if (!silent) { const char *type_name; - switch (entry_ptr->nte_type) - { + switch (entry_ptr->nte_type) { case BOOLEAN: - type_name = "boolean"; - break; + type_name = "boolean"; + break; case STRING: - type_name = "string"; - break; + type_name = "string"; + break; case NUMBER: - type_name = "numeric"; - break; + type_name = "numeric"; + break; default: - type_name = "unknown"; - break; + type_name = "unknown"; + break; } _nc_warning("wrong type used for %s capability '%s'", - type_name, _nc_curr_token.tk_name); + type_name, _nc_curr_token.tk_name); } continue; } @@ -415,23 +409,23 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) case STRING: ptr = _nc_curr_token.tk_valstring; - if (_nc_syntax==SYN_TERMCAP) + if (_nc_syntax == SYN_TERMCAP) ptr = _nc_captoinfo(_nc_curr_token.tk_name, - ptr, - parametrized[entry_ptr->nte_index]); + ptr, + parametrized[entry_ptr->nte_index]); entryp->tterm.Strings[entry_ptr->nte_index] = _nc_save_str(ptr); break; default: if (!silent) _nc_warning("unknown token type"); - _nc_panic_mode((_nc_syntax==SYN_TERMCAP) ? ':' : ','); + _nc_panic_mode((_nc_syntax == SYN_TERMCAP) ? ':' : ','); continue; } - } /* end else cur_token.name != "use" */ - nexttok: - continue; /* cannot have a label w/o statement */ - } /* endwhile (not EOF and not NAMES) */ + } /* end else cur_token.name != "use" */ + nexttok: + continue; /* cannot have a label w/o statement */ + } /* endwhile (not EOF and not NAMES) */ _nc_push_token(token_type); _nc_set_type(_nc_first_name(entryp->tterm.term_names)); @@ -443,10 +437,9 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) * to be done before entry allocation is wrapped up. */ if (!literal) { - if (_nc_syntax == SYN_TERMCAP) - { - bool has_base_entry = FALSE; - int i; + if (_nc_syntax == SYN_TERMCAP) { + bool has_base_entry = FALSE; + int i; /* * Don't insert defaults if this is a `+' entry meant only @@ -461,50 +454,49 @@ int _nc_parse_entry(struct entry *entryp, int literal, bool silent) * have picked up defaults via translation. */ for (i = 0; i < entryp->nuses; i++) - if (!strchr((char *)entryp->uses[i].parent, '+')) + if (!strchr((char *) entryp->uses[i].name, '+')) has_base_entry = TRUE; postprocess_termcap(&entryp->tterm, has_base_entry); - } - else + } else postprocess_terminfo(&entryp->tterm); } _nc_wrap_entry(entryp); - return(OK); + return (OK); } -int _nc_capcmp(const char *s, const char *t) +int +_nc_capcmp(const char *s, const char *t) /* compare two string capabilities, stripping out padding */ { if (!s && !t) - return(0); + return (0); else if (!s || !t) - return(1); - - for (;;) - { - if (s[0] == '$' && s[1] == '<') - { - for (s += 2; ; s++) - if (!(isdigit(*s) || *s=='.' || *s=='*' || *s=='/' || *s=='>')) + return (1); + + for (;;) { + if (s[0] == '$' && s[1] == '<') { + for (s += 2;; s++) + if (!(isdigit(*s) || *s == '.' || *s == '*' || *s == '/' || + *s == '>')) break; } - if (t[0] == '$' && t[1] == '<') - { - for (t += 2; ; t++) - if (!(isdigit(*t) || *t=='.' || *t=='*' || *t=='/' || *t=='>')) + if (t[0] == '$' && t[1] == '<') { + for (t += 2;; t++) + if (!(isdigit(*t) || *t == '.' || *t == '*' || *t == '/' || + *t == '>')) break; } /* we've now pushed s and t past any padding they were pointing at */ if (*s == '\0' && *t == '\0') - return(0); + return (0); if (*s != *t) - return(*t - *s); + return (*t - *s); /* else *s == *t but one is not NUL, so continue */ s++, t++; @@ -516,29 +508,32 @@ int _nc_capcmp(const char *s, const char *t) * list. For each capability, we may assume there is a keycap that sends the * string which is the value of that capability. */ -typedef struct {const char *from; const char *to;} assoc; +typedef struct { + const char *from; + const char *to; +} assoc; static assoc const ko_xlate[] = { - {"al", "kil1"}, /* insert line key -> KEY_IL */ - {"bt", "kcbt"}, /* back tab -> KEY_BTAB */ - {"cd", "ked"}, /* clear-to-eos key -> KEY_EOL */ - {"ce", "kel"}, /* clear-to-eol key -> KEY_EOS */ - {"cl", "kclr"}, /* clear key -> KEY_CLEAR */ - {"ct", "tbc"}, /* clear all tabs -> KEY_CATAB */ - {"dc", "kdch1"}, /* delete char -> KEY_DC */ - {"dl", "kdl1"}, /* delete line -> KEY_DL */ - {"do", "kcud1"}, /* down key -> KEY_DOWN */ - {"ei", "krmir"}, /* exit insert key -> KEY_EIC */ - {"ho", "khome"}, /* home key -> KEY_HOME */ - {"ic", "kich1"}, /* insert char key -> KEY_IC */ - {"im", "kIC"}, /* insert-mode key -> KEY_SIC */ - {"le", "kcub1"}, /* le key -> KEY_LEFT */ - {"nd", "kcuf1"}, /* nd key -> KEY_RIGHT */ - {"nl", "kent"}, /* new line key -> KEY_ENTER */ - {"st", "khts"}, /* set-tab key -> KEY_STAB */ - {"ta", CANCELLED_STRING}, - {"up", "kcuu1"}, /* up-arrow key -> KEY_UP */ - {(char *)0, (char *)0}, + {"al", "kil1"}, /* insert line key -> KEY_IL */ + {"bt", "kcbt"}, /* back tab -> KEY_BTAB */ + {"cd", "ked"}, /* clear-to-eos key -> KEY_EOL */ + {"ce", "kel"}, /* clear-to-eol key -> KEY_EOS */ + {"cl", "kclr"}, /* clear key -> KEY_CLEAR */ + {"ct", "tbc"}, /* clear all tabs -> KEY_CATAB */ + {"dc", "kdch1"}, /* delete char -> KEY_DC */ + {"dl", "kdl1"}, /* delete line -> KEY_DL */ + {"do", "kcud1"}, /* down key -> KEY_DOWN */ + {"ei", "krmir"}, /* exit insert key -> KEY_EIC */ + {"ho", "khome"}, /* home key -> KEY_HOME */ + {"ic", "kich1"}, /* insert char key -> KEY_IC */ + {"im", "kIC"}, /* insert-mode key -> KEY_SIC */ + {"le", "kcub1"}, /* le key -> KEY_LEFT */ + {"nd", "kcuf1"}, /* nd key -> KEY_RIGHT */ + {"nl", "kent"}, /* new line key -> KEY_ENTER */ + {"st", "khts"}, /* set-tab key -> KEY_STAB */ + {"ta", CANCELLED_STRING}, + {"up", "kcuu1"}, /* up-arrow key -> KEY_UP */ + {(char *) 0, (char *) 0}, }; /* @@ -569,7 +564,8 @@ static const char C_HT[] = "\t"; #define CUR tp-> static -void postprocess_termcap(TERMTYPE *tp, bool has_base) +void +postprocess_termcap(TERMTYPE * tp, bool has_base) { char buf[MAX_LINE * 2 + 2]; @@ -582,8 +578,7 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) */ /* if there was a tc entry, assume we picked up defaults via that */ - if (!has_base) - { + if (!has_base) { if (WANTED(init_3string) && termcap_init2) init_3string = _nc_save_str(termcap_init2); @@ -637,15 +632,15 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) } else newline = _nc_save_str(C_LF); } else if (PRESENT(carriage_return) && PRESENT(scroll_forward)) { - strncpy(buf, carriage_return, MAX_LINE-2); - buf[MAX_LINE-1] = '\0'; - strncat(buf, scroll_forward, MAX_LINE-strlen(buf)-1); + strncpy(buf, carriage_return, MAX_LINE - 2); + buf[MAX_LINE - 1] = '\0'; + strncat(buf, scroll_forward, MAX_LINE - strlen(buf) - 1); buf[MAX_LINE] = '\0'; newline = _nc_save_str(buf); } else if (PRESENT(carriage_return) && PRESENT(cursor_down)) { - strncpy(buf, carriage_return, MAX_LINE-2); - buf[MAX_LINE-1] = '\0'; - strncat(buf, cursor_down, MAX_LINE-strlen(buf)-1); + strncpy(buf, carriage_return, MAX_LINE - 2); + buf[MAX_LINE - 1] = '\0'; + strncat(buf, cursor_down, MAX_LINE - strlen(buf) - 1); buf[MAX_LINE] = '\0'; newline = _nc_save_str(buf); } @@ -661,8 +656,7 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) * These translations will *not* be inverted by tgetent(). */ - if (!has_base) - { + if (!has_base) { /* * We wait until now to decide if we've got a working cr because even * one that doesn't work can be used for newline. Unfortunately the @@ -698,13 +692,11 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) if (has_hardware_tabs == TRUE) { if (init_tabs != 8 && init_tabs != ABSENT_NUMERIC) _nc_warning("hardware tabs with a width other than 8: %d", init_tabs); - else - { + else { if (tab && _nc_capcmp(tab, C_HT)) _nc_warning("hardware tabs with a non-^I tab string %s", - _nc_visbuf(tab)); - else - { + _nc_visbuf(tab)); + else { if (WANTED(tab)) tab = _nc_save_str(C_HT); init_tabs = 8; @@ -715,14 +707,13 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) * Now translate the ko capability, if there is one. This * isn't from mytinfo... */ - if (PRESENT(other_non_function_keys)) - { - char *dp, *cp = strtok(other_non_function_keys, ","); - struct name_table_entry const *from_ptr; - struct name_table_entry const *to_ptr; - assoc const *ap; - char buf2[MAX_TERMINFO_LENGTH]; - bool foundim; + if (PRESENT(other_non_function_keys)) { + char *dp, *cp = strtok(other_non_function_keys, ","); + struct name_table_entry const *from_ptr; + struct name_table_entry const *to_ptr; + assoc const *ap; + char buf2[MAX_TERMINFO_LENGTH]; + bool foundim; /* we're going to use this for a special case later */ dp = strchr(other_non_function_keys, 'i'); @@ -733,30 +724,26 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) for (ap = ko_xlate; ap->from; ap++) if (strcmp(ap->from, cp) == 0) break; - if (!ap->to) - { + if (!ap->to) { _nc_warning("unknown capability `%s' in ko string", cp); continue; - } - else if (ap->to == CANCELLED_STRING) /* ignore it */ + } else if (ap->to == CANCELLED_STRING) /* ignore it */ continue; /* now we know we found a match in ko_table, so... */ from_ptr = _nc_find_entry(ap->from, _nc_cap_hash_table); - to_ptr = _nc_find_entry(ap->to, _nc_info_hash_table); + to_ptr = _nc_find_entry(ap->to, _nc_info_hash_table); if (!from_ptr || !to_ptr) /* should never happen! */ _nc_err_abort("ko translation table is invalid, I give up"); - if (WANTED(tp->Strings[from_ptr->nte_index])) - { + if (WANTED(tp->Strings[from_ptr->nte_index])) { _nc_warning("no value for ko capability %s", ap->from); continue; } - if (tp->Strings[to_ptr->nte_index]) - { + if (tp->Strings[to_ptr->nte_index]) { /* There's no point in warning about it if it's the same * string; that's just an inefficiency. */ @@ -764,8 +751,8 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) tp->Strings[from_ptr->nte_index], tp->Strings[to_ptr->nte_index]) != 0) _nc_warning("%s (%s) already has an explicit value %s, ignoring ko", - ap->to, ap->from, - _nc_visbuf(tp->Strings[to_ptr->nte_index]) ); + ap->to, ap->from, + _nc_visbuf(tp->Strings[to_ptr->nte_index])); continue; } @@ -774,24 +761,21 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) * stripping out padding. */ dp = buf2; - for (cp = tp->Strings[from_ptr->nte_index]; *cp; cp++) - { - if (cp[0] == '$' && cp[1] == '<') - { + for (cp = tp->Strings[from_ptr->nte_index]; *cp; cp++) { + if (cp[0] == '$' && cp[1] == '<') { while (*cp && *cp != '>') if (!*cp) break; - else + else ++cp; - } - else + } else *dp++ = *cp; } *dp++ = '\0'; tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2); } while - ((cp = strtok((char *)0, ",")) != 0); + ((cp = strtok((char *) 0, ",")) != 0); /* * Note: ko=im and ko=ic both want to grab the `Insert' @@ -799,15 +783,13 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) * got mapped to kich1 and im to kIC to avoid a collision. * If the description has im but not ic, hack kIC back to kich1. */ - if (foundim && WANTED(key_ic) && key_sic) - { + if (foundim && WANTED(key_ic) && key_sic) { key_ic = key_sic; key_sic = ABSENT_STRING; } } - if (!hard_copy) - { + if (!hard_copy) { if (WANTED(key_backspace)) key_backspace = _nc_save_str(C_BS); if (WANTED(key_left)) @@ -829,90 +811,76 @@ void postprocess_termcap(TERMTYPE *tp, bool has_base) PRESENT(acs_ttee) || PRESENT(acs_hline) || PRESENT(acs_vline) || - PRESENT(acs_plus)) - { - char buf2[MAX_TERMCAP_LENGTH], *bp = buf2; + PRESENT(acs_plus)) { + char buf2[MAX_TERMCAP_LENGTH], *bp = buf2; - if (acs_chars) - { - (void)strcpy(bp, acs_chars); + if (acs_chars) { + (void) strcpy(bp, acs_chars); bp += strlen(bp); } - if (acs_ulcorner && acs_ulcorner[1] == '\0') - { + if (acs_ulcorner && acs_ulcorner[1] == '\0') { *bp++ = 'l'; *bp++ = *acs_ulcorner; } - if (acs_llcorner && acs_llcorner[1] == '\0') - { + if (acs_llcorner && acs_llcorner[1] == '\0') { *bp++ = 'm'; *bp++ = *acs_llcorner; } - if (acs_urcorner && acs_urcorner[1] == '\0') - { + if (acs_urcorner && acs_urcorner[1] == '\0') { *bp++ = 'k'; *bp++ = *acs_urcorner; } - if (acs_lrcorner && acs_lrcorner[1] == '\0') - { + if (acs_lrcorner && acs_lrcorner[1] == '\0') { *bp++ = 'j'; *bp++ = *acs_lrcorner; } - if (acs_ltee && acs_ltee[1] == '\0') - { + if (acs_ltee && acs_ltee[1] == '\0') { *bp++ = 't'; *bp++ = *acs_ltee; } - if (acs_rtee && acs_rtee[1] == '\0') - { + if (acs_rtee && acs_rtee[1] == '\0') { *bp++ = 'u'; *bp++ = *acs_rtee; } - if (acs_btee && acs_btee[1] == '\0') - { + if (acs_btee && acs_btee[1] == '\0') { *bp++ = 'v'; *bp++ = *acs_btee; } - if (acs_ttee && acs_ttee[1] == '\0') - { + if (acs_ttee && acs_ttee[1] == '\0') { *bp++ = 'w'; *bp++ = *acs_ttee; } - if (acs_hline && acs_hline[1] == '\0') - { + if (acs_hline && acs_hline[1] == '\0') { *bp++ = 'q'; *bp++ = *acs_hline; } - if (acs_vline && acs_vline[1] == '\0') - { + if (acs_vline && acs_vline[1] == '\0') { *bp++ = 'x'; *bp++ = *acs_vline; } - if (acs_plus) - { + if (acs_plus) { *bp++ = 'n'; strcpy(bp, acs_plus); bp = buf2 + strlen(buf2); } - if (bp != buf2) - { + if (bp != buf2) { *bp++ = '\0'; acs_chars = _nc_save_str(buf2); _nc_warning("acsc string synthesized from XENIX capabilities"); } - } - else if (acs_chars == 0 - && enter_alt_charset_mode != 0 - && exit_alt_charset_mode != 0) - { - acs_chars = _nc_save_str("``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"); + } else if (acs_chars == 0 + && enter_alt_charset_mode != 0 + && exit_alt_charset_mode != 0) { + acs_chars = + _nc_save_str("``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"); } } static -void postprocess_terminfo(TERMTYPE *tp) +void +postprocess_terminfo(TERMTYPE * tp) { /* * TERMINFO-TO-TERMINFO MAPPINGS FOR SOURCE TRANSLATION @@ -922,74 +890,60 @@ void postprocess_terminfo(TERMTYPE *tp) /* * Translate AIX forms characters. */ - if (PRESENT(box_chars_1)) - { - char buf2[MAX_TERMCAP_LENGTH], *bp = buf2; + if (PRESENT(box_chars_1)) { + char buf2[MAX_TERMCAP_LENGTH], *bp = buf2; - if (acs_chars) - { - (void)strcpy(bp, acs_chars); + if (acs_chars) { + (void) strcpy(bp, acs_chars); bp += strlen(bp); } - if (box_chars_1[0]) /* ACS_ULCORNER */ - { + if (box_chars_1[0]) { /* ACS_ULCORNER */ *bp++ = 'l'; *bp++ = box_chars_1[0]; } - if (box_chars_1[1]) /* ACS_HLINE */ - { + if (box_chars_1[1]) { /* ACS_HLINE */ *bp++ = 'q'; *bp++ = box_chars_1[1]; } - if (box_chars_1[2]) /* ACS_URCORNER */ - { + if (box_chars_1[2]) { /* ACS_URCORNER */ *bp++ = 'k'; *bp++ = box_chars_1[2]; } - if (box_chars_1[3]) /* ACS_VLINE */ - { + if (box_chars_1[3]) { /* ACS_VLINE */ *bp++ = 'x'; *bp++ = box_chars_1[3]; } - if (box_chars_1[4]) /* ACS_LRCORNER */ - { + if (box_chars_1[4]) { /* ACS_LRCORNER */ *bp++ = 'j'; *bp++ = box_chars_1[4]; } - if (box_chars_1[5]) /* ACS_LLCORNER */ - { + if (box_chars_1[5]) { /* ACS_LLCORNER */ *bp++ = 'm'; *bp++ = box_chars_1[5]; } - if (box_chars_1[6]) /* ACS_TTEE */ - { + if (box_chars_1[6]) { /* ACS_TTEE */ *bp++ = 'w'; *bp++ = box_chars_1[6]; } - if (box_chars_1[7]) /* ACS_RTEE */ - { + if (box_chars_1[7]) { /* ACS_RTEE */ *bp++ = 'u'; *bp++ = box_chars_1[7]; } - if (box_chars_1[8]) /* ACS_BTEE */ - { + if (box_chars_1[8]) { /* ACS_BTEE */ *bp++ = 'v'; *bp++ = box_chars_1[8]; } - if (box_chars_1[9]) /* ACS_LTEE */ - { + if (box_chars_1[9]) { /* ACS_LTEE */ *bp++ = 't'; *bp++ = box_chars_1[9]; } - if (box_chars_1[10]) /* ACS_PLUS */ - { + if (box_chars_1[10]) { /* ACS_PLUS */ *bp++ = 'n'; *bp++ = box_chars_1[10]; } - if (bp != buf2) - { + if (bp != buf2) { *bp++ = '\0'; acs_chars = _nc_save_str(buf2); _nc_warning("acsc string synthesized from AIX capabilities"); @@ -1010,7 +964,8 @@ void postprocess_terminfo(TERMTYPE *tp) * sorted, but the nte_type fields are not necessarily grouped together. */ static -struct name_table_entry const * lookup_fullname(const char *find) +struct name_table_entry const * +lookup_fullname(const char *find) { int state = -1; @@ -1034,10 +989,10 @@ struct name_table_entry const * lookup_fullname(const char *find) for (count = 0; names[count] != 0; count++) { if (!strcmp(names[count], find)) { - struct name_table_entry const *entry_ptr = _nc_get_table(FALSE); - while (entry_ptr->nte_type != state + struct name_table_entry const *entry_ptr = _nc_get_table(FALSE); + while (entry_ptr->nte_type != state || entry_ptr->nte_index != count) - entry_ptr++; + entry_ptr++; return entry_ptr; } } diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index f60a4863..85dc3e0b 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * read_entry.c -- Routine for reading in a compiled terminfo file * @@ -40,23 +38,13 @@ #include -#if HAVE_FCNTL_H -#include -#endif - #include #include -MODULE_ID("$Id: read_entry.c,v 1.61 1999/07/24 20:07:20 tom Exp $") +MODULE_ID("$Id: read_entry.c,v 1.67 2000/03/11 12:35:45 tom Exp $") -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -#if 0 -#define TRACE_IN(p) DEBUG(2, p) -#else -#define TRACE_IN(p) /*nothing*/ +#if !HAVE_TELL +#define tell(fd) 0 /* lseek() is POSIX, but not tell() - odd... */ #endif /* @@ -82,7 +70,8 @@ static bool keep_tic_directory = FALSE; * Record the "official" location of the terminfo directory, according to * the place where we're writing to, or the normal default, if not. */ -const char *_nc_tic_dir(const char *path) +const char * +_nc_tic_dir(const char *path) { static const char *result = TERMINFO; @@ -104,42 +93,44 @@ const char *_nc_tic_dir(const char *path) * has chdir'd to it. If we let it be changed, then if $TERMINFO has a * relative path, we'll lose track of the actual directory. */ -void _nc_keep_tic_dir(const char *path) +void +_nc_keep_tic_dir(const char *path) { _nc_tic_dir(path); keep_tic_directory = TRUE; } -static void convert_shorts(char *buf, short *Numbers, int count) +static void +convert_shorts(char *buf, short *Numbers, int count) { int i; - for (i = 0; i < count; i++) - { - if (IS_NEG1(buf + 2*i)) + for (i = 0; i < count; i++) { + if (IS_NEG1(buf + 2 * i)) Numbers[i] = ABSENT_NUMERIC; - else if (IS_NEG2(buf + 2*i)) + else if (IS_NEG2(buf + 2 * i)) Numbers[i] = CANCELLED_NUMERIC; else - Numbers[i] = LOW_MSB(buf + 2*i); - TRACE_IN(("get Numbers[%d]=%d", i, Numbers[i])); + Numbers[i] = LOW_MSB(buf + 2 * i); + TR(TRACE_DATABASE, ("get Numbers[%d]=%d", i, Numbers[i])); } } -static void convert_strings(char *buf, char **Strings, int count, int size, char *table) +static void +convert_strings(char *buf, char **Strings, int count, int size, char *table) { int i; char *p; for (i = 0; i < count; i++) { - if (IS_NEG1(buf + 2*i)) { + if (IS_NEG1(buf + 2 * i)) { Strings[i] = ABSENT_STRING; - } else if (IS_NEG2(buf + 2*i)) { + } else if (IS_NEG2(buf + 2 * i)) { Strings[i] = CANCELLED_STRING; - } else if (LOW_MSB(buf + 2*i) > size) { + } else if (LOW_MSB(buf + 2 * i) > size) { Strings[i] = ABSENT_STRING; } else { - Strings[i] = (LOW_MSB(buf+2*i) + table); - TRACE_IN(("Strings[%d] = %s", i, _nc_visbuf(Strings[i]))); + Strings[i] = (LOW_MSB(buf + 2 * i) + table); + TR(TRACE_DATABASE, ("Strings[%d] = %s", i, _nc_visbuf(Strings[i]))); } /* make sure all strings are NUL terminated */ @@ -159,53 +150,59 @@ static void convert_strings(char *buf, char **Strings, int count, int size, char #define even_boundary(value) \ if ((value) % 2 != 0) read(fd, buf, 1) -static int read_termtype(int fd, TERMTYPE *ptr) +static int +read_termtype(int fd, TERMTYPE * ptr) /* return 1 if read, 0 if not found or garbled */ { - int name_size, bool_count, num_count, str_count, str_size; - int i; - char buf[MAX_ENTRY_SIZE]; + int name_size, bool_count, num_count, str_count, str_size; + int i; + char buf[MAX_ENTRY_SIZE]; + + TR(TRACE_DATABASE, ("READ termtype header @%d", tell(fd))); - TRACE_IN(("READ termtype header @%d", tell(fd))); + memset(ptr, 0, sizeof(*ptr)); /* grab the header */ if (!read_shorts(fd, buf, 6) - || LOW_MSB(buf) != MAGIC) { - return(0); + || LOW_MSB(buf) != MAGIC) { + return (0); } _nc_free_termtype(ptr); - name_size = LOW_MSB(buf + 2); + name_size = LOW_MSB(buf + 2); bool_count = LOW_MSB(buf + 4); - num_count = LOW_MSB(buf + 6); - str_count = LOW_MSB(buf + 8); - str_size = LOW_MSB(buf + 10); - - TRACE_IN(("header is %d/%d/%d/%d(%d)", name_size, bool_count, num_count, str_count, str_size)); - if (name_size < 0 - || bool_count < 0 - || num_count < 0 - || str_count < 0 - || str_size < 0) { - return(0); + num_count = LOW_MSB(buf + 6); + str_count = LOW_MSB(buf + 8); + str_size = LOW_MSB(buf + 10); + + TR(TRACE_DATABASE, + ("TERMTYPE name_size=%d, bool=%d/%d, num=%d/%d str=%d/%d(%d)", + name_size, bool_count, BOOLCOUNT, num_count, NUMCOUNT, + str_count, STRCOUNT, str_size)); + if (name_size < 0 + || bool_count < 0 + || num_count < 0 + || str_count < 0 + || str_size < 0) { + return (0); } if (str_size) { /* try to allocate space for the string table */ - if (str_count*2 >= (int) sizeof(buf) - || (ptr->str_table = typeMalloc(char, (unsigned)str_size)) == 0) { - return(0); + if (str_count * 2 >= (int) sizeof(buf) + || (ptr->str_table = typeMalloc(char, (unsigned) str_size)) == 0) { + return (0); } } else { str_count = 0; } /* grab the name (a null-terminate string) */ - read(fd, buf, min(MAX_NAME_SIZE, (unsigned)name_size)); + read(fd, buf, min(MAX_NAME_SIZE, (unsigned) name_size)); buf[MAX_NAME_SIZE] = '\0'; ptr->term_names = typeCalloc(char, strlen(buf) + 1); if (ptr->term_names == NULL) { - return(0); + return (0); } (void) strcpy(ptr->term_names, buf); if (name_size > MAX_NAME_SIZE) @@ -213,8 +210,8 @@ static int read_termtype(int fd, TERMTYPE *ptr) /* grab the booleans */ if ((ptr->Booleans = typeCalloc(char, max(BOOLCOUNT, bool_count))) == 0 - || read(fd, ptr->Booleans, (unsigned)bool_count) < bool_count) { - return(0); + || read(fd, ptr->Booleans, (unsigned) bool_count) < bool_count) { + return (0); } /* @@ -227,128 +224,142 @@ static int read_termtype(int fd, TERMTYPE *ptr) /* grab the numbers */ if ((ptr->Numbers = typeCalloc(short, max(NUMCOUNT, num_count))) == 0 - || !read_shorts(fd, buf, num_count)) { - return(0); + || !read_shorts(fd, buf, num_count)) { + return (0); } convert_shorts(buf, ptr->Numbers, num_count); if ((ptr->Strings = typeCalloc(char *, max(STRCOUNT, str_count))) == 0) - return(0); + return (0); - if (str_count) - { + if (str_count) { /* grab the string offsets */ if (!read_shorts(fd, buf, str_count)) { - return(0); + return (0); } /* finally, grab the string table itself */ - if (read(fd, ptr->str_table, (unsigned)str_size) != str_size) - return(0); + if (read(fd, ptr->str_table, (unsigned) str_size) != str_size) + return (0); convert_strings(buf, ptr->Strings, str_count, str_size, ptr->str_table); } - #if NCURSES_XNAMES ptr->num_Booleans = BOOLCOUNT; - ptr->num_Numbers = NUMCOUNT; - ptr->num_Strings = STRCOUNT; + ptr->num_Numbers = NUMCOUNT; + ptr->num_Strings = STRCOUNT; /* * Read extended entries, if any, after the normal end of terminfo data. */ even_boundary(str_size); - TRACE_IN(("READ extended_header @%d", tell(fd))); + TR(TRACE_DATABASE, ("READ extended_header @%d", 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); - int ext_str_count = LOW_MSB(buf + 4); - int ext_str_size = LOW_MSB(buf + 6); - int ext_str_limit = LOW_MSB(buf + 8); + int ext_num_count = LOW_MSB(buf + 2); + int ext_str_count = LOW_MSB(buf + 4); + int ext_str_size = LOW_MSB(buf + 6); + int ext_str_limit = LOW_MSB(buf + 8); int need = (ext_bool_count + ext_num_count + ext_str_count); int base = 0; if (need >= (int) sizeof(buf) - || ext_str_size >= (int) sizeof(buf) - || ext_str_limit >= (int) sizeof(buf) - || ext_bool_count < 0 - || ext_num_count < 0 - || ext_str_count < 0 - || ext_str_size < 0 - || ext_str_limit < 0) - return(0); + || ext_str_size >= (int) sizeof(buf) + || ext_str_limit >= (int) sizeof(buf) + || ext_bool_count < 0 + || ext_num_count < 0 + || ext_str_count < 0 + || ext_str_size < 0 + || ext_str_limit < 0) + return (0); ptr->num_Booleans = BOOLCOUNT + ext_bool_count; - ptr->num_Numbers = NUMCOUNT + ext_num_count; - ptr->num_Strings = STRCOUNT + ext_str_count; + ptr->num_Numbers = NUMCOUNT + ext_num_count; + ptr->num_Strings = STRCOUNT + ext_str_count; - ptr->Booleans = typeRealloc(char, ptr->num_Booleans,ptr->Booleans); + ptr->Booleans = typeRealloc(char, ptr->num_Booleans, ptr->Booleans); ptr->Numbers = typeRealloc(short, ptr->num_Numbers, ptr->Numbers); - ptr->Strings = typeRealloc(char*, ptr->num_Strings, ptr->Strings); + ptr->Strings = typeRealloc(char *, ptr->num_Strings, ptr->Strings); - TRACE_IN(("extended header is %d/%d/%d(%d:%d)", ext_bool_count, ext_num_count, ext_str_count, ext_str_size, ext_str_limit)); + TR(TRACE_DATABASE, ("extended header is %d/%d/%d(%d:%d)", + ext_bool_count, ext_num_count, ext_str_count, ext_str_size, ext_str_limit)); - TRACE_IN(("READ %d extended-booleans @%d", ext_bool_count, tell(fd))); + TR(TRACE_DATABASE, ("READ %d extended-booleans @%d", + ext_bool_count, tell(fd))); if ((ptr->ext_Booleans = ext_bool_count) != 0) { - if (read(fd, ptr->Booleans + BOOLCOUNT, (unsigned)ext_bool_count) != ext_bool_count) - return(0); + if (read(fd, ptr->Booleans + BOOLCOUNT, (unsigned) + ext_bool_count) != ext_bool_count) + return (0); } even_boundary(ext_bool_count); - TRACE_IN(("READ %d extended-numbers @%d", ext_num_count, tell(fd))); + TR(TRACE_DATABASE, ("READ %d extended-numbers @%d", + ext_num_count, tell(fd))); if ((ptr->ext_Numbers = ext_num_count) != 0) { if (!read_shorts(fd, buf, ext_num_count)) - return(0); - TRACE_IN(("Before converting extended-numbers")); + return (0); + TR(TRACE_DATABASE, ("Before converting extended-numbers")); convert_shorts(buf, ptr->Numbers + NUMCOUNT, ext_num_count); } - TRACE_IN(("READ extended-offsets @%d", tell(fd))); + TR(TRACE_DATABASE, ("READ extended-offsets @%d", tell(fd))); if ((ext_str_count || need) - && !read_shorts(fd, buf, ext_str_count+need)) - return(0); + && !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))); - TRACE_IN(("READ %d bytes of extended-strings @%d", ext_str_limit, tell(fd))); if (ext_str_limit) { if ((ptr->ext_str_table = typeMalloc(char, ext_str_limit)) == 0) - return(0); + return (0); if (read(fd, ptr->ext_str_table, ext_str_limit) != ext_str_limit) - return(0); - TRACE_IN(("first extended-string is %s", _nc_visbuf(ptr->ext_str_table))); + return (0); + TR(TRACE_DATABASE, ("first extended-string is %s", _nc_visbuf(ptr->ext_str_table))); } if ((ptr->ext_Strings = ext_str_count) != 0) { - TRACE_IN(("Before computing extended-string capabilities str_count=%d, ext_str_count=%d", str_count, ext_str_count)); - convert_strings(buf, ptr->Strings + str_count, ext_str_count, ext_str_limit, ptr->ext_str_table); - for (i = ext_str_count-1; i >= 0; i--) { - TRACE_IN(("MOVE from [%d:%d] %s", i, i+str_count, _nc_visbuf(ptr->Strings[i+str_count]))); - ptr->Strings[i+STRCOUNT] = ptr->Strings[i+str_count]; - if (VALID_STRING(ptr->Strings[i+STRCOUNT])) - base += (strlen(ptr->Strings[i+STRCOUNT]) + 1); - TRACE_IN(("... to [%d] %s", i+STRCOUNT, _nc_visbuf(ptr->Strings[i+STRCOUNT]))); + TR(TRACE_DATABASE, + ("Before computing extended-string capabilities str_count=%d, ext_str_count=%d", + str_count, ext_str_count)); + convert_strings(buf, ptr->Strings + str_count, ext_str_count, + ext_str_limit, ptr->ext_str_table); + for (i = ext_str_count - 1; i >= 0; i--) { + TR(TRACE_DATABASE, ("MOVE from [%d:%d] %s", + i, i + str_count, + _nc_visbuf(ptr->Strings[i + str_count]))); + ptr->Strings[i + STRCOUNT] = ptr->Strings[i + str_count]; + if (VALID_STRING(ptr->Strings[i + STRCOUNT])) + base += (strlen(ptr->Strings[i + STRCOUNT]) + 1); + TR(TRACE_DATABASE, ("... to [%d] %s", + i + STRCOUNT, + _nc_visbuf(ptr->Strings[i + STRCOUNT]))); } } if (need) { if ((ptr->ext_Names = typeCalloc(char *, need)) == 0) - return(0); - TRACE_IN(("ext_NAMES starting @%d in extended_strings, first = %s", base, _nc_visbuf(ptr->ext_str_table+base))); - convert_strings(buf + (2 * ext_str_count), ptr->ext_Names, need, ext_str_limit, ptr->ext_str_table + base); + return (0); + TR(TRACE_DATABASE, + ("ext_NAMES starting @%d in extended_strings, first = %s", + base, _nc_visbuf(ptr->ext_str_table + base))); + convert_strings(buf + (2 * ext_str_count), ptr->ext_Names, need, + ext_str_limit, ptr->ext_str_table + base); } T(("...done reading terminfo bool %d(%d) num %d(%d) str %d(%d)", - ptr->num_Booleans, ptr->ext_Booleans, - ptr->num_Numbers, ptr->ext_Numbers, - ptr->num_Strings, ptr->ext_Strings)); + ptr->num_Booleans, ptr->ext_Booleans, + ptr->num_Numbers, ptr->ext_Numbers, + ptr->num_Strings, ptr->ext_Strings)); - TRACE_IN(("extend: num_Booleans:%d", ptr->num_Booleans)); + TR(TRACE_DATABASE, ("extend: num_Booleans:%d", ptr->num_Booleans)); } else #endif /* NCURSES_XNAMES */ { T(("...done reading terminfo bool %d num %d str %d", - bool_count, - num_count, - str_count)); - TRACE_IN(("normal: num_Booleans:%d", ptr->num_Booleans)); + bool_count, num_count, str_count)); +#if NCURSES_XNAMES + TR(TRACE_DATABASE, ("normal: num_Booleans:%d", ptr->num_Booleans)); +#endif } for (i = bool_count; i < BOOLCOUNT; i++) @@ -358,18 +369,19 @@ static int read_termtype(int fd, TERMTYPE *ptr) for (i = str_count; i < STRCOUNT; i++) ptr->Strings[i] = ABSENT_STRING; - return(1); + return (1); } -int _nc_read_file_entry(const char *const filename, TERMTYPE *ptr) +int +_nc_read_file_entry(const char *const filename, TERMTYPE * ptr) /* return 1 if read, 0 if not found or garbled */ { int code, fd = -1; if (_nc_access(filename, R_OK) < 0 - || (fd = open(filename, O_RDONLY|O_BINARY)) < 0) { + || (fd = open(filename, O_RDONLY | O_BINARY)) < 0) { T(("cannot open terminfo %s (errno=%d)", filename, errno)); - return(0); + return (0); } T(("read terminfo %s", filename)); @@ -384,51 +396,54 @@ int _nc_read_file_entry(const char *const filename, TERMTYPE *ptr) * Build a terminfo pathname and try to read the data. Returns 1 on success, * 0 on failure. */ -static int _nc_read_tic_entry(char *const filename, - const char *const dir, const char *ttn, TERMTYPE *const tp) +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) - if (strlen(dir) > MAX_TPATH) - return 0; - (void) sprintf(filename, "%s/%s", dir, ttn); - return _nc_read_file_entry(filename, tp); + if (strlen(dir) > MAX_TPATH) + return 0; + (void) sprintf(filename, "%s/%s", dir, ttn); + return _nc_read_file_entry(filename, tp); } /* * Process the list of :-separated directories, looking for the terminal type. * We don't use strtok because it does not show us empty tokens. */ -static int _nc_read_terminfo_dirs(const char *dirs, char *const filename, const char *const ttn, TERMTYPE *const tp) +static int +_nc_read_terminfo_dirs(const char *dirs, char *const filename, const char *const + ttn, TERMTYPE * const tp) { - char *list, *a; - const char *b; - int code = 0; - - /* we'll modify the argument, so we must copy */ - if ((b = a = list = strdup(dirs)) == NULL) - return(0); - - for (;;) { - int c = *a; - if (c == 0 || c == ':') { - *a = 0; - if ((b + 1) >= a) - b = TERMINFO; - if (_nc_read_tic_entry(filename, b, ttn, tp) == 1) { - code = 1; - break; - } - b = a + 1; - if (c == 0) - break; - } - a++; + char *list, *a; + const char *b; + int code = 0; + + /* we'll modify the argument, so we must copy */ + if ((b = a = list = strdup(dirs)) == NULL) + return (0); + + for (;;) { + int c = *a; + if (c == 0 || c == ':') { + *a = 0; + if ((b + 1) >= a) + b = TERMINFO; + if (_nc_read_tic_entry(filename, b, ttn, tp) == 1) { + code = 1; + break; + } + b = a + 1; + if (c == 0) + break; } + a++; + } - free(list); - return(code); + free(list); + return (code); } /* @@ -440,43 +455,43 @@ static int _nc_read_terminfo_dirs(const char *dirs, char *const filename, const * overrun the file buffer. */ -int _nc_read_entry(const char *const tn, char *const filename, TERMTYPE *const tp) +int +_nc_read_entry(const char *const tn, char *const filename, TERMTYPE * const tp) { -char *envp; -char ttn[MAX_ALIAS + 3]; - - /* truncate the terminal name to prevent dangerous buffer airline */ - (void) sprintf(ttn, "%c/%.*s", *tn, MAX_ALIAS, tn); - - /* This is System V behavior, in conjunction with our requirements for - * writing terminfo entries. - */ - if (have_tic_directory - && _nc_read_tic_entry(filename, _nc_tic_dir(0), ttn, tp) == 1) - return 1; - - if ((envp = getenv("TERMINFO")) != 0 - && _nc_read_tic_entry(filename, _nc_tic_dir(envp), ttn, tp) == 1) - return 1; - - if ((envp = _nc_home_terminfo()) != 0) { - if (_nc_read_tic_entry(filename, envp, ttn, tp) == 1) { - return(1); - } + char *envp; + char ttn[MAX_ALIAS + 3]; + + /* truncate the terminal name to prevent dangerous buffer airline */ + (void) sprintf(ttn, "%c/%.*s", *tn, MAX_ALIAS, tn); + + /* This is System V behavior, in conjunction with our requirements for + * writing terminfo entries. + */ + if (have_tic_directory + && _nc_read_tic_entry(filename, _nc_tic_dir(0), ttn, tp) == 1) + return 1; + + if ((envp = getenv("TERMINFO")) != 0 + && _nc_read_tic_entry(filename, _nc_tic_dir(envp), ttn, tp) == 1) + return 1; + + if ((envp = _nc_home_terminfo()) != 0) { + if (_nc_read_tic_entry(filename, envp, ttn, tp) == 1) { + return (1); } + } - /* this is an ncurses extension */ - if ((envp = getenv("TERMINFO_DIRS")) != 0) - return _nc_read_terminfo_dirs(envp, filename, ttn, tp); + /* this is an ncurses extension */ + if ((envp = getenv("TERMINFO_DIRS")) != 0) + return _nc_read_terminfo_dirs(envp, filename, ttn, tp); - /* Try the system directory. Note that the TERMINFO_DIRS value, if - * defined by the configure script, begins with a ":", which will be - * interpreted as TERMINFO. - */ + /* Try the system directory. Note that the TERMINFO_DIRS value, if + * defined by the configure script, begins with a ":", which will be + * interpreted as TERMINFO. + */ #ifdef TERMINFO_DIRS - return _nc_read_terminfo_dirs(TERMINFO_DIRS, filename, ttn, tp); + return _nc_read_terminfo_dirs(TERMINFO_DIRS, filename, ttn, tp); #else - return _nc_read_tic_entry(filename, TERMINFO, ttn, tp); + return _nc_read_tic_entry(filename, TERMINFO, ttn, tp); #endif } - diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index d60a92d6..26e72d40 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * Termcap compatibility support * @@ -56,11 +55,7 @@ #include #include -#if HAVE_FCNTL_H -#include -#endif - -MODULE_ID("$Id: read_termcap.c,v 1.43 1999/04/10 20:52:52 tom Exp $") +MODULE_ID("$Id: read_termcap.c,v 1.47 2000/04/15 16:53:19 Todd.C.Miller Exp $") #ifndef PURE_TERMINFO @@ -86,7 +81,7 @@ MODULE_ID("$Id: read_termcap.c,v 1.43 1999/04/10 20:52:52 tom Exp $") #define _nc_cgetset cgetset #else static int _nc_cgetmatch(char *, const char *); -static int _nc_getent(char **, unsigned int *, int *, int, char **, int, const char *, int, char *); +static int _nc_getent(char **, unsigned *, int *, int, char **, int, const char *, int, char *); static int _nc_nfcmp(const char *, char *); /*- @@ -130,16 +125,16 @@ static int _nc_nfcmp(const char *, char *); #define BFRAG 1024 #define BSIZE 1024 #define ESC ('[' & 037) /* ASCII ESC */ -#define MAX_RECURSION 32 /* maximum getent recursion */ -#define SFRAG 100 /* cgetstr mallocs in SFRAG chunks */ +#define MAX_RECURSION 32 /* maximum getent recursion */ +#define SFRAG 100 /* cgetstr mallocs in SFRAG chunks */ #define RECOK (char)0 #define TCERR (char)1 #define SHADOW (char)2 -static size_t topreclen; /* toprec length */ -static char *toprec; /* Additional record specified by cgetset() */ -static int gottoprec; /* Flag indicating retrieval of toprecord */ +static size_t topreclen; /* toprec length */ +static char *toprec; /* Additional record specified by cgetset() */ +static int gottoprec; /* Flag indicating retrieval of toprecord */ /* * Cgetset() allows the addition of a user specified buffer to be added to the @@ -149,20 +144,20 @@ static int gottoprec; /* Flag indicating retrieval of toprecord */ static int _nc_cgetset(const char *ent) { - if (ent == 0) { - FreeIfNeeded(toprec); - toprec = 0; - topreclen = 0; - return (0); - } - topreclen = strlen(ent); - if ((toprec = typeMalloc(char, topreclen + 1)) == 0) { - errno = ENOMEM; - return (-1); - } - gottoprec = 0; - (void)strcpy(toprec, ent); + if (ent == 0) { + FreeIfNeeded(toprec); + toprec = 0; + topreclen = 0; return (0); + } + topreclen = strlen(ent); + if ((toprec = typeMalloc(char, topreclen + 1)) == 0) { + errno = ENOMEM; + return (-1); + } + gottoprec = 0; + (void) strcpy(toprec, ent); + return (0); } /* @@ -180,43 +175,43 @@ _nc_cgetset(const char *ent) static char * _nc_cgetcap(char *buf, const char *cap, int type) { - register const char *cp; - register char *bp; + register const char *cp; + register char *bp; - bp = buf; + bp = buf; + for (;;) { + /* + * Skip past the current capability field - it's either the + * name field if this is the first time through the loop, or + * the remainder of a field whose name failed to match cap. + */ for (;;) { - /* - * Skip past the current capability field - it's either the - * name field if this is the first time through the loop, or - * the remainder of a field whose name failed to match cap. - */ - for (;;) { - if (*bp == '\0') - return (0); - else if (*bp++ == ':') - break; - } + if (*bp == '\0') + return (0); + else if (*bp++ == ':') + break; + } - /* - * Try to match (cap, type) in buf. - */ - for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++) - continue; - if (*cp != '\0') - continue; - if (*bp == '@') - return (0); - if (type == ':') { - if (*bp != '\0' && *bp != ':') - continue; - return(bp); - } - if (*bp != type) - continue; - bp++; - return (*bp == '@' ? 0 : bp); + /* + * Try to match (cap, type) in buf. + */ + for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++) + continue; + if (*cp != '\0') + continue; + if (*bp == '@') + return (0); + if (type == ':') { + if (*bp != '\0' && *bp != ':') + continue; + return (bp); } - /* NOTREACHED */ + if (*bp != type) + continue; + bp++; + return (*bp == '@' ? 0 : bp); + } + /* NOTREACHED */ } /* @@ -236,9 +231,9 @@ _nc_cgetcap(char *buf, const char *cap, int type) static int _nc_cgetent(char **buf, int *oline, char **db_array, const char *name) { - unsigned int dummy; + unsigned dummy; - return (_nc_getent(buf, &dummy, oline, 0, db_array, -1, name, 0, 0)); + return (_nc_getent(buf, &dummy, oline, 0, db_array, -1, name, 0, 0)); } /* @@ -262,327 +257,327 @@ _nc_cgetent(char **buf, int *oline, char **db_array, const char *name) #define DOALLOC(size) typeRealloc(char, size, record) static int _nc_getent( - char **cap, /* termcap-content */ - unsigned int *len, /* length, needed for recursion */ - int *beginning, /* line-number at match */ - int in_array, /* index in 'db_array[] */ - char **db_array, /* list of files to search */ - int fd, - const char *name, - int depth, - char *nfield) + char **cap, /* termcap-content */ + unsigned *len, /* length, needed for recursion */ + int *beginning, /* line-number at match */ + int in_array, /* index in 'db_array[] */ + char **db_array, /* list of files to search */ + int fd, + const char *name, + int depth, + char *nfield) { - register char *r_end, *rp; - int myfd = FALSE; - char *record = 0; - int tc_not_resolved; - int current; - int lineno; - - /* - * Return with ``loop detected'' error if we've recurred more than - * MAX_RECURSION times. - */ - if (depth > MAX_RECURSION) - return (TC_REF_LOOP); + register char *r_end, *rp; + int myfd = FALSE; + char *record = 0; + int tc_not_resolved; + int current; + int lineno; + + /* + * Return with ``loop detected'' error if we've recurred more than + * MAX_RECURSION times. + */ + if (depth > MAX_RECURSION) + return (TC_REF_LOOP); + + /* + * Check if we have a top record from cgetset(). + */ + if (depth == 0 && toprec != 0 && _nc_cgetmatch(toprec, name) == 0) { + if ((record = DOALLOC(topreclen + BFRAG)) == 0) { + errno = ENOMEM; + return (TC_SYS_ERR); + } + (void) strcpy(record, toprec); + rp = record + topreclen + 1; + r_end = rp + BFRAG; + current = in_array; + } else { + int foundit; /* - * Check if we have a top record from cgetset(). + * Allocate first chunk of memory. */ - if (depth == 0 && toprec != 0 && _nc_cgetmatch(toprec, name) == 0) { - if ((record = DOALLOC(topreclen + BFRAG)) == 0) { - errno = ENOMEM; - return (TC_SYS_ERR); - } - (void)strcpy(record, toprec); - rp = record + topreclen + 1; - r_end = rp + BFRAG; - current = in_array; - } else { - int foundit; - - /* - * Allocate first chunk of memory. - */ - if ((record = DOALLOC(BFRAG)) == 0) { - errno = ENOMEM; - return (TC_SYS_ERR); - } - rp = r_end = record + BFRAG; - foundit = FALSE; - - /* - * Loop through database array until finding the record. - */ - for (current = in_array; db_array[current] != 0; current++) { - int eof = FALSE; - - /* - * Open database if not already open. - */ - if (fd >= 0) { - (void)lseek(fd, (off_t)0, SEEK_SET); - } else if ((_nc_access(db_array[current], R_OK) < 0) - || (fd = open(db_array[current], O_RDONLY, 0)) < 0) { - /* No error on unfound file. */ - if (errno == ENOENT) - continue; - free(record); - return (TC_SYS_ERR); - } else { - myfd = TRUE; - } - lineno = 0; - - /* - * Find the requested capability record ... - */ - { - char buf[2048]; - register char *b_end = buf; - register char *bp = buf; - register int c; - - /* - * Loop invariants: - * There is always room for one more character in record. - * R_end always points just past end of record. - * Rp always points just past last character in record. - * B_end always points just past last character in buf. - * Bp always points at next character in buf. - */ - - for (;;) { - int first = lineno + 1; - - /* - * Read in a line implementing (\, newline) - * line continuation. - */ - rp = record; - for (;;) { - if (bp >= b_end) { - int n; - - n = read(fd, buf, sizeof(buf)); - if (n <= 0) { - if (myfd) - (void)close(fd); - if (n < 0) { - free(record); - return (TC_SYS_ERR); - } - fd = -1; - eof = TRUE; - break; - } - b_end = buf+n; - bp = buf; - } - - c = *bp++; - if (c == '\n') { - lineno++; - if (rp == record || *(rp-1) != '\\') - break; - } - *rp++ = c; - - /* - * Enforce loop invariant: if no room - * left in record buffer, try to get - * some more. - */ - if (rp >= r_end) { - unsigned int pos; - size_t newsize; - - pos = rp - record; - newsize = r_end - record + BFRAG; - record = DOALLOC(newsize); - if (record == 0) { - if (myfd) - (void)close(fd); - errno = ENOMEM; - return (TC_SYS_ERR); - } - r_end = record + newsize; - rp = record + pos; - } - } - /* loop invariant lets us do this */ - *rp++ = '\0'; - - /* - * If encountered eof check next file. - */ - if (eof) - break; - - /* - * Toss blank lines and comments. - */ - if (*record == '\0' || *record == '#') - continue; - - /* - * See if this is the record we want ... - */ - if (_nc_cgetmatch(record, name) == 0 - && (nfield == 0 - || !_nc_nfcmp(nfield, record))) { - foundit = TRUE; - *beginning = first; - break; /* found it! */ - } - } - } - if (foundit) - break; - } - - if (!foundit) - return (TC_NOT_FOUND); + if ((record = DOALLOC(BFRAG)) == 0) { + errno = ENOMEM; + return (TC_SYS_ERR); } + rp = r_end = record + BFRAG; + foundit = FALSE; /* - * Got the capability record, but now we have to expand all tc=name - * references in it ... + * Loop through database array until finding the record. */ - { - register char *newicap, *s; - register int newilen; - unsigned int ilen; - int diff, iret, tclen, oline; - char *icap, *scan, *tc, *tcstart, *tcend; + for (current = in_array; db_array[current] != 0; current++) { + int eof = FALSE; + + /* + * Open database if not already open. + */ + if (fd >= 0) { + (void) lseek(fd, (off_t) 0, SEEK_SET); + } else if ((_nc_access(db_array[current], R_OK) < 0) + || (fd = open(db_array[current], O_RDONLY, 0)) < 0) { + /* No error on unfound file. */ + if (errno == ENOENT) + continue; + free(record); + return (TC_SYS_ERR); + } else { + myfd = TRUE; + } + lineno = 0; + + /* + * Find the requested capability record ... + */ + { + char buf[2048]; + register char *b_end = buf; + register char *bp = buf; + register int c; /* * Loop invariants: - * There is room for one more character in record. - * R_end points just past end of record. - * Rp points just past last character in record. - * Scan points at remainder of record that needs to be - * scanned for tc=name constructs. + * There is always room for one more character in record. + * R_end always points just past end of record. + * Rp always points just past last character in record. + * B_end always points just past last character in buf. + * Bp always points at next character in buf. */ - scan = record; - tc_not_resolved = FALSE; - for (;;) { - if ((tc = _nc_cgetcap(scan, "tc", '=')) == 0) - break; - /* - * Find end of tc=name and stomp on the trailing `:' - * (if present) so we can use it to call ourselves. - */ - s = tc; - while (*s != '\0') { - if (*s++ == ':') { - *(s - 1) = '\0'; - break; - } - } - tcstart = tc - 3; - tclen = s - tcstart; - tcend = s; - - iret = _nc_getent(&icap, &ilen, &oline, current, db_array, fd, tc, depth+1, 0); - newicap = icap; /* Put into a register. */ - newilen = ilen; - if (iret != TC_SUCCESS) { - /* an error */ - if (iret < TC_NOT_FOUND) { - if (myfd) - (void)close(fd); - free(record); - return (iret); - } - if (iret == TC_UNRESOLVED) - tc_not_resolved = TRUE; - /* couldn't resolve tc */ - if (iret == TC_NOT_FOUND) { - *(s - 1) = ':'; - scan = s - 1; - tc_not_resolved = TRUE; - continue; + for (;;) { + int first = lineno + 1; + + /* + * Read in a line implementing (\, newline) + * line continuation. + */ + rp = record; + for (;;) { + if (bp >= b_end) { + int n; + + n = read(fd, buf, sizeof(buf)); + if (n <= 0) { + if (myfd) + (void) close(fd); + if (n < 0) { + free(record); + return (TC_SYS_ERR); } + fd = -1; + eof = TRUE; + break; + } + b_end = buf + n; + bp = buf; } - /* not interested in name field of tc'ed record */ - s = newicap; - while (*s != '\0' && *s++ != ':') - ; - newilen -= s - newicap; - newicap = s; - - /* make sure interpolated record is `:'-terminated */ - s += newilen; - if (*(s-1) != ':') { - *s = ':'; /* overwrite NUL with : */ - newilen++; + c = *bp++; + if (c == '\n') { + lineno++; + if (rp == record || *(rp - 1) != '\\') + break; } + *rp++ = c; /* - * Make sure there's enough room to insert the - * new record. + * Enforce loop invariant: if no room + * left in record buffer, try to get + * some more. */ - diff = newilen - tclen; - if (diff >= r_end - rp) { - unsigned int pos, tcpos, tcposend; - size_t newsize; - - pos = rp - record; - newsize = r_end - record + diff + BFRAG; - tcpos = tcstart - record; - tcposend = tcend - record; - record = DOALLOC(newsize); - if (record == 0) { - if (myfd) - (void)close(fd); - free(icap); - errno = ENOMEM; - return (TC_SYS_ERR); - } - r_end = record + newsize; - rp = record + pos; - tcstart = record + tcpos; - tcend = record + tcposend; + if (rp >= r_end) { + unsigned pos; + size_t newsize; + + pos = rp - record; + newsize = r_end - record + BFRAG; + record = DOALLOC(newsize); + if (record == 0) { + if (myfd) + (void) close(fd); + errno = ENOMEM; + return (TC_SYS_ERR); + } + r_end = record + newsize; + rp = record + pos; } + } + /* loop invariant lets us do this */ + *rp++ = '\0'; + + /* + * If encountered eof check next file. + */ + if (eof) + break; - /* - * Insert tc'ed record into our record. - */ - s = tcstart + newilen; - memmove(s, tcend, (size_t)(rp - tcend)); - memmove(tcstart, newicap, (size_t)newilen); - rp += diff; - free(icap); + /* + * Toss blank lines and comments. + */ + if (*record == '\0' || *record == '#') + continue; - /* - * Start scan on `:' so next cgetcap works properly - * (cgetcap always skips first field). - */ - scan = s-1; + /* + * See if this is the record we want ... + */ + if (_nc_cgetmatch(record, name) == 0 + && (nfield == 0 + || !_nc_nfcmp(nfield, record))) { + foundit = TRUE; + *beginning = first; + break; /* found it! */ + } } + } + if (foundit) + break; } + if (!foundit) + return (TC_NOT_FOUND); + } + + /* + * Got the capability record, but now we have to expand all tc=name + * references in it ... + */ + { + register char *newicap, *s; + register int newilen; + unsigned ilen; + int diff, iret, tclen, oline; + char *icap, *scan, *tc, *tcstart, *tcend; + /* - * Close file (if we opened it), give back any extra memory, and - * return capability, length and success. + * Loop invariants: + * There is room for one more character in record. + * R_end points just past end of record. + * Rp points just past last character in record. + * Scan points at remainder of record that needs to be + * scanned for tc=name constructs. */ - if (myfd) - (void)close(fd); - *len = rp - record - 1; /* don't count NUL */ - if (r_end > rp) { - if ((record = DOALLOC((size_t)(rp - record))) == 0) { - errno = ENOMEM; - return (TC_SYS_ERR); + scan = record; + tc_not_resolved = FALSE; + for (;;) { + if ((tc = _nc_cgetcap(scan, "tc", '=')) == 0) + break; + + /* + * Find end of tc=name and stomp on the trailing `:' + * (if present) so we can use it to call ourselves. + */ + s = tc; + while (*s != '\0') { + if (*s++ == ':') { + *(s - 1) = '\0'; + break; + } + } + tcstart = tc - 3; + tclen = s - tcstart; + tcend = s; + + iret = _nc_getent(&icap, &ilen, &oline, current, db_array, fd, + tc, depth + 1, 0); + newicap = icap; /* Put into a register. */ + newilen = ilen; + if (iret != TC_SUCCESS) { + /* an error */ + if (iret < TC_NOT_FOUND) { + if (myfd) + (void) close(fd); + free(record); + return (iret); } + if (iret == TC_UNRESOLVED) + tc_not_resolved = TRUE; + /* couldn't resolve tc */ + if (iret == TC_NOT_FOUND) { + *(s - 1) = ':'; + scan = s - 1; + tc_not_resolved = TRUE; + continue; + } + } + + /* not interested in name field of tc'ed record */ + s = newicap; + while (*s != '\0' && *s++ != ':') ; + newilen -= s - newicap; + newicap = s; + + /* make sure interpolated record is `:'-terminated */ + s += newilen; + if (*(s - 1) != ':') { + *s = ':'; /* overwrite NUL with : */ + newilen++; + } + + /* + * Make sure there's enough room to insert the + * new record. + */ + diff = newilen - tclen; + if (diff >= r_end - rp) { + unsigned pos, tcpos, tcposend; + size_t newsize; + + pos = rp - record; + newsize = r_end - record + diff + BFRAG; + tcpos = tcstart - record; + tcposend = tcend - record; + record = DOALLOC(newsize); + if (record == 0) { + if (myfd) + (void) close(fd); + free(icap); + errno = ENOMEM; + return (TC_SYS_ERR); + } + r_end = record + newsize; + rp = record + pos; + tcstart = record + tcpos; + tcend = record + tcposend; + } + + /* + * Insert tc'ed record into our record. + */ + s = tcstart + newilen; + memmove(s, tcend, (size_t) (rp - tcend)); + memmove(tcstart, newicap, (size_t) newilen); + rp += diff; + free(icap); + + /* + * Start scan on `:' so next cgetcap works properly + * (cgetcap always skips first field). + */ + scan = s - 1; + } + } + + /* + * Close file (if we opened it), give back any extra memory, and + * return capability, length and success. + */ + if (myfd) + (void) close(fd); + *len = rp - record - 1; /* don't count NUL */ + if (r_end > rp) { + if ((record = DOALLOC((size_t) (rp - record))) == 0) { + errno = ENOMEM; + return (TC_SYS_ERR); } + } - *cap = record; - if (tc_not_resolved) - return (TC_UNRESOLVED); - return (current); + *cap = record; + if (tc_not_resolved) + return (TC_UNRESOLVED); + return (current); } /* @@ -592,40 +587,40 @@ _nc_getent( static int _nc_cgetmatch(char *buf, const char *name) { - register const char *np; - register char *bp; - + register const char *np; + register char *bp; + + /* + * Start search at beginning of record. + */ + bp = buf; + for (;;) { /* - * Start search at beginning of record. + * Try to match a record name. */ - bp = buf; + np = name; for (;;) { - /* - * Try to match a record name. - */ - np = name; - for (;;) { - if (*np == '\0') { - if (*bp == '|' || *bp == ':' || *bp == '\0') - return (0); - else - break; - } else if (*bp++ != *np++) { - break; - } - } + if (*np == '\0') { + if (*bp == '|' || *bp == ':' || *bp == '\0') + return (0); + else + break; + } else if (*bp++ != *np++) { + break; + } + } - /* - * Match failed, skip to next name in record. - */ - bp--; /* a '|' or ':' may have stopped the match */ - for (;;) { - if (*bp == '\0' || *bp == ':') - return (-1); /* match failed totally */ - else if (*bp++ == '|') - break; /* found next name */ - } + /* + * Match failed, skip to next name in record. + */ + bp--; /* a '|' or ':' may have stopped the match */ + for (;;) { + if (*bp == '\0' || *bp == ':') + return (-1); /* match failed totally */ + else if (*bp++ == '|') + break; /* found next name */ } + } } /* @@ -634,18 +629,17 @@ _nc_cgetmatch(char *buf, const char *name) static int _nc_nfcmp(const char *nf, char *rec) { - char *cp, tmp; - int ret; + char *cp, tmp; + int ret; - for (cp = rec; *cp != ':'; cp++) - ; + for (cp = rec; *cp != ':'; cp++) ; - tmp = *(cp + 1); - *(cp + 1) = '\0'; - ret = strcmp(nf, rec); - *(cp + 1) = tmp; + tmp = *(cp + 1); + *(cp + 1) = '\0'; + ret = strcmp(nf, rec); + *(cp + 1) = tmp; - return (ret); + return (ret); } #endif /* HAVE_BSD_CGETENT */ @@ -706,63 +700,63 @@ static char *tbuf; static char * get_tc_token(char **srcp, int *endp) { - int ch; - bool found = FALSE; - char *s, *base; - char *tok = 0; - - *endp = TRUE; - for (s = base = *srcp; *s != '\0'; ) { - ch = *s++; - if (ch == '\\') { - if (*s == '\0') { - break; - } else if (*s++ == '\n') { - while (isspace(*s)) - s++; - } else { - found = TRUE; - } - } else if (ch == ':') { - if (found) { - tok = base; - s[-1] = '\0'; - *srcp = s; - *endp = FALSE; - break; - } - base = s; - } else if (isgraph(ch)) { - found = TRUE; - } - } - - /* malformed entry may end without a ':' */ - if (tok == 0 && found) { + int ch; + bool found = FALSE; + char *s, *base; + char *tok = 0; + + *endp = TRUE; + for (s = base = *srcp; *s != '\0';) { + ch = *s++; + if (ch == '\\') { + if (*s == '\0') { + break; + } else if (*s++ == '\n') { + while (isspace(*s)) + s++; + } else { + found = TRUE; + } + } else if (ch == ':') { + if (found) { tok = base; + s[-1] = '\0'; + *srcp = s; + *endp = FALSE; + break; + } + base = s; + } else if (isgraph(ch)) { + found = TRUE; } + } + + /* malformed entry may end without a ':' */ + if (tok == 0 && found) { + tok = base; + } - return tok; + return tok; } static char * copy_tc_token(char *dst, const char *src, size_t len) { - int ch; + int ch; - while ((ch = *src++) != '\0') { - if (ch == '\\' && *src == '\n') { - while (isspace(*src)) - src++; - continue; - } - if (--len == 0) { - dst = 0; - break; - } - *dst++ = ch; + while ((ch = *src++) != '\0') { + if (ch == '\\' && *src == '\n') { + while (isspace(*src)) + src++; + continue; + } + if (--len == 0) { + dst = 0; + break; } - return dst; + *dst++ = ch; + } + return dst; } /* @@ -771,127 +765,126 @@ copy_tc_token(char *dst, const char *src, size_t len) static int _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name) { - static char *the_source; - - register char *p; - register char *cp; - char *dummy; - char **fname; - char *home; - int i; - char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ - char *pathvec[PVECSIZ]; /* to point to names in pathbuf */ - char **pvec; /* holds usable tail of path vector */ - char *termpath; - - fname = pathvec; - pvec = pathvec; - tbuf = bp; - p = pathbuf; - cp = getenv("TERMCAP"); - - /* - * TERMCAP can have one of two things in it. It can be the name of a - * file to use instead of /etc/termcap. In this case it better start - * with a "/". Or it can be an entry to use so we don't have to read - * the file. In this case it has to already have the newlines crunched - * out. If TERMCAP does not hold a file name then a path of names is - * searched instead. The path is found in the TERMPATH variable, or - * becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists. - */ - if (!is_pathname(cp)) { /* no TERMCAP or it holds an entry */ - if ((termpath = getenv("TERMPATH")) != 0) { - strncpy(pathbuf, termpath, PBUFSIZ - 1); - } else { - if ((home = getenv("HOME")) != 0 && - strlen(home) < PBUFSIZ) { /* setup path */ - p += strlen(home); /* path, looking in */ - strcpy(pathbuf, home); /* $HOME first */ - *p++ = '/'; - } /* if no $HOME look in current directory */ + static char *the_source; + + register char *p; + register char *cp; + char *dummy; + char **fname; + char *home; + int i; + char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ + char *pathvec[PVECSIZ]; /* to point to names in pathbuf */ + char **pvec; /* holds usable tail of path vector */ + char *termpath; + + fname = pathvec; + pvec = pathvec; + tbuf = bp; + p = pathbuf; + cp = getenv("TERMCAP"); + + /* + * TERMCAP can have one of two things in it. It can be the name of a file + * to use instead of /etc/termcap. In this case it better start with a + * "/". Or it can be an entry to use so we don't have to read the file. + * In this case it has to already have the newlines crunched out. If + * TERMCAP does not hold a file name then a path of names is searched + * instead. The path is found in the TERMPATH variable, or becomes + * "$HOME/.termcap /etc/termcap" if no TERMPATH exists. + */ + if (!is_pathname(cp)) { /* no TERMCAP or it holds an entry */ + if ((termpath = getenv("TERMPATH")) != 0) { + strncpy(pathbuf, termpath, PBUFSIZ - 1); + } else { + if ((home = getenv("HOME")) != 0 && + strlen(home) < PBUFSIZ) { /* setup path */ + p += strlen(home); /* path, looking in */ + strcpy(pathbuf, home); /* $HOME first */ + *p++ = '/'; + } /* if no $HOME look in current directory */ #define MY_PATH_DEF ".termcap /etc/termcap /usr/share/misc/termcap" - strncpy(p, MY_PATH_DEF, (size_t)(PBUFSIZ - (p - pathbuf) - 1)); - } + strncpy(p, MY_PATH_DEF, (size_t) (PBUFSIZ - (p - pathbuf) - 1)); } - else /* user-defined name in TERMCAP */ - strncpy(pathbuf, cp, PBUFSIZ - 1); /* still can be tokenized */ - pathbuf[PBUFSIZ - 1] = '\0'; - - *fname++ = pathbuf; /* tokenize path into vector of names */ - while (*++p) { - if (*p == ' ' || *p == ':') { - *p = '\0'; - while (*++p) - if (*p != ' ' && *p != ':') - break; - if (*p == '\0') - break; - *fname++ = p; - if (fname >= pathvec + PVECSIZ) { - fname--; - break; - } - } + } else /* user-defined name in TERMCAP */ + strncpy(pathbuf, cp, PBUFSIZ - 1); /* still can be tokenized */ + pathbuf[PBUFSIZ - 1] = '\0'; + + *fname++ = pathbuf; /* tokenize path into vector of names */ + while (*++p) { + if (*p == ' ' || *p == ':') { + *p = '\0'; + while (*++p) + if (*p != ' ' && *p != ':') + break; + if (*p == '\0') + break; + *fname++ = p; + if (fname >= pathvec + PVECSIZ) { + fname--; + break; + } } - *fname = 0; /* mark end of vector */ - if (is_pathname(cp)) { - if (_nc_cgetset(cp) < 0) { - return(TC_SYS_ERR); - } + } + *fname = 0; /* mark end of vector */ + if (is_pathname(cp)) { + if (_nc_cgetset(cp) < 0) { + return (TC_SYS_ERR); } - - i = _nc_cgetent(&dummy, lineno, pathvec, name); - - /* ncurses' termcap-parsing routines cannot handle multiple adjacent - * empty fields, and mistakenly use the last valid cap entry instead of - * the first (breaks tc= includes) - */ - if (i >= 0) { - char *pd, *ps, *tok; - int endflag = FALSE; - char *list[1023]; - size_t n, count = 0; - - pd = bp; - ps = dummy; - while (!endflag && (tok = get_tc_token(&ps, &endflag)) != 0) { - bool ignore = FALSE; - - for (n = 1; n < count; n++) { - char *s = list[n]; - if (s[0] == tok[0] - && s[1] == tok[1]) { - ignore = TRUE; - break; - } - } - if (ignore != TRUE) { - list[count++] = tok; - pd = copy_tc_token(pd, tok, TBUFSIZ - (2+pd-bp)); - if (pd == 0) { - i = -1; - break; - } - *pd++ = ':'; - *pd = '\0'; - } + } + + i = _nc_cgetent(&dummy, lineno, pathvec, name); + + /* ncurses' termcap-parsing routines cannot handle multiple adjacent + * empty fields, and mistakenly use the last valid cap entry instead of + * the first (breaks tc= includes) + */ + if (i >= 0) { + char *pd, *ps, *tok; + int endflag = FALSE; + char *list[1023]; + size_t n, count = 0; + + pd = bp; + ps = dummy; + while (!endflag && (tok = get_tc_token(&ps, &endflag)) != 0) { + bool ignore = FALSE; + + for (n = 1; n < count; n++) { + char *s = list[n]; + if (s[0] == tok[0] + && s[1] == tok[1]) { + ignore = TRUE; + break; } + } + if (ignore != TRUE) { + list[count++] = tok; + pd = copy_tc_token(pd, tok, TBUFSIZ - (2 + pd - bp)); + if (pd == 0) { + i = -1; + break; + } + *pd++ = ':'; + *pd = '\0'; + } } - - FreeIfNeeded(dummy); - FreeIfNeeded(the_source); - the_source = 0; - - /* This is not related to the BSD cgetent(), but to fake up a suitable - * filename for ncurses' error reporting. (If we are not using BSD - * cgetent, then it is the actual filename). - */ - if (i >= 0) { - if ((the_source = strdup(pathvec[i])) != 0) - *sourcename = the_source; - } - - return(i); + } + + FreeIfNeeded(dummy); + FreeIfNeeded(the_source); + the_source = 0; + + /* This is not related to the BSD cgetent(), but to fake up a suitable + * filename for ncurses' error reporting. (If we are not using BSD + * cgetent, then it is the actual filename). + */ + if (i >= 0) { + if ((the_source = strdup(pathvec[i])) != 0) + *sourcename = the_source; + } + + return (i); } #endif /* USE_BSD_TGETENT */ #endif /* USE_GETCAP */ @@ -903,214 +896,207 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name) * a right to open the file. */ #if !USE_GETCAP -static int add_tc(char *termpaths[], char *path, int count) +static int +add_tc(char *termpaths[], char *path, int count) { - if (count < MAXPATHS - && _nc_access(path, R_OK) == 0) - termpaths[count++] = path; - termpaths[count] = 0; - return count; + if (count < MAXPATHS + && _nc_access(path, R_OK) == 0) + termpaths[count++] = path; + termpaths[count] = 0; + return count; } #define ADD_TC(path, count) filecount = add_tc(termpaths, path, count) #endif /* !USE_GETCAP */ -int _nc_read_termcap_entry(const char *const tn, TERMTYPE *const tp) +int +_nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp) { - int found = FALSE; - ENTRY *ep; + int found = FALSE; + ENTRY *ep; #if USE_GETCAP_CACHE - char cwd_buf[PATH_MAX]; + char cwd_buf[PATH_MAX]; #endif #if USE_GETCAP - char tc[TBUFSIZ]; - static char *source; - static int lineno; - + char *p, tc[TBUFSIZ]; + static char *source; + static int lineno; + + if ((p = getenv("TERMCAP")) != 0 + && !is_pathname(p) && _nc_name_match(p, tn, "|:")) { + /* TERMCAP holds a termcap entry */ + strncpy(tc, p, sizeof(tc) - 1); + tc[sizeof(tc) - 1] = '\0'; + _nc_set_source("TERMCAP"); + } else { /* we're using getcap(3) */ if (_nc_tgetent(tc, &source, &lineno, tn) < 0) - return (ERR); + return (ERR); _nc_curr_line = lineno; _nc_set_source(source); - _nc_read_entry_source((FILE *)0, tc, FALSE, FALSE, NULLHOOK); + } + _nc_read_entry_source((FILE *) 0, tc, FALSE, FALSE, NULLHOOK); #else - /* - * Here is what the 4.4BSD termcap(3) page prescribes: - * - * It will look in the environment for a TERMCAP variable. If found, - * and the value does not begin with a slash, and the terminal type - * name is the same as the environment string TERM, the TERMCAP string - * is used instead of reading a termcap file. If it does begin with a - * slash, the string is used as a path name of the termcap file to - * search. If TERMCAP does not begin with a slash and name is - * different from TERM, tgetent() searches the files $HOME/.termcap and - * /usr/share/misc/termcap, in that order, unless the environment - * variable TERMPATH exists, in which case it specifies a list of file - * pathnames (separated by spaces or colons) to be searched instead. - * - * It goes on to state: - * - * Whenever multiple files are searched and a tc field occurs in the - * requested entry, the entry it names must be found in the same file - * or one of the succeeding files. - * - * However, this restriction is relaxed in ncurses; tc references to - * previous files are permitted. - * - * This routine returns 1 if an entry is found, 0 if not found, and -1 - * if the database is not accessible. - */ - FILE *fp; - char *tc, *termpaths[MAXPATHS]; - int filecount = 0; - bool use_buffer = FALSE; - char tc_buf[1024]; - char pathbuf[PATH_MAX]; - - termpaths[filecount] = 0; - if ((tc = getenv("TERMCAP")) != 0) - { - if (is_pathname(tc)) /* interpret as a filename */ - { - ADD_TC(tc, 0); - } - else if (_nc_name_match(tc, tn, "|:")) /* treat as a capability file */ - { - use_buffer = TRUE; - (void) sprintf(tc_buf, "%.*s\n", (int)sizeof(tc_buf)-2, tc); - } - else if ((tc = getenv("TERMPATH")) != 0) - { - char *cp; - - for (cp = tc; *cp; cp++) - { - if (*cp == ':') - *cp = '\0'; - else if (cp == tc || cp[-1] == '\0') - { - ADD_TC(cp, filecount); - } - } + /* + * Here is what the 4.4BSD termcap(3) page prescribes: + * + * It will look in the environment for a TERMCAP variable. If found, and + * the value does not begin with a slash, and the terminal type name is the + * same as the environment string TERM, the TERMCAP string is used instead + * of reading a termcap file. If it does begin with a slash, the string is + * used as a path name of the termcap file to search. If TERMCAP does not + * begin with a slash and name is different from TERM, tgetent() searches + * the files $HOME/.termcap and /usr/share/misc/termcap, in that order, + * unless the environment variable TERMPATH exists, in which case it + * specifies a list of file pathnames (separated by spaces or colons) to be + * searched instead. + * + * It goes on to state: + * + * Whenever multiple files are searched and a tc field occurs in the + * requested entry, the entry it names must be found in the same file or + * one of the succeeding files. + * + * However, this restriction is relaxed in ncurses; tc references to + * previous files are permitted. + * + * This routine returns 1 if an entry is found, 0 if not found, and -1 if + * the database is not accessible. + */ + FILE *fp; + char *tc, *termpaths[MAXPATHS]; + int filecount = 0; + bool use_buffer = FALSE; + char tc_buf[1024]; + char pathbuf[PATH_MAX]; + + termpaths[filecount] = 0; + if ((tc = getenv("TERMCAP")) != 0) { + if (is_pathname(tc)) { /* interpret as a filename */ + ADD_TC(tc, 0); + } else if (_nc_name_match(tc, tn, "|:")) { /* treat as a capability file */ + use_buffer = TRUE; + (void) sprintf(tc_buf, "%.*s\n", (int) sizeof(tc_buf) - 2, tc); + } else if ((tc = getenv("TERMPATH")) != 0) { + char *cp; + + for (cp = tc; *cp; cp++) { + if (*cp == ':') + *cp = '\0'; + else if (cp == tc || cp[-1] == '\0') { + ADD_TC(cp, filecount); } + } } - else /* normal case */ - { - char envhome[PATH_MAX], *h; + } else { /* normal case */ + char envhome[PATH_MAX], *h; - filecount = 0; + filecount = 0; - /* - * Probably /etc/termcap is a symlink to /usr/share/misc/termcap. - * Avoid reading the same file twice. - */ - if (_nc_access("/etc/termcap", F_OK) == 0) - ADD_TC("/etc/termcap", filecount); - else - ADD_TC("/usr/share/misc/termcap", filecount); + /* + * Probably /etc/termcap is a symlink to /usr/share/misc/termcap. + * Avoid reading the same file twice. + */ + if (_nc_access("/etc/termcap", F_OK) == 0) + ADD_TC("/etc/termcap", filecount); + else + ADD_TC("/usr/share/misc/termcap", filecount); #define PRIVATE_CAP "%s/.termcap" - if ((h = getenv("HOME")) != NULL - && (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) - { - /* user's .termcap, if any, should override it */ - (void) strcpy(envhome, h); - (void) sprintf(pathbuf, PRIVATE_CAP, envhome); - ADD_TC(pathbuf, filecount); - } + if ((h = getenv("HOME")) != NULL + && (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) { + /* user's .termcap, if any, should override it */ + (void) strcpy(envhome, h); + (void) sprintf(pathbuf, PRIVATE_CAP, envhome); + ADD_TC(pathbuf, filecount); } + } - /* parse the sources */ - if (use_buffer) - { - _nc_set_source("TERMCAP"); + /* parse the sources */ + if (use_buffer) { + _nc_set_source("TERMCAP"); - /* - * We don't suppress warning messages here. The presumption is - * that since it's just a single entry, they won't be a pain. - */ - _nc_read_entry_source((FILE *)0, tc_buf, FALSE, FALSE, NULLHOOK); - } else { - int i; + /* + * We don't suppress warning messages here. The presumption is + * that since it's just a single entry, they won't be a pain. + */ + _nc_read_entry_source((FILE *) 0, tc_buf, FALSE, FALSE, NULLHOOK); + } else { + int i; - for (i = 0; i < filecount; i++) { + for (i = 0; i < filecount; i++) { - T(("Looking for %s in %s", tn, termpaths[i])); - if ((fp = fopen(termpaths[i], "r")) != (FILE *)0) - { - _nc_set_source(termpaths[i]); + T(("Looking for %s in %s", tn, termpaths[i])); + if ((fp = fopen(termpaths[i], "r")) != (FILE *) 0) { + _nc_set_source(termpaths[i]); - /* - * Suppress warning messages. Otherwise you - * get 400 lines of crap from archaic termcap - * files as ncurses complains about all the - * obsolete capabilities. - */ - _nc_read_entry_source(fp, (char*)0, FALSE, TRUE, NULLHOOK); + /* + * Suppress warning messages. Otherwise you get 400 lines of + * crap from archaic termcap files as ncurses complains about + * all the obsolete capabilities. + */ + _nc_read_entry_source(fp, (char *) 0, FALSE, TRUE, NULLHOOK); - (void) fclose(fp); - } - } + (void) fclose(fp); + } } + } #endif /* USE_GETCAP */ - if (_nc_head == 0) - return(ERR); + if (_nc_head == 0) + return (ERR); - /* resolve all use references */ - _nc_resolve_uses(); + /* resolve all use references */ + _nc_resolve_uses(TRUE); - /* find a terminal matching tn, if we can */ + /* find a terminal matching tn, if we can */ #if USE_GETCAP_CACHE - if (getcwd(cwd_buf, sizeof(cwd_buf)) != 0) - { - _nc_set_writedir((char *)0); /* note: this does a chdir */ + if (getcwd(cwd_buf, sizeof(cwd_buf)) != 0) { + _nc_set_writedir((char *) 0); /* note: this does a chdir */ #endif - for_entry_list(ep) { - if (_nc_name_match(ep->tterm.term_names, tn, "|:")) - { - /* - * Make a local copy of the terminal - * capabilities. Free all entry storage except - * the string table for the loaded type (which - * we disconnected from the list by NULLing out - * ep->tterm.str_table above). - */ - *tp = ep->tterm; - ep->tterm.str_table = (char *)0; - - /* - * OK, now try to write the type to user's - * terminfo directory. Next time he loads - * this, it will come through terminfo. - * - * Advantage: Second and subsequent fetches of - * this entry will be very fast. - * - * Disadvantage: After the first time a - * termcap type is loaded by its user, editing - * it in the /etc/termcap file, or in TERMCAP, - * or in a local ~/.termcap, will be - * ineffective unless the terminfo entry is - * explicitly removed. - */ + for_entry_list(ep) { + if (_nc_name_match(ep->tterm.term_names, tn, "|:")) { + /* + * Make a local copy of the terminal capabilities. Free all + * entry storage except the string table for the loaded type + * (which we disconnected from the list by NULLing out + * ep->tterm.str_table above). + */ + *tp = ep->tterm; + ep->tterm.str_table = (char *) 0; + + /* + * OK, now try to write the type to user's terminfo directory. + * Next time he loads this, it will come through terminfo. + * + * Advantage: Second and subsequent fetches of this entry will + * be very fast. + * + * Disadvantage: After the first time a termcap type is loaded + * by its user, editing it in the /etc/termcap file, or in + * TERMCAP, or in a local ~/.termcap, will be ineffective + * unless the terminfo entry is explicitly removed. + */ #if USE_GETCAP_CACHE - (void) _nc_write_entry(tp); + (void) _nc_write_entry(tp); #endif - found = TRUE; - break; - } - } -#if USE_GETCAP_CACHE - chdir(cwd_buf); + found = TRUE; + break; + } } +#if USE_GETCAP_CACHE + chdir(cwd_buf); + } #endif - _nc_free_entries(_nc_head); - return(found); + _nc_free_entries(_nc_head); + return (found); } #else -extern void _nc_read_termcap(void); - void _nc_read_termcap(void) { } -#endif /* PURE_TERMINFO */ +extern void _nc_read_termcap(void); +void +_nc_read_termcap(void) +{ +} +#endif /* PURE_TERMINFO */ diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index 4829fa93..12aedd6e 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,8 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * write_entry.c -- write a terminfo structure onto the file system */ @@ -51,28 +49,29 @@ #if 0 #define TRACE_OUT(p) DEBUG(2, p) #else -#define TRACE_OUT(p) /*nothing*/ +#define TRACE_OUT(p) /*nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.47 1999/07/10 20:29:22 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.52 2000/03/11 12:23:42 tom Exp $") static int total_written; static int write_object(FILE *, TERMTYPE *); -static void write_file(char *filename, TERMTYPE *tp) +static void +write_file(char *filename, TERMTYPE * tp) { - FILE *fp = (_nc_access(filename, W_OK) == 0) ? fopen(filename, "wb") : 0; - if (fp == 0) { - perror(filename); - _nc_syserr_abort("can't open %s/%s", _nc_tic_dir(0), filename); - } - DEBUG(1, ("Created %s", filename)); + FILE *fp = (_nc_access(filename, W_OK) == 0) ? fopen(filename, "wb") : 0; + if (fp == 0) { + perror(filename); + _nc_syserr_abort("can't open %s/%s", _nc_tic_dir(0), filename); + } + DEBUG(1, ("Created %s", filename)); - if (write_object(fp, tp) == ERR) { - _nc_syserr_abort("error writing %s/%s", _nc_tic_dir(0), filename); - } - fclose(fp); + if (write_object(fp, tp) == ERR) { + _nc_syserr_abort("error writing %s/%s", _nc_tic_dir(0), filename); + } + fclose(fp); } /* @@ -80,36 +79,38 @@ static void write_file(char *filename, TERMTYPE *tp) * * Make a directory if it doesn't exist. */ -static int make_directory(const char *path) +static int +make_directory(const char *path) { -int rc; -struct stat statbuf; -char fullpath[PATH_MAX]; -const char *destination = _nc_tic_dir(0); - - if (path == destination || *path == '/') { - if (strlen(path) + 1 > sizeof(fullpath)) - return(-1); - (void)strcpy(fullpath, path); - } else { - if (strlen(destination) + strlen(path) + 2 > sizeof(fullpath)) - return(-1); - (void)sprintf(fullpath, "%s/%s", destination, path); - } + int rc; + struct stat statbuf; + char fullpath[PATH_MAX]; + const char *destination = _nc_tic_dir(0); + + if (path == destination || *path == '/') { + if (strlen(path) + 1 > sizeof(fullpath)) + return (-1); + (void) strcpy(fullpath, path); + } else { + if (strlen(destination) + strlen(path) + 2 > sizeof(fullpath)) + return (-1); + (void) sprintf(fullpath, "%s/%s", destination, path); + } - if ((rc = stat(path, &statbuf)) < 0) { - rc = mkdir(path, 0777); - } else { - if (_nc_access(path, R_OK|W_OK|X_OK) < 0) { - rc = -1; /* permission denied */ - } else if (!(S_ISDIR(statbuf.st_mode))) { - rc = -1; /* not a directory */ - } + if ((rc = stat(path, &statbuf)) < 0) { + rc = mkdir(path, 0777); + } else { + if (_nc_access(path, R_OK | W_OK | X_OK) < 0) { + rc = -1; /* permission denied */ + } else if (!(S_ISDIR(statbuf.st_mode))) { + rc = -1; /* not a directory */ } - return rc; + } + return rc; } -void _nc_set_writedir(char *dir) +void +_nc_set_writedir(char *dir) /* set the write directory for compiled entries */ { const char *destination; @@ -121,15 +122,14 @@ void _nc_set_writedir(char *dir) (void) _nc_tic_dir(getenv("TERMINFO")); destination = _nc_tic_dir(0); - if (make_directory(destination) < 0) - { - char *home = _nc_home_terminfo(); + if (make_directory(destination) < 0) { + char *home = _nc_home_terminfo(); if (home != 0) { destination = home; if (make_directory(destination) < 0) _nc_err_abort("%s: permission denied (errno %d)", - destination, errno); + destination, errno); } } @@ -138,7 +138,7 @@ void _nc_set_writedir(char *dir) * *once only* per run. */ if (chdir(_nc_tic_dir(destination)) < 0 - || getcwd(actual, sizeof(actual)) == 0) + || getcwd(actual, sizeof(actual)) == 0) _nc_err_abort("%s: not a directory", destination); _nc_keep_tic_dir(strdup(actual)); } @@ -155,27 +155,28 @@ void _nc_set_writedir(char *dir) * */ -static void check_writeable(int code) +static void +check_writeable(int code) { -static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -static bool verified[sizeof(dirnames)]; + static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + static bool verified[sizeof(dirnames)]; -char dir[2]; -char *s; + char dir[2]; + char *s; - if (code == 0 || (s = strchr(dirnames, code)) == 0) - _nc_err_abort("Illegal terminfo subdirectory \"%c\"", code); + if (code == 0 || (s = strchr(dirnames, code)) == 0) + _nc_err_abort("Illegal terminfo subdirectory \"%c\"", code); - if (verified[s-dirnames]) - return; + if (verified[s - dirnames]) + return; - dir[0] = code; - dir[1] = '\0'; - if (make_directory(dir) < 0) { - _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir); - } + dir[0] = code; + dir[1] = '\0'; + if (make_directory(dir) < 0) { + _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir); + } - verified[s-dirnames] = TRUE; + verified[s - dirnames] = TRUE; } /* @@ -200,163 +201,159 @@ char *s; * _nc_curr_line is properly set before the write_entry() call. */ -void _nc_write_entry(TERMTYPE *const tp) +void +_nc_write_entry(TERMTYPE * const tp) { -struct stat statbuf; -char name_list[MAX_TERMINFO_LENGTH]; -char *first_name, *other_names; -char *ptr; -char filename[PATH_MAX]; -char linkname[PATH_MAX]; + struct stat statbuf; + char name_list[MAX_TERMINFO_LENGTH]; + char *first_name, *other_names; + char *ptr; + char filename[PATH_MAX]; + char linkname[PATH_MAX]; #if USE_SYMLINKS -char symlinkname[PATH_MAX]; + char symlinkname[PATH_MAX]; #endif /* USE_SYMLINKS */ -static int call_count; -static time_t start_time; /* time at start of writes */ + static int call_count; + static time_t start_time; /* time at start of writes */ - if (call_count++ == 0) { - start_time = 0; - } + if (call_count++ == 0) { + start_time = 0; + } - (void) strcpy(name_list, tp->term_names); - DEBUG(7, ("Name list = '%s'", name_list)); + (void) strcpy(name_list, tp->term_names); + DEBUG(7, ("Name list = '%s'", name_list)); - first_name = name_list; + first_name = name_list; - ptr = &name_list[strlen(name_list) - 1]; - other_names = ptr + 1; + ptr = &name_list[strlen(name_list) - 1]; + other_names = ptr + 1; - while (ptr > name_list && *ptr != '|') - ptr--; + while (ptr > name_list && *ptr != '|') + ptr--; - if (ptr != name_list) { - *ptr = '\0'; + if (ptr != name_list) { + *ptr = '\0'; - for (ptr = name_list; *ptr != '\0' && *ptr != '|'; ptr++) - continue; + for (ptr = name_list; *ptr != '\0' && *ptr != '|'; ptr++) + continue; - if (*ptr == '\0') - other_names = ptr; - else { - *ptr = '\0'; - other_names = ptr + 1; - } + if (*ptr == '\0') + other_names = ptr; + else { + *ptr = '\0'; + other_names = ptr + 1; } + } - DEBUG(7, ("First name = '%s'", first_name)); - DEBUG(7, ("Other names = '%s'", other_names)); + DEBUG(7, ("First name = '%s'", first_name)); + DEBUG(7, ("Other names = '%s'", other_names)); - _nc_set_type(first_name); + _nc_set_type(first_name); - if (strlen(first_name) > sizeof(filename)-3) - _nc_warning("terminal name too long."); + if (strlen(first_name) > sizeof(filename) - 3) + _nc_warning("terminal name too long."); - sprintf(filename, "%c/%s", first_name[0], first_name); + sprintf(filename, "%c/%s", first_name[0], first_name); - /* - * Has this primary name been written since the first call to - * write_entry()? If so, the newer write will step on the older, - * so warn the user. - */ - if (start_time > 0 && - stat(filename, &statbuf) >= 0 - && statbuf.st_mtime >= start_time) - { - _nc_warning("name multiply defined."); + /* + * Has this primary name been written since the first call to + * write_entry()? If so, the newer write will step on the older, + * so warn the user. + */ + if (start_time > 0 && + stat(filename, &statbuf) >= 0 + && statbuf.st_mtime >= start_time) { + _nc_warning("name multiply defined."); + } + + check_writeable(first_name[0]); + write_file(filename, tp); + + if (start_time == 0) { + if (stat(filename, &statbuf) < 0 + || (start_time = statbuf.st_mtime) == 0) { + _nc_syserr_abort("error obtaining time from %s/%s", + _nc_tic_dir(0), filename); } + } + while (*other_names != '\0') { + ptr = other_names++; + while (*other_names != '|' && *other_names != '\0') + other_names++; - check_writeable(first_name[0]); - write_file(filename, tp); + if (*other_names != '\0') + *(other_names++) = '\0'; - if (start_time == 0) { - if (stat(filename, &statbuf) < 0 - || (start_time = statbuf.st_mtime) == 0) { - _nc_syserr_abort("error obtaining time from %s/%s", - _nc_tic_dir(0), filename); - } + if (strlen(ptr) > sizeof(linkname) - 3) { + _nc_warning("terminal alias %s too long.", ptr); + continue; } - while (*other_names != '\0') { - ptr = other_names++; - while (*other_names != '|' && *other_names != '\0') - other_names++; - - if (*other_names != '\0') - *(other_names++) = '\0'; - - if (strlen(ptr) > sizeof(linkname)-3) { - _nc_warning("terminal alias %s too long.", ptr); - continue; - } - if (strchr(ptr, '/') != 0) { - _nc_warning("cannot link alias %s.", ptr); - continue; - } - - check_writeable(ptr[0]); - sprintf(linkname, "%c/%s", ptr[0], ptr); - - if (strcmp(filename, linkname) == 0) { - _nc_warning("self-synonym ignored"); - } - else if (stat(linkname, &statbuf) >= 0 && - statbuf.st_mtime < start_time) - { - _nc_warning("alias %s multiply defined.", ptr); - } - else if (_nc_access(linkname, W_OK) == 0) + if (strchr(ptr, '/') != 0) { + _nc_warning("cannot link alias %s.", ptr); + continue; + } + + check_writeable(ptr[0]); + sprintf(linkname, "%c/%s", ptr[0], ptr); + + if (strcmp(filename, linkname) == 0) { + _nc_warning("self-synonym ignored"); + } else if (stat(linkname, &statbuf) >= 0 && + statbuf.st_mtime < start_time) { + _nc_warning("alias %s multiply defined.", ptr); + } else if (_nc_access(linkname, W_OK) == 0) #if HAVE_LINK - { - int code; + { + int code; #if USE_SYMLINKS - strcpy(symlinkname, "../"); - strncat(symlinkname, filename, sizeof(symlinkname) - 4); - symlinkname[sizeof(symlinkname) - 1] = '\0'; + strcpy(symlinkname, "../"); + strncat(symlinkname, filename, sizeof(symlinkname) - 4); + symlinkname[sizeof(symlinkname) - 1] = '\0'; #endif /* USE_SYMLINKS */ #if HAVE_REMOVE - code = remove(linkname); + code = remove(linkname); #else - code = unlink(linkname); + code = unlink(linkname); #endif - if (code != 0 && errno == ENOENT) - code = 0; + if (code != 0 && errno == ENOENT) + code = 0; #if USE_SYMLINKS - if (symlink(symlinkname, linkname) < 0) + if (symlink(symlinkname, linkname) < 0) #else - if (link(filename, linkname) < 0) + if (link(filename, linkname) < 0) #endif /* USE_SYMLINKS */ - { - /* - * If there wasn't anything there, and we cannot - * link to the target because it is the same as the - * target, then the source must be on a filesystem - * that uses caseless filenames, such as Win32, etc. - */ - if (code == 0 && errno == EEXIST) - _nc_warning("can't link %s to %s", filename, linkname); - else if (code == 0 && errno == EPERM) - write_file(linkname, tp); - else - _nc_syserr_abort("can't link %s to %s", filename, linkname); - } - else - { - DEBUG(1, ("Linked %s", linkname)); - } - } + { + /* + * If there wasn't anything there, and we cannot + * link to the target because it is the same as the + * target, then the source must be on a filesystem + * that uses caseless filenames, such as Win32, etc. + */ + if (code == 0 && errno == EEXIST) + _nc_warning("can't link %s to %s", filename, linkname); + else if (code == 0 && errno == EPERM) + write_file(linkname, tp); + else + _nc_syserr_abort("can't link %s to %s", filename, linkname); + } else { + DEBUG(1, ("Linked %s", linkname)); + } + } #else /* just make copies */ - write_file(linkname, tp); + write_file(linkname, tp); #endif /* HAVE_LINK */ - } + } } -#undef LITTLE_ENDIAN /* BSD/OS defines this as a feature macro */ +#undef LITTLE_ENDIAN /* BSD/OS defines this as a feature macro */ #define HI(x) ((x) / 256) #define LO(x) ((x) % 256) #define LITTLE_ENDIAN(p, x) (p)[0] = LO(x), (p)[1] = HI(x) #define WRITE_STRING(str) (fwrite(str, sizeof(char), strlen(str) + 1, fp) == strlen(str) + 1) -static int compute_offsets(char **Strings, int strmax, short *offsets) +static int +compute_offsets(char **Strings, int strmax, short *offsets) { size_t nextfree = 0; int i; @@ -375,17 +372,18 @@ static int compute_offsets(char **Strings, int strmax, short *offsets) return nextfree; } -static void convert_shorts(unsigned char *buf, short *Numbers, int count) +static void +convert_shorts(unsigned char *buf, short *Numbers, int count) { int i; for (i = 0; i < count; i++) { - if (Numbers[i] == -1) { /* HI/LO won't work */ - buf[2*i] = buf[2*i + 1] = 0377; - } else if (Numbers[i] == -2) { /* HI/LO won't work */ - buf[2*i] = 0376; - buf[2*i + 1] = 0377; + if (Numbers[i] == ABSENT_NUMERIC) { /* HI/LO won't work */ + buf[2 * i] = buf[2 * i + 1] = 0377; + } else if (Numbers[i] == CANCELLED_NUMERIC) { /* HI/LO won't work */ + buf[2 * i] = 0376; + buf[2 * i + 1] = 0377; } else { - LITTLE_ENDIAN(buf + 2*i, Numbers[i]); + LITTLE_ENDIAN(buf + 2 * i, Numbers[i]); TRACE_OUT(("put Numbers[%d]=%d", i, Numbers[i])); } } @@ -394,164 +392,188 @@ static void convert_shorts(unsigned char *buf, short *Numbers, int count) #define even_boundary(value) \ ((value) % 2 != 0 && fwrite(&zero, sizeof(char), 1, fp) != 1) -static int write_object(FILE *fp, TERMTYPE *tp) +static int +write_object(FILE * fp, TERMTYPE * tp) { -char *namelist; -size_t namelen, boolmax, nummax, strmax; -char zero = '\0'; -size_t i; -short nextfree; -short offsets[MAX_ENTRY_SIZE/2]; -unsigned char buf[MAX_ENTRY_SIZE]; + char *namelist; + size_t namelen, boolmax, nummax, strmax; + char zero = '\0'; + size_t i; + short nextfree; + short offsets[MAX_ENTRY_SIZE / 2]; + unsigned char buf[MAX_ENTRY_SIZE]; + unsigned last_bool = BOOLWRITE; + unsigned last_num = NUMWRITE; + unsigned last_str = STRWRITE; - namelist = tp->term_names; - namelen = strlen(namelist) + 1; +#if NCURSES_XNAMES + /* + * Normally we limit the list of values to exclude the "obsolete" + * capabilities. However, if we are accepting extended names, add + * these as well, since they are used for supporting translation + * to/from termcap. + */ + if (_nc_user_definable) { + last_bool = BOOLCOUNT; + last_num = NUMCOUNT; + last_str = STRCOUNT; + } +#endif - /* - * BOOLWRITE, etc., are less than BOOLCOUNT because we store some - * values internally. - */ - boolmax = 0; - for (i = 0; i < BOOLWRITE; i++) { - if (tp->Booleans[i]) - boolmax = i+1; - } + namelist = tp->term_names; + namelen = strlen(namelist) + 1; - nummax = 0; - for (i = 0; i < NUMWRITE; i++) { - if (tp->Numbers[i] != ABSENT_NUMERIC) - nummax = i+1; - } + boolmax = 0; + for (i = 0; i < last_bool; i++) { + if (tp->Booleans[i] == TRUE) + boolmax = i + 1; + } - strmax = 0; - for (i = 0; i < STRWRITE; i++) { - if (tp->Strings[i] != ABSENT_STRING) - strmax = i+1; - } + nummax = 0; + for (i = 0; i < last_num; i++) { + if (tp->Numbers[i] != ABSENT_NUMERIC) + nummax = i + 1; + } - nextfree = compute_offsets(tp->Strings, strmax, offsets); + strmax = 0; + for (i = 0; i < last_str; i++) { + if (tp->Strings[i] != ABSENT_STRING) + strmax = i + 1; + } - /* fill in the header */ - LITTLE_ENDIAN(buf, MAGIC); - LITTLE_ENDIAN(buf+2, min(namelen, MAX_NAME_SIZE + 1)); - LITTLE_ENDIAN(buf+4, boolmax); - LITTLE_ENDIAN(buf+6, nummax); - LITTLE_ENDIAN(buf+8, strmax); - LITTLE_ENDIAN(buf+10, nextfree); + nextfree = compute_offsets(tp->Strings, strmax, offsets); - /* write out the header */ - TRACE_OUT(("Header of %s @%ld", namelist, ftell(fp))); - if (fwrite(buf, 12, 1, fp) != 1 - || fwrite(namelist, sizeof(char), namelen, fp) != namelen - || fwrite(tp->Booleans, sizeof(char), boolmax, fp) != boolmax) - return(ERR); + /* fill in the header */ + LITTLE_ENDIAN(buf, MAGIC); + LITTLE_ENDIAN(buf + 2, min(namelen, MAX_NAME_SIZE + 1)); + LITTLE_ENDIAN(buf + 4, boolmax); + LITTLE_ENDIAN(buf + 6, nummax); + LITTLE_ENDIAN(buf + 8, strmax); + LITTLE_ENDIAN(buf + 10, nextfree); - if (even_boundary(namelen+boolmax)) - return(ERR); + /* write out the header */ + TRACE_OUT(("Header of %s @%ld", namelist, ftell(fp))); + if (fwrite(buf, 12, 1, fp) != 1 + || fwrite(namelist, sizeof(char), namelen, fp) != namelen) + return (ERR); - TRACE_OUT(("Numerics begin at %04lx", ftell(fp))); + for (i = 0; i < boolmax; i++) + if (tp->Booleans[i] == TRUE) + buf[i] = TRUE; + else + buf[i] = FALSE; + if (fwrite(buf, sizeof(char), boolmax, fp) != boolmax) + return (ERR); - /* the numerics */ - convert_shorts(buf, tp->Numbers, nummax); - if (fwrite(buf, 2, nummax, fp) != nummax) - return(ERR); + if (even_boundary(namelen + boolmax)) + return (ERR); - TRACE_OUT(("String offsets begin at %04lx", ftell(fp))); + TRACE_OUT(("Numerics begin at %04lx", ftell(fp))); - /* the string offsets */ - convert_shorts(buf, offsets, strmax); - if (fwrite(buf, 2, strmax, fp) != strmax) - return(ERR); + /* the numerics */ + convert_shorts(buf, tp->Numbers, nummax); + if (fwrite(buf, 2, nummax, fp) != nummax) + return (ERR); - TRACE_OUT(("String table begins at %04lx", ftell(fp))); + TRACE_OUT(("String offsets begin at %04lx", ftell(fp))); - /* the strings */ - for (i = 0; i < strmax; i++) - if (VALID_STRING(tp->Strings[i])) - if (!WRITE_STRING(tp->Strings[i])) - return(ERR); + /* the string offsets */ + convert_shorts(buf, offsets, strmax); + if (fwrite(buf, 2, strmax, fp) != strmax) + return (ERR); + + TRACE_OUT(("String table begins at %04lx", ftell(fp))); + + /* the strings */ + for (i = 0; i < strmax; i++) + if (VALID_STRING(tp->Strings[i])) + if (!WRITE_STRING(tp->Strings[i])) + return (ERR); #if NCURSES_XNAMES - if (NUM_EXT_NAMES(tp)) { - unsigned extcnt = NUM_EXT_NAMES(tp); - - if (even_boundary(nextfree)) - return(ERR); - - nextfree = compute_offsets(tp->Strings + STRCOUNT, tp->ext_Strings, offsets); - TRACE_OUT(("after extended string capabilities, nextfree=%d", nextfree)); - nextfree += compute_offsets(tp->ext_Names, extcnt, offsets + tp->ext_Strings); - TRACE_OUT(("after extended capnames, nextfree=%d", nextfree)); - strmax = tp->ext_Strings + extcnt; - - /* - * Write the extended header - */ - LITTLE_ENDIAN(buf+0, tp->ext_Booleans); - LITTLE_ENDIAN(buf+2, tp->ext_Numbers); - LITTLE_ENDIAN(buf+4, tp->ext_Strings); - LITTLE_ENDIAN(buf+6, strmax); - LITTLE_ENDIAN(buf+8, nextfree); - TRACE_OUT(("WRITE extended-header @%ld", ftell(fp))); - if (fwrite(buf, 10, 1, fp) != 1) - return(ERR); - - TRACE_OUT(("WRITE %d booleans @%ld", tp->ext_Booleans, ftell(fp))); - if (tp->ext_Booleans - && fwrite(tp->Booleans + BOOLCOUNT, sizeof(char), tp->ext_Booleans, fp) != tp->ext_Booleans) - return(ERR); - - if (even_boundary(tp->ext_Booleans)) - return(ERR); - - TRACE_OUT(("WRITE %d numbers @%ld", tp->ext_Numbers, ftell(fp))); - if (tp->ext_Numbers) { - convert_shorts(buf, tp->Numbers + NUMCOUNT, tp->ext_Numbers); - if (fwrite(buf, 2, tp->ext_Numbers, fp) != tp->ext_Numbers) - return(ERR); - } + if (NUM_EXT_NAMES(tp)) { + unsigned extcnt = NUM_EXT_NAMES(tp); - /* - * Convert the offsets for the ext_Strings and ext_Names tables, - * in that order. - */ - convert_shorts(buf, offsets, strmax); - TRACE_OUT(("WRITE offsets @%ld", ftell(fp))); - if (fwrite(buf, 2, strmax, fp) != strmax) - return(ERR); - - /* - * Write the string table after the offset tables so we do not - * have to do anything about alignment. - */ - for (i = 0; i < tp->ext_Strings; i++) { - if (VALID_STRING(tp->Strings[i+STRCOUNT])) { - TRACE_OUT(("WRITE ext_Strings[%d]=%s", i, _nc_visbuf(tp->Strings[i+STRCOUNT]))); - if (!WRITE_STRING(tp->Strings[i+STRCOUNT])) - return(ERR); - } - } + if (even_boundary(nextfree)) + return (ERR); - /* - * Write the extended names - */ - for (i = 0; i < extcnt; i++) { - TRACE_OUT(("WRITE ext_Names[%d]=%s", i, tp->ext_Names[i])); - if (!WRITE_STRING(tp->ext_Names[i])) - return(ERR); + nextfree = compute_offsets(tp->Strings + STRCOUNT, tp->ext_Strings, offsets); + TRACE_OUT(("after extended string capabilities, nextfree=%d", nextfree)); + nextfree += compute_offsets(tp->ext_Names, extcnt, offsets + tp->ext_Strings); + TRACE_OUT(("after extended capnames, nextfree=%d", nextfree)); + strmax = tp->ext_Strings + extcnt; + + /* + * Write the extended header + */ + LITTLE_ENDIAN(buf + 0, tp->ext_Booleans); + LITTLE_ENDIAN(buf + 2, tp->ext_Numbers); + LITTLE_ENDIAN(buf + 4, tp->ext_Strings); + LITTLE_ENDIAN(buf + 6, strmax); + LITTLE_ENDIAN(buf + 8, nextfree); + TRACE_OUT(("WRITE extended-header @%ld", ftell(fp))); + if (fwrite(buf, 10, 1, fp) != 1) + return (ERR); + + TRACE_OUT(("WRITE %d booleans @%ld", tp->ext_Booleans, ftell(fp))); + if (tp->ext_Booleans + && fwrite(tp->Booleans + BOOLCOUNT, sizeof(char), + tp->ext_Booleans, fp) != tp->ext_Booleans) + return (ERR); + + if (even_boundary(tp->ext_Booleans)) + return (ERR); + + TRACE_OUT(("WRITE %d numbers @%ld", tp->ext_Numbers, ftell(fp))); + if (tp->ext_Numbers) { + convert_shorts(buf, tp->Numbers + NUMCOUNT, tp->ext_Numbers); + if (fwrite(buf, 2, tp->ext_Numbers, fp) != tp->ext_Numbers) + return (ERR); + } + + /* + * Convert the offsets for the ext_Strings and ext_Names tables, + * in that order. + */ + convert_shorts(buf, offsets, strmax); + TRACE_OUT(("WRITE offsets @%ld", ftell(fp))); + if (fwrite(buf, 2, strmax, fp) != strmax) + return (ERR); + + /* + * Write the string table after the offset tables so we do not + * have to do anything about alignment. + */ + for (i = 0; i < tp->ext_Strings; i++) { + if (VALID_STRING(tp->Strings[i + STRCOUNT])) { + TRACE_OUT(("WRITE ext_Strings[%d]=%s", i, + _nc_visbuf(tp->Strings[i + STRCOUNT]))); + if (!WRITE_STRING(tp->Strings[i + STRCOUNT])) + return (ERR); } + } + /* + * Write the extended names + */ + for (i = 0; i < extcnt; i++) { + TRACE_OUT(("WRITE ext_Names[%d]=%s", i, tp->ext_Names[i])); + if (!WRITE_STRING(tp->ext_Names[i])) + return (ERR); } + + } #endif /* NCURSES_XNAMES */ - total_written++; - return(OK); + total_written++; + return (OK); } /* * Returns the total number of entries written by this process */ -int _nc_tic_written(void) +int +_nc_tic_written(void) { - return total_written; + return total_written; } diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index aa4b8871..51260aec 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -38,163 +38,179 @@ #include #include -MODULE_ID("$Id: lib_trace.c,v 1.30 1998/10/03 23:41:42 tom Exp $") - #include -#if HAVE_FCNTL_H -#include -#endif + +MODULE_ID("$Id: lib_trace.c,v 1.34 2000/04/01 20:25:47 tom Exp $") unsigned _nc_tracing = 0; /* always define this */ #ifdef TRACE const char *_nc_tputs_trace = ""; -long _nc_outchars; +long _nc_outchars = 0; -static FILE * tracefp; /* default to writing to stderr */ -#endif +static FILE *tracefp; /* default to writing to stderr */ -void trace(const unsigned int tracelevel GCC_UNUSED) +void +trace(const unsigned int tracelevel GCC_UNUSED) { -#ifdef TRACE -static bool been_here = FALSE; -static char my_name[] = "trace"; - - _nc_tracing = tracelevel; - if (! been_here && tracelevel) { - been_here = TRUE; - - if (_nc_access(my_name, W_OK) < 0 - || (tracefp = fopen(my_name, "w")) == 0) { - perror("curses: Can't open 'trace' file: "); - exit(EXIT_FAILURE); - } - /* Try to set line-buffered mode, or (failing that) unbuffered, - * so that the trace-output gets flushed automatically at the - * end of each line. This is useful in case the program dies. - */ -#if HAVE_SETVBUF /* ANSI */ - (void) setvbuf(tracefp, (char *)0, _IOLBF, 0); -#elif HAVE_SETBUF /* POSIX */ - (void) setbuffer(tracefp, (char *)0); -#endif - _tracef("TRACING NCURSES version %s (%d)", - NCURSES_VERSION, NCURSES_VERSION_PATCH); + static bool been_here = FALSE; + static char my_name[] = "trace"; + + _nc_tracing = tracelevel; + if (!been_here && tracelevel) { + been_here = TRUE; + + if (_nc_access(my_name, W_OK) < 0 + || (tracefp = fopen(my_name, "w")) == 0) { + perror("curses: Can't open 'trace' file: "); + exit(EXIT_FAILURE); } + /* Try to set line-buffered mode, or (failing that) unbuffered, + * so that the trace-output gets flushed automatically at the + * end of each line. This is useful in case the program dies. + */ +#if HAVE_SETVBUF /* ANSI */ + (void) setvbuf(tracefp, (char *) 0, _IOLBF, 0); +#elif HAVE_SETBUF /* POSIX */ + (void) setbuffer(tracefp, (char *) 0); #endif + _tracef("TRACING NCURSES version %s (%d)", + NCURSES_VERSION, NCURSES_VERSION_PATCH); + } } +#endif -const char *_nc_visbuf2(int bufnum, const char *buf) +const char * +_nc_visbuf2(int bufnum, const char *buf) /* visibilize a given string */ { -char *vbuf; -char *tp; -int c; - - if (buf == 0) - return("(null)"); - if (buf == CANCELLED_STRING) - return("(cancelled)"); - - tp = vbuf = _nc_trace_buf(bufnum, (strlen(buf) * 4) + 5); - *tp++ = '"'; - while ((c = *buf++) != '\0') { - if (c == '"') { - *tp++ = '\\'; *tp++ = '"'; - } else if (is7bits(c) && (isgraph(c) || c == ' ')) { - *tp++ = c; - } else if (c == '\n') { - *tp++ = '\\'; *tp++ = 'n'; - } else if (c == '\r') { - *tp++ = '\\'; *tp++ = 'r'; - } else if (c == '\b') { - *tp++ = '\\'; *tp++ = 'b'; - } else if (c == '\033') { - *tp++ = '\\'; *tp++ = 'e'; - } else if (is7bits(c) && iscntrl(c)) { - *tp++ = '\\'; *tp++ = '^'; *tp++ = '@' + c; - } else { - sprintf(tp, "\\%03o", c & 0xff); - tp += strlen(tp); - } + char *vbuf; + char *tp; + int c; + + if (buf == 0) + return ("(null)"); + if (buf == CANCELLED_STRING) + return ("(cancelled)"); + +#ifdef TRACE + tp = vbuf = _nc_trace_buf(bufnum, (strlen(buf) * 4) + 5); +#else + { + static char *mybuf[2]; + mybuf[bufnum] = _nc_doalloc(mybuf[bufnum], (strlen(buf) * 4) + 5); + tp = vbuf = mybuf[bufnum]; + } +#endif + *tp++ = '"'; + while ((c = *buf++) != '\0') { + if (c == '"') { + *tp++ = '\\'; + *tp++ = '"'; + } else if (is7bits(c) && (isgraph(c) || c == ' ')) { + *tp++ = c; + } else if (c == '\n') { + *tp++ = '\\'; + *tp++ = 'n'; + } else if (c == '\r') { + *tp++ = '\\'; + *tp++ = 'r'; + } else if (c == '\b') { + *tp++ = '\\'; + *tp++ = 'b'; + } else if (c == '\033') { + *tp++ = '\\'; + *tp++ = 'e'; + } else if (is7bits(c) && iscntrl(c)) { + *tp++ = '\\'; + *tp++ = '^'; + *tp++ = '@' + c; + } else { + sprintf(tp, "\\%03o", c & 0xff); + tp += strlen(tp); } - *tp++ = '"'; - *tp++ = '\0'; - return(vbuf); + } + *tp++ = '"'; + *tp++ = '\0'; + return (vbuf); } -const char *_nc_visbuf(const char *buf) +const char * +_nc_visbuf(const char *buf) { - return _nc_visbuf2(0, buf); + return _nc_visbuf2(0, buf); } #ifdef TRACE void -_tracef(const char *fmt, ...) +_tracef(const char *fmt,...) { -static const char Called[] = T_CALLED(""); -static const char Return[] = T_RETURN(""); -static int level; -va_list ap; -bool before = FALSE; -bool after = FALSE; -int doit = _nc_tracing; -int save_err = errno; - - if (strlen(fmt) >= sizeof(Called) - 1) { - if (!strncmp(fmt, Called, sizeof(Called)-1)) { - before = TRUE; - level++; - } else if (!strncmp(fmt, Return, sizeof(Return)-1)) { - after = TRUE; - } - if (before || after) { - if ((level <= 1) - || (doit & TRACE_ICALLS) != 0) - doit &= (TRACE_CALLS|TRACE_CCALLS); - else - doit = 0; - } + static const char Called[] = T_CALLED(""); + static const char Return[] = T_RETURN(""); + static int level; + va_list ap; + bool before = FALSE; + bool after = FALSE; + int doit = _nc_tracing; + int save_err = errno; + + if (strlen(fmt) >= sizeof(Called) - 1) { + if (!strncmp(fmt, Called, sizeof(Called) - 1)) { + before = TRUE; + level++; + } else if (!strncmp(fmt, Return, sizeof(Return) - 1)) { + after = TRUE; } - - if (doit != 0) { - if (tracefp == 0) - tracefp = stderr; - if (before || after) { - int n; - for (n = 1; n < level; n++) - fputs("+ ", tracefp); - } - va_start(ap, fmt); - vfprintf(tracefp, fmt, ap); - fputc('\n', tracefp); - va_end(ap); - fflush(tracefp); + if (before || after) { + if ((level <= 1) + || (doit & TRACE_ICALLS) != 0) + doit &= (TRACE_CALLS | TRACE_CCALLS); + else + doit = 0; } - - if (after && level) - level--; - errno = save_err; + } + + if (doit != 0) { + if (tracefp == 0) + tracefp = stderr; + if (before || after) { + int n; + for (n = 1; n < level; n++) + fputs("+ ", tracefp); + } + va_start(ap, fmt); + vfprintf(tracefp, fmt, ap); + fputc('\n', tracefp); + va_end(ap); + fflush(tracefp); + } + + if (after && level) + level--; + errno = save_err; } /* Trace 'int' return-values */ -int _nc_retrace_int(int code) +int +_nc_retrace_int(int code) { - T((T_RETURN("%d"), code)); - return code; + T((T_RETURN("%d"), code)); + return code; } /* Trace 'char*' return-values */ -char * _nc_retrace_ptr(char * code) +char * +_nc_retrace_ptr(char *code) { - T((T_RETURN("%s"), _nc_visbuf(code))); - return code; + T((T_RETURN("%s"), _nc_visbuf(code))); + return code; } /* Trace 'WINDOW *' return-values */ -WINDOW *_nc_retrace_win(WINDOW *code) +WINDOW * +_nc_retrace_win(WINDOW *code) { - T((T_RETURN("%p"), code)); - return code; + T((T_RETURN("%p"), code)); + return code; } #endif /* TRACE */ diff --git a/ncurses/trace/lib_tracebits.c b/ncurses/trace/lib_tracebits.c index a92e00a8..6dbb2f79 100644 --- a/ncurses/trace/lib_tracebits.c +++ b/ncurses/trace/lib_tracebits.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,21 +32,20 @@ ****************************************************************************/ #include -#include /* cur_term */ +#include /* cur_term */ -MODULE_ID("$Id: lib_tracebits.c,v 1.3 1999/08/21 21:43:48 tom Exp $") +MODULE_ID("$Id: lib_tracebits.c,v 1.5 2000/02/13 01:01:55 tom Exp $") #if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE) #define _POSIX_SOURCE #endif #if HAVE_SYS_TERMIO_H -#include /* needed for ISC */ +#include /* needed for ISC */ #endif #ifdef __EMX__ #include -#include #endif /* may be undefined if we're using termio.h */ @@ -59,90 +58,89 @@ MODULE_ID("$Id: lib_tracebits.c,v 1.3 1999/08/21 21:43:48 tom Exp $") #ifdef TRACE -typedef struct {unsigned int val; const char *name;} BITNAMES; +typedef struct { + unsigned int val; + const char *name; +} BITNAMES; -static void lookup_bits(char *buf, const BITNAMES *table, const char *label, unsigned int val) +static void +lookup_bits(char *buf, const BITNAMES * table, const char *label, unsigned int val) { - const BITNAMES *sp; - - (void) strcat(buf, label); - (void) strcat(buf, ": {"); - for (sp = table; sp->name; sp++) - if (sp->val != 0 - && (val & sp->val) == sp->val) - { - (void) strcat(buf, sp->name); - (void) strcat(buf, ", "); - } - if (buf[strlen(buf) - 2] == ',') - buf[strlen(buf) - 2] = '\0'; - (void) strcat(buf,"} "); + const BITNAMES *sp; + + (void) strcat(buf, label); + (void) strcat(buf, ": {"); + for (sp = table; sp->name; sp++) + if (sp->val != 0 + && (val & sp->val) == sp->val) { + (void) strcat(buf, sp->name); + (void) strcat(buf, ", "); + } + if (buf[strlen(buf) - 2] == ',') + buf[strlen(buf) - 2] = '\0'; + (void) strcat(buf, "} "); } -char *_nc_tracebits(void) +char * +_nc_tracebits(void) /* describe the state of the terminal control bits exactly */ { -char *buf; -static const BITNAMES + char *buf; #ifdef TERMIOS -iflags[] = + static const BITNAMES iflags[] = { - {BRKINT, "BRKINT"}, - {IGNBRK, "IGNBRK"}, - {IGNPAR, "IGNPAR"}, - {PARMRK, "PARMRK"}, - {INPCK, "INPCK"}, - {ISTRIP, "ISTRIP"}, - {INLCR, "INLCR"}, - {IGNCR, "IGNC"}, - {ICRNL, "ICRNL"}, - {IXON, "IXON"}, - {IXOFF, "IXOFF"}, - {0, NULL} + {BRKINT, "BRKINT"}, + {IGNBRK, "IGNBRK"}, + {IGNPAR, "IGNPAR"}, + {PARMRK, "PARMRK"}, + {INPCK, "INPCK"}, + {ISTRIP, "ISTRIP"}, + {INLCR, "INLCR"}, + {IGNCR, "IGNC"}, + {ICRNL, "ICRNL"}, + {IXON, "IXON"}, + {IXOFF, "IXOFF"}, + {0, NULL} #define ALLIN (BRKINT|IGNBRK|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IXOFF) - }, -oflags[] = + }, oflags[] = { - {OPOST, "OPOST"}, - {0, NULL} + {OPOST, "OPOST"}, + {0, NULL} #define ALLOUT (OPOST) - }, -cflags[] = + }, cflags[] = { - {CLOCAL, "CLOCAL"}, - {CREAD, "CREAD"}, - {CSTOPB, "CSTOPB"}, + {CLOCAL, "CLOCAL"}, + {CREAD, "CREAD"}, + {CSTOPB, "CSTOPB"}, #if !defined(CS5) || !defined(CS8) - {CSIZE, "CSIZE"}, + {CSIZE, "CSIZE"}, #endif - {HUPCL, "HUPCL"}, - {PARENB, "PARENB"}, - {PARODD|PARENB, "PARODD"}, /* concession to readability */ - {0, NULL} + {HUPCL, "HUPCL"}, + {PARENB, "PARENB"}, + {PARODD | PARENB, "PARODD"}, /* concession to readability */ + {0, NULL} #define ALLCTRL (CLOCAL|CREAD|CSIZE|CSTOPB|HUPCL|PARENB|PARODD) - }, -lflags[] = + }, lflags[] = { - {ECHO, "ECHO"}, - {ECHOE|ECHO, "ECHOE"}, /* concession to readability */ - {ECHOK|ECHO, "ECHOK"}, /* concession to readability */ - {ECHONL, "ECHONL"}, - {ICANON, "ICANON"}, - {ISIG, "ISIG"}, - {NOFLSH, "NOFLSH"}, - {TOSTOP, "TOSTOP"}, - {IEXTEN, "IEXTEN"}, - {0, NULL} + {ECHO, "ECHO"}, + {ECHOE | ECHO, "ECHOE"}, /* concession to readability */ + {ECHOK | ECHO, "ECHOK"}, /* concession to readability */ + {ECHONL, "ECHONL"}, + {ICANON, "ICANON"}, + {ISIG, "ISIG"}, + {NOFLSH, "NOFLSH"}, + {TOSTOP, "TOSTOP"}, + {IEXTEN, "IEXTEN"}, + {0, NULL} #define ALLLOCAL (ECHO|ECHONL|ICANON|ISIG|NOFLSH|TOSTOP|IEXTEN) }; - buf = _nc_trace_buf(0, - 8 + sizeof(iflags) + - 8 + sizeof(oflags) + - 8 + sizeof(cflags) + - 8 + sizeof(lflags) + + 8 + sizeof(iflags) + + 8 + sizeof(oflags) + + 8 + sizeof(cflags) + + 8 + sizeof(lflags) + 8); if (cur_term->Nttyb.c_iflag & ALLIN) @@ -157,18 +155,28 @@ lflags[] = #if defined(CS5) && defined(CS8) switch (cur_term->Nttyb.c_cflag & CSIZE) { #if defined(CS5) && (CS5 != 0) - case CS5: strcat(buf, "CS5 "); break; + case CS5: + strcat(buf, "CS5 "); + break; #endif #if defined(CS6) && (CS6 != 0) - case CS6: strcat(buf, "CS6 "); break; + case CS6: + strcat(buf, "CS6 "); + break; #endif #if defined(CS7) && (CS7 != 0) - case CS7: strcat(buf, "CS7 "); break; + case CS7: + strcat(buf, "CS7 "); + break; #endif #if defined(CS8) && (CS8 != 0) - case CS8: strcat(buf, "CS8 "); break; + case CS8: + strcat(buf, "CS8 "); + break; #endif - default: strcat(buf, "CSIZE? "); break; + default: + strcat(buf, "CSIZE? "); + break; } #endif @@ -193,33 +201,36 @@ lflags[] = #define TANDEM 0 #endif -cflags[] = + static const BITNAMES cflags[] = { - {CBREAK, "CBREAK"}, - {CRMOD, "CRMOD"}, - {ECHO, "ECHO"}, - {EVENP, "EVENP"}, - {LCASE, "LCASE"}, - {LLITOUT, "LLITOUT"}, - {ODDP, "ODDP"}, - {RAW, "RAW"}, - {TANDEM, "TANDEM"}, - {XTABS, "XTABS"}, - {0, NULL} + {CBREAK, "CBREAK"}, + {CRMOD, "CRMOD"}, + {ECHO, "ECHO"}, + {EVENP, "EVENP"}, + {LCASE, "LCASE"}, + {LLITOUT, "LLITOUT"}, + {ODDP, "ODDP"}, + {RAW, "RAW"}, + {TANDEM, "TANDEM"}, + {XTABS, "XTABS"}, + {0, NULL} #define ALLCTRL (CBREAK|CRMOD|ECHO|EVENP|LCASE|LLITOUT|ODDP|RAW|TANDEM|XTABS) }; buf = _nc_trace_buf(0, - 8 + sizeof(cflags)); + 8 + sizeof(cflags)); - if (cur_term->Nttyb.sg_flags & ALLCTRL) - { + if (cur_term->Nttyb.sg_flags & ALLCTRL) { lookup_bits(buf, cflags, "cflags", cur_term->Nttyb.sg_flags); } - #endif - return(buf); + return (buf); } #else -char *_nc_tracebits(void) { static char tmp[] = ""; return tmp; } +char * +_nc_tracebits(void) +{ + static char tmp[] = ""; + return tmp; +} #endif /* TRACE */ diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index e97e6793..bf004f35 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,36 +31,18 @@ * and: Eric S. Raymond * ****************************************************************************/ - - /* * lib_tracechr.c - Tracing/Debugging routines */ - -#ifndef TRACE -#define TRACE /* turn on internal defs for this module */ -#endif - #include -#include +MODULE_ID("$Id: lib_tracechr.c,v 1.2 2000/04/01 20:17:26 tom Exp $") #ifdef TRACE char *_tracechar(const unsigned char ch) { static char crep[20]; - /* - * We can show the actual character if it's either an ordinary printable - * or one of the high-half characters. - */ - if (isprint(ch) || (ch & 0x80)) - { - crep[0] = '\''; - crep[1] = ch; /* necessary; printf tries too hard on metachars */ - (void) sprintf(crep + 2, "' = 0x%02x", (unsigned)ch); - } - else - (void) sprintf(crep, "0x%02x", (unsigned)ch); + (void) sprintf(crep, "'%s' = 0x%02x", unctrl(ch), (unsigned)ch); return(crep); } #else diff --git a/ncurses/tty/hashmap.c b/ncurses/tty/hashmap.c index f6a58bc6..300ac9a3 100644 --- a/ncurses/tty/hashmap.c +++ b/ncurses/tty/hashmap.c @@ -70,7 +70,7 @@ AUTHOR #include #include /* for back_color_erase */ -MODULE_ID("$Id: hashmap.c,v 1.33 1999/03/18 02:09:45 Alexander.V.Lukyanov Exp $") +MODULE_ID("$Id: hashmap.c,v 1.34 1999/11/28 00:10:57 tom Exp $") #ifdef HASHDEBUG @@ -286,7 +286,9 @@ void _nc_hash_map(void) if (!hashtab) { if (oldhash) + { FreeAndNull(oldhash); + } lines_alloc = 0; return; } diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 955eb8c6..190c59bd 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* ** lib_mvcur.c ** @@ -153,13 +152,13 @@ #include #include -MODULE_ID("$Id: lib_mvcur.c,v 1.60 1999/10/03 01:08:27 Alexander.V.Lukyanov Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.67 2000/06/24 21:13:51 tom Exp $") #define STRLEN(s) (s != 0) ? strlen(s) : 0 +#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 CURRENT_ROW SP->_cursrow /* phys cursor row */ -#define CURRENT_COLUMN SP->_curscol /* phys cursor column */ #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 */ @@ -176,20 +175,21 @@ static float diff; static int normalized_cost(const char *const cap, int affcnt); #if !HAVE_STRSTR -char * _nc_strstr(const char *haystack, const char *needle) +char * +_nc_strstr(const char *haystack, const char *needle) { - size_t len1 = strlen(haystack); - size_t len2 = strlen(needle); - char *result = 0; - - while ((len1 != 0) && (len1-- >= len2)) { - if (!strncmp(haystack, needle, len2)) { - result = haystack; - break; - } - haystack++; + size_t len1 = strlen(haystack); + size_t len2 = strlen(needle); + char *result = 0; + + while ((len1 != 0) && (len1-- >= len2)) { + if (!strncmp(haystack, needle, len2)) { + result = haystack; + break; } - return result; + haystack++; + } + return result; } #endif @@ -203,18 +203,20 @@ char * _nc_strstr(const char *haystack, const char *needle) static int trace_cost_of(const char *capname, const char *cap, int affcnt) { - int result = _nc_msec_cost(cap,affcnt); - TR(TRACE_CHARPUT|TRACE_MOVE, ("CostOf %s %d", capname, result)); - return result; + int result = _nc_msec_cost(cap, affcnt); + TR(TRACE_CHARPUT | TRACE_MOVE, + ("CostOf %s %d %s", capname, result, _nc_visbuf(cap))); + return result; } #define CostOf(cap,affcnt) trace_cost_of(#cap,cap,affcnt); static int trace_normalized_cost(const char *capname, const char *cap, int affcnt) { - int result = normalized_cost(cap,affcnt); - TR(TRACE_CHARPUT|TRACE_MOVE, ("NormalizedCost %s %d", capname, result)); - return result; + int result = normalized_cost(cap, affcnt); + TR(TRACE_CHARPUT | TRACE_MOVE, + ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap))); + return result; } #define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt); @@ -225,25 +227,22 @@ trace_normalized_cost(const char *capname, const char *cap, int affcnt) #endif -int _nc_msec_cost(const char *const cap, int affcnt) +int +_nc_msec_cost(const char *const cap, int affcnt) /* compute the cost of a given operation */ { if (cap == 0) - return(INFINITY); - else - { - const char *cp; - float cum_cost = 0; + return (INFINITY); + else { + const char *cp; + float cum_cost = 0; - for (cp = cap; *cp; cp++) - { + for (cp = cap; *cp; cp++) { /* extract padding, either mandatory or required */ - if (cp[0] == '$' && cp[1] == '<' && strchr(cp, '>')) - { - float number = 0; + if (cp[0] == '$' && cp[1] == '<' && strchr(cp, '>')) { + float number = 0; - for (cp += 2; *cp != '>'; cp++) - { + for (cp += 2; *cp != '>'; cp++) { if (isdigit(*cp)) number = number * 10 + (*cp - '0'); else if (*cp == '*') @@ -252,41 +251,44 @@ int _nc_msec_cost(const char *const cap, int affcnt) number += (*cp - '0') / 10.0; } - cum_cost += number * 10; - } - else +#ifdef NCURSES_NO_PADDING + if (!(SP->_no_padding)) +#endif + cum_cost += number * 10; + } else cum_cost += SP->_char_padding; } - return((int)cum_cost); + return ((int) cum_cost); } } -static int normalized_cost(const char *const cap, int affcnt) +static int +normalized_cost(const char *const cap, int affcnt) /* compute the effective character-count for an operation (round up) */ { - int cost = _nc_msec_cost(cap, affcnt); - if (cost != INFINITY) - cost = (cost + SP->_char_padding - 1) / SP->_char_padding; - return cost; + int cost = _nc_msec_cost(cap, affcnt); + if (cost != INFINITY) + cost = (cost + SP->_char_padding - 1) / SP->_char_padding; + return cost; } -static void reset_scroll_region(void) +static void +reset_scroll_region(void) /* Set the scroll-region to a known state (the default) */ { - if (change_scroll_region) - { + if (change_scroll_region) { TPUTS_TRACE("change_scroll_region"); putp(tparm(change_scroll_region, 0, screen_lines - 1)); } } -void _nc_mvcur_resume(void) +void +_nc_mvcur_resume(void) /* what to do at initialization time and after each shellout */ { /* initialize screen for cursor access */ - if (enter_ca_mode) - { + if (enter_ca_mode) { TPUTS_TRACE("enter_ca_mode"); putp(enter_ca_mode); } @@ -304,15 +306,15 @@ void _nc_mvcur_resume(void) SP->_cursrow = SP->_curscol = -1; /* restore cursor shape */ - if (SP->_cursor != -1) - { + if (SP->_cursor != -1) { int cursor = SP->_cursor; SP->_cursor = -1; - curs_set (cursor); + curs_set(cursor); } } -void _nc_mvcur_init(void) +void +_nc_mvcur_init(void) /* initialize the cost structure */ { /* @@ -321,15 +323,15 @@ void _nc_mvcur_init(void) SP->_char_padding = (9 * 1000 * 10) / (BAUDRATE > 0 ? BAUDRATE : 9600); if (SP->_char_padding <= 0) SP->_char_padding = 1; /* must be nonzero */ - TR(TRACE_CHARPUT|TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding)); + TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding)); /* non-parameterized local-motion strings */ - SP->_cr_cost = CostOf(carriage_return, 0); + SP->_cr_cost = CostOf(carriage_return, 0); SP->_home_cost = CostOf(cursor_home, 0); - SP->_ll_cost = CostOf(cursor_to_ll, 0); + SP->_ll_cost = CostOf(cursor_to_ll, 0); #if USE_HARD_TABS - SP->_ht_cost = CostOf(tab, 0); - SP->_cbt_cost = CostOf(back_tab, 0); + SP->_ht_cost = CostOf(tab, 0); + SP->_cbt_cost = CostOf(back_tab, 0); #endif /* USE_HARD_TABS */ SP->_cub1_cost = CostOf(cursor_left, 0); SP->_cuf1_cost = CostOf(cursor_right, 0); @@ -357,7 +359,7 @@ void _nc_mvcur_init(void) * * (1) They never have * padding. In the entire master terminfo database * as of March 1995, only the obsolete Zenith Z-100 pc violates this. - * (Proportional padding is found mainly in insert, delete and scroll + * (Proportional padding is found mainly in insert, delete and scroll * capabilities). * * (2) The average case of cup has two two-digit parameters. Strictly, @@ -375,34 +377,38 @@ void _nc_mvcur_init(void) * All these averages depend on the assumption that all parameter values * are equally probable. */ - SP->_cup_cost = CostOf(tparm(SP->_address_cursor, 23, 23), 1); - SP->_cub_cost = CostOf(tparm(parm_left_cursor, 23), 1); - SP->_cuf_cost = CostOf(tparm(parm_right_cursor, 23), 1); - SP->_cud_cost = CostOf(tparm(parm_down_cursor, 23), 1); - SP->_cuu_cost = CostOf(tparm(parm_up_cursor, 23), 1); - SP->_hpa_cost = CostOf(tparm(column_address, 23), 1); - SP->_vpa_cost = CostOf(tparm(row_address, 23), 1); + SP->_cup_cost = CostOf(tparm(SP->_address_cursor, 23, 23), 1); + SP->_cub_cost = CostOf(tparm(parm_left_cursor, 23), 1); + SP->_cuf_cost = CostOf(tparm(parm_right_cursor, 23), 1); + SP->_cud_cost = CostOf(tparm(parm_down_cursor, 23), 1); + SP->_cuu_cost = CostOf(tparm(parm_up_cursor, 23), 1); + SP->_hpa_cost = CostOf(tparm(column_address, 23), 1); + SP->_vpa_cost = CostOf(tparm(row_address, 23), 1); /* non-parameterized screen-update strings */ - SP->_ed_cost = NormalizedCost(clr_eos, 1); - SP->_el_cost = NormalizedCost(clr_eol, 1); - SP->_el1_cost = NormalizedCost(clr_bol, 1); + SP->_ed_cost = NormalizedCost(clr_eos, 1); + SP->_el_cost = NormalizedCost(clr_eol, 1); + SP->_el1_cost = NormalizedCost(clr_bol, 1); SP->_dch1_cost = NormalizedCost(delete_character, 1); SP->_ich1_cost = NormalizedCost(insert_character, 1); /* parameterized screen-update strings */ - SP->_dch_cost = NormalizedCost(tparm(parm_dch, 23), 1); - SP->_ich_cost = NormalizedCost(tparm(parm_ich, 23), 1); - SP->_ech_cost = NormalizedCost(tparm(erase_chars, 23), 1); - SP->_rep_cost = NormalizedCost(tparm(repeat_char, ' ', 23), 1); + SP->_dch_cost = NormalizedCost(tparm(parm_dch, 23), 1); + SP->_ich_cost = NormalizedCost(tparm(parm_ich, 23), 1); + SP->_ech_cost = NormalizedCost(tparm(erase_chars, 23), 1); + SP->_rep_cost = NormalizedCost(tparm(repeat_char, ' ', 23), 1); SP->_cup_ch_cost = NormalizedCost(tparm(SP->_address_cursor, 23, 23), 1); SP->_hpa_ch_cost = NormalizedCost(tparm(column_address, 23), 1); + SP->_cuf_ch_cost = NormalizedCost(tparm(parm_right_cursor, 23), 1); + SP->_inline_cost = min(SP->_cup_ch_cost, + min(SP->_hpa_ch_cost, + SP->_cuf_ch_cost)); /* pre-compute some capability lengths */ SP->_carriage_return_length = STRLEN(carriage_return); - SP->_cursor_home_length = STRLEN(cursor_home); - SP->_cursor_to_ll_length = STRLEN(cursor_to_ll); + SP->_cursor_home_length = STRLEN(cursor_home); + SP->_cursor_to_ll_length = STRLEN(cursor_to_ll); /* * If save_cursor is used within enter_ca_mode, we should not use it for @@ -411,8 +417,8 @@ void _nc_mvcur_init(void) * feature. */ if (save_cursor != 0 - && enter_ca_mode != 0 - && strstr(enter_ca_mode, save_cursor) != 0) { + && enter_ca_mode != 0 + && strstr(enter_ca_mode, save_cursor) != 0) { T(("...suppressed sc/rc capability due to conflict with smcup/rmcup")); save_cursor = 0; restore_cursor = 0; @@ -426,7 +432,8 @@ void _nc_mvcur_init(void) _nc_mvcur_resume(); } -void _nc_mvcur_wrap(void) +void +_nc_mvcur_wrap(void) /* wrap up cursor-addressing mode */ { /* leave cursor at screen bottom */ @@ -436,8 +443,7 @@ void _nc_mvcur_wrap(void) if (SP->_cursor != -1) curs_set(1); - if (exit_ca_mode) - { + if (exit_ca_mode) { TPUTS_TRACE("exit_ca_mode"); putp(exit_ca_mode); } @@ -462,24 +468,24 @@ void _nc_mvcur_wrap(void) * Perform repeated-append, returning cost */ static inline int -repeated_append (int total, int num, int repeat, char *dst, const char *src) +repeated_append(int total, int num, int repeat, char *dst, const char *src) { - register size_t src_len = strlen(src); - register size_t dst_len = STRLEN(dst); - - if ((dst_len + repeat * src_len) < OPT_SIZE-1) { - total += (num * repeat); - if (dst) { - dst += dst_len; - while (repeat-- > 0) { - (void) strcpy(dst, src); - dst += src_len; - } - } - } else { - total = INFINITY; + register size_t src_len = strlen(src); + register size_t dst_len = STRLEN(dst); + + if ((dst_len + repeat * src_len) < OPT_SIZE - 1) { + total += (num * repeat); + if (dst) { + dst += dst_len; + while (repeat-- > 0) { + (void) strcpy(dst, src); + dst += src_len; + } } - return total; + } else { + total = INFINITY; + } + return total; } #ifndef NO_OPTIMIZE @@ -494,56 +500,47 @@ repeated_append (int total, int num, int repeat, char *dst, const char *src) /* Note: we'd like to inline this for speed, but GNU C barfs on the attempt. */ static int -relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) +relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw) /* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */ { - int n, vcost = 0, hcost = 0; + int n, vcost = 0, hcost = 0; if (result) result[0] = '\0'; - if (to_y != from_y) - { + if (to_y != from_y) { vcost = INFINITY; - if (row_address) - { + if (row_address) { if (result) (void) strcpy(result, tparm(row_address, to_y)); vcost = SP->_vpa_cost; } - if (to_y > from_y) - { + if (to_y > from_y) { n = (to_y - from_y); - if (parm_down_cursor && SP->_cud_cost < vcost) - { + if (parm_down_cursor && SP->_cud_cost < vcost) { if (result) (void) strcpy(result, tparm(parm_down_cursor, n)); vcost = SP->_cud_cost; } - if (cursor_down && (n * SP->_cud1_cost < vcost)) - { + if (cursor_down && (n * SP->_cud1_cost < vcost)) { if (result) result[0] = '\0'; vcost = repeated_append(0, SP->_cud1_cost, n, result, cursor_down); } - } - else /* (to_y < from_y) */ - { + } else { /* (to_y < from_y) */ n = (from_y - to_y); - if (parm_up_cursor && SP->_cup_cost < vcost) - { + if (parm_up_cursor && SP->_cup_cost < vcost) { if (result) (void) strcpy(result, tparm(parm_up_cursor, n)); vcost = SP->_cup_cost; } - if (cursor_up && (n * SP->_cuu1_cost < vcost)) - { + if (cursor_up && (n * SP->_cuu1_cost < vcost)) { if (result) result[0] = '\0'; vcost = repeated_append(0, SP->_cuu1_cost, n, result, cursor_up); @@ -551,53 +548,47 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) } if (vcost == INFINITY) - return(INFINITY); + return (INFINITY); } if (result) result += strlen(result); - if (to_x != from_x) - { - char str[OPT_SIZE]; + if (to_x != from_x) { + char str[OPT_SIZE]; hcost = INFINITY; - if (column_address) - { + if (column_address) { if (result) (void) strcpy(result, tparm(column_address, to_x)); hcost = SP->_hpa_cost; } - if (to_x > from_x) - { + if (to_x > from_x) { n = to_x - from_x; - if (parm_right_cursor && SP->_cuf_cost < hcost) - { + if (parm_right_cursor && SP->_cuf_cost < hcost) { if (result) (void) strcpy(result, tparm(parm_right_cursor, n)); hcost = SP->_cuf_cost; } - if (cursor_right) - { - int lhcost = 0; + if (cursor_right) { + int lhcost = 0; str[0] = '\0'; #if USE_HARD_TABS /* use hard tabs, if we have them, to do as much as possible */ - if (init_tabs > 0 && tab) - { - int nxt, fr; + if (init_tabs > 0 && tab) { + int nxt, fr; - for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) - { - lhcost = repeated_append(lhcost, SP->_ht_cost, 1, str, tab); + for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) { + lhcost = repeated_append(lhcost, SP->_ht_cost, 1, + str, tab); if (lhcost == INFINITY) - break; + break; } n = to_x - fr; @@ -614,11 +605,11 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) * screen. */ if (ovw - && n > 0 - && vcost == 0 - && str[0] == '\0' - && isdigit(TextOf(WANT_CHAR(to_y, from_x)))) - ovw = FALSE; + && n > 0 + && vcost == 0 + && str[0] == '\0' + && isdigit(TextOf(WANT_CHAR(to_y, from_x)))) + ovw = FALSE; #endif /* * If we have no attribute changes, overwrite is cheaper. @@ -628,21 +619,18 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) * and the time the structure WANT_CHAR would access has been * updated. */ - if (ovw) - { - int i; + if (ovw) { + int i; for (i = 0; i < n; i++) - if ((WANT_CHAR(to_y, from_x + i) & A_ATTRIBUTES) != CURRENT_ATTR) - { + if ((WANT_CHAR(to_y, from_x + i) & A_ATTRIBUTES) != CURRENT_ATTR) { ovw = FALSE; break; } } - if (ovw) - { - char *sp; - int i; + if (ovw) { + char *sp; + int i; sp = str + strlen(str); @@ -650,48 +638,41 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) *sp++ = WANT_CHAR(to_y, from_x + i); *sp = '\0'; lhcost += n * SP->_char_padding; - } - else + } else #endif /* defined(REAL_ATTR) && defined(WANT_CHAR) */ { lhcost = repeated_append(lhcost, SP->_cuf1_cost, n, str, cursor_right); } - if (lhcost < hcost) - { + if (lhcost < hcost) { if (result) (void) strcpy(result, str); hcost = lhcost; } } - } - else /* (to_x < from_x) */ - { + } else { /* (to_x < from_x) */ n = from_x - to_x; - if (parm_left_cursor && SP->_cub_cost < hcost) - { + if (parm_left_cursor && SP->_cub_cost < hcost) { if (result) (void) strcpy(result, tparm(parm_left_cursor, n)); hcost = SP->_cub_cost; } - if (cursor_left) - { - int lhcost = 0; + if (cursor_left) { + int lhcost = 0; str[0] = '\0'; #if USE_HARD_TABS - if (init_tabs > 0 && back_tab) - { - int nxt, fr; + if (init_tabs > 0 && back_tab) { + int nxt, fr; - for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) - { - lhcost = repeated_append(lhcost, SP->_cbt_cost, 1, str, back_tab); + for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) { + lhcost = repeated_append(lhcost, SP->_cbt_cost, 1, + str, back_tab); if (lhcost == INFINITY) - break; + break; } n = fr - to_x; @@ -700,8 +681,7 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) lhcost = repeated_append(lhcost, SP->_cub1_cost, n, str, cursor_left); - if (lhcost < hcost) - { + if (lhcost < hcost) { if (result) (void) strcpy(result, str); hcost = lhcost; @@ -710,10 +690,10 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) } if (hcost == INFINITY) - return(INFINITY); + return (INFINITY); } - return(vcost + hcost); + return (vcost + hcost); } #endif /* !NO_OPTIMIZE */ @@ -729,12 +709,12 @@ relative_move(char *result, int from_y,int from_x,int to_y,int to_x, bool ovw) */ static inline int -onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) +onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw) /* onscreen move from (yold, xold) to (ynew, xnew) */ { - char use[OPT_SIZE], *sp; - int tactic = 0, newcost, usecost = INFINITY; - int t5_cr_cost; + char use[OPT_SIZE], *sp; + int tactic = 0, newcost, usecost = INFINITY; + int t5_cr_cost; #if defined(MAIN) || defined(NCURSES_TEST) struct timeval before, after; @@ -744,8 +724,7 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) /* tactic #0: use direct cursor addressing */ sp = tparm(SP->_address_cursor, ynew, xnew); - if (sp) - { + if (sp) { tactic = 0; (void) strcpy(use, sp); usecost = SP->_cup_cost; @@ -763,11 +742,9 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) * (like, say, local-movement \n getting mapped to some obscure * character because A_ALTCHARSET is on). */ - if (yold == -1 || xold == -1 || NOT_LOCAL(yold, xold, ynew, xnew)) - { + if (yold == -1 || xold == -1 || NOT_LOCAL(yold, xold, ynew, xnew)) { #if defined(MAIN) || defined(NCURSES_TEST) - if (!profiling) - { + if (!profiling) { (void) fputs("nonlocal\n", stderr); goto nonlocal; /* always run the optimizer if profiling */ } @@ -776,40 +753,36 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) #endif /* MAIN */ } } - #ifndef NO_OPTIMIZE /* tactic #1: use local movement */ if (yold != -1 && xold != -1 - && ((newcost=relative_move(NULL, yold, xold, ynew, xnew, ovw))!=INFINITY) - && newcost < usecost) - { + && ((newcost = relative_move(NULL, yold, xold, ynew, xnew, ovw)) != INFINITY) + && newcost < usecost) { tactic = 1; usecost = newcost; } /* tactic #2: use carriage-return + local movement */ if (yold != -1 && carriage_return - && ((newcost=relative_move(NULL, yold,0,ynew,xnew, ovw)) != INFINITY) - && SP->_cr_cost + newcost < usecost) - { + && ((newcost = relative_move(NULL, yold, 0, ynew, xnew, ovw)) != INFINITY) + && SP->_cr_cost + newcost < usecost) { tactic = 2; usecost = SP->_cr_cost + newcost; } /* tactic #3: use home-cursor + local movement */ if (cursor_home - && ((newcost=relative_move(NULL, 0, 0, ynew, xnew, ovw)) != INFINITY) - && SP->_home_cost + newcost < usecost) - { + && ((newcost = relative_move(NULL, 0, 0, ynew, xnew, ovw)) != INFINITY) + && SP->_home_cost + newcost < usecost) { tactic = 3; usecost = SP->_home_cost + newcost; } /* tactic #4: use home-down + local movement */ if (cursor_to_ll - && ((newcost=relative_move(NULL, screen_lines-1, 0, ynew, xnew, ovw)) != INFINITY) - && SP->_ll_cost + newcost < usecost) - { + && ((newcost = relative_move(NULL, screen_lines - 1, 0, ynew, xnew, + ovw)) != INFINITY) + && SP->_ll_cost + newcost < usecost) { tactic = 4; usecost = SP->_ll_cost + newcost; } @@ -818,12 +791,12 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) * tactic #5: use left margin for wrap to right-hand side, * unless strange wrap behavior indicated by xenl might hose us. */ - t5_cr_cost = (xold>0 ? SP->_cr_cost : 0); + t5_cr_cost = (xold > 0 ? SP->_cr_cost : 0); if (auto_left_margin && !eat_newline_glitch && yold > 0 && cursor_left - && ((newcost=relative_move(NULL, yold-1, screen_columns-1, ynew, xnew, ovw)) != INFINITY) - && t5_cr_cost + SP->_cub1_cost + newcost < usecost) - { + && ((newcost = relative_move(NULL, yold - 1, screen_columns - 1, + ynew, xnew, ovw)) != INFINITY) + && t5_cr_cost + SP->_cub1_cost + newcost < usecost) { tactic = 5; usecost = t5_cr_cost + SP->_cub1_cost + newcost; } @@ -831,37 +804,33 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) /* * These cases are ordered by estimated relative frequency. */ - if (tactic) - { - if (tactic == 1) - (void) relative_move(use, yold, xold, ynew, xnew, ovw); - else if (tactic == 2) - { - (void) strcpy(use, carriage_return); - (void) relative_move(use + SP->_carriage_return_length, - yold,0,ynew,xnew, ovw); - } - else if (tactic == 3) - { - (void) strcpy(use, cursor_home); - (void) relative_move(use + SP->_cursor_home_length, - 0, 0, ynew, xnew, ovw); - } - else if (tactic == 4) - { - (void) strcpy(use, cursor_to_ll); - (void) relative_move(use + SP->_cursor_to_ll_length, - screen_lines-1, 0, ynew, xnew, ovw); - } - else /* if (tactic == 5) */ - { - use[0] = '\0'; - if (xold > 0) - (void) strcat(use, carriage_return); - (void) strcat(use, cursor_left); - (void) relative_move(use + strlen(use), - yold-1, screen_columns-1, ynew, xnew, ovw); - } + switch (tactic) { + case 1: + (void) relative_move(use, yold, xold, ynew, xnew, ovw); + break; + case 2: + (void) strcpy(use, carriage_return); + (void) relative_move(use + SP->_carriage_return_length, + yold, 0, ynew, xnew, ovw); + break; + case 3: + (void) strcpy(use, cursor_home); + (void) relative_move(use + SP->_cursor_home_length, + 0, 0, ynew, xnew, ovw); + break; + case 4: + (void) strcpy(use, cursor_to_ll); + (void) relative_move(use + SP->_cursor_to_ll_length, + screen_lines - 1, 0, ynew, xnew, ovw); + break; + case 5: + use[0] = '\0'; + if (xold > 0) + (void) strcat(use, carriage_return); + (void) strcat(use, cursor_left); + (void) relative_move(use + strlen(use), + yold - 1, screen_columns - 1, ynew, xnew, ovw); + break; } #endif /* !NO_OPTIMIZE */ @@ -870,28 +839,28 @@ onscreen_mvcur(int yold,int xold,int ynew,int xnew, bool ovw) 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", - (int)diff, diff/288); + (void) fprintf(stderr, + "onscreen: %d msec, %f 28.8Kbps char-equivalents\n", + (int) diff, diff / 288); #endif /* MAIN */ - nonlocal: - if (usecost != INFINITY) - { + nonlocal: + if (usecost != INFINITY) { TPUTS_TRACE("mvcur"); tputs(use, 1, _nc_outch); - return(OK); - } - else - return(ERR); + return (OK); + } else + return (ERR); } -int mvcur(int yold, int xold, int ynew, int xnew) +int +mvcur(int yold, int xold, int ynew, int xnew) /* optimized cursor move from (yold, xold) to (ynew, xnew) */ { TR(TRACE_MOVE, ("mvcur(%d,%d,%d,%d) called", yold, xold, ynew, xnew)); if (yold == ynew && xold == xnew) - return(OK); + return (OK); /* * Most work here is rounding for terminal boundaries getting the @@ -899,40 +868,33 @@ int mvcur(int yold, int xold, int ynew, int xnew) * rolling up the screen to get ynew on the screen. */ - if (xnew >= screen_columns) - { + if (xnew >= screen_columns) { ynew += xnew / screen_columns; xnew %= screen_columns; } - if (xold >= screen_columns) - { - int l; + if (xold >= screen_columns) { + int l; l = (xold + 1) / screen_columns; yold += l; if (yold >= screen_lines) - l -= (yold - screen_lines - 1); + 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 (carriage_return) - { - TPUTS_TRACE("carriage_return"); - tputs(carriage_return, 0, _nc_outch); - } - else - putchar('\r'); - xold = 0; - } + if (newline) { + TPUTS_TRACE("newline"); + tputs(newline, 0, _nc_outch); + } else + putchar('\n'); + l--; + if (xold > 0) { + if (carriage_return) { + TPUTS_TRACE("carriage_return"); + tputs(carriage_return, 0, _nc_outch); + } else + putchar('\r'); + xold = 0; + } } } @@ -942,7 +904,7 @@ int mvcur(int yold, int xold, int ynew, int xnew) ynew = screen_lines - 1; /* destination location is on screen now */ - return(onscreen_mvcur(yold, xold, ynew, xnew, TRUE)); + return (onscreen_mvcur(yold, xold, ynew, xnew, TRUE)); } #if defined(TRACE) || defined(NCURSES_TEST) @@ -963,35 +925,51 @@ const char *_nc_progname = "mvcur"; static unsigned long xmits; -int tputs(const char *string, int affcnt GCC_UNUSED, int (*outc)(int) GCC_UNUSED) +/* these override lib_tputs.c */ +int +tputs(const char *string, int affcnt GCC_UNUSED, int (*outc) (int) GCC_UNUSED) /* stub tputs() that dumps sequences in a visible form */ { if (profiling) xmits += strlen(string); else (void) fputs(_nc_visbuf(string), stdout); - return(OK); + return (OK); } -int putp(const char *string) +int +putp(const char *string) { - return(tputs(string, 1, _nc_outch)); + return (tputs(string, 1, _nc_outch)); } -int _nc_outch(int ch) +int +_nc_outch(int ch) { putc(ch, stdout); return OK; } -static char tname[MAX_ALIAS]; +char PC = 0; /* used by termcap library */ +speed_t ospeed = 0; /* used by termcap library */ +int _nc_nulls_sent = 0; /* used by 'tack' program */ + +int +delay_output(int ms GCC_UNUSED) +{ + return OK; +} + +static char tname[MAX_ALIAS]; -static void load_term(void) +static void +load_term(void) { (void) setupterm(tname, STDOUT_FILENO, NULL); } -static int roll(int n) +static int +roll(int n) { int i, j; @@ -1001,7 +979,8 @@ static int roll(int n) return (j % n); } -int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) +int +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { (void) strcpy(tname, termname()); load_term(); @@ -1016,30 +995,32 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) fputs("smcup:", stdout); putchar('\n'); - for (;;) - { - int fy, fx, ty, tx, n, i; - char buf[BUFSIZ], capname[BUFSIZ]; + for (;;) { + int fy, fx, ty, tx, n, i; + char buf[BUFSIZ], capname[BUFSIZ]; (void) fputs("> ", stdout); (void) fgets(buf, sizeof(buf), stdin); - if (buf[0] == '?') - { -(void) puts("? -- display this help message"); -(void) puts("fy fx ty tx -- (4 numbers) display (fy,fx)->(ty,tx) move"); -(void) puts("s[croll] n t b m -- display scrolling sequence"); -(void) printf("r[eload] -- reload terminal info for %s\n", termname()); -(void) puts("l[oad] -- load terminal info for type "); -(void) puts("d[elete] -- delete named capability"); -(void) puts("i[nspect] -- display terminal capabilities"); -(void) puts("c[ost] -- dump cursor-optimization cost table"); -(void) puts("o[optimize] -- toggle movement optimization"); -(void) puts("t[orture] -- torture-test with random moves"); -(void) puts("q[uit] -- quit the program"); - } - else if (sscanf(buf, "%d %d %d %d", &fy, &fx, &ty, &tx) == 4) - { + if (buf[0] == '?') { + (void) puts("? -- display this help message"); + (void) + puts("fy fx ty tx -- (4 numbers) display (fy,fx)->(ty,tx) move"); + (void) puts("s[croll] n t b m -- display scrolling sequence"); + (void) + printf("r[eload] -- reload terminal info for %s\n", + termname()); + (void) + puts("l[oad] -- load terminal info for type "); + (void) puts("d[elete] -- delete named capability"); + (void) puts("i[nspect] -- display terminal capabilities"); + (void) + puts("c[ost] -- dump cursor-optimization cost table"); + (void) puts("o[optimize] -- toggle movement optimization"); + (void) + puts("t[orture] -- torture-test with random moves"); + (void) puts("q[uit] -- quit the program"); + } else if (sscanf(buf, "%d %d %d %d", &fy, &fx, &ty, &tx) == 4) { struct timeval before, after; putchar('"'); @@ -1049,10 +1030,9 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) gettimeofday(&after, NULL); printf("\" (%ld msec)\n", - (long)(after.tv_usec - before.tv_usec + (after.tv_sec - before.tv_sec) * 1000000)); - } - else if (sscanf(buf, "s %d %d %d %d", &fy, &fx, &ty, &tx) == 4) - { + (long) (after.tv_usec - before.tv_usec + (after.tv_sec - + before.tv_sec) * 1000000)); + } else if (sscanf(buf, "s %d %d %d %d", &fy, &fx, &ty, &tx) == 4) { struct timeval before, after; putchar('"'); @@ -1062,66 +1042,53 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) gettimeofday(&after, NULL); printf("\" (%ld msec)\n", - (long)(after.tv_usec - before.tv_usec + (after.tv_sec - before.tv_sec) * 1000000)); - } - else if (buf[0] == 'r') - { + (long) (after.tv_usec - before.tv_usec + (after.tv_sec - + before.tv_sec) * 1000000)); + } else if (buf[0] == 'r') { (void) strcpy(tname, termname()); load_term(); - } - else if (sscanf(buf, "l %s", tname) == 1) - { + } else if (sscanf(buf, "l %s", tname) == 1) { load_term(); - } - else if (sscanf(buf, "d %s", capname) == 1) - { - struct name_table_entry const *np = _nc_find_entry(capname, - _nc_info_hash_table); + } else if (sscanf(buf, "d %s", capname) == 1) { + struct name_table_entry const *np = _nc_find_entry(capname, + _nc_info_hash_table); if (np == NULL) (void) printf("No such capability as \"%s\"\n", capname); - else - { - switch(np->nte_type) - { + else { + switch (np->nte_type) { case BOOLEAN: cur_term->type.Booleans[np->nte_index] = FALSE; - (void) printf("Boolean capability `%s' (%d) turned off.\n", - np->nte_name, np->nte_index); + (void) + printf("Boolean capability `%s' (%d) turned off.\n", + np->nte_name, np->nte_index); break; case NUMBER: - cur_term->type.Numbers[np->nte_index] = -1; + cur_term->type.Numbers[np->nte_index] = ABSENT_NUMERIC; (void) printf("Number capability `%s' (%d) set to -1.\n", - np->nte_name, np->nte_index); + np->nte_name, np->nte_index); break; case STRING: - cur_term->type.Strings[np->nte_index] = (char *)NULL; + cur_term->type.Strings[np->nte_index] = ABSENT_STRING; (void) printf("String capability `%s' (%d) deleted.\n", - np->nte_name, np->nte_index); + np->nte_name, np->nte_index); break; } } - } - else if (buf[0] == 'i') - { - dump_init((char *)NULL, F_TERMINFO, S_TERMINFO, 70, 0, FALSE); - dump_entry(&cur_term->type, FALSE, TRUE, 0); - putchar('\n'); - } - else if (buf[0] == 'o') - { - if (_nc_optimize_enable & OPTIMIZE_MVCUR) - { - _nc_optimize_enable &=~ OPTIMIZE_MVCUR; - (void) puts("Optimization is now off."); - } - else - { - _nc_optimize_enable |= OPTIMIZE_MVCUR; - (void) puts("Optimization is now on."); - } + } else if (buf[0] == 'i') { + dump_init((char *) NULL, F_TERMINFO, S_TERMINFO, 70, 0, FALSE); + dump_entry(&cur_term->type, FALSE, TRUE, 0); + putchar('\n'); + } else if (buf[0] == 'o') { + if (_nc_optimize_enable & OPTIMIZE_MVCUR) { + _nc_optimize_enable &= ~OPTIMIZE_MVCUR; + (void) puts("Optimization is now off."); + } else { + _nc_optimize_enable |= OPTIMIZE_MVCUR; + (void) puts("Optimization is now on."); + } } /* * You can use the `t' test to profile and tune the movement @@ -1142,16 +1109,15 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) * modes. As long as the optimized times are less, the optimizer * is winning. */ - else if (sscanf(buf, "t %d", &n) == 1) - { + else if (sscanf(buf, "t %d", &n) == 1) { float cumtime = 0, perchar; - int speeds[] = {2400, 9600, 14400, 19200, 28800, 38400, 0}; + int speeds[] = + {2400, 9600, 14400, 19200, 28800, 38400, 0}; - srand((unsigned)(getpid() + time((time_t *)0))); + srand((unsigned) (getpid() + time((time_t *) 0))); profiling = TRUE; xmits = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { /* * This does a move test between two random locations, * Random moves probably short-change the optimizer, @@ -1182,10 +1148,9 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) perchar = cumtime / n; (void) printf("%d moves (%ld chars) in %d msec, %f msec each:\n", - n, xmits, (int)cumtime, perchar); + n, xmits, (int) cumtime, perchar); - for (i = 0; speeds[i]; i++) - { + for (i = 0; speeds[i]; i++) { /* * Total estimated time for the moves, computation and * transmission both. Transmission time is an estimate @@ -1200,12 +1165,11 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) */ float overhead = speeds[i] * perchar / 1e6; - (void) printf("%6d bps: %3.2f char-xmits overhead; total estimated time %15.2f\n", - speeds[i], overhead, totalest); + (void) + printf("%6d bps: %3.2f char-xmits overhead; total estimated time %15.2f\n", + speeds[i], overhead, totalest); } - } - else if (buf[0] == 'c') - { + } else if (buf[0] == 'c') { (void) printf("char padding: %d\n", SP->_char_padding); (void) printf("cr cost: %d\n", SP->_cr_cost); (void) printf("cup cost: %d\n", SP->_cup_cost); @@ -1225,8 +1189,7 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) (void) printf("cuu cost: %d\n", SP->_cuu_cost); (void) printf("hpa cost: %d\n", SP->_hpa_cost); (void) printf("vpa cost: %d\n", SP->_vpa_cost); - } - else if (buf[0] == 'x' || buf[0] == 'q') + } else if (buf[0] == 'x' || buf[0] == 'q') break; else (void) puts("Invalid command."); @@ -1236,7 +1199,7 @@ int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) _nc_mvcur_wrap(); putchar('\n'); - return(0); + return (0); } #endif /* MAIN */ diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index 6fb912cf..d01a62f7 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -48,7 +48,7 @@ #define _POSIX_SOURCE #endif -MODULE_ID("$Id: lib_tstp.c,v 1.20 1999/10/22 23:11:09 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.21 2000/05/20 23:28:56 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -226,6 +226,7 @@ static void cleanup(int sig) && SP->_ofp != 0 && isatty(fileno(SP->_ofp))) { SP->_cleanup = TRUE; + SP->_outch = _nc_outch; } set_term(scan); endwin(); diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c index f095c9b5..a21e2a16 100644 --- a/ncurses/tty/lib_twait.c +++ b/ncurses/tty/lib_twait.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -47,8 +47,6 @@ #include #if USE_FUNC_POLL -# include -# include # if HAVE_SYS_TIME_H # include # endif @@ -61,7 +59,7 @@ # endif #endif -MODULE_ID("$Id: lib_twait.c,v 1.34 1999/10/16 21:25:10 tom Exp $") +MODULE_ID("$Id: lib_twait.c,v 1.37 2000/06/29 23:03:09 tom Exp $") static long _nc_gettime(bool first) { @@ -243,7 +241,6 @@ retry: if ((mode & (1 << count)) && (fds[count].revents & POLLIN)) { result |= (1 << count); - count++; } } #elif defined(__BEOS__) diff --git a/ncurses/tty/lib_vidattr.c b/ncurses/tty/lib_vidattr.c index 20cc2b13..7cff22ec 100644 --- a/ncurses/tty/lib_vidattr.c +++ b/ncurses/tty/lib_vidattr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -64,7 +64,7 @@ #include #include -MODULE_ID("$Id: lib_vidattr.c,v 1.23 1999/06/12 21:20:41 tom Exp $") +MODULE_ID("$Id: lib_vidattr.c,v 1.27 2000/04/29 23:25:27 tom Exp $") #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc) @@ -76,203 +76,218 @@ MODULE_ID("$Id: lib_vidattr.c,v 1.23 1999/06/12 21:20:41 tom Exp $") /* if there is no current screen, assume we *can* do color */ #define SetColorsIf(why,old_attr) \ - if ((!SP || SP->_coloron) && (why)) { \ + if (can_color && (why)) { \ int old_pair = PAIR_NUMBER(old_attr); \ T(("old pair = %d -- new pair = %d", old_pair, pair)); \ if ((pair != old_pair) \ + || (fix_pair0 && (pair == 0)) \ || (reverse ^ ((old_attr & A_REVERSE) != 0))) { \ - _nc_do_color(pair, reverse, outc); \ + _nc_do_color(old_pair, pair, reverse, outc); \ } \ } -int vidputs(attr_t newmode, int (*outc)(int)) +int +vidputs(attr_t newmode, int (*outc) (int)) { -static attr_t previous_attr = A_NORMAL; -attr_t turn_on, turn_off; -int pair; -bool reverse = FALSE; -bool used_ncv = FALSE; + static attr_t previous_attr = A_NORMAL; + attr_t turn_on, turn_off; + int pair; + bool reverse = FALSE; + bool used_ncv = FALSE; + bool can_color = (SP == 0 || SP->_coloron); +#ifdef NCURSES_EXT_FUNCS + bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color); +#else +#define fix_pair0 FALSE +#endif - T((T_CALLED("vidputs(%s)"), _traceattr(newmode))); + T((T_CALLED("vidputs(%s)"), _traceattr(newmode))); - /* this allows us to go on whether or not newterm() has been called */ - if (SP) - previous_attr = SP->_current_attr; + /* this allows us to go on whether or not newterm() has been called */ + if (SP) + previous_attr = SP->_current_attr; - T(("previous attribute was %s", _traceattr(previous_attr))); + T(("previous attribute was %s", _traceattr(previous_attr))); #if !USE_XMC_SUPPORT - if ((SP != 0) - && (magic_cookie_glitch > 0)) - newmode &= ~(SP->_xmc_suppress); + if ((SP != 0) + && (magic_cookie_glitch > 0)) + newmode &= ~(SP->_xmc_suppress); #endif - /* - * If we have a terminal that cannot combine color with video - * attributes, use the colors in preference. - */ - if ((newmode & A_COLOR) - && (no_color_video > 0)) { - static const struct { - attr_t video; - unsigned bit; - } table[] = { - { A_STANDOUT, 1 }, - { A_UNDERLINE, 2 }, - { A_REVERSE, 4 }, - { A_BLINK, 8 }, - { A_DIM, 16 }, - { A_BOLD, 32 }, - { A_INVIS, 64 }, - { A_PROTECT, 128 }, - { A_ALTCHARSET, 256 }, - }; - size_t n; - for (n = 0; n < SIZEOF(table); n++) { - if ((table[n].bit & no_color_video) - && (table[n].video & newmode)) { - used_ncv = TRUE; - if (table[n].video == A_REVERSE) - reverse = TRUE; - else - newmode &= ~table[n].video; - } - } + /* + * If we have a terminal that cannot combine color with video + * attributes, use the colors in preference. + */ + if (((newmode & A_COLOR) != 0 + || fix_pair0) + && (no_color_video > 0)) { + /* *INDENT-OFF* */ + static const struct { + attr_t video; + unsigned bit; + } table[] = { + { A_STANDOUT, 1 }, + { A_UNDERLINE, 2 }, + { A_REVERSE, 4 }, + { A_BLINK, 8 }, + { A_DIM, 16 }, + { A_BOLD, 32 }, + { A_INVIS, 64 }, + { A_PROTECT, 128 }, + { A_ALTCHARSET, 256 }, + }; + /* *INDENT-ON* */ + + size_t n; + for (n = 0; n < SIZEOF(table); n++) { + if ((table[n].bit & no_color_video) + && (table[n].video & newmode)) { + used_ncv = TRUE; + if (table[n].video == A_REVERSE) + reverse = TRUE; + else + newmode &= ~table[n].video; + } } + } + + if (newmode == previous_attr) + returnCode(OK); + + pair = PAIR_NUMBER(newmode); - if (newmode == previous_attr) - returnCode(OK); + if (reverse) { + newmode &= ~A_REVERSE; + } - pair = PAIR_NUMBER(newmode); + turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR; + turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR; - if (reverse) { - newmode &= ~A_REVERSE; + SetColorsIf(((pair == 0) && !fix_pair0), previous_attr); + + if (newmode == A_NORMAL) { + if ((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) { + doPut(exit_alt_charset_mode); + previous_attr &= ~A_ALTCHARSET; + } + if (previous_attr) { + doPut(exit_attribute_mode); + previous_attr &= ~A_COLOR; } - turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR; - turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR; - - SetColorsIf(pair == 0, previous_attr); - - if (newmode == A_NORMAL) { - if((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) { - doPut(exit_alt_charset_mode); - previous_attr &= ~A_ALTCHARSET; - } - if (previous_attr) { - doPut(exit_attribute_mode); - previous_attr &= ~A_COLOR; - } - - SetColorsIf(pair != 0, previous_attr); - } else if (set_attributes && !used_ncv) { - if (turn_on || turn_off) { - TPUTS_TRACE("set_attributes"); - tputs(tparm(set_attributes, - (newmode & A_STANDOUT) != 0, - (newmode & A_UNDERLINE) != 0, - (newmode & A_REVERSE) != 0, - (newmode & A_BLINK) != 0, - (newmode & A_DIM) != 0, - (newmode & A_BOLD) != 0, - (newmode & A_INVIS) != 0, - (newmode & A_PROTECT) != 0, - (newmode & A_ALTCHARSET) != 0), 1, outc); - previous_attr &= ~A_COLOR; - } - SetColorsIf(pair != 0, previous_attr); - } else { - - T(("turning %s off", _traceattr(turn_off))); - - TurnOff(A_ALTCHARSET, exit_alt_charset_mode); - - if (!SP || SP->_use_rmul) { - TurnOff(A_UNDERLINE, exit_underline_mode); - } - - if (!SP || SP->_use_rmso) { - TurnOff(A_STANDOUT, exit_standout_mode); - } - - if (turn_off && exit_attribute_mode) { - doPut(exit_attribute_mode); - turn_on |= (newmode & (chtype)(~A_COLOR)); - previous_attr &= ~A_COLOR; - } - SetColorsIf(pair != 0, previous_attr); - - T(("turning %s on", _traceattr(turn_on))); - - TurnOn (A_ALTCHARSET, enter_alt_charset_mode); - TurnOn (A_BLINK, enter_blink_mode); - TurnOn (A_BOLD, enter_bold_mode); - TurnOn (A_DIM, enter_dim_mode); - TurnOn (A_REVERSE, enter_reverse_mode); - TurnOn (A_STANDOUT, enter_standout_mode); - TurnOn (A_PROTECT, enter_protected_mode); - TurnOn (A_INVIS, enter_secure_mode); - TurnOn (A_UNDERLINE, enter_underline_mode); - TurnOn (A_HORIZONTAL, enter_horizontal_hl_mode); - TurnOn (A_LEFT, enter_left_hl_mode); - TurnOn (A_LOW, enter_low_hl_mode); - TurnOn (A_RIGHT, enter_right_hl_mode); - TurnOn (A_TOP, enter_top_hl_mode); - TurnOn (A_VERTICAL, enter_vertical_hl_mode); + SetColorsIf((pair != 0) || fix_pair0, previous_attr); + } else if (set_attributes && !used_ncv) { + if (turn_on || turn_off) { + TPUTS_TRACE("set_attributes"); + tputs(tparm(set_attributes, + (newmode & A_STANDOUT) != 0, + (newmode & A_UNDERLINE) != 0, + (newmode & A_REVERSE) != 0, + (newmode & A_BLINK) != 0, + (newmode & A_DIM) != 0, + (newmode & A_BOLD) != 0, + (newmode & A_INVIS) != 0, + (newmode & A_PROTECT) != 0, + (newmode & A_ALTCHARSET) != 0), 1, outc); + previous_attr &= ~A_COLOR; } + SetColorsIf((pair != 0) || fix_pair0, previous_attr); + } else { - if (reverse) - newmode |= A_REVERSE; + T(("turning %s off", _traceattr(turn_off))); - if (SP) - SP->_current_attr = newmode; - else - previous_attr = newmode; + TurnOff(A_ALTCHARSET, exit_alt_charset_mode); - returnCode(OK); + if (!SP || SP->_use_rmul) { + TurnOff(A_UNDERLINE, exit_underline_mode); + } + + if (!SP || SP->_use_rmso) { + TurnOff(A_STANDOUT, exit_standout_mode); + } + + if (turn_off && exit_attribute_mode) { + doPut(exit_attribute_mode); + turn_on |= (newmode & (chtype) (~A_COLOR)); + previous_attr &= ~A_COLOR; + } + SetColorsIf((pair != 0) || fix_pair0, previous_attr); + + T(("turning %s on", _traceattr(turn_on))); + /* *INDENT-OFF* */ + TurnOn(A_ALTCHARSET, enter_alt_charset_mode); + TurnOn(A_BLINK, enter_blink_mode); + TurnOn(A_BOLD, enter_bold_mode); + TurnOn(A_DIM, enter_dim_mode); + TurnOn(A_REVERSE, enter_reverse_mode); + TurnOn(A_STANDOUT, enter_standout_mode); + TurnOn(A_PROTECT, enter_protected_mode); + TurnOn(A_INVIS, enter_secure_mode); + TurnOn(A_UNDERLINE, enter_underline_mode); + TurnOn(A_HORIZONTAL, enter_horizontal_hl_mode); + TurnOn(A_LEFT, enter_left_hl_mode); + TurnOn(A_LOW, enter_low_hl_mode); + TurnOn(A_RIGHT, enter_right_hl_mode); + TurnOn(A_TOP, enter_top_hl_mode); + TurnOn(A_VERTICAL, enter_vertical_hl_mode); + /* *INDENT-ON* */ + + } + + if (reverse) + newmode |= A_REVERSE; + + if (SP) + SP->_current_attr = newmode; + else + previous_attr = newmode; + + returnCode(OK); } -int vidattr(attr_t newmode) +int +vidattr(attr_t newmode) { - T((T_CALLED("vidattr(%s)"), _traceattr(newmode))); + T((T_CALLED("vidattr(%s)"), _traceattr(newmode))); - returnCode(vidputs(newmode, _nc_outch)); + returnCode(vidputs(newmode, _nc_outch)); } -chtype termattrs(void) +chtype +termattrs(void) { - chtype attrs = A_NORMAL; + chtype attrs = A_NORMAL; - if (enter_alt_charset_mode) - attrs |= A_ALTCHARSET; + if (enter_alt_charset_mode) + attrs |= A_ALTCHARSET; - if (enter_blink_mode) - attrs |= A_BLINK; + if (enter_blink_mode) + attrs |= A_BLINK; - if (enter_bold_mode) - attrs |= A_BOLD; + if (enter_bold_mode) + attrs |= A_BOLD; - if (enter_dim_mode) - attrs |= A_DIM; + if (enter_dim_mode) + attrs |= A_DIM; - if (enter_reverse_mode) - attrs |= A_REVERSE; + if (enter_reverse_mode) + attrs |= A_REVERSE; - if (enter_standout_mode) - attrs |= A_STANDOUT; + if (enter_standout_mode) + attrs |= A_STANDOUT; - if (enter_protected_mode) - attrs |= A_PROTECT; + if (enter_protected_mode) + attrs |= A_PROTECT; - if (enter_secure_mode) - attrs |= A_INVIS; + if (enter_secure_mode) + attrs |= A_INVIS; - if (enter_underline_mode) - attrs |= A_UNDERLINE; + if (enter_underline_mode) + attrs |= A_UNDERLINE; - if (SP->_coloron) - attrs |= A_COLOR; + if (SP->_coloron) + attrs |= A_COLOR; - return(attrs); + return (attrs); } - diff --git a/ncurses/tty/tty_display.h b/ncurses/tty/tty_display.h index 1bc0d2d9..e7b447d8 100644 --- a/ncurses/tty/tty_display.h +++ b/ncurses/tty/tty_display.h @@ -132,15 +132,6 @@ struct tty_display_data { vidattr(AttrOf(c)); #endif -/* - * Check whether the given character can be output by clearing commands. This - * includes test for being a space and not including any 'bad' attributes, such - * as A_REVERSE. All attribute flags which don't affect appearance of a space - * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded. - */ -#define can_clear_with(ch) \ - ((ch & ~(NONBLANK_ATTR|(back_color_erase ? A_COLOR:0))) == BLANK) - #define XMC_CHANGES(c) ((c) & D->_xmc_suppress) #endif /* TTY_DISPLAY_H */ diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index a5a640f8..1f3dd463 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /*----------------------------------------------------------------- * * lib_doupdate.c @@ -63,8 +62,6 @@ #endif #if USE_FUNC_POLL -#include -#include #elif HAVE_SELECT #if HAVE_SYS_SELECT_H #include @@ -73,7 +70,7 @@ #include -MODULE_ID("$Id: tty_update.c,v 1.117 1999/10/22 23:28:46 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.141 2000/07/04 21:01:40 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -86,6 +83,8 @@ MODULE_ID("$Id: tty_update.c,v 1.117 1999/10/22 23:28:46 tom Exp $") */ #define CHECK_INTERVAL 5 +#define FILL_BCE() (SP->_coloron && !SP->_default_color && !back_color_erase) + /* * Enable checking to see if doupdate and friends are tracking the true * cursor position correctly. NOTE: this is a debugging hack which will @@ -93,13 +92,13 @@ MODULE_ID("$Id: tty_update.c,v 1.117 1999/10/22 23:28:46 tom Exp $") */ /* #define POSITION_DEBUG */ -static inline chtype ClrBlank ( WINDOW *win ); +static inline chtype ClrBlank(WINDOW *win); static int ClrBottom(int total); -static void ClearScreen( chtype blank ); -static void ClrUpdate( void ); -static void DelChar( int count ); -static void InsStr( chtype *line, int count ); -static void TransformLine( int const lineno ); +static void ClearScreen(chtype blank); +static void ClrUpdate(void); +static void DelChar(int count); +static void InsStr(chtype * line, int count); +static void TransformLine(int const lineno); #ifdef POSITION_DEBUG /**************************************************************************** @@ -108,19 +107,20 @@ static void TransformLine( int const lineno ); * ****************************************************************************/ -static void position_check(int expected_y, int expected_x, char *legend) +static void +position_check(int expected_y, int expected_x, char *legend) /* check to see if the real cursor position matches the virtual */ { - char buf[20]; + char buf[20]; int y, x; if (!_nc_tracing || (expected_y < 0 && expected_x < 0)) return; memset(buf, '\0', sizeof(buf)); - putp("\033[6n"); /* only works on ANSI-compatibles */ + putp("\033[6n"); /* only works on ANSI-compatibles */ _nc_flush(); - (void) read(0, buf, sizeof(buf)-1); + (void) read(0, buf, sizeof(buf) - 1); _tracef("probe returned %s", _nc_visbuf(buf)); /* try to interpret as a position report */ @@ -134,14 +134,14 @@ static void position_check(int expected_y, int expected_x, char *legend) if (y - 1 != expected_y || x - 1 != expected_x) { beep(); _tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s", - y-1, x-1, expected_y, expected_x, legend); + y - 1, x - 1, expected_y, expected_x, legend); } else { _tracef("position matches OK in %s", legend); } } } #else -#define position_check(expected_y, expected_x, legend) /* nothing */ +#define position_check(expected_y, expected_x, legend) /* nothing */ #endif /* POSITION_DEBUG */ /**************************************************************************** @@ -150,115 +150,118 @@ static void position_check(int expected_y, int expected_x, char *legend) * ****************************************************************************/ -static inline void GoTo(int const row, int const col) +static inline void +GoTo(int const row, int const col) { - chtype oldattr = SP->_current_attr; + chtype oldattr = SP->_current_attr; - TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)", - row, col, SP->_cursrow, SP->_curscol)); + TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)", + row, col, SP->_cursrow, SP->_curscol)); - position_check(SP->_cursrow, SP->_curscol, "GoTo"); + 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); - } + /* + * 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"); + mvcur(SP->_cursrow, SP->_curscol, row, col); + SP->_cursrow = row; + SP->_curscol = col; + position_check(SP->_cursrow, SP->_curscol, "GoTo2"); } -static inline void PutAttrChar(chtype ch) +static inline void +PutAttrChar(chtype ch) { - if (tilde_glitch && (TextOf(ch) == '~')) - ch = ('`' | AttrOf(ch)); - - TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", - _tracechtype(ch), - SP->_cursrow, SP->_curscol)); - UpdateAttrs(ch); - if (SP->_cleanup) { - _nc_outch((int)TextOf(ch)); - } else { - putc((int)TextOf(ch), SP->_ofp); /* macro's fastest... */ + int data; + + if (tilde_glitch && (TextOf(ch) == '~')) + ch = ('`' | AttrOf(ch)); + + TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)", + _tracechtype(ch), + SP->_cursrow, SP->_curscol)); + UpdateAttrs(ch); + data = TextOf(ch); + if (SP->_outch != 0) { + SP->_outch(data); + } else { + putc(data, SP->_ofp); /* macro's fastest... */ #ifdef TRACE - _nc_outchars++; + _nc_outchars++; #endif /* TRACE */ - } - SP->_curscol++; - if (char_padding) { - TPUTS_TRACE("char_padding"); - putp(char_padding); - } + } + SP->_curscol++; + if (char_padding) { + TPUTS_TRACE("char_padding"); + putp(char_padding); + } } -static bool check_pending(void) +static bool +check_pending(void) /* check for pending input */ { - bool have_pending = FALSE; + bool have_pending = FALSE; - /* - * Only carry out this check when the flag is zero, otherwise we'll - * have the refreshing slow down drastically (or stop) if there's an - * unread character available. - */ - if(SP->_fifohold != 0) - return FALSE; + /* + * Only carry out this check when the flag is zero, otherwise we'll + * have the refreshing slow down drastically (or stop) if there's an + * unread character available. + */ + if (SP->_fifohold != 0) + return FALSE; - if (SP->_checkfd >= 0) { + if (SP->_checkfd >= 0) { #if USE_FUNC_POLL - struct pollfd fds[1]; - fds[0].fd = SP->_checkfd; - fds[0].events = POLLIN; - if (poll(fds, 1, 0) > 0) - { - have_pending = TRUE; - } + struct pollfd fds[1]; + fds[0].fd = SP->_checkfd; + fds[0].events = POLLIN; + if (poll(fds, 1, 0) > 0) { + have_pending = TRUE; + } #elif defined(__BEOS__) - /* - * BeOS's select() is declared in socket.h, so the configure script does - * not see it. That's just as well, since that function works only for - * sockets. This (using snooze and ioctl) was distilled from Be's patch - * for ncurses which uses a separate thread to simulate select(). - * - * FIXME: the return values from the ioctl aren't very clear if we get - * interrupted. - */ - int n = 0; - int howmany = ioctl(0, 'ichr', &n); - if (howmany >= 0 && n > 0) { - have_pending = TRUE; - } + /* + * BeOS's select() is declared in socket.h, so the configure script does + * not see it. That's just as well, since that function works only for + * sockets. This (using snooze and ioctl) was distilled from Be's patch + * for ncurses which uses a separate thread to simulate select(). + * + * FIXME: the return values from the ioctl aren't very clear if we get + * interrupted. + */ + int n = 0; + int howmany = ioctl(0, 'ichr', &n); + if (howmany >= 0 && n > 0) { + have_pending = TRUE; + } #elif HAVE_SELECT - fd_set fdset; - struct timeval ktimeout; + fd_set fdset; + struct timeval ktimeout; - ktimeout.tv_sec = - ktimeout.tv_usec = 0; + ktimeout.tv_sec = + ktimeout.tv_usec = 0; - FD_ZERO(&fdset); - FD_SET(SP->_checkfd, &fdset); - if (select(SP->_checkfd+1, &fdset, NULL, NULL, &ktimeout) != 0) - { - have_pending = TRUE; - } -#endif - } - if (have_pending) { - SP->_fifohold = 5; - _nc_flush(); + FD_ZERO(&fdset); + FD_SET(SP->_checkfd, &fdset); + if (select(SP->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) { + have_pending = TRUE; } - return FALSE; +#endif + } + if (have_pending) { + SP->_fifohold = 5; + _nc_flush(); + } + return FALSE; } /* @@ -274,15 +277,13 @@ static void callPutChar(chtype const); static inline void PutChar(chtype const ch); /* forward declaration */ /* put char at lower right corner */ -static void PutCharLR(chtype const ch) +static void +PutCharLR(chtype const ch) { - if (!auto_right_margin) - { + if (!auto_right_margin) { /* we can put the char directly */ PutAttrChar(ch); - } - else if (enter_am_mode && exit_am_mode) - { + } else if (enter_am_mode && exit_am_mode) { /* we can suppress automargin */ TPUTS_TRACE("exit_am_mode"); putp(exit_am_mode); @@ -293,21 +294,19 @@ static void PutCharLR(chtype const ch) TPUTS_TRACE("enter_am_mode"); putp(enter_am_mode); - } - else if ((enter_insert_mode && exit_insert_mode) - || insert_character || parm_ich) - { - GoTo(screen_lines-1,screen_columns-2); + } else if ((enter_insert_mode && exit_insert_mode) + || insert_character || parm_ich) { + GoTo(screen_lines - 1, screen_columns - 2); callPutChar(ch); - GoTo(screen_lines-1,screen_columns-2); - InsStr(newscr->_line[screen_lines-1].text+screen_columns-2,1); + GoTo(screen_lines - 1, screen_columns - 2); + InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1); } } -static void wrap_cursor(void) +static void +wrap_cursor(void) { - if (eat_newline_glitch) - { + if (eat_newline_glitch) { /* * xenl can manifest two different ways. The vt100 * way is that, when you'd expect the cursor to wrap, @@ -326,23 +325,20 @@ static void wrap_cursor(void) */ SP->_curscol = -1; SP->_cursrow = -1; - } - else if (auto_right_margin) - { + } else if (auto_right_margin) { SP->_curscol = 0; SP->_cursrow++; - } - else - { + } else { SP->_curscol--; } position_check(SP->_cursrow, SP->_curscol, "wrap_cursor"); } -static inline void PutChar(chtype const ch) +static inline void +PutChar(chtype const ch) /* insert character, handling automargin stuff */ { - if (SP->_cursrow == screen_lines-1 && SP->_curscol == screen_columns-1) + if (SP->_cursrow == screen_lines - 1 && SP->_curscol == screen_columns - 1) PutCharLR(ch); else PutAttrChar(ch); @@ -353,6 +349,28 @@ static inline void PutChar(chtype const ch) position_check(SP->_cursrow, SP->_curscol, "PutChar"); } +/* + * Check whether the given character can be output by clearing commands. This + * includes test for being a space and not including any 'bad' attributes, such + * as A_REVERSE. All attribute flags which don't affect appearance of a space + * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded. + */ +static inline bool +can_clear_with(chtype ch) +{ + if (!back_color_erase && SP->_coloron) { + if (ch & A_COLOR) + return FALSE; +#ifdef NCURSES_EXT_FUNCS + if (!SP->_default_color) + return FALSE; + if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK) + return FALSE; +#endif + } + return ((ch & ~(NONBLANK_ATTR | A_COLOR)) == BLANK); +} + /* * Issue a given span of characters from an array. * Must be functionally equivalent to: @@ -365,26 +383,23 @@ static inline void PutChar(chtype const ch) * * This code is optimized using ech and rep. */ -static int EmitRange(const chtype *ntext, int num) +static int +EmitRange(const chtype * ntext, int num) { - int i; + int i; - if (erase_chars || repeat_char) - { - while (num > 0) - { - int runcount; + if (erase_chars || repeat_char) { + while (num > 0) { + int runcount; chtype ntext0; - while (num>1 && ntext[0]!=ntext[1]) - { + while (num > 1 && ntext[0] != ntext[1]) { PutChar(ntext[0]); ntext++; num--; } ntext0 = ntext[0]; - if (num==1) - { + if (num == 1) { PutChar(ntext0); return 0; } @@ -395,16 +410,15 @@ static int EmitRange(const chtype *ntext, int num) /* * The cost expression in the middle isn't exactly right. - * _cup_cost is an upper bound on the cost for moving to the + * _cup_ch_cost is an upper bound on the cost for moving to the * end of the erased area, but not the cost itself (which we * can't compute without emitting the move). This may result * in erase_chars not getting used in some situations for * which it would be marginally advantageous. */ if (erase_chars - && runcount > SP->_ech_cost + SP->_cup_cost - && can_clear_with(ntext0)) - { + && runcount > SP->_ech_cost + SP->_cup_ch_cost + && can_clear_with(ntext0)) { UpdateAttrs(ntext0); putp(tparm(erase_chars, runcount)); @@ -417,9 +431,7 @@ static int EmitRange(const chtype *ntext, int num) GoTo(SP->_cursrow, SP->_curscol + runcount); else return 1; /* cursor stays in the middle */ - } - else if (repeat_char && runcount > SP->_rep_cost) - { + } else if (repeat_char && runcount > SP->_rep_cost) { bool wrap_possible = (SP->_curscol + runcount >= screen_columns); int rep_count = runcount; @@ -432,9 +444,7 @@ static int EmitRange(const chtype *ntext, int num) if (wrap_possible) PutChar(ntext0); - } - else - { + } else { for (i = 0; i < runcount; i++) PutChar(ntext[i]); } @@ -457,345 +467,333 @@ static int EmitRange(const chtype *ntext, int num) * * Returns: same as EmitRange */ -static int PutRange( - const chtype *otext, - const chtype *ntext, - int row, - int first, int last) +static int +PutRange( + const chtype * otext, + const chtype * ntext, + int row, + int first, int last) { - int j, run; - int cost = min(SP->_cup_ch_cost, SP->_hpa_ch_cost); - - TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)", - otext, ntext, row, first, last)); - - if (otext != ntext - && (last-first+1) > cost) { - for (j = first, run = 0; j <= last; j++) { - if (otext[j] == ntext[j]) { - run++; - } else { - if (run > cost) { - int before_run = (j - run); - EmitRange(ntext+first, before_run-first); - GoTo(row, first = j); - } - run = 0; - } + int j, run; + + 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 (otext[j] == ntext[j]) { + run++; + } else { + if (run > SP->_inline_cost) { + int before_run = (j - run); + EmitRange(ntext + first, before_run - first); + GoTo(row, first = j); } + run = 0; + } } - return EmitRange(ntext + first, last-first+1); + } + return EmitRange(ntext + first, last - first + 1); } #if CC_HAS_INLINE_FUNCS -static void callPutChar(chtype const ch) +static void +callPutChar(chtype const ch) { - PutChar(ch); + PutChar(ch); } #endif +/* leave unbracketed here so 'indent' works */ #define MARK_NOCHANGE(win,row) \ - { \ win->_line[row].firstchar = _NOCHANGE; \ win->_line[row].lastchar = _NOCHANGE; \ - if_USE_SCROLL_HINTS(win->_line[row].oldindex = row); \ - } + if_USE_SCROLL_HINTS(win->_line[row].oldindex = row) -int doupdate(void) +int +doupdate(void) { -int i; -int nonempty; + int i; + int nonempty; #if USE_TRACE_TIMES -struct tms before, after; + struct tms before, after; #endif /* USE_TRACE_TIMES */ - T((T_CALLED("doupdate()"))); + T((T_CALLED("doupdate()"))); #ifdef TRACE - if (_nc_tracing & TRACE_UPDATE) - { - if (curscr->_clear) - _tracef("curscr is clear"); - else - _tracedump("curscr", curscr); - _tracedump("newscr", newscr); - } + if (_nc_tracing & TRACE_UPDATE) { + if (curscr->_clear) + _tracef("curscr is clear"); + else + _tracedump("curscr", curscr); + _tracedump("newscr", newscr); + } #endif /* TRACE */ - _nc_signal_handler(FALSE); + _nc_signal_handler(FALSE); - if (SP->_fifohold) - SP->_fifohold--; + if (SP->_fifohold) + SP->_fifohold--; #if USE_SIZECHANGE - if (SP->_endwin || SP->_sig_winch) - { - /* - * This is a transparent extension: XSI does not address it, - * and applications need not know that ncurses can do it. - * - * Check if the terminal size has changed while curses was off - * (this can happen in an xterm, for example), and resize the - * ncurses data structures accordingly. - */ - _nc_update_screensize(); - } + if (SP->_endwin || SP->_sig_winch) { + /* + * This is a transparent extension: XSI does not address it, + * and applications need not know that ncurses can do it. + * + * Check if the terminal size has changed while curses was off + * (this can happen in an xterm, for example), and resize the + * ncurses data structures accordingly. + */ + _nc_update_screensize(); + } #endif - if (SP->_endwin) { + if (SP->_endwin) { - T(("coming back from shell mode")); - reset_prog_mode(); + T(("coming back from shell mode")); + reset_prog_mode(); - _nc_mvcur_resume(); - _nc_screen_resume(); - SP->_mouse_resume(SP); - - SP->_endwin = FALSE; - } + _nc_mvcur_resume(); + _nc_screen_resume(); + SP->_mouse_resume(SP); + SP->_endwin = FALSE; + } #if USE_TRACE_TIMES - /* zero the metering machinery */ - _nc_outchars = 0; - (void) times(&before); + /* zero the metering machinery */ + _nc_outchars = 0; + (void) times(&before); #endif /* USE_TRACE_TIMES */ - /* - * This is the support for magic-cookie terminals. The - * theory: we scan the virtual screen looking for attribute - * turnons. Where we find one, check to make sure it's - * realizable by seeing if the required number of - * un-attributed blanks are present before and after the - * attributed range; try to shift the range boundaries over - * blanks (not changing the screen display) so this becomes - * true. If it is, shift the beginning attribute change - * appropriately (the end one, if we've gotten this far, is - * guaranteed room for its cookie). If not, nuke the added - * attributes out of the span. - */ + /* + * This is the support for magic-cookie terminals. The + * theory: we scan the virtual screen looking for attribute + * turnons. Where we find one, check to make sure it's + * realizable by seeing if the required number of + * un-attributed blanks are present before and after the + * attributed range; try to shift the range boundaries over + * blanks (not changing the screen display) so this becomes + * true. If it is, shift the beginning attribute change + * appropriately (the end one, if we've gotten this far, is + * guaranteed room for its cookie). If not, nuke the added + * attributes out of the span. + */ #if USE_XMC_SUPPORT - if (magic_cookie_glitch > 0) { - int j, k; - attr_t rattr = A_NORMAL; - - for (i = 0; i < screen_lines; i++) - for (j = 0; j < screen_columns; j++) - { - bool failed = FALSE; - chtype turnon = AttrOf(newscr->_line[i].text[j]) & ~rattr; - - /* is an attribute turned on here? */ - if (turnon == 0) { - rattr = AttrOf(newscr->_line[i].text[j]); - continue; - } + if (magic_cookie_glitch > 0) { + int j, k; + attr_t rattr = A_NORMAL; - T(("At (%d, %d): from %s...", i, j, _traceattr(rattr))); - T(("...to %s",_traceattr(turnon))); + for (i = 0; i < screen_lines; i++) { + for (j = 0; j < screen_columns; j++) { + bool failed = FALSE; + chtype turnon = AttrOf(newscr->_line[i].text[j]) & ~rattr; - /* - * If the attribute change location is a blank with a - * "safe" attribute, undo the attribute turnon. This may - * ensure there's enough room to set the attribute before - * the first non-blank in the run. - */ -#define SAFE(a) !((a) & (chtype)~NONBLANK_ATTR) - if (TextOf(newscr->_line[i].text[j])==' ' && SAFE(turnon)) - { - newscr->_line[i].text[j] &= ~turnon; - continue; - } + /* is an attribute turned on here? */ + if (turnon == 0) { + rattr = AttrOf(newscr->_line[i].text[j]); + continue; + } - /* check that there's enough room at start of span */ - for (k = 1; k <= magic_cookie_glitch; k++) - if (j-k < 0 - || TextOf(newscr->_line[i].text[j-k]) != ' ' - || !SAFE(AttrOf(newscr->_line[i].text[j-k]))) - failed = TRUE; - if (!failed) - { - bool end_onscreen = FALSE; - int m, n = j; - - /* find end of span, if it's onscreen */ - for (m = i; m < screen_lines; m++) - { - for ( ; n < screen_columns; n++) - { - if (AttrOf(newscr->_line[m].text[n]) == rattr) - { - end_onscreen = TRUE; - T(("Range attributed with %s ends at (%d, %d)", - _traceattr(turnon),m,n)); - goto foundit; - } - } - n = 0; - } - T(("Range attributed with %s ends offscreen", - _traceattr(turnon))); - foundit:; - - if (end_onscreen) - { - chtype *lastline = newscr->_line[m].text; - - /* - * If there are safely-attributed blanks at the - * end of the range, shorten the range. This will - * help ensure that there is enough room at end - * of span. - */ - while (n >= 0 - && TextOf(lastline[n]) == ' ' - && SAFE(AttrOf(lastline[n]))) - lastline[n--] &= ~turnon; - - /* check that there's enough room at end of span */ - for (k = 1; k <= magic_cookie_glitch; k++) - if (n + k >= screen_columns - || TextOf(lastline[n + k]) != ' ' - || !SAFE(AttrOf(lastline[n+k]))) - failed = TRUE; - } - } + T(("At (%d, %d): from %s...", i, j, _traceattr(rattr))); + T(("...to %s", _traceattr(turnon))); + + /* + * If the attribute change location is a blank with a + * "safe" attribute, undo the attribute turnon. This may + * ensure there's enough room to set the attribute before + * the first non-blank in the run. + */ +#define SAFE(a) (!((a) & (chtype)~NONBLANK_ATTR)) + if (TextOf(newscr->_line[i].text[j]) == ' ' && SAFE(turnon)) { + newscr->_line[i].text[j] &= ~turnon; + continue; + } - if (failed) - { - int p, q = j; - - T(("Clearing %s beginning at (%d, %d)", - _traceattr(turnon), i, j)); - - /* turn off new attributes over span */ - for (p = i; p < screen_lines; p++) - { - for ( ; q < screen_columns; q++) - { - if (AttrOf(newscr->_line[p].text[q]) == rattr) - goto foundend; - newscr->_line[p].text[q] &= ~turnon; + /* check that there's enough room at start of span */ + for (k = 1; k <= magic_cookie_glitch; k++) { + if (j - k < 0 + || TextOf(newscr->_line[i].text[j - k]) != ' ' + || !SAFE(AttrOf(newscr->_line[i].text[j - k]))) + failed = TRUE; + } + if (!failed) { + bool end_onscreen = FALSE; + int m, n = j; + + /* find end of span, if it's onscreen */ + for (m = i; m < screen_lines; m++) { + for (; n < screen_columns; n++) { + if (AttrOf(newscr->_line[m].text[n]) == rattr) { + end_onscreen = TRUE; + T(("Range attributed with %s ends at (%d, %d)", + _traceattr(turnon), m, n)); + goto foundit; } - q = 0; } - foundend:; + n = 0; } - else - { - T(("Cookie space for %s found before (%d, %d)", - _traceattr(turnon), i, j)); + T(("Range attributed with %s ends offscreen", + _traceattr(turnon))); + foundit:; + + if (end_onscreen) { + chtype *lastline = newscr->_line[m].text; /* - * back up the start of range so there's room - * for cookies before the first nonblank character + * If there are safely-attributed blanks at the + * end of the range, shorten the range. This will + * help ensure that there is enough room at end + * of span. */ + while (n >= 0 + && TextOf(lastline[n]) == ' ' + && SAFE(AttrOf(lastline[n]))) + lastline[n--] &= ~turnon; + + /* check that there's enough room at end of span */ for (k = 1; k <= magic_cookie_glitch; k++) - newscr->_line[i].text[j-k] |= turnon; + if (n + k >= screen_columns + || TextOf(lastline[n + k]) != ' ' + || !SAFE(AttrOf(lastline[n + k]))) + failed = TRUE; } + } - rattr = AttrOf(newscr->_line[i].text[j]); + if (failed) { + int p, q = j; + + T(("Clearing %s beginning at (%d, %d)", + _traceattr(turnon), i, j)); + + /* turn off new attributes over span */ + for (p = i; p < screen_lines; p++) { + for (; q < screen_columns; q++) { + if (AttrOf(newscr->_line[p].text[q]) == rattr) + goto foundend; + newscr->_line[p].text[q] &= ~turnon; + } + q = 0; + } + foundend:; + } else { + T(("Cookie space for %s found before (%d, %d)", + _traceattr(turnon), i, j)); + + /* + * back up the start of range so there's room + * for cookies before the first nonblank character + */ + for (k = 1; k <= magic_cookie_glitch; k++) + newscr->_line[i].text[j - k] |= turnon; } -#ifdef TRACE - /* show altered highlights after magic-cookie check */ - if (_nc_tracing & TRACE_UPDATE) - { - _tracef("After magic-cookie check..."); - _tracedump("newscr", newscr); + rattr = AttrOf(newscr->_line[i].text[j]); } -#endif /* TRACE */ } -#endif /* USE_XMC_SUPPORT */ - - nonempty = 0; - if (curscr->_clear || newscr->_clear) { /* force refresh ? */ - T(("clearing and updating from scratch")); - ClrUpdate(); - curscr->_clear = FALSE; /* reset flag */ - newscr->_clear = FALSE; /* reset flag */ - } else { - int changedlines = CHECK_INTERVAL; - if(check_pending()) - goto cleanup; +#ifdef TRACE + /* show altered highlights after magic-cookie check */ + if (_nc_tracing & TRACE_UPDATE) { + _tracef("After magic-cookie check..."); + _tracedump("newscr", newscr); + } +#endif /* TRACE */ + } +#endif /* USE_XMC_SUPPORT */ - nonempty = min(screen_lines, newscr->_maxy+1); + nonempty = 0; + if (curscr->_clear || newscr->_clear) { /* force refresh ? */ + T(("clearing and updating from scratch")); + ClrUpdate(); + curscr->_clear = FALSE; /* reset flag */ + newscr->_clear = FALSE; /* reset flag */ + } else { + int changedlines = CHECK_INTERVAL; - if (SP->_scrolling) { - _nc_scroll_optimize(); - } + if (check_pending()) + goto cleanup; - nonempty = ClrBottom(nonempty); + nonempty = min(screen_lines, newscr->_maxy + 1); - T(("Transforming lines, nonempty %d", nonempty)); - for (i = 0; i < nonempty; i++) { - /* - * Here is our line-breakout optimization. - */ - if (changedlines == CHECK_INTERVAL) - { - if (check_pending()) - goto cleanup; - changedlines = 0; - } + if (SP->_scrolling) { + _nc_scroll_optimize(); + } - /* - * newscr->line[i].firstchar is normally set - * by wnoutrefresh. curscr->line[i].firstchar - * is normally set by _nc_scroll_window in the - * vertical-movement optimization code, - */ - if (newscr->_line[i].firstchar != _NOCHANGE - || curscr->_line[i].firstchar != _NOCHANGE) - { - TransformLine(i); - changedlines++; - } + nonempty = ClrBottom(nonempty); - /* mark line changed successfully */ - if (i <= newscr->_maxy) - MARK_NOCHANGE(newscr,i) - if (i <= curscr->_maxy) - MARK_NOCHANGE(curscr,i) - } + T(("Transforming lines, nonempty %d", nonempty)); + for (i = 0; i < nonempty; i++) { + /* + * Here is our line-breakout optimization. + */ + if (changedlines == CHECK_INTERVAL) { + if (check_pending()) + goto cleanup; + changedlines = 0; + } + + /* + * newscr->line[i].firstchar is normally set + * by wnoutrefresh. curscr->line[i].firstchar + * is normally set by _nc_scroll_window in the + * vertical-movement optimization code, + */ + if (newscr->_line[i].firstchar != _NOCHANGE + || curscr->_line[i].firstchar != _NOCHANGE) { + TransformLine(i); + changedlines++; + } + + /* mark line changed successfully */ + if (i <= newscr->_maxy) { + MARK_NOCHANGE(newscr, i) + } + if (i <= curscr->_maxy) { + MARK_NOCHANGE(curscr, i) + } } + } - /* put everything back in sync */ - for (i = nonempty; i <= newscr->_maxy; i++) - MARK_NOCHANGE(newscr,i) - for (i = nonempty; i <= curscr->_maxy; i++) - MARK_NOCHANGE(curscr,i) + /* put everything back in sync */ + for (i = nonempty; i <= newscr->_maxy; i++) { + MARK_NOCHANGE(newscr, i) + } + for (i = nonempty; i <= curscr->_maxy; i++) { + MARK_NOCHANGE(curscr, i) + } - if (!newscr->_leaveok) - { - curscr->_curx = newscr->_curx; - curscr->_cury = newscr->_cury; + if (!newscr->_leaveok) { + curscr->_curx = newscr->_curx; + curscr->_cury = newscr->_cury; - GoTo(curscr->_cury, curscr->_curx); - } + GoTo(curscr->_cury, curscr->_curx); + } - cleanup: - /* - * Keep the physical screen in normal mode in case we get other - * processes writing to the screen. - */ - UpdateAttrs(A_NORMAL); + cleanup: + /* + * Keep the physical screen in normal mode in case we get other + * processes writing to the screen. + */ + UpdateAttrs(A_NORMAL); - _nc_flush(); - curscr->_attrs = newscr->_attrs; -/* curscr->_bkgd = newscr->_bkgd; */ + _nc_flush(); + curscr->_attrs = newscr->_attrs; #if USE_TRACE_TIMES - (void) times(&after); - TR(TRACE_TIMES, ("Update cost: %ld chars, %ld clocks system time, %ld clocks user time", + (void) times(&after); + TR(TRACE_TIMES, + ("Update cost: %ld chars, %ld clocks system time, %ld clocks user time", _nc_outchars, - after.tms_stime-before.tms_stime, - after.tms_utime-before.tms_utime)); + after.tms_stime - before.tms_stime, + after.tms_utime - before.tms_utime)); #endif /* USE_TRACE_TIMES */ - _nc_signal_handler(TRUE); + _nc_signal_handler(TRUE); - returnCode(OK); + returnCode(OK); } /* @@ -811,12 +809,13 @@ struct tms before, after; #define BCE_ATTRS (A_NORMAL|A_COLOR) #define BCE_BKGD(win) (((win) == curscr ? stdscr : (win))->_bkgd) -static inline chtype ClrBlank (WINDOW *win) +static inline chtype +ClrBlank(WINDOW *win) { -chtype blank = BLANK; - if (back_color_erase) - blank |= (BCE_BKGD(win) & BCE_ATTRS); - return blank; + chtype blank = BLANK; + if (back_color_erase) + blank |= (BCE_BKGD(win) & BCE_ATTRS); + return blank; } /* @@ -826,22 +825,23 @@ chtype blank = BLANK; ** */ -static void ClrUpdate(void) +static void +ClrUpdate(void) { - int i; - chtype blank = ClrBlank(stdscr); - int nonempty = min(screen_lines, newscr->_maxy+1); + int i; + chtype blank = ClrBlank(stdscr); + int nonempty = min(screen_lines, newscr->_maxy + 1); - T(("ClrUpdate() called")); + T(("ClrUpdate() called")); - ClearScreen(blank); + ClearScreen(blank); - T(("updating screen from scratch")); + T(("updating screen from scratch")); - nonempty = ClrBottom(nonempty); + nonempty = ClrBottom(nonempty); - for (i = 0; i < nonempty; i++) - TransformLine(i); + for (i = 0; i < nonempty; i++) + TransformLine(i); } /* @@ -850,35 +850,37 @@ static void ClrUpdate(void) ** Clear to end of current line, starting at the cursor position */ -static void ClrToEOL(chtype blank) +static void +ClrToEOL(chtype blank, bool needclear) { -int j; -bool needclear = FALSE; + int j; - for (j = SP->_curscol; j < screen_columns; j++) - { + if (curscr != 0 + && SP->_cursrow >= 0 + && SP->_curscol >= 0) { + for (j = SP->_curscol; j < screen_columns; j++) { chtype *cp = &(curscr->_line[SP->_cursrow].text[j]); - if (*cp != blank) - { + if (*cp != blank) { *cp = blank; needclear = TRUE; } } + } else { + needclear = TRUE; + } - if (needclear) - { - UpdateAttrs(blank); - TPUTS_TRACE("clr_eol"); - if (SP->_el_cost > (screen_columns - SP->_curscol)) - { - int count = (screen_columns - SP->_curscol); - while (count-- > 0) - PutChar(blank); - } - else - putp(clr_eol); + if (needclear) { + UpdateAttrs(blank); + TPUTS_TRACE("clr_eol"); + if (SP->_el_cost > (screen_columns - SP->_curscol)) { + int count = (screen_columns - SP->_curscol); + while (count-- > 0) + PutChar(blank); + } else { + putp(clr_eol); } + } } /* @@ -887,23 +889,27 @@ bool needclear = FALSE; ** Clear to end of screen, starting at the cursor position */ -static void ClrToEOS(chtype blank) +static void +ClrToEOS(chtype blank) { -int row, col; + int row, col; + + row = SP->_cursrow; + col = SP->_curscol; + { UpdateAttrs(blank); TPUTS_TRACE("clr_eos"); - row = SP->_cursrow; - tputs(clr_eos, screen_lines-row, _nc_outch); + tputs(clr_eos, screen_lines - row, _nc_outch); + } - for (col = SP->_curscol; col < screen_columns; col++) - curscr->_line[row].text[col] = blank; + while (col < screen_columns) + curscr->_line[row].text[col++] = blank; - for (row++; row < screen_lines; row++) - { - for (col = 0; col < screen_columns; col++) - curscr->_line[row].text[col] = blank; - } + for (row++; row < screen_lines; row++) { + for (col = 0; col < screen_columns; col++) + curscr->_line[row].text[col] = blank; + } } /* @@ -913,57 +919,44 @@ int row, col; * screen-update. Do this by scanning backwards through the lines in the * screen, checking if each is blank, and one or more are changed. */ -static int ClrBottom(int total) +static int +ClrBottom(int total) { -static chtype *tstLine; -static size_t lenLine; - -int row, col; -int top = total; -int last = min(screen_columns, newscr->_maxx+1); -size_t length = sizeof(chtype) * last; -chtype blank = newscr->_line[total-1].text[last-1]; /* lower right char */ - - if(!clr_eos || !can_clear_with(blank)) - return total; - - if ((tstLine == 0) || (last > (int)lenLine)) { - tstLine = typeRealloc(chtype, last, tstLine); - if (tstLine != 0) { - lenLine = last; - for (col = 0; col < last; col++) - tstLine[col] = blank; - } - } + int row; + int col; + int top = total; + int last = min(screen_columns, newscr->_maxx + 1); + chtype blank = ClrBlank(stdscr); + bool ok; + + if (clr_eos && can_clear_with(blank)) { + + for (row = total - 1; row >= 0; row--) { + for (col = 0, ok = TRUE; ok && col < last; col++) { + ok = (newscr->_line[row].text[col] == blank); + } + if (!ok) break; - if (tstLine != 0) { - for (row = total-1; row >= 0; row--) { - if (memcmp(tstLine, newscr->_line[row].text, length)) - break; - if (memcmp(tstLine, curscr->_line[row].text, length)) - top = row; - } + for (col = 0; ok && col < last; col++) { + ok = (curscr->_line[row].text[col] == blank); + } + if (!ok) top = row; + } - /* don't use clr_eos for just one line if clr_eol available */ - if (top < total-1 || (top < total && !clr_eol && !clr_bol)) { - 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]; - } - } + /* don't use clr_eos for just one line if clr_eol available */ + if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) { + 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]; + } } -#if NO_LEAKS - if (tstLine != 0) - FreeAndNull(tstLine); -#endif - return total; + } + return total; } - /* ** TransformLine(lineno) ** @@ -982,35 +975,69 @@ chtype blank = newscr->_line[total-1].text[last-1]; /* lower right char */ ** delete oLastChar - nLastChar spaces */ -static void TransformLine(int const lineno) +static void +TransformLine(int const lineno) { -int firstChar, oLastChar, nLastChar; -chtype *newLine = newscr->_line[lineno].text; -chtype *oldLine = curscr->_line[lineno].text; -int n; -bool attrchanged = FALSE; - - T(("TransformLine(%d) called", lineno)); - - /* copy new hash value to old one */ - if (SP->oldhash && SP->newhash) - SP->oldhash[lineno] = SP->newhash[lineno]; - - if(ceol_standout_glitch && clr_eol) { - firstChar = 0; - while(firstChar < screen_columns) { - if(AttrOf(newLine[firstChar]) != AttrOf(oldLine[firstChar])) - attrchanged = TRUE; - firstChar++; + int firstChar, oLastChar, nLastChar; + chtype *newLine = newscr->_line[lineno].text; + chtype *oldLine = curscr->_line[lineno].text; + int n; + bool attrchanged = FALSE; + + T(("TransformLine(%d) called", lineno)); + + /* copy new hash value to old one */ + if (SP->oldhash && SP->newhash) + SP->oldhash[lineno] = SP->newhash[lineno]; + +#define ColorOf(n) ((n) & A_COLOR) +#define unColor(n) ((n) & ALL_BUT_COLOR) + /* + * If we have colors, there is the possibility of having two color pairs + * that display as the same colors. For instance, Lynx does this. Check + * for this case, and update the old line with the new line's colors when + * they are equivalent. + */ + if (SP->_coloron) { + chtype oldColor; + chtype newColor; + int oldPair; + int newPair; + + for (n = 0; n < screen_columns; n++) { + if (newLine[n] != oldLine[n]) { + oldColor = ColorOf(oldLine[n]); + newColor = ColorOf(newLine[n]); + if (oldColor != newColor + && unColor(oldLine[n]) == unColor(newLine[n])) { + oldPair = PAIR_NUMBER(oldColor); + newPair = PAIR_NUMBER(newColor); + if (oldPair < COLOR_PAIRS + && newPair < COLOR_PAIRS + && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) { + oldLine[n] &= ~A_COLOR; + oldLine[n] |= ColorOf(newLine[n]); + } } + } } + } + if (ceol_standout_glitch && clr_eol) { firstChar = 0; + while (firstChar < screen_columns) { + if (AttrOf(newLine[firstChar]) != AttrOf(oldLine[firstChar])) + attrchanged = TRUE; + firstChar++; + } + } - if (attrchanged) { /* we may have to disregard the whole line */ - GoTo(lineno, firstChar); - ClrToEOL(ClrBlank(curscr)); - PutRange(oldLine, newLine, lineno, 0, (screen_columns-1)); + firstChar = 0; + + if (attrchanged) { /* we may have to disregard the whole line */ + GoTo(lineno, firstChar); + ClrToEOL(ClrBlank(curscr), FALSE); + PutRange(oldLine, newLine, lineno, 0, (screen_columns - 1)); #if USE_XMC_SUPPORT #define NEW(r,c) newscr->_line[r].text[c] @@ -1028,199 +1055,194 @@ bool attrchanged = FALSE; * will work properly only once, since we may overwrite a cookie in a * following operation. */ - } else if (magic_cookie_glitch > 0) { - GoTo(lineno, firstChar); - for (n = 0; n < screen_columns; n++) { - int m = n + magic_cookie_glitch; - - /* check for turn-on: - * If we are writing an attributed blank, where the - * previous cell is not attributed. - */ - if (TextOf(newLine[n]) == ' ' - && ((n > 0 - && xmc_turn_on(newLine[n-1], newLine[n])) - || (n == 0 - && lineno > 0 - && xmc_turn_on(NEW(lineno-1,screen_columns-1), newLine[n])))) { - n = m; - } + } else if (magic_cookie_glitch > 0) { + GoTo(lineno, firstChar); + for (n = 0; n < screen_columns; n++) { + int m = n + magic_cookie_glitch; + + /* check for turn-on: + * If we are writing an attributed blank, where the + * previous cell is not attributed. + */ + if (TextOf(newLine[n]) == ' ' + && ((n > 0 + && xmc_turn_on(newLine[n - 1], newLine[n])) + || (n == 0 + && lineno > 0 + && xmc_turn_on(NEW(lineno - 1, screen_columns - 1), + newLine[n])))) { + n = m; + } - PutChar(newLine[n]); + PutChar(newLine[n]); - /* check for turn-off: - * If we are writing an attributed non-blank, where the - * next cell is blank, and not attributed. - */ - if (TextOf(newLine[n]) != ' ' - && ((n+1 < screen_columns - && xmc_turn_off(newLine[n], newLine[n+1])) - || (n+1 >= screen_columns - && lineno+1 < screen_lines - && xmc_turn_off(newLine[n], NEW(lineno+1,0))))) { - n = m; - } + /* check for turn-off: + * If we are writing an attributed non-blank, where the + * next cell is blank, and not attributed. + */ + if (TextOf(newLine[n]) != ' ' + && ((n + 1 < screen_columns + && xmc_turn_off(newLine[n], newLine[n + 1])) + || (n + 1 >= screen_columns + && lineno + 1 < screen_lines + && xmc_turn_off(newLine[n], NEW(lineno + 1, 0))))) { + n = m; + } - } + } #undef NEW #endif - } else { - chtype blank; + } else { + chtype blank; + + /* find the first differing character */ + while (firstChar < screen_columns && + 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 && can_clear_with(blank = newLine[0])) { + int oFirstChar, nFirstChar; + + for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++) + if (oldLine[oFirstChar] != blank) + break; + for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++) + if (newLine[nFirstChar] != blank) + break; + + if (nFirstChar > oFirstChar + SP->_el1_cost) { + if (nFirstChar >= screen_columns && SP->_el_cost <= SP->_el1_cost) { + GoTo(lineno, 0); + UpdateAttrs(blank); + TPUTS_TRACE("clr_eol"); + putp(clr_eol); + } else { + GoTo(lineno, nFirstChar - 1); + UpdateAttrs(blank); + TPUTS_TRACE("clr_bol"); + putp(clr_bol); + } - /* find the first differing character */ - while (firstChar < screen_columns && - newLine[firstChar] == oldLine[firstChar]) - firstChar++; + while (firstChar < nFirstChar) + oldLine[firstChar++] = blank; - /* 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 && can_clear_with(blank=newLine[0])) - { - int oFirstChar, nFirstChar; - - for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++) - if (oldLine[oFirstChar] != blank) - break; - for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++) - if (newLine[nFirstChar] != blank) - break; - - if (nFirstChar > oFirstChar + SP->_el1_cost) - { - if (nFirstChar >= screen_columns && SP->_el_cost <= SP->_el1_cost) - { - GoTo(lineno, 0); - UpdateAttrs(blank); - TPUTS_TRACE("clr_eol"); - putp(clr_eol); - } - else - { - GoTo(lineno, nFirstChar - 1); - UpdateAttrs(blank); - TPUTS_TRACE("clr_bol"); - putp(clr_bol); - } - - while (firstChar < nFirstChar) - oldLine[firstChar++] = blank; - - if (firstChar >= screen_columns) - return; - } - } + return; + } + } - blank = newLine[screen_columns-1]; + blank = newLine[screen_columns - 1]; - if(!can_clear_with(blank)) - { - /* find the last differing character */ - nLastChar = screen_columns - 1; + if (!can_clear_with(blank)) { + /* find the last differing character */ + nLastChar = screen_columns - 1; - while (nLastChar > firstChar - && newLine[nLastChar] == oldLine[nLastChar]) - nLastChar--; + while (nLastChar > firstChar + && newLine[nLastChar] == oldLine[nLastChar]) + nLastChar--; - if (nLastChar >= firstChar) { - GoTo(lineno, firstChar); - PutRange(oldLine, newLine, lineno, firstChar, nLastChar); - memcpy( oldLine + firstChar, - newLine + firstChar, - (nLastChar - firstChar + 1) * sizeof(chtype)); - } - return; - } + if (nLastChar >= firstChar) { + GoTo(lineno, firstChar); + PutRange(oldLine, newLine, lineno, firstChar, nLastChar); + memcpy(oldLine + firstChar, + newLine + firstChar, + (nLastChar - firstChar + 1) * sizeof(chtype)); + } + return; + } - /* find last non-blank character on old line */ - oLastChar = screen_columns - 1; - while (oLastChar > firstChar && oldLine[oLastChar] == blank) - oLastChar--; - - /* find last non-blank character on new line */ - nLastChar = screen_columns - 1; - while (nLastChar > firstChar && newLine[nLastChar] == blank) - nLastChar--; - - if((nLastChar == firstChar) - && (SP->_el_cost < (oLastChar - nLastChar))) { - GoTo(lineno, firstChar); - if(newLine[firstChar] != blank ) - PutChar(newLine[firstChar]); - ClrToEOL(blank); - } else if( (nLastChar != oLastChar) - && (newLine[nLastChar] != oldLine[oLastChar] - || !(_nc_idcok && has_ic())) ) { - GoTo(lineno, firstChar); - if ((oLastChar - nLastChar) > SP->_el_cost) { - if(PutRange(oldLine, newLine, lineno, firstChar, nLastChar)) - GoTo(lineno, nLastChar+1); - ClrToEOL(blank); - } else { - n = max( nLastChar , oLastChar ); - PutRange(oldLine, newLine, lineno, firstChar, n); - } + /* find last non-blank character on old line */ + oLastChar = screen_columns - 1; + while (oLastChar > firstChar && oldLine[oLastChar] == blank) + oLastChar--; + + /* find last non-blank character on new line */ + nLastChar = screen_columns - 1; + while (nLastChar > firstChar && newLine[nLastChar] == blank) + nLastChar--; + + if ((nLastChar == firstChar) + && (SP->_el_cost < (oLastChar - nLastChar))) { + GoTo(lineno, firstChar); + if (newLine[firstChar] != blank) + PutChar(newLine[firstChar]); + ClrToEOL(blank, FALSE); + } else if ((nLastChar != oLastChar) + && (newLine[nLastChar] != oldLine[oLastChar] + || !(_nc_idcok && has_ic()))) { + GoTo(lineno, firstChar); + if ((oLastChar - nLastChar) > SP->_el_cost) { + if (PutRange(oldLine, newLine, lineno, firstChar, nLastChar)) + GoTo(lineno, nLastChar + 1); + ClrToEOL(blank, FALSE); + } else { + n = max(nLastChar, oLastChar); + PutRange(oldLine, newLine, lineno, firstChar, n); + } + } else { + int nLastNonblank = nLastChar; + int oLastNonblank = oLastChar; + + /* find the last characters that really differ */ + while (newLine[nLastChar] == oldLine[oLastChar]) { + if (nLastChar != 0 + && oLastChar != 0) { + nLastChar--; + oLastChar--; } else { - int nLastNonblank = nLastChar; - int oLastNonblank = oLastChar; - - /* find the last characters that really differ */ - while (newLine[nLastChar] == oldLine[oLastChar]) { - if (nLastChar != 0 - && oLastChar != 0) { - nLastChar--; - oLastChar--; - } else { - break; - } - } + break; + } + } - n = min(oLastChar, nLastChar); - if (n >= firstChar) { - GoTo(lineno, firstChar); - PutRange(oldLine, newLine, lineno, firstChar, n); - } + n = min(oLastChar, nLastChar); + if (n >= firstChar) { + GoTo(lineno, firstChar); + PutRange(oldLine, newLine, lineno, firstChar, n); + } - if (oLastChar < nLastChar) { - int m = max(nLastNonblank, oLastNonblank); - GoTo(lineno, n+1); - if (InsCharCost(nLastChar - oLastChar) - > (m - n)) { - PutRange(oldLine, newLine, lineno, n+1, m); - } else { - InsStr(&newLine[n+1], nLastChar - oLastChar); - } - } else if (oLastChar > nLastChar ) { - GoTo(lineno, n+1); - if (DelCharCost(oLastChar - nLastChar) - > SP->_el_cost + nLastNonblank - (n+1)) { - if(PutRange(oldLine, newLine, lineno, - n+1, nLastNonblank)) - GoTo(lineno, nLastNonblank+1); - ClrToEOL(blank); - } else { - /* - * The delete-char sequence will - * effectively shift in blanks from the - * right margin of the screen. Ensure - * that they are the right color by - * setting the video attributes from - * the last character on the row. - */ - UpdateAttrs(blank); - DelChar(oLastChar - nLastChar); - } - } + if (oLastChar < nLastChar) { + int m = max(nLastNonblank, oLastNonblank); + GoTo(lineno, n + 1); + if (InsCharCost(nLastChar - oLastChar) + > (m - n)) { + PutRange(oldLine, newLine, lineno, n + 1, m); + } else { + InsStr(&newLine[n + 1], nLastChar - oLastChar); + } + } else if (oLastChar > nLastChar) { + GoTo(lineno, n + 1); + if (DelCharCost(oLastChar - nLastChar) + > SP->_el_cost + nLastNonblank - (n + 1)) { + if (PutRange(oldLine, newLine, lineno, + n + 1, nLastNonblank)) + GoTo(lineno, nLastNonblank + 1); + ClrToEOL(blank, FALSE); + } else { + /* + * The delete-char sequence will + * effectively shift in blanks from the + * right margin of the screen. Ensure + * that they are the right color by + * setting the video attributes from + * the last character on the row. + */ + UpdateAttrs(blank); + DelChar(oLastChar - nLastChar); } + } } + } - /* update the code's internal representation */ - if (screen_columns > firstChar) - memcpy( oldLine + firstChar, - newLine + firstChar, - (screen_columns - firstChar) * sizeof(chtype)); + /* update the code's internal representation */ + if (screen_columns > firstChar) + memcpy(oldLine + firstChar, + newLine + firstChar, + (screen_columns - firstChar) * sizeof(chtype)); } /* @@ -1230,46 +1252,65 @@ bool attrchanged = FALSE; ** */ -static void ClearScreen(chtype blank) +static void +ClearScreen(chtype blank) { - int i, j; + int i, j; + bool fast_clear = (clear_screen || clr_eos || clr_eol); + + T(("ClearScreen() called")); - T(("ClearScreen() called")); +#ifdef NCURSES_EXT_FUNCS + if (SP->_coloron + && !SP->_default_color) { + _nc_do_color(COLOR_PAIR(SP->_current_attr), 0, FALSE, _nc_outch); + if (!back_color_erase) { + fast_clear = FALSE; + } + } +#endif + if (fast_clear) { if (clear_screen) { - UpdateAttrs(blank); - TPUTS_TRACE("clear_screen"); - putp(clear_screen); - SP->_cursrow = SP->_curscol = 0; - position_check(SP->_cursrow, SP->_curscol, "ClearScreen"); + UpdateAttrs(blank); + TPUTS_TRACE("clear_screen"); + putp(clear_screen); + SP->_cursrow = SP->_curscol = 0; + position_check(SP->_cursrow, SP->_curscol, "ClearScreen"); } else if (clr_eos) { - SP->_cursrow = SP->_curscol = -1; - GoTo(0,0); + SP->_cursrow = SP->_curscol = -1; + GoTo(0, 0); - UpdateAttrs(blank); - TPUTS_TRACE("clr_eos"); - putp(clr_eos); + UpdateAttrs(blank); + TPUTS_TRACE("clr_eos"); + putp(clr_eos); } else if (clr_eol) { - SP->_cursrow = SP->_curscol = -1; + SP->_cursrow = SP->_curscol = -1; - for (i = 0; i < screen_lines; i++) { - GoTo(i, 0); - UpdateAttrs(blank); - TPUTS_TRACE("clr_eol"); - putp(clr_eol); - } - GoTo(0,0); - } else { - T(("cannot clear screen")); - return; + UpdateAttrs(blank); + for (i = 0; i < screen_lines; i++) { + GoTo(i, 0); + TPUTS_TRACE("clr_eol"); + putp(clr_eol); + } + GoTo(0, 0); } - + } else { + UpdateAttrs(blank); for (i = 0; i < screen_lines; i++) { - for (j = 0; j < screen_columns; j++) - curscr->_line[i].text[j] = blank; + GoTo(i, 0); + for (j = 0; j < screen_columns; j++) + PutChar(blank); } + GoTo(0, 0); + } - T(("screen cleared")); + for (i = 0; i < screen_lines; i++) { + for (j = 0; j < screen_columns; j++) + curscr->_line[i].text[j] = blank; + } + + T(("screen cleared")); } /* @@ -1279,51 +1320,50 @@ static void ClearScreen(chtype blank) ** */ -static void InsStr(chtype *line, int count) +static void +InsStr(chtype * line, int count) { - T(("InsStr(%p,%d) called", line, count)); - - /* Prefer parm_ich as it has the smallest cost - no need to shift - * the whole line on each character. */ - /* The order must match that of InsCharCost. */ - if (parm_ich) { - TPUTS_TRACE("parm_ich"); - tputs(tparm(parm_ich, count), count, _nc_outch); - while (count) { - PutAttrChar(*line); - line++; - count--; - } - } else if (enter_insert_mode && exit_insert_mode) { - TPUTS_TRACE("enter_insert_mode"); - putp(enter_insert_mode); - while (count) { - PutAttrChar(*line); - if (insert_padding) - { - TPUTS_TRACE("insert_padding"); - putp(insert_padding); - } - line++; - count--; - } - TPUTS_TRACE("exit_insert_mode"); - putp(exit_insert_mode); - } else { - while (count) { - TPUTS_TRACE("insert_character"); - putp(insert_character); - PutAttrChar(*line); - if (insert_padding) - { - TPUTS_TRACE("insert_padding"); - putp(insert_padding); - } - line++; - count--; - } + T(("InsStr(%p,%d) called", line, count)); + + /* Prefer parm_ich as it has the smallest cost - no need to shift + * the whole line on each character. */ + /* The order must match that of InsCharCost. */ + if (parm_ich) { + TPUTS_TRACE("parm_ich"); + tputs(tparm(parm_ich, count), count, _nc_outch); + while (count) { + PutAttrChar(*line); + line++; + count--; } - position_check(SP->_cursrow, SP->_curscol, "InsStr"); + } else if (enter_insert_mode && exit_insert_mode) { + TPUTS_TRACE("enter_insert_mode"); + putp(enter_insert_mode); + while (count) { + PutAttrChar(*line); + if (insert_padding) { + TPUTS_TRACE("insert_padding"); + putp(insert_padding); + } + line++; + count--; + } + TPUTS_TRACE("exit_insert_mode"); + putp(exit_insert_mode); + } else { + while (count) { + TPUTS_TRACE("insert_character"); + putp(insert_character); + PutAttrChar(*line); + if (insert_padding) { + TPUTS_TRACE("insert_padding"); + putp(insert_padding); + } + line++; + count--; + } + } + position_check(SP->_cursrow, SP->_curscol, "InsStr"); } /* @@ -1333,20 +1373,22 @@ static void InsStr(chtype *line, int count) ** */ -static void DelChar(int count) +static void +DelChar(int count) { - T(("DelChar(%d) called, position = (%d,%d)", count, newscr->_cury, newscr->_curx)); + int n; - if (parm_dch) { - TPUTS_TRACE("parm_dch"); - tputs(tparm(parm_dch, count), count, _nc_outch); - } else { - while (count--) - { - TPUTS_TRACE("delete_character"); - putp(delete_character); - } + T(("DelChar(%d) called, position = (%d,%d)", count, newscr->_cury, newscr->_curx)); + + if (parm_dch) { + TPUTS_TRACE("parm_dch"); + tputs(tparm(parm_dch, count), count, _nc_outch); + } else { + for (n = 0; n < count; n++) { + TPUTS_TRACE("delete_character"); + putp(delete_character); } + } } /* @@ -1355,7 +1397,8 @@ static void DelChar(int count) ** Emit a string without waiting for update. */ -void _nc_outstr(const char *str) +void +_nc_outstr(const char *str) { (void) putp(str); _nc_flush(); @@ -1394,149 +1437,136 @@ void _nc_outstr(const char *str) */ /* Try to scroll up assuming given csr (miny, maxy). Returns ERR on failure */ -static int scroll_csr_forward(int n, int top, int bot, int miny, int maxy, chtype blank) +static int +scroll_csr_forward(int n, int top, int bot, int miny, int maxy, chtype blank) { - int i; + int i, j; - if (n == 1 && scroll_forward && top == miny && bot == maxy) - { + if (n == 1 && scroll_forward && top == miny && bot == maxy) { GoTo(bot, 0); UpdateAttrs(blank); TPUTS_TRACE("scroll_forward"); tputs(scroll_forward, 0, _nc_outch); - } - else if (n == 1 && delete_line && bot == maxy) - { + } else if (n == 1 && delete_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("delete_line"); tputs(delete_line, 0, _nc_outch); - } - else if (parm_index && top == miny && bot == maxy) - { + } else if (parm_index && top == miny && bot == maxy) { GoTo(bot, 0); UpdateAttrs(blank); TPUTS_TRACE("parm_index"); tputs(tparm(parm_index, n, 0), n, _nc_outch); - } - else if (parm_delete_line && bot == maxy) - { + } else if (parm_delete_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("parm_delete_line"); tputs(tparm(parm_delete_line, n, 0), n, _nc_outch); - } - else if (scroll_forward && top == miny && bot == maxy) - { + } else if (scroll_forward && top == miny && bot == maxy) { GoTo(bot, 0); UpdateAttrs(blank); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { TPUTS_TRACE("scroll_forward"); tputs(scroll_forward, 0, _nc_outch); } - } - else if (delete_line && bot == maxy) - { + } else if (delete_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { TPUTS_TRACE("delete_line"); tputs(delete_line, 0, _nc_outch); } - } - else + } else return ERR; +#ifdef NCURSES_EXT_FUNCS + if (FILL_BCE()) { + for (i = 0; i < n; i++) { + GoTo(bot - i, 0); + for (j = 0; j < screen_columns; j++) + PutChar(blank); + } + } +#endif return OK; } /* Try to scroll down assuming given csr (miny, maxy). Returns ERR on failure */ /* n > 0 */ -static int scroll_csr_backward(int n, int top, int bot, int miny, int maxy, chtype blank) +static int +scroll_csr_backward(int n, int top, int bot, int miny, int maxy, chtype blank) { - int i; + int i, j; - if (n == 1 && scroll_reverse && top == miny && bot == maxy) - { + if (n == 1 && scroll_reverse && top == miny && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("scroll_reverse"); tputs(scroll_reverse, 0, _nc_outch); - } - else if (n == 1 && insert_line && bot == maxy) - { + } else if (n == 1 && insert_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("insert_line"); tputs(insert_line, 0, _nc_outch); - } - else if (parm_rindex && top == miny && bot == maxy) - { + } else if (parm_rindex && top == miny && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("parm_rindex"); tputs(tparm(parm_rindex, n, 0), n, _nc_outch); - } - else if (parm_insert_line && bot == maxy) - { + } else if (parm_insert_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); TPUTS_TRACE("parm_insert_line"); tputs(tparm(parm_insert_line, n, 0), n, _nc_outch); - } - else if (scroll_reverse && top == miny && bot == maxy) - { + } else if (scroll_reverse && top == miny && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { TPUTS_TRACE("scroll_reverse"); tputs(scroll_reverse, 0, _nc_outch); } - } - else if (insert_line && bot == maxy) - { + } else if (insert_line && bot == maxy) { GoTo(top, 0); UpdateAttrs(blank); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { TPUTS_TRACE("insert_line"); tputs(insert_line, 0, _nc_outch); } - } - else + } else return ERR; +#ifdef NCURSES_EXT_FUNCS + if (FILL_BCE()) { + for (i = 0; i < n; i++) { + GoTo(top + i, 0); + for (j = 0; j < screen_columns; j++) + PutChar(blank); + } + } +#endif return OK; } /* scroll by using delete_line at del and insert_line at ins */ /* n > 0 */ -static int scroll_idl(int n, int del, int ins, chtype blank) +static int +scroll_idl(int n, int del, int ins, chtype blank) { int i; - if(!((parm_delete_line || delete_line) && (parm_insert_line || insert_line))) + if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line))) return ERR; GoTo(del, 0); UpdateAttrs(blank); - if (n == 1 && delete_line) - { + if (n == 1 && delete_line) { TPUTS_TRACE("delete_line"); tputs(delete_line, 0, _nc_outch); - } - else if (parm_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++) - { + } else { /* if (delete_line) */ + for (i = 0; i < n; i++) { TPUTS_TRACE("delete_line"); tputs(delete_line, 0, _nc_outch); } @@ -1544,20 +1574,14 @@ static int scroll_idl(int n, int del, int ins, chtype blank) GoTo(ins, 0); UpdateAttrs(blank); - if (n == 1 && insert_line) - { + if (n == 1 && insert_line) { TPUTS_TRACE("insert_line"); tputs(insert_line, 0, _nc_outch); - } - else if (parm_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++) - { + } else { /* if (insert_line) */ + for (i = 0; i < n; i++) { TPUTS_TRACE("insert_line"); tputs(insert_line, 0, _nc_outch); } @@ -1566,12 +1590,13 @@ static int scroll_idl(int n, int del, int ins, chtype blank) return OK; } -int _nc_scrolln(int n, int top, int bot, int maxy) +int +_nc_scrolln(int n, int top, int bot, int maxy) /* scroll region from top to bot by n lines */ { - chtype blank=ClrBlank(stdscr); + chtype blank = ClrBlank(stdscr); int i; - bool cursor_saved=FALSE; + bool cursor_saved = FALSE; int res; TR(TRACE_MOVE, ("mvcur_scrolln(%d, %d, %d, %d)", n, top, bot, maxy)); @@ -1585,41 +1610,34 @@ int _nc_scrolln(int n, int top, int bot, int maxy) } #endif - if (n > 0) /* scroll up (forward) */ - { + if (n > 0) { /* scroll up (forward) */ /* * Explicitly clear if stuff pushed off top of region might * be saved by the terminal. */ if (non_dest_scroll_region || (memory_above && top == 0)) { - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { GoTo(i, 0); - ClrToEOL(BLANK); + ClrToEOL(BLANK, FALSE); } } res = scroll_csr_forward(n, top, bot, 0, maxy, blank); - if (res == ERR && change_scroll_region) - { - if ((((n==1 && scroll_forward) || parm_index) - && (SP->_cursrow == bot || SP->_cursrow == bot-1)) - && save_cursor && restore_cursor) - { - cursor_saved=TRUE; + if (res == ERR && change_scroll_region) { + if ((((n == 1 && scroll_forward) || parm_index) + && (SP->_cursrow == bot || SP->_cursrow == bot - 1)) + && save_cursor && restore_cursor) { + cursor_saved = TRUE; TPUTS_TRACE("save_cursor"); tputs(save_cursor, 0, _nc_outch); } TPUTS_TRACE("change_scroll_region"); tputs(tparm(change_scroll_region, top, bot), 0, _nc_outch); - if (cursor_saved) - { + if (cursor_saved) { TPUTS_TRACE("restore_cursor"); tputs(restore_cursor, 0, _nc_outch); - } - else - { + } else { SP->_cursrow = SP->_curscol = -1; } @@ -1631,51 +1649,39 @@ int _nc_scrolln(int n, int top, int bot, int maxy) } if (res == ERR && _nc_idlok) - res = scroll_idl(n, top, bot-n+1, blank); - } - else /* (n < 0) - scroll down (backward) */ - { + res = scroll_idl(n, top, bot - n + 1, blank); + } else { /* (n < 0) - scroll down (backward) */ /* * Do explicit clear to end of region if it's possible that the * terminal might hold on to stuff we push off the end. */ - if (non_dest_scroll_region || (memory_below && bot == maxy)) - { - if (bot == maxy && clr_eos) - { + if (non_dest_scroll_region || (memory_below && bot == maxy)) { + if (bot == maxy && clr_eos) { GoTo(maxy + n, 0); ClrToEOS(BLANK); - } - else if (clr_eol) - { - for (i = 0; i < -n; i++) - { + } else if (clr_eol) { + for (i = 0; i < -n; i++) { GoTo(maxy + n + i, 0); - ClrToEOL(BLANK); + ClrToEOL(BLANK, FALSE); } } } res = scroll_csr_backward(-n, top, bot, 0, maxy, blank); - if (res == ERR && change_scroll_region) - { - if (top != 0 && (SP->_cursrow == top || SP->_cursrow == top-1) - && save_cursor && restore_cursor) - { - cursor_saved=TRUE; + if (res == ERR && change_scroll_region) { + if (top != 0 && (SP->_cursrow == top || SP->_cursrow == top - 1) + && save_cursor && restore_cursor) { + cursor_saved = TRUE; TPUTS_TRACE("save_cursor"); tputs(save_cursor, 0, _nc_outch); } TPUTS_TRACE("change_scroll_region"); tputs(tparm(change_scroll_region, top, bot), 0, _nc_outch); - if (cursor_saved) - { + if (cursor_saved) { TPUTS_TRACE("restore_cursor"); tputs(restore_cursor, 0, _nc_outch); - } - else - { + } else { SP->_cursrow = SP->_curscol = -1; } @@ -1687,22 +1693,22 @@ int _nc_scrolln(int n, int top, int bot, int maxy) } if (res == ERR && _nc_idlok) - res = scroll_idl(-n, bot+n+1, top, blank); + res = scroll_idl(-n, bot + n + 1, top, blank); } if (res == ERR) - return(ERR); + return (ERR); _nc_scroll_window(curscr, n, top, bot, blank); /* shift hash values too - they can be reused */ _nc_scroll_oldhash(n, top, bot); - return(OK); + return (OK); } - -void _nc_screen_resume() +void +_nc_screen_resume(void) { /* make sure terminal is in a sane known state */ SP->_current_attr = A_NORMAL; @@ -1712,8 +1718,7 @@ void _nc_screen_resume() putp(orig_pair); if (exit_attribute_mode) putp(exit_attribute_mode); - else - { + else { /* turn off attributes */ if (exit_alt_charset_mode) putp(exit_alt_charset_mode); @@ -1728,30 +1733,47 @@ void _nc_screen_resume() putp(auto_right_margin ? enter_am_mode : exit_am_mode); } -void _nc_screen_init() +void +_nc_screen_init(void) { _nc_screen_resume(); } /* wrap up screen handling */ -void _nc_screen_wrap() +void +_nc_screen_wrap(void) { UpdateAttrs(A_NORMAL); +#ifdef NCURSES_EXT_FUNCS + if (SP->_coloron + && !SP->_default_color) { + SP->_default_color = TRUE; + _nc_do_color(-1, 0, FALSE, _nc_outch); + SP->_default_color = FALSE; + + mvcur(SP->_cursrow, SP->_curscol, screen_lines - 1, 0); + SP->_cursrow = screen_lines - 1; + SP->_curscol = 0; + + ClrToEOL(BLANK, TRUE); + } +#endif } #if USE_XMC_SUPPORT -void _nc_do_xmc_glitch(attr_t previous) +void +_nc_do_xmc_glitch(attr_t previous) { - attr_t chg = XMC_CHANGES(previous ^ SP->_current_attr); - - while (chg != 0) { - if (chg & 1) { - SP->_curscol += magic_cookie_glitch; - if (SP->_curscol >= SP->_columns) - wrap_cursor(); - T(("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol)); - } - chg >>= 1; + attr_t chg = XMC_CHANGES(previous ^ SP->_current_attr); + + while (chg != 0) { + if (chg & 1) { + SP->_curscol += magic_cookie_glitch; + if (SP->_curscol >= SP->_columns) + wrap_cursor(); + T(("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol)); } + chg >>= 1; + } } #endif /* USE_XMC_SUPPORT */ diff --git a/panel/Makefile.in b/panel/Makefile.in index 3110f830..e5f528d7 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.28 1998/11/29 01:03:31 Rick.Ohnemus Exp $ +# $Id: Makefile.in,v 1.31 2000/05/28 01:40:32 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -67,6 +67,7 @@ LD = @LD@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ \ @@ -85,7 +86,7 @@ LINK = $(CC) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib -L$(libdir) -SHLIB_LIST = $(SHLIB_DIRS) -lncurses @SHLIB_LIST@ +SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ MK_SHARED_LIB = @MK_SHARED_LIB@ @@ -104,7 +105,9 @@ AUTO_SRC = \ ../include/panel.h ################################################################################ -all install :: $(AUTO_SRC) $(LIBRARIES) +all \ +libs \ +install :: $(AUTO_SRC) $(LIBRARIES) sources: $(AUTO_SRC) diff --git a/panel/llib-lpanel b/panel/llib-lpanel index ab75ffee..2ca1a3e3 100644 --- a/panel/llib-lpanel +++ b/panel/llib-lpanel @@ -35,30 +35,6 @@ #include "panel.priv.h" -#undef _nc_free_obscure -void _nc_free_obscure( - PANEL *pan) - { /* void */ } - -#undef _nc_override -void _nc_override( - const PANEL *pan, - int show) - { /* void */ } - -#undef _nc_calculate_obscure -void _nc_calculate_obscure(void) - { /* void */ } - -#undef _nc_panel_is_linked -bool _nc_panel_is_linked( - const PANEL *pan) - { return(*(bool *)0); } - -#undef _nc_panel_link_bottom -void _nc_panel_link_bottom( - PANEL *pan) - { /* void */ } /* ./p_above.c */ diff --git a/panel/p_bottom.c b/panel/p_bottom.c index 4e6e11d1..f6718642 100644 --- a/panel/p_bottom.c +++ b/panel/p_bottom.c @@ -36,44 +36,35 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_bottom.c,v 1.5 1999/09/29 15:22:32 juergen Exp $") - -/*+------------------------------------------------------------------------- - __panel_link_bottom(pan) - link panel into stack at bottom ---------------------------------------------------------------------------*/ -static void -panel_link_bottom(PANEL *pan) -{ -#ifdef TRACE - dStack("",1,pan); - if(_nc_panel_is_linked(pan)) - return; -#endif - - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - - assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - - pan->below = _nc_bottom_panel; - pan->above = _nc_bottom_panel->above; - if (pan->above) - pan->above->below = pan; - _nc_bottom_panel->above = pan; - - dStack("",9,pan); -} +MODULE_ID("$Id: p_bottom.c,v 1.7 1999/11/25 13:49:26 juergen Exp $") int bottom_panel(PANEL *pan) { - if(!pan) - return(ERR); - if(Is_Bottom(pan)) - return(OK); - dBug(("--> bottom_panel %s", USER_PTR(pan->user))); - if(_nc_panel_is_linked(pan)) - (void)hide_panel(pan); - panel_link_bottom(pan); - return(OK); + int err = OK; + + if (pan) { + + if(!Is_Bottom(pan)) { + + dBug(("--> bottom_panel %s", USER_PTR(pan->user))); + + HIDE_PANEL(pan,err,FALSE); + assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); + + dStack("",1,pan); + + pan->below = _nc_bottom_panel; + pan->above = _nc_bottom_panel->above; + if (pan->above) + pan->above->below = pan; + _nc_bottom_panel->above = pan; + + dStack("",9,pan); + } + } + else + err = ERR; + + return(err); } diff --git a/panel/p_delete.c b/panel/p_delete.c index aabccdc4..3f975d3b 100644 --- a/panel/p_delete.c +++ b/panel/p_delete.c @@ -36,18 +36,19 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_delete.c,v 1.2 1998/02/11 12:14:01 tom Exp $") +MODULE_ID("$Id: p_delete.c,v 1.4 1999/11/25 13:49:26 juergen Exp $") int del_panel(PANEL *pan) { + int err = OK; if(pan) { dBug(("--> del_panel %s", USER_PTR(pan->user))); - if(_nc_panel_is_linked(pan)) - (void)hide_panel(pan); + HIDE_PANEL(pan,err,FALSE); free((void *)pan); - return(OK); } - return(ERR); + else + err = ERR; + return(err); } diff --git a/panel/p_hidden.c b/panel/p_hidden.c index fa05e6ab..7a13ec43 100644 --- a/panel/p_hidden.c +++ b/panel/p_hidden.c @@ -36,12 +36,12 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hidden.c,v 1.3 1999/09/18 11:04:19 juergen Exp $") +MODULE_ID("$Id: p_hidden.c,v 1.4 1999/11/22 18:02:41 juergen Exp $") int panel_hidden(const PANEL *pan) { if(!pan) return(ERR); - return(_nc_panel_is_linked(pan) ? FALSE : TRUE); + return(IS_LINKED(pan) ? FALSE : TRUE); } diff --git a/panel/p_hide.c b/panel/p_hide.c index d6142953..ecc9eed2 100644 --- a/panel/p_hide.c +++ b/panel/p_hide.c @@ -36,61 +36,22 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hide.c,v 1.3 1999/09/29 15:22:32 juergen Exp $") - -/*+------------------------------------------------------------------------- - __panel_unlink(pan) - unlink panel from stack ---------------------------------------------------------------------------*/ -static void -__panel_unlink(PANEL *pan) -{ - PANEL *prev; - PANEL *next; - -#ifdef TRACE - dStack("",1,pan); - if(!_nc_panel_is_linked(pan)) - return; -#endif - - PANEL_UPDATE(pan,(PANEL*)0); - - prev = pan->below; - next = pan->above; - - if(prev) - { /* if non-zero, we will not update the list head */ - prev->above = next; - if(next) - next->below = prev; - } - else if(next) - next->below = prev; - if(pan == _nc_bottom_panel) - _nc_bottom_panel = next; - if(pan == _nc_top_panel) - _nc_top_panel = prev; - - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - dStack("",9,pan); -} +MODULE_ID("$Id: p_hide.c,v 1.5 1999/11/25 13:49:26 juergen Exp $") int hide_panel(register PANEL *pan) { + int err = OK; + if(!pan) return(ERR); dBug(("--> hide_panel %s", USER_PTR(pan->user))); + dStack("",1,pan); + + HIDE_PANEL(pan,err,TRUE); - if(!_nc_panel_is_linked(pan)) - { - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - return(ERR); - } + dStack("",9,pan); - __panel_unlink(pan); - return(OK); + return(err); } diff --git a/panel/p_move.c b/panel/p_move.c index 3bc6328f..d34b4fb8 100644 --- a/panel/p_move.c +++ b/panel/p_move.c @@ -36,19 +36,19 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_move.c,v 1.3 1999/09/29 15:22:32 juergen Exp $") +MODULE_ID("$Id: p_move.c,v 1.5 1999/11/25 13:49:26 juergen Exp $") int move_panel(PANEL *pan, int starty, int startx) { - WINDOW *win; - if(!pan) return(ERR); - if(_nc_panel_is_linked(pan)) - PANEL_UPDATE(pan,(PANEL*)0); - win = pan->win; - if(mvwin(win,starty,startx)) + + if (IS_LINKED(pan)) + PANEL_UPDATE(pan,(PANEL*)0, TRUE); + + if (mvwin(pan->win,starty,startx)) return(ERR); + return(OK); } diff --git a/panel/p_new.c b/panel/p_new.c index f2f208d6..43542fea 100644 --- a/panel/p_new.c +++ b/panel/p_new.c @@ -36,7 +36,12 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_new.c,v 1.4 1999/09/29 15:22:32 juergen Exp $") +MODULE_ID("$Id: p_new.c,v 1.5 1999/11/22 18:02:41 juergen Exp $") + +#ifdef TRACE +static char* stdscr_id; +static char* new_id; +#endif /*+------------------------------------------------------------------------- Get root (i.e. stdscr's) panel. @@ -57,7 +62,9 @@ root_panel(void) pan->below = (PANEL*)0; pan->above = (PANEL*)0; #ifdef TRACE - pan->user = "stdscr"; + if (!stdscr_id) + stdscr_id = strdup("stdscr"); + pan->user = stdscr_id; #else pan->user = (void*)0; #endif @@ -72,7 +79,11 @@ new_panel(WINDOW *win) { PANEL *pan = (PANEL*)0; - (void)root_panel(); + if (!win) + return(pan); + + if (!_nc_stdscr_pseudo_panel) + (void)root_panel(); assert(_nc_stdscr_pseudo_panel); if (!(win->_flags & _ISPAD) && (pan = (PANEL*)malloc(sizeof(PANEL)))) @@ -81,7 +92,9 @@ new_panel(WINDOW *win) pan->above = (PANEL *)0; pan->below = (PANEL *)0; #ifdef TRACE - pan->user = "new"; + if (!new_id) + new_id = strdup("new"); + pan->user = new_id; #else pan->user = (char *)0; #endif diff --git a/panel/p_replace.c b/panel/p_replace.c index 3c4aca18..b7d51746 100644 --- a/panel/p_replace.c +++ b/panel/p_replace.c @@ -36,15 +36,18 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_replace.c,v 1.3 1999/09/29 15:22:32 juergen Exp $") +MODULE_ID("$Id: p_replace.c,v 1.5 1999/11/25 13:49:26 juergen Exp $") int replace_panel(PANEL *pan, WINDOW *win) { if(!pan) return(ERR); - if(_nc_panel_is_linked(pan)) - PANEL_UPDATE(pan,(PANEL*)0); + + if (IS_LINKED(pan)) + PANEL_UPDATE(pan,(PANEL*)0, TRUE); + pan->win = win; + return(OK); } diff --git a/panel/p_show.c b/panel/p_show.c index d129fd50..4fc7b1db 100644 --- a/panel/p_show.c +++ b/panel/p_show.c @@ -36,32 +36,13 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_show.c,v 1.5 1999/09/29 15:22:32 juergen Exp $") - -static void -panel_link_top(PANEL *pan) -{ -#ifdef TRACE - dStack("",1,pan); - if(_nc_panel_is_linked(pan)) - return; -#endif - - assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - - _nc_top_panel->above = pan; - pan->below = _nc_top_panel; - _nc_top_panel = pan; - - dStack("",9,pan); -} +MODULE_ID("$Id: p_show.c,v 1.7 1999/11/25 13:49:26 juergen Exp $") int show_panel(PANEL *pan) -{ +{ + int err = OK; + if(!pan) return(ERR); @@ -70,10 +51,17 @@ show_panel(PANEL *pan) dBug(("--> show_panel %s", USER_PTR(pan->user))); - if(_nc_panel_is_linked(pan)) - (void)hide_panel(pan); + HIDE_PANEL(pan,err,FALSE); + + dStack("",1,pan); + assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - panel_link_top(pan); + _nc_top_panel->above = pan; + pan->below = _nc_top_panel; + pan->above = (PANEL *)0; + _nc_top_panel = pan; + + dStack("",9,pan); return(OK); } diff --git a/panel/p_update.c b/panel/p_update.c index 692a3f33..983d0b60 100644 --- a/panel/p_update.c +++ b/panel/p_update.c @@ -36,7 +36,7 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_update.c,v 1.3 1999/09/29 15:22:32 juergen Exp $") +MODULE_ID("$Id: p_update.c,v 1.5 1999/11/25 13:49:26 juergen Exp $") void update_panels(void) @@ -47,15 +47,14 @@ update_panels(void) pan = _nc_bottom_panel; while(pan && pan->above) { - PANEL_UPDATE(pan,pan->above); + PANEL_UPDATE(pan,pan->above, FALSE); pan = pan->above; } pan = _nc_bottom_panel; while (pan) { - if (is_wintouched(pan->win)) - Wnoutrefresh(pan); + Wnoutrefresh(pan); pan = pan->above; } } diff --git a/panel/panel.priv.h b/panel/panel.priv.h index cd470a98..57bf793a 100644 --- a/panel/panel.priv.h +++ b/panel/panel.priv.h @@ -1,4 +1,4 @@ -/* $Id: panel.priv.h,v 1.10 1999/09/29 15:21:58 juergen Exp $ */ +/* $Id: panel.priv.h,v 1.13 2000/01/15 20:39:53 juergen Exp $ */ #ifndef _PANEL_PRIV_H #define _PANEL_PRIV_H @@ -73,42 +73,103 @@ #define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p))) #define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel)) +/* borrowed from curses.priv.h */ +#define CHANGED_RANGE(line,start,end) \ + if (line->firstchar == _NOCHANGE \ + || line->firstchar > (start)) \ + line->firstchar = start; \ + if (line->lastchar == _NOCHANGE \ + || line->lastchar < (end)) \ + line->lastchar = end + /*+------------------------------------------------------------------------- - _nc_panel_is_linked(pan) - check to see if panel is in the stack + IS_LINKED(pan) - check to see if panel is in the stack --------------------------------------------------------------------------*/ /* This works! The only case where it would fail is, when the list has only one element. But this could only be the pseudo panel at the bottom */ -#define _nc_panel_is_linked(p) ((((p)->above!=(PANEL*)0)||((p)->below!=(PANEL*)0)||((p)==_nc_bottom_panel)) ? TRUE : FALSE) +#define IS_LINKED(p) (((p)->above || (p)->below ||((p)==_nc_bottom_panel)) ? TRUE : FALSE) #define PSTARTX(pan) ((pan)->win->_begx) -#define PENDX(pan) ((pan)->win->_begx + getmaxx((pan)->win)) +#define PENDX(pan) ((pan)->win->_begx + getmaxx((pan)->win) - 1) #define PSTARTY(pan) ((pan)->win->_begy) -#define PENDY(pan) ((pan)->win->_begy + getmaxy((pan)->win)) +#define PENDY(pan) ((pan)->win->_begy + getmaxy((pan)->win) - 1) /*+------------------------------------------------------------------------- PANELS_OVERLAPPED(pan1,pan2) - check panel overlapped ---------------------------------------------------------------------------*/ #define PANELS_OVERLAPPED(pan1,pan2) \ (( !(pan1) || !(pan2) || \ - PSTARTY(pan1) >= PENDY(pan2) || PENDY(pan1) <= PSTARTY(pan2) ||\ - PSTARTX(pan1) >= PENDX(pan2) || PENDX(pan1) <= PSTARTX(pan2) ) \ + PSTARTY(pan1) > PENDY(pan2) || PENDY(pan1) < PSTARTY(pan2) ||\ + PSTARTX(pan1) > PENDX(pan2) || PENDX(pan1) < PSTARTX(pan2) ) \ ? FALSE : TRUE) -#define PANEL_UPDATE(pan,panstart) { int y; PANEL* pan2 = panstart;\ - if (!pan2) {\ +/*+------------------------------------------------------------------------- + Compute the intersection rectangle of two overlapping rectangles +---------------------------------------------------------------------------*/ +#define COMPUTE_INTERSECTION(pan1,pan2,ix1,ix2,iy1,iy2)\ + ix1 = (PSTARTX(pan1) < PSTARTX(pan2)) ? PSTARTX(pan2) : PSTARTX(pan1);\ + ix2 = (PENDX(pan1) < PENDX(pan2)) ? PENDX(pan1) : PENDX(pan2);\ + iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\ + iy2 = (PENDY(pan1) < PENDY(pan2)) ? PENDY(pan1) : PENDY(pan2);\ + assert((ix1<=ix2) && (iy1<=iy2));\ + + +/*+------------------------------------------------------------------------- + Walk through the panel stack starting at the given location and + check for intersections; overlapping panels are "touched", so they + are incrementally overwriting cells that should be hidden. + If the "touch" flag is set, the panel gets touched before it is + updated. +---------------------------------------------------------------------------*/ +#define PANEL_UPDATE(pan,panstart,touch)\ +{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\ + if (touch)\ Touchpan(pan);\ - pan2 = _nc_bottom_panel;\ - }\ while(pan2) {\ if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\ - for(y = PSTARTY(pan); y < PENDY(pan); y++) {\ - if( (y >= PSTARTY(pan2)) && (y < PENDY(pan2)) &&\ - ((is_linetouched(pan->win,y - PSTARTY(pan)) == TRUE)) )\ - Touchline(pan2,y - PSTARTY(pan2),1);\ + int y,ix1,ix2,iy1,iy2;\ + COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\ + for(y = iy1; y <= iy2; y++) {\ + if (is_linetouched(pan->win,y - PSTARTY(pan))) {\ + struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\ + CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\ + }\ }\ }\ pan2 = pan2->above;\ - }\ + }\ +} + +/*+------------------------------------------------------------------------- + Remove panel from stack. +---------------------------------------------------------------------------*/ +#define PANEL_UNLINK(pan,err) \ +{ err = ERR;\ + if (pan) {\ + if (IS_LINKED(pan)) {\ + if ((pan)->below)\ + (pan)->below->above = (pan)->above;\ + if ((pan)->above)\ + (pan)->above->below = (pan)->below;\ + if ((pan) == _nc_bottom_panel) \ + _nc_bottom_panel = (pan)->above;\ + if ((pan) == _nc_top_panel) \ + _nc_top_panel = (pan)->below;\ + err = OK;\ + }\ + (pan)->above = (pan)->below = (PANEL*)0;\ + }\ } + +#define HIDE_PANEL(pan,err,err_if_unlinked)\ + if (IS_LINKED(pan)) {\ + PANEL_UPDATE(pan,(PANEL*)0,TRUE);\ + PANEL_UNLINK(pan,err);\ + } \ + else {\ + if (err_if_unlinked)\ + err = ERR;\ + } + #endif /* _PANEL_PRIV_H */ diff --git a/progs/MKtermsort.sh b/progs/MKtermsort.sh index 6cbe9548..5486fd74 100755 --- a/progs/MKtermsort.sh +++ b/progs/MKtermsort.sh @@ -1,17 +1,24 @@ #!/bin/sh +# $Id: MKtermsort.sh,v 1.6 2000/01/25 11:35:36 tom Exp $ # # MKtermsort.sh -- generate indirection vectors for the various sort methods # # The output of this script is C source for nine arrays that list three sort # orders for each of the three different classes of terminfo capabilities. # +# keep the order independent of locale: +LANGUAGE=C +LC_ALL=C +export LANGUAGE +export LC_ALL +# AWK=${1-awk} DATA=${2-../include/Caps} echo "/*"; echo " * termsort.c --- sort order arrays for use by infocmp."; echo " *"; -echo " * Note: this file is generated using termsort.sh, do not edit by hand."; +echo " * Note: this file is generated using MKtermsort.sh, do not edit by hand."; echo " */"; echo "static const int bool_terminfo_sort[] = {"; @@ -95,27 +102,26 @@ $3 == "str" {printf("%s\t%d\n", $4, i++);} echo "};"; echo ""; -echo "static const int bool_from_termcap[] = {"; +echo "static const bool bool_from_termcap[] = {"; $AWK <$DATA ' -$3 == "bool" && substr($5, 1, 1) == "-" {print "0,\t/* ", $2, " */";} -$3 == "bool" && substr($5, 1, 1) == "Y" {print "1,\t/* ", $2, " */";} +$3 == "bool" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";} +$3 == "bool" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";} ' echo "};"; echo ""; -echo "static const int num_from_termcap[] = {"; +echo "static const bool num_from_termcap[] = {"; $AWK <$DATA ' -$3 == "num" && substr($5, 1, 1) == "-" {print "0,\t/* ", $2, " */";} -$3 == "num" && substr($5, 1, 1) == "Y" {print "1,\t/* ", $2, " */";} +$3 == "num" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";} +$3 == "num" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";} ' echo "};"; echo ""; -echo "static const int str_from_termcap[] = {"; +echo "static const bool str_from_termcap[] = {"; $AWK <$DATA ' -$3 == "str" && substr($5, 1, 1) == "-" {print "0,\t/* ", $2, " */";} -$3 == "str" && substr($5, 1, 1) == "Y" {print "1,\t/* ", $2, " */";} +$3 == "str" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";} +$3 == "str" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";} ' echo "};"; echo ""; - diff --git a/progs/Makefile.in b/progs/Makefile.in index f22a0168..a0a296ef 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.37 1998/05/31 00:07:33 tom Exp $ +# $Id: Makefile.in,v 1.41 2000/07/08 01:56:25 tom Exp $ ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -68,6 +68,7 @@ AWK = @AWK@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ INCDIR = $(srcdir)/../include @@ -79,7 +80,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE CFLAGS_PROFILE = $(CCFLAGS) -pg -CFLAGS_SHARED = $(CCFLAGS) # @CC_SHARED_OPTS@ +CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) @@ -107,7 +108,7 @@ PROGS = tic$x toe$x infocmp$x clear$x tput$x tset$x TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x # Default library, for linking applications -DEPS_CURSES = @LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ +DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ ################################################################################ all: $(AUTO_SRC) $(PROGS) @@ -118,7 +119,8 @@ install: install.progs uninstall: uninstall.progs # this line simplifies the configure-script -install.libs: +libs \ +install.libs \ uninstall.libs: install.progs: $(PROGS) $(INSTALL_PREFIX)$(bindir) diff --git a/progs/dump_entry.c b/progs/dump_entry.c index 8324fe22..3830742f 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -38,11 +38,17 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.37 1999/03/14 12:29:30 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.53 2000/04/15 21:23:30 tom Exp $") #define INDENT 8 - #define DISCARD(string) string = ABSENT_STRING +#define PRINTF (void) printf + +typedef struct { + char *text; + size_t used; + size_t size; +} DYNBUF; static int tversion; /* terminfo version */ static int outform; /* output format to use */ @@ -53,15 +59,14 @@ static int oldcol; /* last value of column before wrap */ static int tracelevel; /* level of debug output */ static bool pretty; /* true if we format if-then-else strings */ -static char *outbuf; /* the output-buffer */ -static size_t out_used; /* ...its current length */ -static size_t out_size; /* ...and its allocated length */ +static DYNBUF outbuf; +static DYNBUF tmpbuf; /* indirection pointers for implementing sort and display modes */ static const int *bool_indirect, *num_indirect, *str_indirect; -static NCURSES_CONST char * const *bool_names; -static NCURSES_CONST char * const *num_names; -static NCURSES_CONST char * const *str_names; +static NCURSES_CONST char *const *bool_names; +static NCURSES_CONST char *const *num_names; +static NCURSES_CONST char *const *str_names; static const char *separator, *trailer; @@ -72,7 +77,13 @@ static const char *separator, *trailer; #define V_AIX 3 /* AIX */ #define V_BSD 4 /* BSD */ +#if NCURSES_XNAMES +#define OBSOLETE(n) (!_nc_user_definable && (n[0] == 'O' && n[1] == 'T')) +#else #define OBSOLETE(n) (n[0] == 'O' && n[1] == 'T') +#endif + +#define isObsolete(f,n) ((f == F_TERMINFO || f == F_VARIABLE) && OBSOLETE(n)) #if NCURSES_XNAMES #define BoolIndirect(j) ((j >= BOOLCOUNT) ? (j) : ((sortmode == S_NOSORT) ? j : bool_indirect[j])) @@ -84,44 +95,79 @@ static const char *separator, *trailer; #define StrIndirect(j) ((sortmode == S_NOSORT) ? (j) : str_indirect[j]) #endif +static void +strncpy_DYN(DYNBUF * dst, const char *src, size_t need) +{ + size_t want = need + dst->used + 1; + if (want > dst->size) { + dst->size += (want + 1024); /* be generous */ + dst->text = typeRealloc(char, dst->size, dst->text); + } + (void) strncpy(dst->text + dst->used, src, need); + dst->used += need; + dst->text[dst->used] = 0; +} + +static void +strcpy_DYN(DYNBUF * dst, const char *src) +{ + if (src == 0) { + dst->used = 0; + strcpy_DYN(dst, ""); + } else { + strncpy_DYN(dst, src, strlen(src)); + } +} + #if NO_LEAKS -void _nc_leaks_dump_entry(void) +static void +free_DYN(DYNBUF * p) { - if (outbuf != 0) { - free(outbuf); - outbuf = 0; - } + if (p->text != 0) + free(p->text); + p->text = 0; + p->size = 0; + p->used = 0; +} + +void +_nc_leaks_dump_entry(void) +{ + free_DYN(&outbuf); + free_DYN(&tmpbuf); } #endif -NCURSES_CONST char *nametrans(const char *name) +NCURSES_CONST char * +nametrans(const char *name) /* translate a capability name from termcap to terminfo */ { - const struct name_table_entry *np; + const struct name_table_entry *np; if ((np = _nc_find_entry(name, _nc_get_hash_table(0))) != 0) - switch(np->nte_type) - { + switch (np->nte_type) { case BOOLEAN: if (bool_from_termcap[np->nte_index]) - return(boolcodes[np->nte_index]); + return (boolcodes[np->nte_index]); break; case NUMBER: if (num_from_termcap[np->nte_index]) - return(numcodes[np->nte_index]); + return (numcodes[np->nte_index]); break; case STRING: if (str_from_termcap[np->nte_index]) - return(strcodes[np->nte_index]); + return (strcodes[np->nte_index]); break; } - return(0); + return (0); } -void dump_init(const char *version, int mode, int sort, int twidth, int traceval, bool formatted) +void +dump_init(const char *version, int mode, int sort, int twidth, int traceval, + bool formatted) /* set up for entry display */ { width = twidth; @@ -132,7 +178,7 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval if (version == 0) tversion = V_ALLCAPS; else if (!strcmp(version, "SVr1") || !strcmp(version, "SVR1") - || !strcmp(version, "Ultrix")) + || !strcmp(version, "Ultrix")) tversion = V_SVR1; else if (!strcmp(version, "HP")) tversion = V_HPUX; @@ -144,8 +190,7 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval tversion = V_ALLCAPS; /* implement display modes */ - switch (outform = mode) - { + switch (outform = mode) { case F_LITERAL: case F_TERMINFO: bool_names = boolnames; @@ -174,18 +219,17 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval } /* implement sort modes */ - switch(sortmode = sort) - { + switch (sortmode = sort) { case S_NOSORT: if (traceval) (void) fprintf(stderr, - "%s: sorting by term structure order\n", _nc_progname); + "%s: sorting by term structure order\n", _nc_progname); break; case S_TERMINFO: if (traceval) (void) fprintf(stderr, - "%s: sorting by terminfo name order\n", _nc_progname); + "%s: sorting by terminfo name order\n", _nc_progname); bool_indirect = bool_terminfo_sort; num_indirect = num_terminfo_sort; str_indirect = str_terminfo_sort; @@ -194,7 +238,7 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval case S_VARIABLE: if (traceval) (void) fprintf(stderr, - "%s: sorting by C variable order\n", _nc_progname); + "%s: sorting by C variable order\n", _nc_progname); bool_indirect = bool_variable_sort; num_indirect = num_variable_sort; str_indirect = str_variable_sort; @@ -203,7 +247,7 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval case S_TERMCAP: if (traceval) (void) fprintf(stderr, - "%s: sorting by termcap name order\n", _nc_progname); + "%s: sorting by termcap name order\n", _nc_progname); bool_indirect = bool_termcap_sort; num_indirect = num_termcap_sort; str_indirect = str_termcap_sort; @@ -212,49 +256,48 @@ void dump_init(const char *version, int mode, int sort, int twidth, int traceval if (traceval) (void) fprintf(stderr, - "%s: width = %d, tversion = %d, outform = %d\n", - _nc_progname, width, tversion, outform); + "%s: width = %d, tversion = %d, outform = %d\n", + _nc_progname, width, tversion, outform); } -static TERMTYPE *cur_type; +static TERMTYPE *cur_type; -static int dump_predicate(int type, int idx) +static int +dump_predicate(int type, int idx) /* predicate function to use for ordinary decompilation */ { - switch(type) { - case BOOLEAN: - return (cur_type->Booleans[idx] == FALSE) - ? FAIL : cur_type->Booleans[idx]; - - case NUMBER: - return (cur_type->Numbers[idx] == ABSENT_NUMERIC) - ? FAIL : cur_type->Numbers[idx]; - - case STRING: - return (cur_type->Strings[idx] != ABSENT_STRING) - ? (int)TRUE : FAIL; - } + switch (type) { + case BOOLEAN: + return (cur_type->Booleans[idx] == FALSE) + ? FAIL : cur_type->Booleans[idx]; + + case NUMBER: + return (cur_type->Numbers[idx] == ABSENT_NUMERIC) + ? FAIL : cur_type->Numbers[idx]; + + case STRING: + return (cur_type->Strings[idx] != ABSENT_STRING) + ? (int) TRUE : FAIL; + } - return(FALSE); /* pacify compiler */ + return (FALSE); /* pacify compiler */ } -static void set_obsolete_termcaps(TERMTYPE *tp); -static void repair_acsc(TERMTYPE *tp); +static void set_obsolete_termcaps(TERMTYPE * tp); /* is this the index of a function key string? */ #define FNKEY(i) (((i)<= 65 && (i)>= 75) || ((i)<= 216 && (i)>= 268)) -static bool version_filter(int type, int idx) +static bool +version_filter(int type, int idx) /* filter out capabilities we may want to suppress */ { - switch (tversion) - { - case V_ALLCAPS: /* SVr4, XSI Curses */ - return(TRUE); - - case V_SVR1: /* System V Release 1, Ultrix */ - switch (type) - { + switch (tversion) { + case V_ALLCAPS: /* SVr4, XSI Curses */ + return (TRUE); + + case V_SVR1: /* System V Release 1, Ultrix */ + switch (type) { case BOOLEAN: /* below and including xon_xoff */ return ((idx <= 20) ? TRUE : FALSE); @@ -268,8 +311,7 @@ static bool version_filter(int type, int idx) break; case V_HPUX: /* Hewlett-Packard */ - switch (type) - { + switch (type) { case BOOLEAN: /* below and including xon_xoff */ return ((idx <= 20) ? TRUE : FALSE); @@ -278,19 +320,18 @@ static bool version_filter(int type, int idx) return ((idx <= 10) ? TRUE : FALSE); case STRING: if (idx <= 144) /* below and including prtr_non */ - return(TRUE); + return (TRUE); else if (FNKEY(idx)) /* function keys */ - return(TRUE); - else if (idx==147||idx==156||idx==157) /* plab_norm,label_on,label_off */ - return(TRUE); + return (TRUE); + else if (idx == 147 || idx == 156 || idx == 157) /* plab_norm,label_on,label_off */ + return (TRUE); else - return(FALSE); + return (FALSE); } break; case V_AIX: /* AIX */ - switch (type) - { + switch (type) { case BOOLEAN: /* below and including xon_xoff */ return ((idx <= 20) ? TRUE : FALSE); @@ -299,17 +340,16 @@ static bool version_filter(int type, int idx) return ((idx <= 7) ? TRUE : FALSE); case STRING: if (idx <= 144) /* below and including prtr_non */ - return(TRUE); + return (TRUE); else if (FNKEY(idx)) /* function keys */ - return(TRUE); + return (TRUE); else - return(FALSE); + return (FALSE); } break; case V_BSD: /* BSD */ - switch (type) - { + switch (type) { case BOOLEAN: return bool_from_termcap[idx]; case NUMBER: @@ -320,51 +360,30 @@ static bool version_filter(int type, int idx) break; } - return(FALSE); /* pacify the compiler */ + return (FALSE); /* pacify the compiler */ } -static -void append_output (const char *src) +static void +force_wrap(void) { - if (src == 0) { - out_used = 0; - append_output(""); - } else { - size_t need = strlen(src); - size_t want = need + out_used + 1; - if (want > out_size) { - out_size += want; /* be generous */ - if (outbuf == 0) - outbuf = malloc(out_size); - else - outbuf = realloc(outbuf, out_size); - } - (void)strcpy(outbuf + out_used, src); - out_used += need; - } + oldcol = column; + strcpy_DYN(&outbuf, trailer); + column = INDENT; } -static -void force_wrap(void) +static void +wrap_concat(const char *src) { - oldcol = column; - append_output(trailer); - column = INDENT; -} + int need = strlen(src); + int want = strlen(separator) + need; -static -void wrap_concat(const char *src) -{ - int need = strlen(src); - int want = strlen(separator) + need; - - if (column > INDENT - && column + want > width) { - force_wrap(); - } - append_output(src); - append_output(separator); - column += need; + if (column > INDENT + && column + want > width) { + force_wrap(); + } + strcpy_DYN(&outbuf, src); + strcpy_DYN(&outbuf, separator); + column += need; } #define IGNORE_SEP_TRAIL(first,last,sep_trail) \ @@ -382,98 +401,116 @@ void wrap_concat(const char *src) * of the best fixed-buffer implementation; the worst case may be much worse. */ #ifdef TEST_TERMCAP_LENGTH -static int termcap_length(const char *src) +static int +termcap_length(const char *src) { - static const char pattern[] = ":\\\n\t:"; + static const char pattern[] = ":\\\n\t:"; - int len = 0; - const char *const t = src + strlen(src); + int len = 0; + const char *const t = src + strlen(src); - while (*src != '\0') { - IGNORE_SEP_TRAIL(src, t, pattern); - src++; - len++; - } - return len; + while (*src != '\0') { + IGNORE_SEP_TRAIL(src, t, pattern); + src++; + len++; + } + return len; } #else #define termcap_length(src) strlen(src) #endif -static char * fmt_complex(char *dst, char *src, int level) +static char * +fmt_complex(char *src, int level) { - int percent = 0; - int n; - - dst += strlen(dst); - while (*src != '\0') { - switch (*src) { - case '\\': - percent = 0; - *dst++ = *src++; - break; - case '%': - percent = 1; - break; - case '?': /* "if" */ - case 't': /* "then" */ - case 'e': /* "else" */ - if (percent) { - percent = 0; - dst[-1] = '\n'; - for (n = 0; n <= level; n++) - *dst++ = '\t'; - *dst++ = '%'; - *dst++ = *src; - *dst = '\0'; - if (*src++ == '?') { - src = fmt_complex(dst, src, level+1); - dst += strlen(dst); - } else if (level == 1) { - _nc_warning("%%%c without %%?", *src); - } - continue; - } - break; - case ';': /* "endif" */ - if (percent) { - percent = 0; - if (level > 1) { - dst[-1] = '\n'; - for (n = 0; n < level; n++) - *dst++ = '\t'; - *dst++ = '%'; - *dst++ = *src++; - *dst = '\0'; - return src; - } - _nc_warning("%%; without %%?"); - } - break; - default: - percent = 0; - break; + int percent = 0; + int n; + bool if_then = strstr(src, "%?") != 0; + bool params = !if_then && (strlen(src) > 50) && (strstr(src, "%p") != 0); + + while (*src != '\0') { + switch (*src) { + case '\\': + percent = 0; + strncpy_DYN(&tmpbuf, src++, 1); + break; + case '%': + percent = 1; + break; + case '?': /* "if" */ + case 't': /* "then" */ + case 'e': /* "else" */ + if (percent) { + percent = 0; + tmpbuf.text[tmpbuf.used - 1] = '\n'; + /* treat a "%e%?" as else-if, on the same level */ + if (!strncmp(src, "e%?", 3)) { + for (n = 0; n < level; n++) + strncpy_DYN(&tmpbuf, "\t", 1); + strncpy_DYN(&tmpbuf, "%", 1); + strncpy_DYN(&tmpbuf, src, 3); + src += 3; + } else { + for (n = 0; n <= level; n++) + strncpy_DYN(&tmpbuf, "\t", 1); + strncpy_DYN(&tmpbuf, "%", 1); + strncpy_DYN(&tmpbuf, src, 1); + if (*src++ == '?') { + src = fmt_complex(src, level + 1); + } else if (level == 1) { + _nc_warning("%%%c without %%?", *src); + } + } + continue; + } + break; + case ';': /* "endif" */ + if (percent) { + percent = 0; + if (level > 1) { + tmpbuf.text[tmpbuf.used - 1] = '\n'; + for (n = 0; n < level; n++) + strncpy_DYN(&tmpbuf, "\t", 1); + strncpy_DYN(&tmpbuf, "%", 1); + strncpy_DYN(&tmpbuf, src++, 1); + return src; } - *dst++ = *src++; + _nc_warning("%%; without %%?"); + } + break; + case 'p': + if (percent && params) { + tmpbuf.text[tmpbuf.used - 1] = '\n'; + for (n = 0; n <= level; n++) + strncpy_DYN(&tmpbuf, "\t", 1); + strncpy_DYN(&tmpbuf, "%", 1); + } + percent = 0; + break; + default: + percent = 0; + break; } - *dst = '\0'; - return src; + strncpy_DYN(&tmpbuf, src++, 1); + } + return src; } -int fmt_entry(TERMTYPE *tterm, - int (*pred)(int type, int idx), - bool suppress_untranslatable, - bool infodump, - int numbers) +int +fmt_entry(TERMTYPE * tterm, + int (*pred) (int type, int idx), + bool suppress_untranslatable, + bool infodump, + int numbers) { -int i, j; -char buffer[MAX_TERMINFO_LENGTH]; -NCURSES_CONST char *name; -int predval, len; -int num_bools = 0; -int num_values = 0; -int num_strings = 0; -bool outcount = 0; + int i, j; + char buffer[MAX_TERMINFO_LENGTH]; + NCURSES_CONST char *name; + int predval, len; + int num_bools = 0; + int num_values = 0; + int num_strings = 0; + bool outcount = 0; #define WRAP_CONCAT \ wrap_concat(buffer); \ @@ -486,20 +523,19 @@ bool outcount = 0; pred = dump_predicate; } - append_output(0); - append_output(tterm->term_names); - append_output(separator); - column = out_used; + strcpy_DYN(&outbuf, 0); + strcpy_DYN(&outbuf, tterm->term_names); + strcpy_DYN(&outbuf, separator); + column = outbuf.used; force_wrap(); - for_each_boolean(j,tterm) { + for_each_boolean(j, tterm) { i = BoolIndirect(j); - name = ExtBoolname(tterm,i,bool_names); + name = ExtBoolname(tterm, i, bool_names); if (!version_filter(BOOLEAN, i)) continue; - else if ((outform == F_LITERAL || outform == F_TERMINFO || outform == F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + else if (isObsolete(outform, name)) continue; predval = pred(BOOLEAN, i); @@ -516,14 +552,13 @@ bool outcount = 0; if (column != INDENT) force_wrap(); - for_each_number(j,tterm) { + for_each_number(j, tterm) { i = NumIndirect(j); - name = ExtNumname(tterm,i,num_names); + name = ExtNumname(tterm, i, num_names); if (!version_filter(NUMBER, i)) continue; - else if ((outform == F_LITERAL || outform == F_TERMINFO || outform == F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + else if (isObsolete(outform, name)) continue; predval = pred(NUMBER, i); @@ -543,20 +578,32 @@ bool outcount = 0; force_wrap(); len += num_bools - + num_values * 2 - + strlen(tterm->term_names) + 1; + + num_values * 2 + + strlen(tterm->term_names) + 1; if (len & 1) - len++; + len++; + +#undef CUR +#define CUR tterm-> + if (outform == F_TERMCAP) { + if (termcap_reset != ABSENT_STRING) { + if (init_3string != ABSENT_STRING + && !strcmp(init_3string, termcap_reset)) + DISCARD(init_3string); + + if (reset_2string != ABSENT_STRING + && !strcmp(reset_2string, termcap_reset)) + DISCARD(reset_2string); + } + } - repair_acsc(tterm); for_each_string(j, tterm) { i = StrIndirect(j); - name = ExtStrname(tterm,i,str_names); + name = ExtStrname(tterm, i, str_names); if (!version_filter(STRING, i)) continue; - else if ((outform == F_LITERAL || outform == F_TERMINFO || outform == F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + else if (isObsolete(outform, name)) continue; /* @@ -564,77 +611,82 @@ bool outcount = 0; * for ich/ich1 to work. If they're not defined, force * them to be output as defined and empty. */ - if (outform==F_TERMCAP) - { -#undef CUR -#define CUR tterm-> - if (insert_character || parm_ich) - { + if (outform == F_TERMCAP) { + if (insert_character || parm_ich) { if (&tterm->Strings[i] == &enter_insert_mode - && enter_insert_mode == ABSENT_STRING) - { + && enter_insert_mode == ABSENT_STRING) { (void) strcpy(buffer, "im="); - goto catenate; + WRAP_CONCAT; + continue; } if (&tterm->Strings[i] == &exit_insert_mode - && exit_insert_mode == ABSENT_STRING) - { + && exit_insert_mode == ABSENT_STRING) { (void) strcpy(buffer, "ei="); - goto catenate; + WRAP_CONCAT; + continue; } } - - if (init_3string != 0 - && termcap_reset != 0 - && !strcmp(init_3string, termcap_reset)) - DISCARD(init_3string); - - if (reset_2string != 0 - && termcap_reset != 0 - && !strcmp(reset_2string, termcap_reset)) - DISCARD(reset_2string); } predval = pred(STRING, i); buffer[0] = '\0'; + if (predval != FAIL) { if (tterm->Strings[i] != ABSENT_STRING - && i + 1 > num_strings) + && i + 1 > num_strings) num_strings = i + 1; - if (!VALID_STRING(tterm->Strings[i])) + + if (!VALID_STRING(tterm->Strings[i])) { sprintf(buffer, "%s@", name); - else if (outform == F_TERMCAP || outform == F_TCONVERR) - { - char *srccap = _nc_tic_expand(tterm->Strings[i], FALSE, numbers); + WRAP_CONCAT; + } else if (outform == F_TERMCAP || outform == F_TCONVERR) { + char *srccap = _nc_tic_expand(tterm->Strings[i], TRUE, numbers); char *cv = _nc_infotocap(name, srccap, parametrized[i]); - if (cv == 0) - { - if (outform == F_TCONVERR) - sprintf(buffer, "%s=!!! %s WILL NOT CONVERT !!!", name, srccap); - else if (suppress_untranslatable) + if (cv == 0) { + if (outform == F_TCONVERR) { + sprintf(buffer, "%s=!!! %s WILL NOT CONVERT !!!", + name, srccap); + } else if (suppress_untranslatable) { continue; - else - sprintf(buffer, "..%s=%s", name, srccap); - } - else + } else { + char *s = srccap, *d = buffer; + sprintf(d, "..%s=", name); + d += strlen(d); + while ((*d = *s++) != 0) { + if (*d == ':') { + *d++ = '\\'; + *d = ':'; + } else if (*d == '\\') { + *++d = *s++; + } + d++; + } + } + } else { sprintf(buffer, "%s=%s", name, cv); + } len += strlen(tterm->Strings[i]) + 1; - } - else - { - char *src = _nc_tic_expand(tterm->Strings[i], outform==F_TERMINFO, numbers); - sprintf(buffer, "%s=", name); - if (pretty && outform==F_TERMINFO) - fmt_complex(buffer + strlen(buffer), src, 1); - else - strcat(buffer, src); + WRAP_CONCAT; + } else { + char *src = _nc_tic_expand(tterm->Strings[i], + outform == F_TERMINFO, numbers); + + strcpy_DYN(&tmpbuf, 0); + strcpy_DYN(&tmpbuf, name); + strcpy_DYN(&tmpbuf, "="); + if (pretty + && (outform == F_TERMINFO + || outform == F_VARIABLE)) { + fmt_complex(src, 1); + } else { + strcpy_DYN(&tmpbuf, src); + } len += strlen(tterm->Strings[i]) + 1; + wrap_concat(tmpbuf.text); + outcount = TRUE; } - - catenate: - WRAP_CONCAT; } } len += num_strings * 2; @@ -644,46 +696,38 @@ bool outcount = 0; * postprocess_terminfo and postprocess_terminfo in parse_entry.c. * Much more work should be done on this to support dumping termcaps. */ - if (tversion == V_HPUX) - { - if (memory_lock) - { + if (tversion == V_HPUX) { + if (memory_lock) { (void) sprintf(buffer, "meml=%s", memory_lock); WRAP_CONCAT; } - if (memory_unlock) - { + if (memory_unlock) { (void) sprintf(buffer, "memu=%s", memory_unlock); WRAP_CONCAT; } - } - else if (tversion == V_AIX) - { - if (VALID_STRING(acs_chars)) - { - bool box_ok = TRUE; - const char *acstrans = "lqkxjmwuvtn"; - const char *cp; - char *tp, *sp, boxchars[11]; + } else if (tversion == V_AIX) { + if (VALID_STRING(acs_chars)) { + bool box_ok = TRUE; + const char *acstrans = "lqkxjmwuvtn"; + const char *cp; + char *tp, *sp, boxchars[11]; tp = boxchars; - for (cp = acstrans; *cp; cp++) - { + for (cp = acstrans; *cp; cp++) { sp = strchr(acs_chars, *cp); if (sp) *tp++ = sp[1]; - else - { + else { box_ok = FALSE; break; } } tp[0] = '\0'; - if (box_ok) - { + if (box_ok) { (void) strcpy(buffer, "box1="); - (void) strcat(buffer, _nc_tic_expand(boxchars, outform==F_TERMINFO, numbers)); + (void) strcat(buffer, _nc_tic_expand(boxchars, + outform == F_TERMINFO, numbers)); WRAP_CONCAT; } } @@ -693,30 +737,33 @@ bool outcount = 0; * kludge: trim off trailer to avoid an extra blank line * in infocmp -u output when there are no string differences */ - if (outcount) - { - j = out_used; + if (outcount) { + bool trimmed = FALSE; + j = outbuf.used; if (j >= 2 - && outbuf[j-1] == '\t' - && outbuf[j-2] == '\n') { - out_used -= 2; + && outbuf.text[j - 1] == '\t' + && outbuf.text[j - 2] == '\n') { + outbuf.used -= 2; + trimmed = TRUE; } else if (j >= 4 - && outbuf[j-1] == ':' - && outbuf[j-2] == '\t' - && outbuf[j-3] == '\n' - && outbuf[j-4] == '\\') { - out_used -= 4; + && outbuf.text[j - 1] == ':' + && outbuf.text[j - 2] == '\t' + && outbuf.text[j - 3] == '\n' + && outbuf.text[j - 4] == '\\') { + outbuf.used -= 4; + trimmed = TRUE; + } + if (trimmed) { + outbuf.text[outbuf.used] = '\0'; + column = oldcol; } - outbuf[out_used] = '\0'; - column = oldcol; } - #if 0 fprintf(stderr, "num_bools = %d\n", num_bools); fprintf(stderr, "num_values = %d\n", num_values); fprintf(stderr, "num_strings = %d\n", num_strings); fprintf(stderr, "term_names=%s, len=%d, strlen(outbuf)=%d, outbuf=%s\n", - tterm->term_names, len, out_used, outbuf); + tterm->term_names, len, outbuf.used, outbuf.text); #endif /* * Here's where we use infodump to trigger a more stringent length check @@ -725,128 +772,137 @@ bool outcount = 0; * It gives an idea of which entries are deadly to even *scan past*, * as opposed to *use*. */ - return(infodump ? len : termcap_length(outbuf)); + return (infodump ? len : termcap_length(outbuf.text)); } -int dump_entry(TERMTYPE *tterm, bool limited, int numbers, int (*pred)(int type, int idx)) +int +dump_entry(TERMTYPE * tterm, bool limited, int numbers, int (*pred) (int + type, int idx)) /* dump a single entry */ { - int len, critlen; - const char *legend; - bool infodump; + int len, critlen; + const char *legend; + bool infodump; - if (outform==F_TERMCAP || outform==F_TCONVERR) - { + if (outform == F_TERMCAP || outform == F_TCONVERR) { critlen = MAX_TERMCAP_LENGTH; legend = "older termcap"; infodump = FALSE; set_obsolete_termcaps(tterm); - } - else - { + } else { critlen = MAX_TERMINFO_LENGTH; legend = "terminfo"; infodump = TRUE; } - if (((len = fmt_entry(tterm, pred, FALSE, infodump, numbers)) > critlen) && limited) - { - (void) printf("# (untranslatable capabilities removed to fit entry within %d bytes)\n", - critlen); - if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) - { + if (((len = fmt_entry(tterm, pred, FALSE, infodump, numbers)) > critlen) + && limited) { + PRINTF("# (untranslatable capabilities removed to fit entry within %d bytes)\n", + critlen); + if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) { /* * We pick on sgr because it's a nice long string capability that - * is really just an optimization hack. + * is really just an optimization hack. Another good candidate is + * acsc since it is both long and unused by BSD termcap. */ char *oldsgr = set_attributes; + char *oldacsc = acs_chars; set_attributes = ABSENT_STRING; - (void) printf("# (sgr removed to fit entry within %d bytes)\n", - critlen); - if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) - { + PRINTF("# (sgr removed to fit entry within %d bytes)\n", + critlen); + if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) { + acs_chars = ABSENT_STRING; + PRINTF("# (acsc removed to fit entry within %d bytes)\n", + critlen); + } + if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) { int oldversion = tversion; tversion = V_BSD; - (void) printf("# (terminfo-only capabilities suppressed to fit entry within %d bytes)\n", - critlen); + PRINTF("# (terminfo-only capabilities suppressed to fit entry within %d bytes)\n", + critlen); - if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) > critlen) - { + if ((len = fmt_entry(tterm, pred, TRUE, infodump, numbers)) + > critlen) { (void) fprintf(stderr, - "warning: %s entry is %d bytes long\n", - _nc_first_name(tterm->term_names), - len); - (void) printf( - "# WARNING: this entry, %d bytes long, may core-dump %s libraries!\n", - len, legend); + "warning: %s entry is %d bytes long\n", + _nc_first_name(tterm->term_names), + len); + PRINTF( + "# WARNING: this entry, %d bytes long, may core-dump %s libraries!\n", + len, legend); } tversion = oldversion; } set_attributes = oldsgr; + acs_chars = oldacsc; } } - (void) fputs(outbuf, stdout); + (void) fputs(outbuf.text, stdout); return len; } -int dump_uses(const char *name, bool infodump) +int +dump_uses(const char *name, bool infodump) /* dump "use=" clauses in the appropriate format */ { char buffer[MAX_TERMINFO_LENGTH]; - append_output(0); - (void)sprintf(buffer, "%s%s", infodump ? "use=" : "tc=", name); + strcpy_DYN(&outbuf, 0); + (void) sprintf(buffer, "%s%s", infodump ? "use=" : "tc=", name); wrap_concat(buffer); - (void) fputs(outbuf, stdout); - return out_used; + (void) fputs(outbuf.text, stdout); + return outbuf.used; } -void compare_entry(void (*hook)(int t, int i, const char *name), TERMTYPE *tp GCC_UNUSED) +void +compare_entry(void (*hook) (int t, int i, const char *name), TERMTYPE * tp + GCC_UNUSED, bool quiet) /* compare two entries */ { - int i, j; - NCURSES_CONST char * name; + int i, j; + NCURSES_CONST char *name; - (void) fputs(" comparing booleans.\n", stdout); - for_each_boolean(j,tp) - { + if (!quiet) + fputs(" comparing booleans.\n", stdout); + for_each_boolean(j, tp) { i = BoolIndirect(j); - name = ExtBoolname(tp,i,bool_names); + name = ExtBoolname(tp, i, bool_names); - if ((outform == F_LITERAL || outform == F_TERMINFO || outform == F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + if (isObsolete(outform, name)) continue; - (*hook)(BOOLEAN, i, name); + (*hook) (CMP_BOOLEAN, i, name); } - (void) fputs(" comparing numbers.\n", stdout); - for_each_number(j,tp) - { + if (!quiet) + fputs(" comparing numbers.\n", stdout); + for_each_number(j, tp) { i = NumIndirect(j); - name = ExtNumname(tp,i,num_names); + name = ExtNumname(tp, i, num_names); - if ((outform==F_LITERAL || outform==F_TERMINFO || outform==F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + if (isObsolete(outform, name)) continue; - (*hook)(NUMBER, i, name); + (*hook) (CMP_NUMBER, i, name); } - (void) fputs(" comparing strings.\n", stdout); - for_each_string(j,tp) - { + if (!quiet) + fputs(" comparing strings.\n", stdout); + for_each_string(j, tp) { i = StrIndirect(j); - name = ExtStrname(tp,i,str_names); + name = ExtStrname(tp, i, str_names); - if ((outform==F_LITERAL || outform==F_TERMINFO || outform==F_VARIABLE) - && (OBSOLETE(name) && outform != F_LITERAL)) + if (isObsolete(outform, name)) continue; - (*hook)(STRING, i, name); + (*hook) (CMP_STRING, i, name); } + + /* (void) fputs(" comparing use entries.\n", stdout); */ + (*hook) (CMP_USE, 0, "use"); + } #define NOTSET(s) ((s) == 0) @@ -859,7 +915,8 @@ void compare_entry(void (*hook)(int t, int i, const char *name), TERMTYPE *tp GC #undef CUR #define CUR tp-> -static void set_obsolete_termcaps(TERMTYPE *tp) +static void +set_obsolete_termcaps(TERMTYPE * tp) { #include "capdefaults.c" } @@ -868,46 +925,47 @@ static void set_obsolete_termcaps(TERMTYPE *tp) * Convert an alternate-character-set string to canonical form: sorted and * unique. */ -static void repair_acsc(TERMTYPE *tp) +void +repair_acsc(TERMTYPE * tp) { - if (VALID_STRING(acs_chars)) { - size_t n, m; - char mapped[256]; - char extra = 0; - unsigned source; - unsigned target; - bool fix_needed = FALSE; - - for (n = 0, source = 0; acs_chars[n] != 0; n++) { - target = acs_chars[n]; - if (source >= target) { - fix_needed = TRUE; - break; - } - source = target; - if (acs_chars[n+1]) - n++; + if (VALID_STRING(acs_chars)) { + size_t n, m; + char mapped[256]; + char extra = 0; + unsigned source; + unsigned target; + bool fix_needed = FALSE; + + for (n = 0, source = 0; acs_chars[n] != 0; n++) { + target = acs_chars[n]; + if (source >= target) { + fix_needed = TRUE; + break; } - if (fix_needed) { - memset(mapped, 0, sizeof(mapped)); - for (n = 0; acs_chars[n] != 0; n++) { - source = acs_chars[n]; - if ((target = (unsigned char)acs_chars[n+1]) != 0) { - mapped[source] = target; - n++; - } else { - extra = source; - } + source = target; + if (acs_chars[n + 1]) + n++; + } + if (fix_needed) { + memset(mapped, 0, sizeof(mapped)); + for (n = 0; acs_chars[n] != 0; n++) { + source = acs_chars[n]; + if ((target = (unsigned char) acs_chars[n + 1]) != 0) { + mapped[source] = target; + n++; + } else { + extra = source; } - for (n = m = 0; n < sizeof(mapped); n++) { - if (mapped[n]) { - acs_chars[m++] = n; - acs_chars[m++] = mapped[n]; - } + } + for (n = m = 0; n < sizeof(mapped); n++) { + if (mapped[n]) { + acs_chars[m++] = n; + acs_chars[m++] = mapped[n]; } - if (extra) - acs_chars[m++] = extra; /* garbage in, garbage out */ - acs_chars[m] = 0; } + if (extra) + acs_chars[m++] = extra; /* garbage in, garbage out */ + acs_chars[m] = 0; } + } } diff --git a/progs/dump_entry.h b/progs/dump_entry.h index d7e27c53..57354702 100644 --- a/progs/dump_entry.h +++ b/progs/dump_entry.h @@ -50,11 +50,18 @@ #define S_VARIABLE 3 /* sort by C variable names */ #define S_TERMCAP 4 /* sort by termcap names */ +/* capability types for the comparison hook */ +#define CMP_BOOLEAN 0 /* comparison on booleans */ +#define CMP_NUMBER 1 /* comparison on numerics */ +#define CMP_STRING 2 /* comparison on strings */ +#define CMP_USE 3 /* comparison on use capabilities */ + extern NCURSES_CONST char *nametrans(const char *); extern void dump_init(const char *, int, int, int, int, bool); extern int fmt_entry(TERMTYPE *, int (*)(int, int), bool, bool, int); extern int dump_entry(TERMTYPE *, bool, int, int (*)(int, int)); extern int dump_uses(const char *, bool); -extern void compare_entry(void (*)(int, int, const char *), TERMTYPE *); +extern void compare_entry(void (*)(int, int, const char *), TERMTYPE *, bool); +extern void repair_acsc(TERMTYPE * tp); #define FAIL -1 diff --git a/progs/infocmp.c b/progs/infocmp.c index 59652240..add5efb9 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * infocmp.c -- decompile an entry, or compare two entries * written by Eric S. Raymond @@ -42,16 +41,17 @@ #include #include -MODULE_ID("$Id: infocmp.c,v 1.44 1999/06/16 00:39:48 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.54 2000/03/19 02:56:14 tom Exp $") #define L_CURL "{" #define R_CURL "}" #define MAXTERMS 32 /* max # terminal arguments we can handle */ +#define MAX_STRING 1024 /* maximum formatted string */ const char *_nc_progname = "infocmp"; -typedef char path[PATH_MAX]; +typedef char path[PATH_MAX]; /*************************************************************************** * @@ -61,15 +61,20 @@ typedef char path[PATH_MAX]; ***************************************************************************/ static char *tname[MAXTERMS]; /* terminal type names */ -static TERMTYPE term[MAXTERMS]; /* terminfo entries */ +static ENTRY entries[MAXTERMS]; /* terminfo entries */ static int termcount; /* count of terminal entries */ +static bool limited = TRUE; /* "-r" option is not set */ +static bool quiet = FALSE; +static const char *bool_sep = ":"; +static const char *s_absent = "NULL"; +static const char *s_cancel = "NULL"; static const char *tversion; /* terminfo version selected */ -static int numbers = 0; /* format "%'char'" to/from "%{number}" */ -static int outform; /* output format */ -static int sortmode; /* sort_mode */ static int itrace; /* trace flag for debugging */ static int mwidth = 60; +static int numbers = 0; /* format "%'char'" to/from "%{number}" */ +static int outform = F_TERMINFO;/* output format */ +static int sortmode; /* sort_mode */ /* main comparison mode */ static int compare; @@ -82,26 +87,30 @@ static bool ignorepads; /* ignore pad prefixes when diffing */ #if NO_LEAKS #undef ExitProgram -static void ExitProgram(int code) GCC_NORETURN; -static void ExitProgram(int code) +static void +ExitProgram(int code) GCC_NORETURN; +/* prototype is to get gcc to accept the noreturn attribute */ +static void +ExitProgram(int code) { - while (termcount-- > 0) - _nc_free_termtype(&term[termcount]); - _nc_leaks_dump_entry(); - _nc_free_and_exit(code); + while (termcount-- > 0) + _nc_free_termtype(&entries[termcount].tterm); + _nc_leaks_dump_entry(); + _nc_free_and_exit(code); } #endif -static char *canonical_name(char *ptr, char *buf) +static char * +canonical_name(char *ptr, char *buf) /* extract the terminal type's primary name */ { - char *bp; + char *bp; (void) strcpy(buf, ptr); - if ((bp = strchr(buf, '|')) != (char *)NULL) + if ((bp = strchr(buf, '|')) != 0) *bp = '\0'; - return(buf); + return (buf); } /*************************************************************************** @@ -110,220 +119,330 @@ static char *canonical_name(char *ptr, char *buf) * ***************************************************************************/ -static int capcmp(const char *s, const char *t) +static int +capcmp(int idx, const char *s, const char *t) /* capability comparison function */ { if (!VALID_STRING(s) && !VALID_STRING(t)) - return(0); + return (s != t); else if (!VALID_STRING(s) || !VALID_STRING(t)) - return(1); + return (1); - if (ignorepads) - return(_nc_capcmp(s, t)); + if ((idx == acs_chars_index) || !ignorepads) + return (strcmp(s, t)); else - return(strcmp(s, t)); + return (_nc_capcmp(s, t)); } -static int use_predicate(int type, int idx) +static int +use_predicate(int type, int idx) /* predicate function to use for use decompilation */ { - TERMTYPE *tp; + ENTRY *ep; - switch(type) + switch (type) { + case BOOLEAN: { - case BOOLEAN: { - int is_set = FALSE; + int is_set = FALSE; - /* - * This assumes that multiple use entries are supposed - * to contribute the logical or of their boolean capabilities. - * This is true if we take the semantics of multiple uses to - * be 'each capability gets the first non-default value found - * in the sequence of use entries'. - */ - for (tp = &term[1]; tp < term + termcount; tp++) - if (tp->Booleans[idx]) { - is_set = TRUE; - break; - } - if (is_set != term->Booleans[idx]) - return(!is_set); - else - return(FAIL); + /* + * This assumes that multiple use entries are supposed + * to contribute the logical or of their boolean capabilities. + * This is true if we take the semantics of multiple uses to + * be 'each capability gets the first non-default value found + * in the sequence of use entries'. + * + * Note that cancelled or absent booleans are stored as FALSE, + * unlike numbers and strings, whose cancelled/absent state is + * recorded in the terminfo database. + */ + for (ep = &entries[1]; ep < entries + termcount; ep++) + if (ep->tterm.Booleans[idx] == TRUE) { + is_set = entries[0].tterm.Booleans[idx]; + break; } + if (is_set != entries[0].tterm.Booleans[idx]) + return (!is_set); + else + return (FAIL); + } - case NUMBER: { - int value = ABSENT_NUMERIC; + case NUMBER: + { + int value = ABSENT_NUMERIC; - /* - * We take the semantics of multiple uses to be 'each - * capability gets the first non-default value found - * in the sequence of use entries'. - */ - for (tp = &term[1]; tp < term + termcount; tp++) - if (tp->Numbers[idx] >= 0) { - value = tp->Numbers[idx]; - break; - } - - if (value != term->Numbers[idx]) - return(value != ABSENT_NUMERIC); - else - return(FAIL); + /* + * We take the semantics of multiple uses to be 'each + * capability gets the first non-default value found + * in the sequence of use entries'. + */ + for (ep = &entries[1]; ep < entries + termcount; ep++) + if (VALID_NUMERIC(ep->tterm.Numbers[idx])) { + value = ep->tterm.Numbers[idx]; + break; + } + + if (value != entries[0].tterm.Numbers[idx]) + return (value != ABSENT_NUMERIC); + else + return (FAIL); + } + + case STRING: + { + char *termstr, *usestr = ABSENT_STRING; + + termstr = entries[0].tterm.Strings[idx]; + + /* + * We take the semantics of multiple uses to be 'each + * capability gets the first non-default value found + * in the sequence of use entries'. + */ + for (ep = &entries[1]; ep < entries + termcount; ep++) + if (ep->tterm.Strings[idx]) { + usestr = ep->tterm.Strings[idx]; + break; } - case STRING: { - char *termstr, *usestr = ABSENT_STRING; + if (usestr == ABSENT_STRING && termstr == ABSENT_STRING) + return (FAIL); + else if (!usestr || !termstr || capcmp(idx, usestr, termstr)) + return (TRUE); + else + return (FAIL); + } + } - termstr = term->Strings[idx]; + return (FALSE); /* pacify compiler */ +} - /* - * We take the semantics of multiple uses to be 'each - * capability gets the first non-default value found - * in the sequence of use entries'. - */ - for (tp = &term[1]; tp < term + termcount; tp++) - if (tp->Strings[idx]) - { - usestr = tp->Strings[idx]; - break; - } - - if (usestr == ABSENT_STRING && termstr == ABSENT_STRING) - return(FAIL); - else if (!usestr || !termstr || capcmp(usestr, termstr)) - return(TRUE); - else - return(FAIL); +static bool +useeq(ENTRY * e1, ENTRY * e2) +/* are the use references in two entries equivalent? */ +{ + int i, j; + + if (e1->nuses != e2->nuses) + return (FALSE); + + /* Ugh...this is quadratic again */ + for (i = 0; i < e1->nuses; i++) { + bool foundmatch = FALSE; + + /* search second entry for given use reference */ + for (j = 0; j < e2->nuses; j++) + if (!strcmp(e1->uses[i].name, e2->uses[j].name)) { + foundmatch = TRUE; + break; } - } - return(FALSE); /* pacify compiler */ + if (!foundmatch) + return (FALSE); + } + + return (TRUE); } -static bool entryeq(TERMTYPE *t1, TERMTYPE *t2) -/* are two terminal types equal */ +static bool +entryeq(TERMTYPE * t1, TERMTYPE * t2) +/* are two entries equivalent? */ { - int i; + int i; for (i = 0; i < NUM_BOOLEANS(t1); i++) if (t1->Booleans[i] != t2->Booleans[i]) - return(FALSE); + return (FALSE); for (i = 0; i < NUM_NUMBERS(t1); i++) if (t1->Numbers[i] != t2->Numbers[i]) - return(FALSE); + return (FALSE); for (i = 0; i < NUM_STRINGS(t1); i++) - if (capcmp(t1->Strings[i], t2->Strings[i])) - return(FALSE); + if (capcmp(i, t1->Strings[i], t2->Strings[i])) + return (FALSE); - return(TRUE); + return (TRUE); } #define TIC_EXPAND(result) _nc_tic_expand(result, outform==F_TERMINFO, numbers) -static void compare_predicate(int type, int idx, const char *name) -/* predicate function to use for entry difference reports */ +static void +print_uses(ENTRY * ep, FILE * fp) +/* print an entry's use references */ { - register TERMTYPE *t1 = &term[0]; - register TERMTYPE *t2 = &term[1]; - char *s1, *s2; + int i; - switch(type) - { - case BOOLEAN: - switch(compare) - { - case C_DIFFERENCE: - if (t1->Booleans[idx] != t2->Booleans[idx]) - (void) printf("\t%s: %c:%c.\n", - name, - t1->Booleans[idx] ? 'T' : 'F', - t2->Booleans[idx] ? 'T' : 'F'); - break; + if (!ep->nuses) + fputs("NULL", fp); + else + for (i = 0; i < ep->nuses; i++) { + fputs(ep->uses[i].name, fp); + if (i < ep->nuses - 1) + fputs(" ", fp); + } +} - case C_COMMON: - if (t1->Booleans[idx] && t2->Booleans[idx]) - (void) printf("\t%s= T.\n", name); - break; +static const char * +dump_boolean(int val) +/* display the value of a boolean capability */ +{ + switch (val) { + case ABSENT_BOOLEAN: + return (s_absent); + case CANCELLED_BOOLEAN: + return (s_cancel); + case FALSE: + return ("F"); + case TRUE: + return ("T"); + default: + return ("?"); + } +} - case C_NAND: - if (!t1->Booleans[idx] && !t2->Booleans[idx]) - (void) printf("\t!%s.\n", name); - break; - } - break; +static void +dump_numeric(int val, char *buf) +/* display the value of a boolean capability */ +{ + switch (val) { + case ABSENT_NUMERIC: + strcpy(buf, s_absent); + break; + case CANCELLED_NUMERIC: + strcpy(buf, s_cancel); + break; + default: + sprintf(buf, "%d", val); + break; + } +} - case NUMBER: - switch(compare) - { - case C_DIFFERENCE: - if (t1->Numbers[idx] != t2->Numbers[idx]) - (void) printf("\t%s: %d:%d.\n", - name, t1->Numbers[idx], t2->Numbers[idx]); - break; +static void +dump_string(char *val, char *buf) +/* display the value of a string capability */ +{ + if (val == ABSENT_STRING) + strcpy(buf, s_absent); + else if (val == CANCELLED_STRING) + strcpy(buf, s_cancel); + else { + sprintf(buf, "'%.*s'", MAX_STRING - 3, TIC_EXPAND(val)); + } +} - case C_COMMON: - if (t1->Numbers[idx]!=-1 && t2->Numbers[idx]!=-1 - && t1->Numbers[idx] == t2->Numbers[idx]) - (void) printf("\t%s= %d.\n", name, t1->Numbers[idx]); - break; +static void +compare_predicate(int type, int idx, const char *name) +/* predicate function to use for entry difference reports */ +{ + register ENTRY *e1 = &entries[0]; + register ENTRY *e2 = &entries[1]; + char buf1[MAX_STRING], buf2[MAX_STRING]; + int b1, b2; + int n1, n2; + char *s1, *s2; + + switch (type) { + case CMP_BOOLEAN: + b1 = e1->tterm.Booleans[idx]; + b2 = e2->tterm.Booleans[idx]; + switch (compare) { + case C_DIFFERENCE: + if (!(b1 == ABSENT_BOOLEAN && b2 == ABSENT_BOOLEAN) && b1 != b2) + (void) printf("\t%s: %s%s%s.\n", + name, + dump_boolean(b1), + bool_sep, + dump_boolean(b2)); + break; - case C_NAND: - if (t1->Numbers[idx]==-1 && t2->Numbers[idx] == -1) - (void) printf("\t!%s.\n", name); - break; - } + case C_COMMON: + if (b1 == b2 && b1 != ABSENT_BOOLEAN) + (void) printf("\t%s= %s.\n", name, dump_boolean(b1)); + break; + + case C_NAND: + if (b1 == ABSENT_BOOLEAN && b2 == ABSENT_BOOLEAN) + (void) printf("\t!%s.\n", name); + break; + } break; - case STRING: - s1 = t1->Strings[idx]; - s2 = t2->Strings[idx]; - switch(compare) - { - case C_DIFFERENCE: - if (capcmp(s1, s2)) - { - char buf1[BUFSIZ], buf2[BUFSIZ]; - - if (s1 == (char *)NULL) - (void) strcpy(buf1, "NULL"); - else - { - (void) strcpy(buf1, "'"); - (void) strcat(buf1, TIC_EXPAND(s1)); - (void) strcat(buf1, "'"); - } - - if (s2 == (char *)NULL) - (void) strcpy(buf2, "NULL"); - else - { - (void) strcpy(buf2, "'"); - (void) strcat(buf2, TIC_EXPAND(s2)); - (void) strcat(buf2, "'"); - } - - if (strcmp(buf1, buf2)) - (void) printf("\t%s: %s, %s.\n", - name, buf1, buf2); - } - break; + case CMP_NUMBER: + n1 = e1->tterm.Numbers[idx]; + n2 = e2->tterm.Numbers[idx]; + dump_numeric(n1, buf1); + dump_numeric(n2, buf2); + switch (compare) { + case C_DIFFERENCE: + if (!((n1 == ABSENT_NUMERIC && n2 == ABSENT_NUMERIC)) && n1 != n2) + (void) printf("\t%s: %s, %s.\n", name, buf1, buf2); + break; - case C_COMMON: - if (s1 && s2 && !capcmp(s1, s2)) - (void) printf("\t%s= '%s'.\n", name, TIC_EXPAND(s1)); - break; + case C_COMMON: + if (n1 != ABSENT_NUMERIC && n2 != ABSENT_NUMERIC && n1 == n2) + (void) printf("\t%s= %s.\n", name, buf1); + break; - case C_NAND: - if (!s1 && !s2) - (void) printf("\t!%s.\n", name); - break; - } - break; + case C_NAND: + if (n1 == ABSENT_NUMERIC && n2 == ABSENT_NUMERIC) + (void) printf("\t!%s.\n", name); + break; + } + break; + + case CMP_STRING: + s1 = e1->tterm.Strings[idx]; + s2 = e2->tterm.Strings[idx]; + switch (compare) { + case C_DIFFERENCE: + if (capcmp(idx, s1, s2)) { + dump_string(s1, buf1); + dump_string(s2, buf2); + if (strcmp(buf1, buf2)) + (void) printf("\t%s: %s, %s.\n", name, buf1, buf2); + } + break; + + case C_COMMON: + if (s1 && s2 && !capcmp(idx, s1, s2)) + (void) printf("\t%s= '%s'.\n", name, TIC_EXPAND(s1)); + break; + + case C_NAND: + if (!s1 && !s2) + (void) printf("\t!%s.\n", name); + break; } + break; + case CMP_USE: + /* unlike the other modes, this compares *all* use entries */ + switch (compare) { + case C_DIFFERENCE: + if (!useeq(e1, e2)) { + (void) fputs("\tuse: ", stdout); + print_uses(e1, stdout); + fputs(", ", stdout); + print_uses(e2, stdout); + fputs(".\n", stdout); + } + break; + + case C_COMMON: + if (e1->nuses && e2->nuses && useeq(e1, e2)) { + (void) fputs("\tuse: ", stdout); + print_uses(e1, stdout); + fputs(".\n", stdout); + } + break; + + case C_NAND: + if (!e1->nuses && !e2->nuses) + (void) printf("\t!use.\n"); + break; + } + } } /*************************************************************************** @@ -332,114 +451,115 @@ static void compare_predicate(int type, int idx, const char *name) * ***************************************************************************/ -typedef struct {const char *from; const char *to;} assoc; +typedef struct { + const char *from; + const char *to; +} assoc; static const assoc std_caps[] = { /* these are specified by X.364 and iBCS2 */ - {"\033c", "RIS"}, /* full reset */ - {"\0337", "SC"}, /* save cursor */ - {"\0338", "RC"}, /* restore cursor */ - {"\033[r", "RSR"}, /* not an X.364 mnemonic */ - {"\033[m", "SGR0"}, /* not an X.364 mnemonic */ - {"\033[2J", "ED2"}, /* clear page */ + {"\033c", "RIS"}, /* full reset */ + {"\0337", "SC"}, /* save cursor */ + {"\0338", "RC"}, /* restore cursor */ + {"\033[r", "RSR"}, /* not an X.364 mnemonic */ + {"\033[m", "SGR0"}, /* not an X.364 mnemonic */ + {"\033[2J", "ED2"}, /* clear page */ /* this group is specified by ISO 2022 */ - {"\033(0", "ISO DEC G0"}, /* enable DEC graphics for G0 */ - {"\033(A", "ISO UK G0"}, /* enable UK chars for G0 */ - {"\033(B", "ISO US G0"}, /* enable US chars for G0 */ - {"\033)0", "ISO DEC G1"}, /* enable DEC graphics for G1 */ - {"\033)A", "ISO UK G1"}, /* enable UK chars for G1 */ - {"\033)B", "ISO US G1"}, /* enable US chars for G1 */ + {"\033(0", "ISO DEC G0"}, /* enable DEC graphics for G0 */ + {"\033(A", "ISO UK G0"}, /* enable UK chars for G0 */ + {"\033(B", "ISO US G0"}, /* enable US chars for G0 */ + {"\033)0", "ISO DEC G1"}, /* enable DEC graphics for G1 */ + {"\033)A", "ISO UK G1"}, /* enable UK chars for G1 */ + {"\033)B", "ISO US G1"}, /* enable US chars for G1 */ /* these are DEC private modes widely supported by emulators */ - {"\033=", "DECPAM"}, /* application keypad mode */ - {"\033>", "DECPNM"}, /* normal keypad mode */ - {"\033<", "DECANSI"}, /* enter ANSI mode */ + {"\033=", "DECPAM"}, /* application keypad mode */ + {"\033>", "DECPNM"}, /* normal keypad mode */ + {"\033<", "DECANSI"}, /* enter ANSI mode */ - { (char *)0, (char *)0} + {(char *) 0, (char *) 0} }; static const assoc private_modes[] = /* DEC \E[ ... [hl] modes recognized by many emulators */ { - {"1", "CKM"}, /* application cursor keys */ - {"2", "ANM"}, /* set VT52 mode */ - {"3", "COLM"}, /* 132-column mode */ - {"4", "SCLM"}, /* smooth scroll */ - {"5", "SCNM"}, /* reverse video mode */ - {"6", "OM"}, /* origin mode */ - {"7", "AWM"}, /* wraparound mode */ - {"8", "ARM"}, /* auto-repeat mode */ - {(char *)0, (char *)0} + {"1", "CKM"}, /* application cursor keys */ + {"2", "ANM"}, /* set VT52 mode */ + {"3", "COLM"}, /* 132-column mode */ + {"4", "SCLM"}, /* smooth scroll */ + {"5", "SCNM"}, /* reverse video mode */ + {"6", "OM"}, /* origin mode */ + {"7", "AWM"}, /* wraparound mode */ + {"8", "ARM"}, /* auto-repeat mode */ + {(char *) 0, (char *) 0} }; static const assoc ecma_highlights[] = /* recognize ECMA attribute sequences */ { - {"0", "NORMAL"}, /* normal */ - {"1", "+BOLD"}, /* bold on */ - {"2", "+DIM"}, /* dim on */ - {"3", "+ITALIC"}, /* italic on */ - {"4", "+UNDERLINE"}, /* underline on */ - {"5", "+BLINK"}, /* blink on */ - {"6", "+FASTBLINK"}, /* fastblink on */ - {"7", "+REVERSE"}, /* reverse on */ - {"8", "+INVISIBLE"}, /* invisible on */ - {"9", "+DELETED"}, /* deleted on */ - {"10", "MAIN-FONT"}, /* select primary font */ - {"11", "ALT-FONT-1"}, /* select alternate font 1 */ - {"12", "ALT-FONT-2"}, /* select alternate font 2 */ - {"13", "ALT-FONT-3"}, /* select alternate font 3 */ - {"14", "ALT-FONT-4"}, /* select alternate font 4 */ - {"15", "ALT-FONT-5"}, /* select alternate font 5 */ - {"16", "ALT-FONT-6"}, /* select alternate font 6 */ - {"17", "ALT-FONT-7"}, /* select alternate font 7 */ - {"18", "ALT-FONT-1"}, /* select alternate font 1 */ - {"19", "ALT-FONT-1"}, /* select alternate font 1 */ - {"20", "FRAKTUR"}, /* Fraktur font */ - {"21", "DOUBLEUNDER"}, /* double underline */ - {"22", "-DIM"}, /* dim off */ - {"23", "-ITALIC"}, /* italic off */ - {"24", "-UNDERLINE"}, /* underline off */ - {"25", "-BLINK"}, /* blink off */ - {"26", "-FASTBLINK"}, /* fastblink off */ - {"27", "-REVERSE"}, /* reverse off */ - {"28", "-INVISIBLE"}, /* invisible off */ - {"29", "-DELETED"}, /* deleted off */ - {(char *)0, (char *)0} + {"0", "NORMAL"}, /* normal */ + {"1", "+BOLD"}, /* bold on */ + {"2", "+DIM"}, /* dim on */ + {"3", "+ITALIC"}, /* italic on */ + {"4", "+UNDERLINE"}, /* underline on */ + {"5", "+BLINK"}, /* blink on */ + {"6", "+FASTBLINK"}, /* fastblink on */ + {"7", "+REVERSE"}, /* reverse on */ + {"8", "+INVISIBLE"}, /* invisible on */ + {"9", "+DELETED"}, /* deleted on */ + {"10", "MAIN-FONT"}, /* select primary font */ + {"11", "ALT-FONT-1"}, /* select alternate font 1 */ + {"12", "ALT-FONT-2"}, /* select alternate font 2 */ + {"13", "ALT-FONT-3"}, /* select alternate font 3 */ + {"14", "ALT-FONT-4"}, /* select alternate font 4 */ + {"15", "ALT-FONT-5"}, /* select alternate font 5 */ + {"16", "ALT-FONT-6"}, /* select alternate font 6 */ + {"17", "ALT-FONT-7"}, /* select alternate font 7 */ + {"18", "ALT-FONT-1"}, /* select alternate font 1 */ + {"19", "ALT-FONT-1"}, /* select alternate font 1 */ + {"20", "FRAKTUR"}, /* Fraktur font */ + {"21", "DOUBLEUNDER"}, /* double underline */ + {"22", "-DIM"}, /* dim off */ + {"23", "-ITALIC"}, /* italic off */ + {"24", "-UNDERLINE"}, /* underline off */ + {"25", "-BLINK"}, /* blink off */ + {"26", "-FASTBLINK"}, /* fastblink off */ + {"27", "-REVERSE"}, /* reverse off */ + {"28", "-INVISIBLE"}, /* invisible off */ + {"29", "-DELETED"}, /* deleted off */ + {(char *) 0, (char *) 0} }; -static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) +static void +analyze_string(const char *name, const char *cap, TERMTYPE * tp) { - char buf[MAX_TERMINFO_LENGTH]; - char buf2[MAX_TERMINFO_LENGTH]; - const char *sp, *ep; - const assoc *ap; + char buf[MAX_TERMINFO_LENGTH]; + char buf2[MAX_TERMINFO_LENGTH]; + const char *sp, *ep; + const assoc *ap; if (cap == ABSENT_STRING || cap == CANCELLED_STRING) return; (void) printf("%s: ", name); buf[0] = '\0'; - for (sp = cap; *sp; sp++) - { - int i; - size_t len = 0; + for (sp = cap; *sp; sp++) { + int i; + size_t len = 0; const char *expansion = 0; /* first, check other capabilities in this entry */ - for (i = 0; i < STRCOUNT; i++) - { - char *cp = tp->Strings[i]; + for (i = 0; i < STRCOUNT; i++) { + char *cp = tp->Strings[i]; /* don't use soft-key capabilities */ if (strnames[i][0] == 'k' && strnames[i][0] == 'f') continue; - - if (cp != ABSENT_STRING && cp != CANCELLED_STRING && cp[0] && cp != cap) - { + if (cp != ABSENT_STRING && cp != CANCELLED_STRING && cp[0] && cp + != cap) { len = strlen(cp); (void) strncpy(buf2, sp, len); buf2[len] = '\0'; @@ -467,12 +587,10 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) /* now check the standard capabilities */ if (!expansion) - for (ap = std_caps; ap->from; ap++) - { + for (ap = std_caps; ap->from; ap++) { len = strlen(ap->from); - if (strncmp(ap->from, sp, len) == 0) - { + if (strncmp(ap->from, sp, len) == 0) { expansion = ap->to; break; } @@ -480,11 +598,10 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) /* now check for private-mode sequences */ if (!expansion - && sp[0] == '\033' && sp[1] == '[' && sp[2] == '?' - && (len = strspn(sp + 3, "0123456789;")) - && ((sp[3 + len] == 'h') || (sp[3 + len] == 'l'))) - { - char buf3[MAX_TERMINFO_LENGTH]; + && sp[0] == '\033' && sp[1] == '[' && sp[2] == '?' + && (len = strspn(sp + 3, "0123456789;")) + && ((sp[3 + len] == 'h') || (sp[3 + len] == 'l'))) { + char buf3[MAX_TERMINFO_LENGTH]; (void) strcpy(buf2, (sp[3 + len] == 'h') ? "DEC+" : "DEC-"); (void) strncpy(buf3, sp + 3, len); @@ -493,36 +610,33 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) ep = strtok(buf3, ";"); do { - bool found = FALSE; - - for (ap = private_modes; ap->from; ap++) - { - size_t tlen = strlen(ap->from); - - if (strncmp(ap->from, ep, tlen) == 0) - { - (void) strcat(buf2, ap->to); - found = TRUE; - break; - } - } - - if (!found) - (void) strcat(buf2, ep); - (void) strcat(buf2, ";"); - } while - ((ep = strtok((char *)NULL, ";"))); + bool found = FALSE; + + for (ap = private_modes; ap->from; ap++) { + size_t tlen = strlen(ap->from); + + if (strncmp(ap->from, ep, tlen) == 0) { + (void) strcat(buf2, ap->to); + found = TRUE; + break; + } + } + + if (!found) + (void) strcat(buf2, ep); + (void) strcat(buf2, ";"); + } while + ((ep = strtok((char *) 0, ";"))); buf2[strlen(buf2) - 1] = '\0'; expansion = buf2; } /* now check for ECMA highlight sequences */ if (!expansion - && sp[0] == '\033' && sp[1] == '[' - && (len = strspn(sp + 2, "0123456789;")) - && sp[2 + len] == 'm') - { - char buf3[MAX_TERMINFO_LENGTH]; + && sp[0] == '\033' && sp[1] == '[' + && (len = strspn(sp + 2, "0123456789;")) + && sp[2 + len] == 'm') { + char buf3[MAX_TERMINFO_LENGTH]; (void) strcpy(buf2, "SGR:"); (void) strncpy(buf3, sp + 2, len); @@ -531,32 +645,29 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) ep = strtok(buf3, ";"); do { - bool found = FALSE; - - for (ap = ecma_highlights; ap->from; ap++) - { - size_t tlen = strlen(ap->from); - - if (strncmp(ap->from, ep, tlen) == 0) - { - (void) strcat(buf2, ap->to); - found = TRUE; - break; - } - } - - if (!found) - (void) strcat(buf2, ep); - (void) strcat(buf2, ";"); - } while - ((ep = strtok((char *)NULL, ";"))); + bool found = FALSE; + + for (ap = ecma_highlights; ap->from; ap++) { + size_t tlen = strlen(ap->from); + + if (strncmp(ap->from, ep, tlen) == 0) { + (void) strcat(buf2, ap->to); + found = TRUE; + break; + } + } + + if (!found) + (void) strcat(buf2, ep); + (void) strcat(buf2, ";"); + } while + ((ep = strtok((char *) 0, ";"))); buf2[strlen(buf2) - 1] = '\0'; expansion = buf2; } /* now check for scroll region reset */ - if (!expansion) - { + if (!expansion) { (void) sprintf(buf2, "\033[1;%dr", tp->Numbers[2]); len = strlen(buf2); if (strncmp(buf2, sp, len) == 0) @@ -564,23 +675,19 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) } /* now check for home-down */ - if (!expansion) - { + if (!expansion) { (void) sprintf(buf2, "\033[%d;1H", tp->Numbers[2]); len = strlen(buf2); if (strncmp(buf2, sp, len) == 0) - expansion = "LL"; + expansion = "LL"; } /* now look at the expansion we got, if any */ - if (expansion) - { + if (expansion) { (void) sprintf(buf + strlen(buf), "{%s}", expansion); sp += len - 1; continue; - } - else - { + } else { /* couldn't match anything */ buf2[0] = *sp; buf2[1] = '\0'; @@ -596,44 +703,43 @@ static void analyze_string(const char *name, const char *cap, TERMTYPE *tp) * ***************************************************************************/ -static void file_comparison(int argc, char *argv[]) +static void +file_comparison(int argc, char *argv[]) { #define MAXCOMPARE 2 /* someday we may allow comparisons on more files */ - int filecount = 0; - ENTRY *heads[MAXCOMPARE]; - ENTRY *tails[MAXCOMPARE]; - ENTRY *qp, *rp; - int i, n; + int filecount = 0; + ENTRY *heads[MAXCOMPARE]; + ENTRY *tails[MAXCOMPARE]; + ENTRY *qp, *rp; + int i, n; - dump_init((char *)NULL, F_LITERAL, S_TERMINFO, 0, itrace, FALSE); + dump_init((char *) 0, F_LITERAL, S_TERMINFO, 0, itrace, FALSE); - for (n = 0; n < argc && n < MAXCOMPARE; n++) - { - if (freopen(argv[n], "r", stdin) == NULL) + for (n = 0; n < argc && n < MAXCOMPARE; n++) { + if (freopen(argv[n], "r", stdin) == 0) _nc_err_abort("Can't open %s", argv[n]); - _nc_head = _nc_tail = (ENTRY *)NULL; + _nc_head = _nc_tail = 0; /* parse entries out of the source file */ _nc_set_source(argv[n]); _nc_read_entry_source(stdin, NULL, TRUE, FALSE, NULLHOOK); if (itrace) - (void) fprintf(stderr, "Resolving file %d...\n", n-0); + (void) fprintf(stderr, "Resolving file %d...\n", n - 0); - /* do use resolution */ - if (!_nc_resolve_uses()) - { + /* maybe do use resolution */ + if (!_nc_resolve_uses(!limited)) { (void) fprintf(stderr, - "There are unresolved use entries in %s:\n", - argv[n]); - for_entry_list(qp) - if (qp->nuses) - { + "There are unresolved use entries in %s:\n", + argv[n]); + for_entry_list(qp) { + if (qp->nuses) { (void) fputs(qp->tterm.term_names, stderr); (void) fputc('\n', stderr); } + } exit(EXIT_FAILURE); } @@ -646,30 +752,17 @@ static void file_comparison(int argc, char *argv[]) if (itrace) (void) fprintf(stderr, "Entries are now in core...\n"); - /* - * The entry-matching loop. We're not using the use[] - * slots any more (they got zeroed out by resolve_uses) so - * we stash each entry's matches in the other file there. - * Sigh, this is intrinsically quadratic. - */ - for (qp = heads[0]; qp; qp = qp->next) - { + /* The entry-matching loop. Sigh, this is intrinsically quadratic. */ + for (qp = heads[0]; qp; qp = qp->next) { for (rp = heads[1]; rp; rp = rp->next) - if (_nc_entry_match(qp->tterm.term_names, rp->tterm.term_names)) - { - /* - * This is why the uses structure parent element is - * (void *) -- so we can have either (char *) for - * names or entry structure pointers in them and still - * be type-safe. - */ - if (qp->nuses < MAX_USES) - qp->uses[qp->nuses].parent = (void *)rp; - qp->nuses++; - - if (rp->nuses < MAX_USES) - rp->uses[rp->nuses].parent = (void *)qp; - rp->nuses++; + if (_nc_entry_match(qp->tterm.term_names, rp->tterm.term_names)) { + if (qp->ncrosslinks < MAX_CROSSLINKS) + qp->crosslinks[qp->ncrosslinks] = rp; + qp->ncrosslinks++; + + if (rp->ncrosslinks < MAX_CROSSLINKS) + rp->crosslinks[rp->ncrosslinks] = qp; + rp->ncrosslinks++; } } @@ -677,170 +770,185 @@ static void file_comparison(int argc, char *argv[]) if (itrace) (void) fprintf(stderr, "Name matches are done...\n"); - for (qp = heads[0]; qp; qp = qp->next) - if (qp->nuses > 1) - { + for (qp = heads[0]; qp; qp = qp->next) { + if (qp->ncrosslinks > 1) { (void) fprintf(stderr, - "%s in file 1 (%s) has %d matches in file 2 (%s):\n", - _nc_first_name(qp->tterm.term_names), - argv[0], - qp->nuses, - argv[1]); - for (i = 0; i < qp->nuses; i++) + "%s in file 1 (%s) has %d matches in file 2 (%s):\n", + _nc_first_name(qp->tterm.term_names), + argv[0], + qp->ncrosslinks, + argv[1]); + for (i = 0; i < qp->ncrosslinks; i++) (void) fprintf(stderr, - "\t%s\n", - _nc_first_name(((ENTRY *)qp->uses[i].parent)->tterm.term_names)); + "\t%s\n", + _nc_first_name((qp->crosslinks[i])->tterm.term_names)); } - for (rp = heads[1]; rp; rp = rp->next) - if (rp->nuses > 1) - { + } + + for (rp = heads[1]; rp; rp = rp->next) { + if (rp->ncrosslinks > 1) { (void) fprintf(stderr, - "%s in file 2 (%s) has %d matches in file 1 (%s):\n", - _nc_first_name(rp->tterm.term_names), - argv[1], - rp->nuses, - argv[0]); - for (i = 0; i < rp->nuses; i++) + "%s in file 2 (%s) has %d matches in file 1 (%s):\n", + _nc_first_name(rp->tterm.term_names), + argv[1], + rp->ncrosslinks, + argv[0]); + for (i = 0; i < rp->ncrosslinks; i++) (void) fprintf(stderr, - "\t%s\n", - _nc_first_name(((ENTRY *)rp->uses[i].parent)->tterm.term_names)); + "\t%s\n", + _nc_first_name((rp->crosslinks[i])->tterm.term_names)); } + } (void) printf("In file 1 (%s) only:\n", argv[0]); for (qp = heads[0]; qp; qp = qp->next) - if (qp->nuses == 0) + if (qp->ncrosslinks == 0) (void) printf("\t%s\n", - _nc_first_name(qp->tterm.term_names)); + _nc_first_name(qp->tterm.term_names)); (void) printf("In file 2 (%s) only:\n", argv[1]); for (rp = heads[1]; rp; rp = rp->next) - if (rp->nuses == 0) + if (rp->ncrosslinks == 0) (void) printf("\t%s\n", - _nc_first_name(rp->tterm.term_names)); + _nc_first_name(rp->tterm.term_names)); (void) printf("The following entries are equivalent:\n"); - for (qp = heads[0]; qp; qp = qp->next) - { - rp = (ENTRY *)qp->uses[0].parent; + for (qp = heads[0]; qp; qp = qp->next) { + rp = qp->crosslinks[0]; - if (qp->nuses == 1 && entryeq(&qp->tterm, &rp->tterm)) - { - char name1[NAMESIZE], name2[NAMESIZE]; + if (qp->ncrosslinks == 1) { + rp = qp->crosslinks[0]; - (void) canonical_name(qp->tterm.term_names, name1); - (void) canonical_name(rp->tterm.term_names, name2); + repair_acsc(&qp->tterm); + repair_acsc(&rp->tterm); +#if NCURSES_XNAMES + _nc_align_termtype(&qp->tterm, &rp->tterm); +#endif + if (entryeq(&qp->tterm, &rp->tterm) && useeq(qp, rp)) { + char name1[NAMESIZE], name2[NAMESIZE]; - (void) printf("%s = %s\n", name1, name2); + (void) canonical_name(qp->tterm.term_names, name1); + (void) canonical_name(rp->tterm.term_names, name2); + + (void) printf("%s = %s\n", name1, name2); + } } } (void) printf("Differing entries:\n"); termcount = 2; - for (qp = heads[0]; qp; qp = qp->next) - { - rp = (ENTRY *)qp->uses[0].parent; + for (qp = heads[0]; qp; qp = qp->next) { + if (qp->ncrosslinks == 1) { + rp = qp->crosslinks[0]; #if NCURSES_XNAMES - if (termcount > 1) + /* sorry - we have to do this on each pass */ _nc_align_termtype(&qp->tterm, &rp->tterm); #endif - if (qp->nuses == 1 && !entryeq(&qp->tterm, &rp->tterm)) - { - char name1[NAMESIZE], name2[NAMESIZE]; + if (!(entryeq(&qp->tterm, &rp->tterm) && useeq(qp, rp))) { + char name1[NAMESIZE], name2[NAMESIZE]; - term[0] = qp->tterm; - term[1] = rp->tterm; + entries[0] = *qp; + entries[1] = *rp; - (void) canonical_name(qp->tterm.term_names, name1); - (void) canonical_name(rp->tterm.term_names, name2); + (void) canonical_name(qp->tterm.term_names, name1); + (void) canonical_name(rp->tterm.term_names, name2); - switch (compare) - { - case C_DIFFERENCE: - if (itrace) - (void)fprintf(stderr, "infocmp: dumping differences\n"); - (void) printf("comparing %s to %s.\n", name1, name2); - compare_entry(compare_predicate, term); - break; + switch (compare) { + case C_DIFFERENCE: + if (itrace) + (void) fprintf(stderr, + "infocmp: dumping differences\n"); + (void) printf("comparing %s to %s.\n", name1, name2); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; - case C_COMMON: - if (itrace) - (void) fprintf(stderr, - "infocmp: dumping common capabilities\n"); - (void) printf("comparing %s to %s.\n", name1, name2); - compare_entry(compare_predicate, term); - break; + case C_COMMON: + if (itrace) + (void) fprintf(stderr, + "infocmp: dumping common capabilities\n"); + (void) printf("comparing %s to %s.\n", name1, name2); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; - case C_NAND: - if (itrace) - (void) fprintf(stderr, - "infocmp: dumping differences\n"); - (void) printf("comparing %s to %s.\n", name1, name2); - compare_entry(compare_predicate, term); - break; + case C_NAND: + if (itrace) + (void) fprintf(stderr, + "infocmp: dumping differences\n"); + (void) printf("comparing %s to %s.\n", name1, name2); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; + } } } } } -static void usage(void) +static void +usage(void) { - static const char *tbl[] = { - "Usage: infocmp [options] [-A directory] [-B directory] [termname...]" - ,"" - ,"Options:" - ," -1 print single-column" - ," -C use termcap-names" - ," -F compare terminfo-files" - ," -I use terminfo-names" - ," -L use long names" - ," -R subset (see manpage)" - ," -T eliminate size limits (test)" - ," -V print version" - ," -c list common capabilities" - ," -d list different capabilities" - ," -e format output for C initializer" - ," -E format output as C tables" - ," -f with -1, format complex strings" - ," -G format %{number} to %'char'" - ," -g format %'char' to %{number}" - ," -i analyze initialization/reset" - ," -l output terminfo names" - ," -n list capabilities in neither" - ," -p ignore padding specifiers" - ," -r with -C, output in termcap form" - ," -s [d|i|l|c] sort fields" - ," -u produce source with 'use='" - ," -v number (verbose)" - ," -w number (width)" - }; - const size_t first = 3; - const size_t last = sizeof(tbl)/sizeof(tbl[0]); - const size_t left = (last - first + 1) / 2 + first; - size_t n; - - for (n = 0; n < left; n++) { - size_t m = (n < first) ? last : n + left - first; - if (m < last) - fprintf(stderr, "%-40.40s%s\n", tbl[n], tbl[m]); - else - fprintf(stderr, "%s\n", tbl[n]); - } - exit(EXIT_FAILURE); + static const char *tbl[] = + { + "Usage: infocmp [options] [-A directory] [-B directory] [termname...]" + ,"" + ,"Options:" + ," -1 print single-column" + ," -C use termcap-names" + ," -F compare terminfo-files" + ," -I use terminfo-names" + ," -L use long names" + ," -R subset (see manpage)" + ," -T eliminate size limits (test)" + ," -V print version" +#if NCURSES_XNAMES + ," -a with -F, list commented-out caps" +#endif + ," -c list common capabilities" + ," -d list different capabilities" + ," -e format output for C initializer" + ," -E format output as C tables" + ," -f with -1, format complex strings" + ," -G format %{number} to %'char'" + ," -g format %'char' to %{number}" + ," -i analyze initialization/reset" + ," -l output terminfo names" + ," -n list capabilities in neither" + ," -p ignore padding specifiers" + ," -q brief listing, removes headers" + ," -r with -C, output in termcap form" + ," -r with -F, resolve use-references" + ," -s [d|i|l|c] sort fields" + ," -u produce source with 'use='" + ," -v number (verbose)" + ," -w number (width)" + }; + const size_t first = 3; + const size_t last = sizeof(tbl) / sizeof(tbl[0]); + const size_t left = (last - first + 1) / 2 + first; + size_t n; + + for (n = 0; n < left; n++) { + size_t m = (n < first) ? last : n + left - first; + if (m < last) + fprintf(stderr, "%-40.40s%s\n", tbl[n], tbl[m]); + else + fprintf(stderr, "%s\n", tbl[n]); + } + exit(EXIT_FAILURE); } -static char * name_initializer(const char *type) +static char * +name_initializer(const char *type) { static char *initializer; char *s; if (initializer == 0) - initializer = malloc(strlen(term->term_names) + 20); + initializer = (char *) malloc(strlen(entries->tterm.term_names) + 20); - (void) sprintf(initializer, "%s_data_%s", type, term->term_names); - for (s = initializer; *s != 0 && *s != '|'; s++) - { + (void) sprintf(initializer, "%s_data_%s", type, entries->tterm.term_names); + for (s = initializer; *s != 0 && *s != '|'; s++) { if (!isalnum(*s)) *s = '_'; } @@ -849,18 +957,17 @@ static char * name_initializer(const char *type) } /* dump C initializers for the terminal type */ -static void dump_initializers(void) +static void +dump_initializers(TERMTYPE * term) { - int n; + int n; const char *str = 0; - int size; + int size; - (void) printf("static bool %s[] = %s\n", name_initializer("bool"), L_CURL); + (void) printf("static char %s[] = %s\n", name_initializer("bool"), L_CURL); - for_each_boolean(n,term) - { - switch((int)(term->Booleans[n])) - { + for_each_boolean(n, term) { + switch ((int) (term->Booleans[n])) { case TRUE: str = "TRUE"; break; @@ -878,17 +985,15 @@ static void dump_initializers(void) break; } (void) printf("\t/* %3d: %-8s */\t%s,\n", - n, ExtBoolname(term,n,boolnames), str); + n, ExtBoolname(term, n, boolnames), str); } (void) printf("%s;\n", R_CURL); (void) printf("static short %s[] = %s\n", name_initializer("number"), L_CURL); - for_each_number(n,term) - { - char buf[BUFSIZ]; - switch (term->Numbers[n]) - { + for_each_number(n, term) { + char buf[BUFSIZ]; + switch (term->Numbers[n]) { case ABSENT_NUMERIC: str = "ABSENT_NUMERIC"; break; @@ -900,7 +1005,8 @@ static void dump_initializers(void) str = buf; break; } - (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtNumname(term,n,numnames), str); + (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtNumname(term, n, + numnames), str); } (void) printf("%s;\n", R_CURL); @@ -910,24 +1016,22 @@ static void dump_initializers(void) (void) printf("static char * %s[] = %s\n", name_initializer("string"), L_CURL); - for_each_string(n,term) - { - char buf[BUFSIZ], *sp, *tp; + for_each_string(n, term) { + char buf[MAX_STRING], *sp, *tp; if (term->Strings[n] == ABSENT_STRING) str = "ABSENT_STRING"; else if (term->Strings[n] == CANCELLED_STRING) str = "CANCELLED_STRING"; - else - { + else { tp = buf; *tp++ = '"'; - for (sp = term->Strings[n]; *sp; sp++) - { - if (isascii(*sp) && isprint(*sp) && *sp !='\\' && *sp != '"') + for (sp = term->Strings[n]; + *sp != 0 && (tp - buf) < MAX_STRING - 6; + sp++) { + if (isascii(*sp) && isprint(*sp) && *sp != '\\' && *sp != '"') *tp++ = *sp; - else - { + else { (void) sprintf(tp, "\\%03o", *sp & 0xff); tp += 4; } @@ -938,20 +1042,22 @@ static void dump_initializers(void) str = buf; } #if NCURSES_XNAMES - if (n == STRCOUNT) - { + if (n == STRCOUNT) { (void) printf("%s;\n", R_CURL); - (void) printf("static char * %s[] = %s\n", name_initializer("string_ext"), L_CURL); + (void) printf("static char * %s[] = %s\n", + name_initializer("string_ext"), L_CURL); } #endif - (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtStrname(term,n,strnames), str); + (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtStrname(term, n, + strnames), str); } (void) printf("%s;\n", R_CURL); } /* dump C initializers for the terminal type */ -static void dump_termtype(void) +static void +dump_termtype(TERMTYPE * term) { (void) printf("\t%s\n\t\t\"%s\",\n", L_CURL, term->term_names); (void) printf("\t\t(char *)0,\t/* pointer to string table */\n"); @@ -966,16 +1072,19 @@ static void dump_termtype(void) (void) printf("\t\t(char *)0,\t/* pointer to extended string table */\n"); (void) printf("\t\t%s,\t/* ...corresponding names */\n", (NUM_STRINGS(term) != STRCOUNT) - ? name_initializer("string_ext") - : "(char **)0"); + ? name_initializer("string_ext") + : "(char **)0"); (void) printf("\t\t%d,\t\t/* count total Booleans */\n", NUM_BOOLEANS(term)); - (void) printf("\t\t%d,\t\t/* count total Numbers */\n", NUM_NUMBERS(term)); - (void) printf("\t\t%d,\t\t/* count total Strings */\n", NUM_STRINGS(term)); + (void) printf("\t\t%d,\t\t/* count total Numbers */\n", NUM_NUMBERS(term)); + (void) printf("\t\t%d,\t\t/* count total Strings */\n", NUM_STRINGS(term)); - (void) printf("\t\t%d,\t\t/* count extensions to Booleans */\n", NUM_BOOLEANS(term) - BOOLCOUNT); - (void) printf("\t\t%d,\t\t/* count extensions to Numbers */\n", NUM_NUMBERS(term) - NUMCOUNT); - (void) printf("\t\t%d,\t\t/* count extensions to Strings */\n", NUM_STRINGS(term) - STRCOUNT); + (void) printf("\t\t%d,\t\t/* count extensions to Booleans */\n", + NUM_BOOLEANS(term) - BOOLCOUNT); + (void) printf("\t\t%d,\t\t/* count extensions to Numbers */\n", + NUM_NUMBERS(term) - NUMCOUNT); + (void) printf("\t\t%d,\t\t/* count extensions to Strings */\n", + NUM_STRINGS(term) - STRCOUNT); (void) printf("#endif /* NCURSES_XNAMES */\n"); #endif /* NCURSES_XNAMES */ @@ -988,334 +1097,333 @@ static void dump_termtype(void) * ***************************************************************************/ -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - char *terminal, *firstdir, *restdir; - /* Avoid "local data >32k" error with mwcc */ - /* Also avoid overflowing smaller stacks on systems like AmigaOS */ - path *tfile = malloc(sizeof(path)*MAXTERMS); - int c, i, len; - bool formatted = FALSE; - bool filecompare = FALSE; - int initdump = 0; - bool init_analyze = FALSE; - bool limited = TRUE; - - if ((terminal = getenv("TERM")) == NULL) - { - (void) fprintf(stderr, - "infocmp: environment variable TERM not set\n"); - return EXIT_FAILURE; - } + char *terminal, *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); + int c, i, len; + bool formatted = FALSE; + bool filecompare = FALSE; + int initdump = 0; + bool init_analyze = 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; + /* where is the terminfo database location going to default to? */ + restdir = firstdir = 0; - while ((c = getopt(argc, argv, "deEcCfFGgIinlLprR:s:uv:Vw:A:B:1T")) != EOF) - switch (c) - { - case 'd': - compare = C_DIFFERENCE; - break; + while ((c = getopt(argc, argv, "adeEcCfFGgIinlLpqrR:s:uv:Vw:A:B:1T")) != EOF) + switch (c) { +#if NCURSES_XNAMES + case 'a': + _nc_disable_period = TRUE; + use_extended_names(TRUE); + break; +#endif + case 'd': + compare = C_DIFFERENCE; + break; - case 'e': - initdump |= 1; - break; + case 'e': + initdump |= 1; + break; - case 'E': - initdump |= 2; - break; + case 'E': + initdump |= 2; + break; - case 'c': - compare = C_COMMON; - break; + case 'c': + compare = C_COMMON; + break; - case 'C': - outform = F_TERMCAP; - tversion = "BSD"; - if (sortmode == S_DEFAULT) - sortmode = S_TERMCAP; - break; + case 'C': + outform = F_TERMCAP; + tversion = "BSD"; + if (sortmode == S_DEFAULT) + sortmode = S_TERMCAP; + break; - case 'f': - formatted = TRUE; - break; + case 'f': + formatted = TRUE; + break; - case 'G': - numbers = 1; - break; + case 'G': + numbers = 1; + break; - case 'g': - numbers = -1; - break; + case 'g': + numbers = -1; + break; - case 'F': - filecompare = TRUE; - break; + case 'F': + filecompare = TRUE; + break; - case 'I': - outform = F_TERMINFO; - if (sortmode == S_DEFAULT) - sortmode = S_VARIABLE; - tversion = 0; - break; + case 'I': + outform = F_TERMINFO; + if (sortmode == S_DEFAULT) + sortmode = S_VARIABLE; + tversion = 0; + break; - case 'i': - init_analyze = TRUE; - break; + case 'i': + init_analyze = TRUE; + break; - case 'l': - outform = F_TERMINFO; - break; + case 'l': + outform = F_TERMINFO; + break; - case 'L': - outform = F_VARIABLE; - if (sortmode == S_DEFAULT) - sortmode = S_VARIABLE; - break; + case 'L': + outform = F_VARIABLE; + if (sortmode == S_DEFAULT) + sortmode = S_VARIABLE; + break; - case 'n': - compare = C_NAND; - break; + case 'n': + compare = C_NAND; + break; - case 'p': - ignorepads = TRUE; - break; + case 'p': + ignorepads = TRUE; + break; - case 'r': - tversion = 0; - limited = FALSE; - break; + case 'q': + quiet = TRUE; + s_absent = "-"; + s_cancel = "@"; + bool_sep = ", "; + break; - case 'R': - tversion = optarg; - break; + case 'r': + tversion = 0; + limited = FALSE; + break; - case 's': - if (*optarg == 'd') - sortmode = S_NOSORT; - else if (*optarg == 'i') - sortmode = S_TERMINFO; - else if (*optarg == 'l') - sortmode = S_VARIABLE; - else if (*optarg == 'c') - sortmode = S_TERMCAP; - else - { - (void) fprintf(stderr, - "infocmp: unknown sort mode\n"); - return EXIT_FAILURE; - } - break; + case 'R': + tversion = optarg; + break; - case 'u': - compare = C_USEALL; - break; + case 's': + if (*optarg == 'd') + sortmode = S_NOSORT; + else if (*optarg == 'i') + sortmode = S_TERMINFO; + else if (*optarg == 'l') + sortmode = S_VARIABLE; + else if (*optarg == 'c') + sortmode = S_TERMCAP; + else { + (void) fprintf(stderr, + "infocmp: unknown sort mode\n"); + return EXIT_FAILURE; + } + break; - case 'v': - itrace = atoi(optarg); - _nc_tracing = (1 << itrace) - 1; - break; + case 'u': + compare = C_USEALL; + break; - case 'V': - (void) fputs(NCURSES_VERSION, stdout); - putchar('\n'); - ExitProgram(EXIT_SUCCESS); + case 'v': + itrace = atoi(optarg); + set_trace_level(itrace); + break; - case 'w': - mwidth = atoi(optarg); - break; + case 'V': + (void) fputs(NCURSES_VERSION, stdout); + putchar('\n'); + ExitProgram(EXIT_SUCCESS); - case 'A': - firstdir = optarg; - break; + case 'w': + mwidth = atoi(optarg); + break; - case 'B': - restdir = optarg; - break; + case 'A': + firstdir = optarg; + break; - case '1': - mwidth = 0; - break; + case 'B': + restdir = optarg; + break; - case 'T': - limited = FALSE; - break; - default: - usage(); - } + case '1': + mwidth = 0; + break; - /* by default, sort by terminfo name */ - if (sortmode == S_DEFAULT) - sortmode = S_TERMINFO; + case 'T': + limited = FALSE; + break; + default: + usage(); + } - /* set up for display */ - dump_init(tversion, outform, sortmode, mwidth, itrace, formatted); + /* by default, sort by terminfo name */ + if (sortmode == S_DEFAULT) + sortmode = S_TERMINFO; - /* make sure we have at least one terminal name to work with */ - if (optind >= argc) - argv[argc++] = terminal; + /* set up for display */ + dump_init(tversion, outform, sortmode, mwidth, itrace, formatted); - /* if user is after a comparison, make sure we have two entries */ - if (compare != C_DEFAULT && optind >= argc - 1) - argv[argc++] = terminal; + /* make sure we have at least one terminal name to work with */ + if (optind >= argc) + argv[argc++] = terminal; - /* exactly two terminal names with no options means do -d */ - if (argc - optind == 2 && compare == C_DEFAULT) - compare = C_DIFFERENCE; + /* if user is after a comparison, make sure we have two entries */ + if (compare != C_DEFAULT && optind >= argc - 1) + argv[argc++] = terminal; - if (!filecompare) - { - /* grab the entries */ - termcount = 0; - for (; optind < argc; optind++) - { - if (termcount >= MAXTERMS) - { - (void) fprintf(stderr, - "infocmp: too many terminal type arguments\n"); - return EXIT_FAILURE; - } - else - { - const char *directory = termcount ? restdir : firstdir; - int status; - - tname[termcount] = argv[optind]; - - if (directory) - { - (void) sprintf(tfile[termcount], "%s/%c/%s", - directory, - *argv[optind], argv[optind]); - if (itrace) - (void) fprintf(stderr, - "infocmp: reading entry %s from file %s\n", - argv[optind], tfile[termcount]); - - status = _nc_read_file_entry(tfile[termcount], - &term[termcount]); - } - else - { - if (itrace) - (void) fprintf(stderr, - "infocmp: reading entry %s from system directories %s\n", - argv[optind], tname[termcount]); - - status = _nc_read_entry(tname[termcount], - tfile[termcount], - &term[termcount]); - directory = TERMINFO; /* for error message */ - } + /* exactly two terminal names with no options means do -d */ + if (argc - optind == 2 && compare == C_DEFAULT) + compare = C_DIFFERENCE; + + if (!filecompare) { + /* grab the entries */ + termcount = 0; + for (; optind < argc; optind++) { + if (termcount >= MAXTERMS) { + (void) fprintf(stderr, + "infocmp: too many terminal type arguments\n"); + return EXIT_FAILURE; + } else { + const char *directory = termcount ? restdir : firstdir; + int status; + + tname[termcount] = argv[optind]; - if (status <= 0) - { + if (directory) { + (void) sprintf(tfile[termcount], "%s/%c/%s", + directory, + *argv[optind], argv[optind]); + if (itrace) (void) fprintf(stderr, - "infocmp: couldn't open terminfo file %s.\n", - tfile[termcount]); - return EXIT_FAILURE; - } - termcount++; + "infocmp: reading entry %s from file %s\n", + argv[optind], tfile[termcount]); + + status = _nc_read_file_entry(tfile[termcount], + &entries[termcount].tterm); + } else { + if (itrace) + (void) fprintf(stderr, + "infocmp: reading entry %s from system directories %s\n", + argv[optind], tname[termcount]); + + status = _nc_read_entry(tname[termcount], + tfile[termcount], + &entries[termcount].tterm); + directory = TERMINFO; /* for error message */ + } + + if (status <= 0) { + (void) fprintf(stderr, + "infocmp: couldn't open terminfo file %s.\n", + tfile[termcount]); + return EXIT_FAILURE; } + repair_acsc(&entries[termcount].tterm); + termcount++; } + } #if NCURSES_XNAMES - if (termcount > 1) - _nc_align_termtype(&term[0], &term[1]); + if (termcount > 1) + _nc_align_termtype(&entries[0].tterm, &entries[1].tterm); #endif - /* dump as C initializer for the terminal type */ - if (initdump) - { - if (initdump & 1) - dump_termtype(); - if (initdump & 2) - dump_initializers(); - ExitProgram(EXIT_SUCCESS); - } + /* dump as C initializer for the terminal type */ + if (initdump) { + if (initdump & 1) + dump_termtype(&entries[0].tterm); + if (initdump & 2) + dump_initializers(&entries[0].tterm); + ExitProgram(EXIT_SUCCESS); + } - /* analyze the init strings */ - if (init_analyze) - { + /* analyze the init strings */ + if (init_analyze) { #undef CUR -#define CUR term[0]. - analyze_string("is1", init_1string, &term[0]); - analyze_string("is2", init_2string, &term[0]); - analyze_string("is3", init_3string, &term[0]); - analyze_string("rs1", reset_1string, &term[0]); - analyze_string("rs2", reset_2string, &term[0]); - analyze_string("rs3", reset_3string, &term[0]); - analyze_string("smcup", enter_ca_mode, &term[0]); - analyze_string("rmcup", exit_ca_mode, &term[0]); +#define CUR entries[0].tterm. + analyze_string("is1", init_1string, &entries[0].tterm); + analyze_string("is2", init_2string, &entries[0].tterm); + analyze_string("is3", init_3string, &entries[0].tterm); + analyze_string("rs1", reset_1string, &entries[0].tterm); + analyze_string("rs2", reset_2string, &entries[0].tterm); + analyze_string("rs3", reset_3string, &entries[0].tterm); + analyze_string("smcup", enter_ca_mode, &entries[0].tterm); + analyze_string("rmcup", exit_ca_mode, &entries[0].tterm); #undef CUR - ExitProgram(EXIT_SUCCESS); - } + ExitProgram(EXIT_SUCCESS); + } - /* - * Here's where the real work gets done - */ - switch (compare) - { - case C_DEFAULT: - if (itrace) - (void) fprintf(stderr, - "infocmp: about to dump %s\n", - tname[0]); - (void) printf("#\tReconstructed via infocmp from file: %s\n", - tfile[0]); - len = dump_entry(&term[0], limited, numbers, NULL); - putchar('\n'); - if (itrace) - (void)fprintf(stderr, "infocmp: length %d\n", len); - break; + /* + * Here's where the real work gets done + */ + switch (compare) { + case C_DEFAULT: + if (itrace) + (void) fprintf(stderr, + "infocmp: about to dump %s\n", + tname[0]); + (void) printf("#\tReconstructed via infocmp from file: %s\n", + tfile[0]); + len = dump_entry(&entries[0].tterm, limited, numbers, NULL); + putchar('\n'); + if (itrace) + (void) fprintf(stderr, "infocmp: length %d\n", len); + break; - case C_DIFFERENCE: - if (itrace) - (void)fprintf(stderr, "infocmp: dumping differences\n"); - (void) printf("comparing %s to %s.\n", tname[0], tname[1]); - compare_entry(compare_predicate, term); - break; + case C_DIFFERENCE: + if (itrace) + (void) fprintf(stderr, "infocmp: dumping differences\n"); + (void) printf("comparing %s to %s.\n", tname[0], tname[1]); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; - case C_COMMON: - if (itrace) - (void) fprintf(stderr, - "infocmp: dumping common capabilities\n"); - (void) printf("comparing %s to %s.\n", tname[0], tname[1]); - compare_entry(compare_predicate, term); - break; + case C_COMMON: + if (itrace) + (void) fprintf(stderr, + "infocmp: dumping common capabilities\n"); + (void) printf("comparing %s to %s.\n", tname[0], tname[1]); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; - case C_NAND: - if (itrace) - (void) fprintf(stderr, - "infocmp: dumping differences\n"); - (void) printf("comparing %s to %s.\n", tname[0], tname[1]); - compare_entry(compare_predicate, term); - break; + case C_NAND: + if (itrace) + (void) fprintf(stderr, + "infocmp: dumping differences\n"); + (void) printf("comparing %s to %s.\n", tname[0], tname[1]); + compare_entry(compare_predicate, &entries->tterm, quiet); + break; - case C_USEALL: - if (itrace) - (void) fprintf(stderr, "infocmp: dumping use entry\n"); - len = dump_entry(&term[0], limited, numbers, use_predicate); - for (i = 1; i < termcount; i++) - len += dump_uses(tname[i], !(outform==F_TERMCAP || outform==F_TCONVERR)); - putchar('\n'); - if (itrace) - (void)fprintf(stderr, "infocmp: length %d\n", len); - break; - } + case C_USEALL: + if (itrace) + (void) fprintf(stderr, "infocmp: dumping use entry\n"); + len = dump_entry(&entries[0].tterm, limited, numbers, use_predicate); + for (i = 1; i < termcount; i++) + len += dump_uses(tname[i], !(outform == F_TERMCAP || outform + == F_TCONVERR)); + putchar('\n'); + if (itrace) + (void) fprintf(stderr, "infocmp: length %d\n", len); + break; } - else if (compare == C_USEALL) - (void) fprintf(stderr, "Sorry, -u doesn't work with -F\n"); - else if (compare == C_DEFAULT) - (void) fprintf(stderr, "Use `tic -[CI] ' for this.\n"); - else if (argc - optind != 2) - (void) fprintf(stderr, - "File comparison needs exactly two file arguments.\n"); - else - file_comparison(argc-optind, argv+optind); + } else if (compare == C_USEALL) + (void) fprintf(stderr, "Sorry, -u doesn't work with -F\n"); + else if (compare == C_DEFAULT) + (void) fprintf(stderr, "Use `tic -[CI] ' for this.\n"); + else if (argc - optind != 2) + (void) fprintf(stderr, + "File comparison needs exactly two file arguments.\n"); + else + file_comparison(argc - optind, argv + optind); - ExitProgram(EXIT_SUCCESS); + ExitProgram(EXIT_SUCCESS); } /* infocmp.c ends here */ diff --git a/progs/modules b/progs/modules index 54cd2020..3d065a95 100644 --- a/progs/modules +++ b/progs/modules @@ -1,6 +1,7 @@ +# $Id: modules,v 1.10 2000/01/02 01:30:45 tom Exp $ # Program modules (some are in ncurses lib!) ############################################################################## -# Copyright (c) 1998 Free Software Foundation, Inc. # +# Copyright (c) 1998-2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -31,10 +32,10 @@ # @ base -clear progs $(srcdir) ../include/term.h +clear progs $(srcdir) ../include/term.h tic progs $(srcdir) ../include/term.h $(INCDIR)/tic.h $(srcdir)/dump_entry.h toe progs $(srcdir) ../include/term.h $(INCDIR)/tic.h $(srcdir)/dump_entry.h -dump_entry progs $(srcdir) ../include/term.h $(INCDIR)/tic.h $(srcdir)/dump_entry.h ../include/parametrized.h termsort.c +dump_entry progs $(srcdir) ../include/term.h $(INCDIR)/tic.h $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.c infocmp progs $(srcdir) ../include/term.h $(INCDIR)/tic.h $(srcdir)/dump_entry.h tput progs $(srcdir) ../include/term.h tset progs $(srcdir) ../include/term.h diff --git a/progs/progs.priv.h b/progs/progs.priv.h index 3384d37c..2d22c9ad 100644 --- a/progs/progs.priv.h +++ b/progs/progs.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -30,7 +30,7 @@ * Author: Thomas E. Dickey 1997,1998 * ****************************************************************************/ /* - * $Id: progs.priv.h,v 1.19 1999/02/23 11:10:32 tom Exp $ + * $Id: progs.priv.h,v 1.22 2000/04/08 23:47:39 tom Exp $ * * progs.priv.h * @@ -123,6 +123,18 @@ extern int optind; #define EXIT_FAILURE 1 #endif +#ifndef R_OK +#define R_OK 4 /* Test for readable. */ +#endif + +#ifndef W_OK +#define W_OK 2 /* Test for writable. */ +#endif + +#ifndef X_OK +#define X_OK 1 /* Test for executable. */ +#endif + #ifndef F_OK #define F_OK 0 /* Test for existence. */ #endif diff --git a/progs/tic.c b/progs/tic.c index 5f082709..cc73a4db 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -42,43 +42,47 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.52 1999/09/25 22:47:54 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.69 2000/04/08 23:53:49 tom Exp $") const char *_nc_progname = "tic"; -static FILE *log_fp; -static FILE *tmp_fp; -static bool showsummary = FALSE; -static const char *to_remove; +static FILE *log_fp; +static FILE *tmp_fp; +static bool showsummary = FALSE; +static const char *to_remove; -static void (*save_check_termtype)(TERMTYPE *); -static void check_termtype(TERMTYPE *tt); +static void (*save_check_termtype) (TERMTYPE *); +static void check_termtype(TERMTYPE * tt); -static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n"; +static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n"; -static void cleanup(void) +static void +cleanup(void) { - if (tmp_fp != 0) - fclose(tmp_fp); - if (to_remove != 0) { + if (tmp_fp != 0) + fclose(tmp_fp); + if (to_remove != 0) { #if HAVE_REMOVE - remove(to_remove); + remove(to_remove); #else - unlink(to_remove); + unlink(to_remove); #endif - } + } } -static void failed(const char *msg) +static void +failed(const char *msg) { - perror(msg); - cleanup(); - exit(EXIT_FAILURE); + perror(msg); + cleanup(); + exit(EXIT_FAILURE); } -static void usage(void) +static void +usage(void) { - static const char *const tbl[] = { + static const char *const tbl[] = + { "Options:", " -1 format translation output one capability per line", " -C translate entries to termcap source form", @@ -87,6 +91,9 @@ static void usage(void) " -N disable smart defaults for source translation", " -R restrict translation to given terminfo/termcap version", " -T remove size-restrictions on compiled description", +#if NCURSES_XNAMES + " -a retain commented-out capabilities (sets -x also)", +#endif " -c check only, validate input without compiling or translating", " -f format complex strings for readability", " -G format %{number} to %'char'", @@ -103,69 +110,73 @@ static void usage(void) "", "Parameters:", " file to translate or compile" - }; - size_t j; + }; + size_t j; - printf("Usage: %s %s\n", _nc_progname, usage_string); - for (j = 0; j < sizeof(tbl)/sizeof(tbl[0]); j++) - puts(tbl[j]); - exit(EXIT_FAILURE); + fprintf(stderr, "Usage: %s %s\n", _nc_progname, usage_string); + for (j = 0; j < sizeof(tbl) / sizeof(tbl[0]); j++) { + fputs(tbl[j], stderr); + putc('\n', stderr); + } + exit(EXIT_FAILURE); } #define L_BRACE '{' #define R_BRACE '}' #define S_QUOTE '\''; -static void write_it(ENTRY *ep) +static void +write_it(ENTRY * ep) { - unsigned n; - int ch; - char *s, *d, *t; - char result[MAX_ENTRY_SIZE]; - - /* - * Look for strings that contain %{number}, convert them to %'char', - * which is shorter and runs a little faster. - */ - for (n = 0; n < STRCOUNT; n++) { - s = ep->tterm.Strings[n]; - if (VALID_STRING(s) - && strchr(s, L_BRACE) != 0) { - d = result; - t = s; - while ((ch = *t++) != 0) { - *d++ = ch; - if (ch == '\\') { - *d++ = *t++; - } else if ((ch == '%') - && (*t == L_BRACE)) { - char *v = 0; - long value = strtol(t+1, &v, 0); - if (v != 0 - && *v == R_BRACE - && value > 0 - && value != '\\' /* FIXME */ - && value < 127 - && isprint((int)value)) { - *d++ = S_QUOTE; - *d++ = (int)value; - *d++ = S_QUOTE; - t = (v + 1); - } - } - } - *d = 0; - if (strlen(result) < strlen(s)) - strcpy(s, result); + unsigned n; + int ch; + char *s, *d, *t; + char result[MAX_ENTRY_SIZE]; + + /* + * Look for strings that contain %{number}, convert them to %'char', + * which is shorter and runs a little faster. + */ + for (n = 0; n < STRCOUNT; n++) { + s = ep->tterm.Strings[n]; + if (VALID_STRING(s) + && strchr(s, L_BRACE) != 0) { + d = result; + t = s; + while ((ch = *t++) != 0) { + *d++ = ch; + if (ch == '\\') { + *d++ = *t++; + } else if ((ch == '%') + && (*t == L_BRACE)) { + char *v = 0; + long value = strtol(t + 1, &v, 0); + if (v != 0 + && *v == R_BRACE + && value > 0 + && value != '\\' /* FIXME */ + && value < 127 + && isprint((int) value)) { + *d++ = S_QUOTE; + *d++ = (int) value; + *d++ = S_QUOTE; + t = (v + 1); + } } + } + *d = 0; + if (strlen(result) < strlen(s)) + strcpy(s, result); } + } - _nc_set_type(_nc_first_name(ep->tterm.term_names)); - _nc_curr_line = ep->startline; - _nc_write_entry(&ep->tterm); + _nc_set_type(_nc_first_name(ep->tterm.term_names)); + _nc_curr_line = ep->startline; + _nc_write_entry(&ep->tterm); } -static bool immedhook(ENTRY *ep GCC_UNUSED) +static bool +immedhook(ENTRY * ep GCC_UNUSED) /* write out entries with no use capabilities immediately to save storage */ { #ifndef HAVE_BIG_CORE @@ -202,511 +213,522 @@ static bool immedhook(ENTRY *ep GCC_UNUSED) * make tic a bit faster (because the resolution code won't have to do * disk I/O nearly as often). */ - if (ep->nuses == 0) - { - int oldline = _nc_curr_line; + if (ep->nuses == 0) { + int oldline = _nc_curr_line; write_it(ep); _nc_curr_line = oldline; free(ep->tterm.str_table); - return(TRUE); + return (TRUE); } #endif /* HAVE_BIG_CORE */ - return(FALSE); + return (FALSE); } -static void put_translate(int c) +static void +put_translate(int c) /* emit a comment char, translating terminfo names to termcap names */ { static bool in_name = FALSE; - static char namebuf[132], suffix[132], *sp; - - if (!in_name) - { - if (c == '<') - { - in_name = TRUE; - sp = namebuf; + static size_t have, used; + static char *namebuf, *suffix; + + if (in_name) { + if (used + 1 >= have) { + have += 132; + namebuf = typeRealloc(char, have, namebuf); + suffix = typeRealloc(char, have, suffix); } - else + if (c == '\n' || c == '@') { + namebuf[used++] = '\0'; + (void) putchar('<'); + (void) fputs(namebuf, stdout); putchar(c); - } - else if (c == '\n' || c == '@') - { - *sp++ = '\0'; - (void) putchar('<'); - (void) fputs(namebuf, stdout); - putchar(c); - in_name = FALSE; - } - else if (c != '>') - *sp++ = c; - else /* ah! candidate name! */ - { - char *up; - NCURSES_CONST char *tp; - - *sp++ = '\0'; - in_name = FALSE; - - suffix[0] = '\0'; - if ((up = strchr(namebuf, '#')) != 0 - || (up = strchr(namebuf, '=')) != 0 - || ((up = strchr(namebuf, '@')) != 0 && up[1] == '>')) - { - (void) strcpy(suffix, up); - *up = '\0'; - } + in_name = FALSE; + } else if (c != '>') { + namebuf[used++] = c; + } else { /* ah! candidate name! */ + char *up; + NCURSES_CONST char *tp; + + namebuf[used++] = '\0'; + in_name = FALSE; + + suffix[0] = '\0'; + if ((up = strchr(namebuf, '#')) != 0 + || (up = strchr(namebuf, '=')) != 0 + || ((up = strchr(namebuf, '@')) != 0 && up[1] == '>')) { + (void) strcpy(suffix, up); + *up = '\0'; + } - if ((tp = nametrans(namebuf)) != 0) - { - (void) putchar(':'); - (void) fputs(tp, stdout); - (void) fputs(suffix, stdout); - (void) putchar(':'); + if ((tp = nametrans(namebuf)) != 0) { + (void) putchar(':'); + (void) fputs(tp, stdout); + (void) fputs(suffix, stdout); + (void) putchar(':'); + } else { + /* couldn't find a translation, just dump the name */ + (void) putchar('<'); + (void) fputs(namebuf, stdout); + (void) fputs(suffix, stdout); + (void) putchar('>'); + } } - else - { - /* couldn't find a translation, just dump the name */ - (void) putchar('<'); - (void) fputs(namebuf, stdout); - (void) fputs(suffix, stdout); - (void) putchar('>'); + } else { + used = 0; + if (c == '<') { + in_name = TRUE; + } else { + putchar(c); } - } } /* Returns a string, stripped of leading/trailing whitespace */ -static char *stripped(char *src) +static char * +stripped(char *src) { - while (isspace(*src)) - src++; - if (*src != '\0') { - char *dst = strcpy(malloc(strlen(src)+1), src); - size_t len = strlen(dst); - while (--len != 0 && isspace(dst[len])) - dst[len] = '\0'; - return dst; - } - return 0; + while (isspace(*src)) + src++; + if (*src != '\0') { + char *dst = strcpy(malloc(strlen(src) + 1), src); + size_t len = strlen(dst); + while (--len != 0 && isspace(dst[len])) + dst[len] = '\0'; + return dst; + } + return 0; } /* Parse the "-e" option-value into a list of names */ -static const char **make_namelist(char *src) +static const char ** +make_namelist(char *src) { - const char **dst = 0; - - char *s, *base; - unsigned pass, n, nn; - char buffer[BUFSIZ]; - - if (src == 0) { - /* EMPTY */; - } else if (strchr(src, '/') != 0) { /* a filename */ - FILE *fp = fopen(src, "r"); - if (fp == 0) - failed(src); - - for (pass = 1; pass <= 2; pass++) { - nn = 0; - while (fgets(buffer, sizeof(buffer), fp) != 0) { - if ((s = stripped(buffer)) != 0) { - if (dst != 0) - dst[nn] = s; - nn++; - } - } - if (pass == 1) { - dst = (const char **)calloc(nn+1, sizeof(*dst)); - rewind(fp); - } - } - fclose(fp); - } else { /* literal list of names */ - for (pass = 1; pass <= 2; pass++) { - for (n = nn = 0, base = src; ; n++) { - int mark = src[n]; - if (mark == ',' || mark == '\0') { - if (pass == 1) { - nn++; - } else { - src[n] = '\0'; - if ((s = stripped(base)) != 0) - dst[nn++] = s; - base = &src[n+1]; - } - } - if (mark == '\0') - break; - } - if (pass == 1) - dst = (const char **)calloc(nn+1, sizeof(*dst)); + const char **dst = 0; + + char *s, *base; + unsigned pass, n, nn; + char buffer[BUFSIZ]; + + if (src == 0) { + /* EMPTY */ ; + } else if (strchr(src, '/') != 0) { /* a filename */ + FILE *fp = fopen(src, "r"); + if (fp == 0) + failed(src); + + for (pass = 1; pass <= 2; pass++) { + nn = 0; + while (fgets(buffer, sizeof(buffer), fp) != 0) { + if ((s = stripped(buffer)) != 0) { + if (dst != 0) + dst[nn] = s; + nn++; } + } + if (pass == 1) { + dst = typeCalloc(const char *, nn + 1); + rewind(fp); + } } - if (showsummary) { - fprintf(log_fp, "Entries that will be compiled:\n"); - for (n = 0; dst[n] != 0; n++) - fprintf(log_fp, "%d:%s\n", n+1, dst[n]); + fclose(fp); + } else { /* literal list of names */ + for (pass = 1; pass <= 2; pass++) { + for (n = nn = 0, base = src;; n++) { + int mark = src[n]; + if (mark == ',' || mark == '\0') { + if (pass == 1) { + nn++; + } else { + src[n] = '\0'; + if ((s = stripped(base)) != 0) + dst[nn++] = s; + base = &src[n + 1]; + } + } + if (mark == '\0') + break; + } + if (pass == 1) + dst = typeCalloc(const char *, nn + 1); } - return dst; + } + if (showsummary) { + fprintf(log_fp, "Entries that will be compiled:\n"); + for (n = 0; dst[n] != 0; n++) + fprintf(log_fp, "%d:%s\n", n + 1, dst[n]); + } + return dst; } -static bool matches(const char **needle, const char *haystack) +static bool +matches(const char **needle, const char *haystack) /* does entry in needle list match |-separated field in haystack? */ { - bool code = FALSE; - size_t n; - - if (needle != 0) - { - for (n = 0; needle[n] != 0; n++) - { - if (_nc_name_match(haystack, needle[n], "|")) - { - code = TRUE; - break; - } - } - } - else + bool code = FALSE; + size_t n; + + if (needle != 0) { + for (n = 0; needle[n] != 0; n++) { + if (_nc_name_match(haystack, needle[n], "|")) { code = TRUE; - return(code); + break; + } + } + } else + code = TRUE; + return (code); } -int main (int argc, char *argv[]) +static FILE * +open_tempfile(char *name) { -char my_tmpname[PATH_MAX]; -int v_opt = -1, debug_level; -int smart_defaults = TRUE; -char *termcap; -ENTRY *qp; - -int this_opt, last_opt = '?'; - -int outform = F_TERMINFO; /* output format */ -int sortmode = S_TERMINFO; /* sort_mode */ - -int width = 60; -bool formatted = FALSE; /* reformat complex strings? */ -int numbers = 0; /* format "%'char'" to/from "%{number}" */ -bool infodump = FALSE; /* running as captoinfo? */ -bool capdump = FALSE; /* running as infotocap? */ -bool forceresolve = FALSE; /* force resolution */ -bool limited = TRUE; -char *tversion = (char *)NULL; -const char *source_file = "terminfo"; -const char **namelst = 0; -char *outdir = (char *)NULL; -bool check_only = FALSE; - - log_fp = stderr; - - if ((_nc_progname = strrchr(argv[0], '/')) == NULL) - _nc_progname = argv[0]; - else - _nc_progname++; + FILE *result = 0; +#if HAVE_MKSTEMP + int fd = mkstemp(name); + if (fd >= 0) + result = fdopen(fd, "w"); +#else + if (tmpnam(name) != 0) + result = fopen(name, "w"); +#endif + return result; +} - infodump = (strcmp(_nc_progname, "captoinfo") == 0); - capdump = (strcmp(_nc_progname, "infotocap") == 0); +int +main(int argc, char *argv[]) +{ + char my_tmpname[PATH_MAX]; + int v_opt = -1, debug_level; + int smart_defaults = TRUE; + char *termcap; + ENTRY *qp; + + int this_opt, last_opt = '?'; + + int outform = F_TERMINFO; /* output format */ + int sortmode = S_TERMINFO; /* sort_mode */ + + int width = 60; + bool formatted = FALSE; /* reformat complex strings? */ + int numbers = 0; /* format "%'char'" to/from "%{number}" */ + bool infodump = FALSE; /* running as captoinfo? */ + bool capdump = FALSE; /* running as infotocap? */ + bool forceresolve = FALSE; /* force resolution */ + bool limited = TRUE; + char *tversion = (char *) NULL; + const char *source_file = "terminfo"; + const char **namelst = 0; + char *outdir = (char *) NULL; + bool check_only = FALSE; + + log_fp = stderr; + + if ((_nc_progname = strrchr(argv[0], '/')) == NULL) + _nc_progname = argv[0]; + else + _nc_progname++; + + if ((infodump = (strcmp(_nc_progname, "captoinfo") == 0)) != FALSE) { + outform = F_TERMINFO; + sortmode = S_TERMINFO; + } + if ((capdump = (strcmp(_nc_progname, "infotocap") == 0)) != FALSE) { + outform = F_TERMCAP; + sortmode = S_TERMCAP; + } #if NCURSES_XNAMES - use_extended_names(FALSE); + use_extended_names(FALSE); #endif - /* - * Processing arguments is a little complicated, since someone made a - * design decision to allow the numeric values for -w, -v options to - * be optional. - */ - while ((this_opt = getopt(argc, argv, "0123456789CILNR:TVce:fGgo:rsvwx")) != EOF) { - if (isdigit(this_opt)) { - switch (last_opt) { - case 'v': - v_opt = (v_opt * 10) + (this_opt - '0'); - break; - case 'w': - width = (width * 10) + (this_opt - '0'); - break; - default: - if (this_opt != '1') - usage(); - last_opt = this_opt; - width = 0; - } - continue; - } - switch (this_opt) { - case 'C': - capdump = TRUE; - outform = F_TERMCAP; - sortmode = S_TERMCAP; - break; - case 'I': - infodump = TRUE; - outform = F_TERMINFO; - sortmode = S_TERMINFO; - break; - case 'L': - infodump = TRUE; - outform = F_VARIABLE; - sortmode = S_VARIABLE; - break; - case 'N': - smart_defaults = FALSE; - break; - case 'R': - tversion = optarg; - break; - case 'T': - limited = FALSE; - break; - case 'V': - puts(NCURSES_VERSION); - return EXIT_SUCCESS; - case 'c': - check_only = TRUE; - break; - case 'e': - namelst = make_namelist(optarg); - break; - case 'f': - formatted = TRUE; - break; - case 'G': - numbers = 1; - break; - case 'g': - numbers = -1; - break; - case 'o': - outdir = optarg; - break; - case 'r': - forceresolve = TRUE; - break; - case 's': - showsummary = TRUE; - break; - case 'v': - v_opt = 0; - break; - case 'w': - width = 0; - break; + /* + * Processing arguments is a little complicated, since someone made a + * design decision to allow the numeric values for -w, -v options to + * be optional. + */ + while ((this_opt = getopt(argc, argv, + "0123456789CILNR:TVace:fGgo:rsvwx")) != EOF) { + if (isdigit(this_opt)) { + switch (last_opt) { + case 'v': + v_opt = (v_opt * 10) + (this_opt - '0'); + break; + case 'w': + width = (width * 10) + (this_opt - '0'); + break; + default: + if (this_opt != '1') + usage(); + last_opt = this_opt; + width = 0; + } + continue; + } + switch (this_opt) { + case 'C': + capdump = TRUE; + outform = F_TERMCAP; + sortmode = S_TERMCAP; + break; + case 'I': + infodump = TRUE; + outform = F_TERMINFO; + sortmode = S_TERMINFO; + break; + case 'L': + infodump = TRUE; + outform = F_VARIABLE; + sortmode = S_VARIABLE; + break; + case 'N': + smart_defaults = FALSE; + break; + case 'R': + tversion = optarg; + break; + case 'T': + limited = FALSE; + break; + case 'V': + puts(NCURSES_VERSION); + return EXIT_SUCCESS; + case 'c': + check_only = TRUE; + break; + case 'e': + namelst = make_namelist(optarg); + break; + case 'f': + formatted = TRUE; + break; + case 'G': + numbers = 1; + break; + case 'g': + numbers = -1; + break; + case 'o': + outdir = optarg; + break; + case 'r': + forceresolve = TRUE; + break; + case 's': + showsummary = TRUE; + break; + case 'v': + v_opt = 0; + break; + case 'w': + width = 0; + break; #if NCURSES_XNAMES - case 'x': - use_extended_names(TRUE); - break; + case 'a': + _nc_disable_period = TRUE; + /* FALLTHRU */ + case 'x': + use_extended_names(TRUE); + break; #endif - default: - usage(); - } - last_opt = this_opt; + default: + usage(); } + last_opt = this_opt; + } - debug_level = (v_opt > 0) ? v_opt : (v_opt == 0); - _nc_tracing = (1 << debug_level) - 1; - - if (_nc_tracing) - { - save_check_termtype = _nc_check_termtype; - _nc_check_termtype = check_termtype; - } + debug_level = (v_opt > 0) ? v_opt : (v_opt == 0); + set_trace_level(debug_level); + if (_nc_tracing) { + save_check_termtype = _nc_check_termtype; + _nc_check_termtype = check_termtype; + } #ifndef HAVE_BIG_CORE - /* - * Aaargh! immedhook seriously hoses us! - * - * One problem with immedhook is it means we can't do -e. Problem - * is that we can't guarantee that for each terminal listed, all the - * terminals it depends on will have been kept in core for reference - * resolution -- in fact it's certain the primitive types at the end - * of reference chains *won't* be in core unless they were explicitly - * in the select list themselves. - */ - if (namelst && (!infodump && !capdump)) - { - (void) fprintf(stderr, - "Sorry, -e can't be used without -I or -C\n"); - cleanup(); - return EXIT_FAILURE; - } + /* + * Aaargh! immedhook seriously hoses us! + * + * One problem with immedhook is it means we can't do -e. Problem + * is that we can't guarantee that for each terminal listed, all the + * terminals it depends on will have been kept in core for reference + * resolution -- in fact it's certain the primitive types at the end + * of reference chains *won't* be in core unless they were explicitly + * in the select list themselves. + */ + if (namelst && (!infodump && !capdump)) { + (void) fprintf(stderr, + "Sorry, -e can't be used without -I or -C\n"); + cleanup(); + return EXIT_FAILURE; + } #endif /* HAVE_BIG_CORE */ + if (optind < argc) { + source_file = argv[optind++]; if (optind < argc) { - source_file = argv[optind++]; - if (optind < argc) { - fprintf (stderr, - "%s: Too many file names. Usage:\n\t%s %s", - _nc_progname, - _nc_progname, - usage_string); - return EXIT_FAILURE; - } - } else { - if (infodump == TRUE) { - /* captoinfo's no-argument case */ - source_file = "/etc/termcap"; - if ((termcap = getenv("TERMCAP")) != 0 - && (namelst = make_namelist(getenv("TERM"))) != 0) { - if (access(termcap, F_OK) == 0) { - /* file exists */ - source_file = termcap; - } else - if ((source_file = tmpnam(my_tmpname)) != 0 - && (tmp_fp = fopen(source_file, "w")) != 0) { - fprintf(tmp_fp, "%s\n", termcap); - fclose(tmp_fp); - tmp_fp = fopen(source_file, "r"); - to_remove = source_file; - } else { - failed("tmpnam"); - } - } + fprintf(stderr, + "%s: Too many file names. Usage:\n\t%s %s", + _nc_progname, + _nc_progname, + usage_string); + return EXIT_FAILURE; + } + } else { + if (infodump == TRUE) { + /* captoinfo's no-argument case */ + source_file = "/etc/termcap"; + if ((termcap = getenv("TERMCAP")) != 0 + && (namelst = make_namelist(getenv("TERM"))) != 0) { + if (access(termcap, F_OK) == 0) { + /* file exists */ + source_file = termcap; + } else if ((tmp_fp = open_tempfile(my_tmpname)) != 0) { + source_file = my_tmpname; + fprintf(tmp_fp, "%s\n", termcap); + fclose(tmp_fp); + tmp_fp = fopen(source_file, "r"); + to_remove = source_file; } else { - /* tic */ - fprintf (stderr, - "%s: File name needed. Usage:\n\t%s %s", - _nc_progname, - _nc_progname, - usage_string); - cleanup(); - return EXIT_FAILURE; + failed("tmpnam"); } + } + } else { + /* tic */ + fprintf(stderr, + "%s: File name needed. Usage:\n\t%s %s", + _nc_progname, + _nc_progname, + usage_string); + cleanup(); + return EXIT_FAILURE; } + } - if (tmp_fp == 0 - && (tmp_fp = fopen(source_file, "r")) == 0) { - fprintf (stderr, "%s: Can't open %s\n", _nc_progname, source_file); - return EXIT_FAILURE; - } + if (tmp_fp == 0 + && (tmp_fp = fopen(source_file, "r")) == 0) { + fprintf(stderr, "%s: Can't open %s\n", _nc_progname, source_file); + return EXIT_FAILURE; + } - if (infodump) - dump_init(tversion, - smart_defaults - ? outform - : F_LITERAL, - sortmode, width, debug_level, formatted); - else if (capdump) - dump_init(tversion, - outform, - sortmode, width, debug_level, FALSE); - - /* parse entries out of the source file */ - _nc_set_source(source_file); + if (infodump) + dump_init(tversion, + smart_defaults + ? outform + : F_LITERAL, + sortmode, width, debug_level, formatted); + else if (capdump) + dump_init(tversion, + outform, + sortmode, width, debug_level, FALSE); + + /* parse entries out of the source file */ + _nc_set_source(source_file); #ifndef HAVE_BIG_CORE - if (!(check_only || infodump || capdump)) - _nc_set_writedir(outdir); + if (!(check_only || infodump || capdump)) + _nc_set_writedir(outdir); #endif /* HAVE_BIG_CORE */ - _nc_read_entry_source(tmp_fp, (char *)NULL, - !smart_defaults, FALSE, - (check_only || infodump || capdump) ? NULLHOOK : immedhook); - - /* do use resolution */ - if (check_only || (!infodump && !capdump) || forceresolve) { - if (!_nc_resolve_uses() && !check_only) { - cleanup(); - return EXIT_FAILURE; - } + _nc_read_entry_source(tmp_fp, (char *) NULL, + !smart_defaults, FALSE, + (check_only || infodump || capdump) ? NULLHOOK : immedhook); + + /* do use resolution */ + if (check_only || (!infodump && !capdump) || forceresolve) { + if (!_nc_resolve_uses(TRUE) && !check_only) { + cleanup(); + return EXIT_FAILURE; } + } - /* length check */ - if (check_only && (capdump || infodump)) - { - for_entry_list(qp) - { - if (matches(namelst, qp->tterm.term_names)) - { - int len = fmt_entry(&qp->tterm, NULL, TRUE, infodump, numbers); - - if (len>(infodump?MAX_TERMINFO_LENGTH:MAX_TERMCAP_LENGTH)) - (void) fprintf(stderr, - "warning: resolved %s entry is %d bytes long\n", - _nc_first_name(qp->tterm.term_names), - len); - } + /* length check */ + if (check_only && (capdump || infodump)) { + for_entry_list(qp) { + if (matches(namelst, qp->tterm.term_names)) { + int len = fmt_entry(&qp->tterm, NULL, TRUE, infodump, numbers); + + if (len > (infodump ? MAX_TERMINFO_LENGTH : MAX_TERMCAP_LENGTH)) + (void) fprintf(stderr, + "warning: resolved %s entry is %d bytes long\n", + _nc_first_name(qp->tterm.term_names), + len); } } + } - /* write or dump all entries */ - if (!check_only) - { - if (!infodump && !capdump) - { - _nc_set_writedir(outdir); - for_entry_list(qp) - if (matches(namelst, qp->tterm.term_names)) - write_it(qp); + /* write or dump all entries */ + if (!check_only) { + if (!infodump && !capdump) { + _nc_set_writedir(outdir); + for_entry_list(qp) { + if (matches(namelst, qp->tterm.term_names)) + write_it(qp); } - else - { - /* this is in case infotocap() generates warnings */ - _nc_curr_col = _nc_curr_line = -1; - - for_entry_list(qp) - if (matches(namelst, qp->tterm.term_names)) - { - int j = qp->cend - qp->cstart; - int len = 0; - - /* this is in case infotocap() generates warnings */ - _nc_set_type(_nc_first_name(qp->tterm.term_names)); - - (void) fseek(tmp_fp, qp->cstart, SEEK_SET); - while (j-- ) - if (infodump) - (void) putchar(fgetc(tmp_fp)); - else - put_translate(fgetc(tmp_fp)); - - len = dump_entry(&qp->tterm, limited, numbers, NULL); - for (j = 0; j < qp->nuses; j++) - len += dump_uses((char *)(qp->uses[j].parent), !capdump); - (void) putchar('\n'); - if (debug_level != 0 && !limited) - printf("# length=%d\n", len); + } else { + /* this is in case infotocap() generates warnings */ + _nc_curr_col = _nc_curr_line = -1; + + for_entry_list(qp) { + if (matches(namelst, qp->tterm.term_names)) { + int j = qp->cend - qp->cstart; + int len = 0; + + /* this is in case infotocap() generates warnings */ + _nc_set_type(_nc_first_name(qp->tterm.term_names)); + + (void) fseek(tmp_fp, qp->cstart, SEEK_SET); + while (j--) { + if (infodump) + (void) putchar(fgetc(tmp_fp)); + else + put_translate(fgetc(tmp_fp)); } - if (!namelst) - { - int c, oldc = '\0'; - bool in_comment = FALSE; - bool trailing_comment = FALSE; - - (void) fseek(tmp_fp, _nc_tail->cend, SEEK_SET); - while ((c = fgetc(tmp_fp)) != EOF) - { - if (oldc == '\n') { - if (c == '#') { - trailing_comment = TRUE; - in_comment = TRUE; - } else { - in_comment = FALSE; - } + + len = dump_entry(&qp->tterm, limited, numbers, NULL); + for (j = 0; j < qp->nuses; j++) + len += dump_uses(qp->uses[j].name, !capdump); + (void) putchar('\n'); + if (debug_level != 0 && !limited) + printf("# length=%d\n", len); + } + } + if (!namelst) { + int c, oldc = '\0'; + bool in_comment = FALSE; + bool trailing_comment = FALSE; + + (void) fseek(tmp_fp, _nc_tail->cend, SEEK_SET); + while ((c = fgetc(tmp_fp)) != EOF) { + if (oldc == '\n') { + if (c == '#') { + trailing_comment = TRUE; + in_comment = TRUE; + } else { + in_comment = FALSE; } - if (trailing_comment - && (in_comment || (oldc == '\n' && c == '\n'))) - putchar(c); - oldc = c; } + if (trailing_comment + && (in_comment || (oldc == '\n' && c == '\n'))) + putchar(c); + oldc = c; } } } + } - /* Show the directory into which entries were written, and the total - * number of entries - */ - if (showsummary - && (!(check_only || infodump || capdump))) { - int total = _nc_tic_written(); - if (total != 0) - fprintf(log_fp, "%d entries written to %s\n", - total, - _nc_tic_dir((char *)0)); - else - fprintf(log_fp, "No entries written\n"); - } - cleanup(); - return(EXIT_SUCCESS); + /* Show the directory into which entries were written, and the total + * number of entries + */ + if (showsummary + && (!(check_only || infodump || capdump))) { + int total = _nc_tic_written(); + if (total != 0) + fprintf(log_fp, "%d entries written to %s\n", + total, + _nc_tic_dir((char *) 0)); + else + fprintf(log_fp, "No entries written\n"); + } + cleanup(); + return (EXIT_SUCCESS); } /* @@ -715,98 +737,169 @@ bool check_only = FALSE; * precisely what's needed (see comp_parse.c). */ -TERMINAL *cur_term; /* tweak to avoid linking lib_cur_term.c */ +TERMINAL *cur_term; /* tweak to avoid linking lib_cur_term.c */ #undef CUR #define CUR tp-> +/* + * An sgr string may contain several settings other than the one we're + * interested in, essentially sgr0 + rmacs + whatever. As long as the + * "whatever" is contained in the sgr string, that is close enough for our + * sanity check. + */ +static bool +similar_sgr(char *a, char *b) +{ + while (*b != 0) { + while (*a != *b) { + if (*a == 0) + return FALSE; + a++; + } + a++; + b++; + } + return TRUE; +} + +static void +check_sgr(TERMTYPE * tp, char *zero, int num, char *cap, const char *name) +{ + char *test = tparm(set_attributes, + num == 1, + num == 2, + num == 3, + num == 4, + num == 5, + num == 6, + num == 7, + num == 8, + num == 9); + if (test != 0) { + if (PRESENT(cap)) { + if (!similar_sgr(test, cap)) { + _nc_warning("%s differs from sgr(%d): %s", name, num, + _nc_visbuf(test)); + } + } else if (strcmp(test, zero)) { + _nc_warning("sgr(%d) present, but not %s", num, name); + } + } else if (PRESENT(cap)) { + _nc_warning("sgr(%d) missing, but %s present", num, name); + } +} + +#define CHECK_SGR(num,name) check_sgr(tp, zero, num, name, #name) + /* other sanity-checks (things that we don't want in the normal * logic that reads a terminfo entry) */ -static void check_termtype(TERMTYPE *tp) +static void +check_termtype(TERMTYPE * tp) { - bool conflict = FALSE; - unsigned j, k; - char fkeys[STRCOUNT]; - - /* - * A terminal entry may contain more than one keycode assigned to - * a given string (e.g., KEY_END and KEY_LL). But curses will only - * return one (the last one assigned). - */ - memset(fkeys, 0, sizeof(fkeys)); - for (j = 0; _nc_tinfo_fkeys[j].code; j++) { - char *a = tp->Strings[_nc_tinfo_fkeys[j].offset]; - bool first = TRUE; - if (!VALID_STRING(a)) + bool conflict = FALSE; + unsigned j, k; + char fkeys[STRCOUNT]; + + /* + * A terminal entry may contain more than one keycode assigned to + * a given string (e.g., KEY_END and KEY_LL). But curses will only + * return one (the last one assigned). + */ + memset(fkeys, 0, sizeof(fkeys)); + for (j = 0; _nc_tinfo_fkeys[j].code; j++) { + char *a = tp->Strings[_nc_tinfo_fkeys[j].offset]; + bool first = TRUE; + if (!VALID_STRING(a)) + continue; + for (k = j + 1; _nc_tinfo_fkeys[k].code; k++) { + char *b = tp->Strings[_nc_tinfo_fkeys[k].offset]; + if (!VALID_STRING(b) + || fkeys[k]) continue; - for (k = j+1; _nc_tinfo_fkeys[k].code; k++) { - char *b = tp->Strings[_nc_tinfo_fkeys[k].offset]; - if (!VALID_STRING(b) - || fkeys[k]) - continue; - if (!strcmp(a,b)) { - fkeys[j] = 1; - fkeys[k] = 1; - if (first) { - if (!conflict) { - _nc_warning("Conflicting key definitions (using the last)"); - conflict = TRUE; - } - fprintf(stderr, "... %s is the same as %s", - keyname(_nc_tinfo_fkeys[j].code), - keyname(_nc_tinfo_fkeys[k].code)); - first = FALSE; - } else { - fprintf(stderr, ", %s", - keyname(_nc_tinfo_fkeys[k].code)); + if (!strcmp(a, b)) { + fkeys[j] = 1; + fkeys[k] = 1; + if (first) { + if (!conflict) { + _nc_warning("Conflicting key definitions (using the last)"); + conflict = TRUE; } + fprintf(stderr, "... %s is the same as %s", + keyname(_nc_tinfo_fkeys[j].code), + keyname(_nc_tinfo_fkeys[k].code)); + first = FALSE; + } else { + fprintf(stderr, ", %s", + keyname(_nc_tinfo_fkeys[k].code)); } } - if (!first) - fprintf(stderr, "\n"); } + if (!first) + fprintf(stderr, "\n"); + } - /* - * 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)) - _nc_warning("inconsistent values for max_colors and max_pairs"); - - PAIRED(set_foreground, set_background) - PAIRED(set_a_foreground, set_a_background) - - /* - * These may be mismatched because the terminal description relies on - * restoring the cursor visibility by resetting it. - */ - ANDMISSING(cursor_invisible, cursor_normal) - ANDMISSING(cursor_visible, cursor_normal) - - /* - * From XSI & O'Reilly, we gather that sc/rc are required if csr is - * given, because the cursor position after the scrolling operation is - * performed is undefined. - */ - ANDMISSING(change_scroll_region, save_cursor) - ANDMISSING(change_scroll_region, restore_cursor) - - /* - * Some standard applications (e.g., vi) and some non-curses - * applications (e.g., jove) get confused if we have both ich/ich1 and - * smir/rmir. Let's be nice and warn about that, too, even though - * ncurses handles it. - */ - if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode)) - && (PRESENT(insert_character) || PRESENT(parm_ich))) { - _nc_warning("non-curses applications may be confused by ich/ich1 with smir/rmir"); - } + /* + * 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)) + _nc_warning("inconsistent values for max_colors and max_pairs"); + + PAIRED(set_foreground, set_background); + PAIRED(set_a_foreground, set_a_background); - /* - * Finally, do the non-verbose checks - */ - if (save_check_termtype != 0) - save_check_termtype(tp); + /* + * These may be mismatched because the terminal description relies on + * restoring the cursor visibility by resetting it. + */ + ANDMISSING(cursor_invisible, cursor_normal); + ANDMISSING(cursor_visible, cursor_normal); + + if (PRESENT(cursor_visible) && PRESENT(cursor_normal) + && !strcmp(cursor_visible, cursor_normal)) + _nc_warning("cursor_visible is same as cursor_normal"); + + /* + * From XSI & O'Reilly, we gather that sc/rc are required if csr is + * given, because the cursor position after the scrolling operation is + * performed is undefined. + */ + ANDMISSING(change_scroll_region, save_cursor); + ANDMISSING(change_scroll_region, restore_cursor); + + if (PRESENT(set_attributes)) { + char *zero = tparm(set_attributes, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + zero = strdup(zero); + CHECK_SGR(1, enter_standout_mode); + CHECK_SGR(2, enter_underline_mode); + CHECK_SGR(3, enter_reverse_mode); + CHECK_SGR(4, enter_blink_mode); + CHECK_SGR(5, enter_dim_mode); + CHECK_SGR(6, enter_bold_mode); + CHECK_SGR(7, enter_secure_mode); + CHECK_SGR(8, enter_protected_mode); + CHECK_SGR(9, enter_alt_charset_mode); + free(zero); + } + + /* + * Some standard applications (e.g., vi) and some non-curses + * applications (e.g., jove) get confused if we have both ich/ich1 and + * smir/rmir. Let's be nice and warn about that, too, even though + * ncurses handles it. + */ + if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode)) + && (PRESENT(insert_character) || PRESENT(parm_ich))) { + _nc_warning("non-curses applications may be confused by ich/ich1 with smir/rmir"); + } + + /* + * Finally, do the non-verbose checks + */ + if (save_check_termtype != 0) + save_check_termtype(tp); } diff --git a/progs/toe.c b/progs/toe.c index f2c5c5ec..afdf379f 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -43,41 +43,57 @@ #include #include -MODULE_ID("$Id: toe.c,v 0.19 1998/03/08 01:02:46 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.22 2000/03/11 21:47:35 tom Exp $") + +#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) const char *_nc_progname; static int typelist(int eargc, char *eargv[], bool, - void (*)(const char *, TERMTYPE *)); + void (*)(const char *, TERMTYPE *)); static void deschook(const char *, TERMTYPE *); #if NO_LEAKS #undef ExitProgram -static void ExitProgram(int code) GCC_NORETURN; -static void ExitProgram(int code) +static void +ExitProgram(int code) GCC_NORETURN; + static void ExitProgram(int code) { - _nc_free_entries(_nc_head); - _nc_leaks_dump_entry(); - _nc_free_and_exit(code); + _nc_free_entries(_nc_head); + _nc_leaks_dump_entry(); + _nc_free_and_exit(code); } #endif -int main (int argc, char *argv[]) +static char * +get_directory(char *path) +{ + if (path != 0) { + struct stat sb; + if (stat(path, &sb) != 0 + || (sb.st_mode & S_IFMT) != S_IFDIR + || access(path, R_OK | X_OK) != 0) + path = 0; + } + return path; +} + +int +main(int argc, char *argv[]) { - bool direct_dependencies = FALSE; - bool invert_dependencies = FALSE; - bool header = FALSE; - int i, c, debug_level = 0; - int code; + bool direct_dependencies = FALSE; + bool invert_dependencies = FALSE; + bool header = FALSE; + int i, c; + int code; - if ((_nc_progname = strrchr(argv[0], '/')) == NULL) + if ((_nc_progname = strrchr(argv[0], '/')) == 0) _nc_progname = argv[0]; else _nc_progname++; while ((c = getopt(argc, argv, "huv:UV")) != EOF) - switch (c) - { + switch (c) { case 'h': header = TRUE; break; @@ -85,8 +101,7 @@ int main (int argc, char *argv[]) direct_dependencies = TRUE; break; case 'v': - debug_level = atoi(optarg); - _nc_tracing = (1 << debug_level) - 1; + set_trace_level(atoi(optarg)); break; case 'U': invert_dependencies = TRUE; @@ -96,14 +111,12 @@ int main (int argc, char *argv[]) putchar('\n'); ExitProgram(EXIT_SUCCESS); default: - (void) fprintf (stderr, "usage: toe [-huUV] [-v n] [file...]\n"); + (void) fprintf(stderr, "usage: toe [-huUV] [-v n] [file...]\n"); ExitProgram(EXIT_FAILURE); } - if (direct_dependencies || invert_dependencies) - { - if (freopen(argv[optind], "r", stdin) == NULL) - { + if (direct_dependencies || invert_dependencies) { + if (freopen(argv[optind], "r", stdin) == 0) { (void) fflush(stdout); fprintf(stderr, "%s: can't open %s\n", _nc_progname, argv[optind]); ExitProgram(EXIT_FAILURE); @@ -111,52 +124,45 @@ int main (int argc, char *argv[]) /* parse entries out of the source file */ _nc_set_source(argv[optind]); - _nc_read_entry_source(stdin, (char *)NULL, - FALSE, FALSE, - NULLHOOK); + _nc_read_entry_source(stdin, 0, FALSE, FALSE, NULLHOOK); } /* maybe we want a direct-dependency listing? */ - if (direct_dependencies) - { - ENTRY *qp; + if (direct_dependencies) { + ENTRY *qp; for_entry_list(qp) - if (qp->nuses) - { - int j; + if (qp->nuses) { + int j; - (void) printf("%s:", _nc_first_name(qp->tterm.term_names)); - for (j = 0; j < qp->nuses; j++) - (void) printf(" %s", (char *)(qp->uses[j].parent)); - putchar('\n'); - } + (void) printf("%s:", _nc_first_name(qp->tterm.term_names)); + for (j = 0; j < qp->nuses; j++) + (void) printf(" %s", qp->uses[j].name); + putchar('\n'); + } ExitProgram(EXIT_SUCCESS); } /* maybe we want a reverse-dependency listing? */ - if (invert_dependencies) - { - ENTRY *qp, *rp; - int matchcount; + if (invert_dependencies) { + ENTRY *qp, *rp; + int matchcount; - for_entry_list(qp) - { + for_entry_list(qp) { matchcount = 0; - for_entry_list(rp) - { + for_entry_list(rp) { if (rp->nuses == 0) continue; for (i = 0; i < rp->nuses; i++) - if (_nc_name_match(qp->tterm.term_names,(char*)rp->uses[i].parent, "|")) - { + if (_nc_name_match(qp->tterm.term_names, + rp->uses[i].name, "|")) { if (matchcount++ == 0) (void) printf("%s:", - _nc_first_name(qp->tterm.term_names)); + _nc_first_name(qp->tterm.term_names)); (void) printf(" %s", - _nc_first_name(rp->tterm.term_names)); + _nc_first_name(rp->tterm.term_names)); } } if (matchcount) @@ -170,29 +176,25 @@ int main (int argc, char *argv[]) * If we get this far, user wants a simple terminal type listing. */ if (optind < argc) { - code = typelist(argc-optind, argv+optind, header, deschook); + code = typelist(argc - optind, argv + optind, header, deschook); } else { - char *by_env, *home, *eargv[3]; - int j; + char *home, *eargv[3]; + char personal[PATH_MAX]; + int j; j = 0; - if ((by_env = getenv("TERMINFO")) != (char *)NULL) - eargv[j++] = by_env; - else - { - if ((home = getenv("HOME")) != (char *)NULL) - { - char personal[PATH_MAX]; - struct stat sb; - + if ((eargv[j] = get_directory(getenv("TERMINFO"))) != 0) { + j++; + } else { + if ((home = getenv("HOME")) != 0) { (void) sprintf(personal, PRIVATE_INFO, home); - if (stat(personal, &sb) == 0 - && (sb.st_mode & S_IFMT) == S_IFDIR) - eargv[j++] = personal; + if ((eargv[j] = get_directory(personal)) != 0) + j++; } - eargv[j++] = TERMINFO; + if ((eargv[j] = get_directory(TERMINFO)) != 0) + j++; } - eargv[j] = (char *)NULL; + eargv[j] = 0; code = typelist(j, eargv, header, deschook); } @@ -200,12 +202,13 @@ int main (int argc, char *argv[]) ExitProgram(code); } -static void deschook(const char *cn, TERMTYPE *tp) +static void +deschook(const char *cn, TERMTYPE * tp) /* display a description for the type */ { const char *desc; - if ((desc = strrchr(tp->term_names, '|')) == (char *)NULL) + if ((desc = strrchr(tp->term_names, '|')) == 0) desc = "(No description)"; else ++desc; @@ -213,85 +216,74 @@ static void deschook(const char *cn, TERMTYPE *tp) (void) printf("%-10s\t%s\n", cn, desc); } -static int typelist(int eargc, char *eargv[], - bool verbosity, - void (*hook)(const char *, TERMTYPE *tp)) +static int +typelist(int eargc, char *eargv[], + bool verbosity, + void (*hook) (const char *, TERMTYPE * tp)) /* apply a function to each entry in given terminfo directories */ { - int i; + int i; - for (i = 0; i < eargc; i++) - { - DIR *termdir; + for (i = 0; i < eargc; i++) { + DIR *termdir; struct dirent *subdir; - if ((termdir = opendir(eargv[i])) == (DIR *)NULL) - { + if ((termdir = opendir(eargv[i])) == 0) { (void) fflush(stdout); (void) fprintf(stderr, - "%s: can't open terminfo directory %s\n", - _nc_progname, eargv[i]); - return(EXIT_FAILURE); - } - else if (verbosity) + "%s: can't open terminfo directory %s\n", + _nc_progname, eargv[i]); + return (EXIT_FAILURE); + } else if (verbosity) (void) printf("#\n#%s:\n#\n", eargv[i]); - while ((subdir = readdir(termdir)) != NULL) - { - size_t len = NAMLEN(subdir); - char buf[PATH_MAX]; - char name_1[PATH_MAX]; - DIR *entrydir; + while ((subdir = readdir(termdir)) != 0) { + size_t len = NAMLEN(subdir); + char buf[PATH_MAX]; + char name_1[PATH_MAX]; + DIR *entrydir; struct dirent *entry; strncpy(name_1, subdir->d_name, len)[len] = '\0'; - if (!strcmp(name_1, ".") - || !strcmp(name_1, "..")) + if (isDotname(name_1)) continue; - (void) strcpy(buf, eargv[i]); - (void) strcat(buf, "/"); - (void) strcat(buf, name_1); - (void) strcat(buf, "/"); + (void) sprintf(buf, "%s/%s/", eargv[i], name_1); chdir(buf); entrydir = opendir("."); - while ((entry = readdir(entrydir)) != NULL) - { - char name_2[PATH_MAX]; - TERMTYPE lterm; - char *cn; - int status; + while ((entry = readdir(entrydir)) != 0) { + char name_2[PATH_MAX]; + TERMTYPE lterm; + char *cn; + int status; len = NAMLEN(entry); strncpy(name_2, entry->d_name, len)[len] = '\0'; - if (!strcmp(name_2, ".") - || !strcmp(name_2, "..")) + if (isDotname(name_2)) continue; status = _nc_read_file_entry(name_2, <erm); - if (status <= 0) - { + if (status <= 0) { (void) fflush(stdout); (void) fprintf(stderr, - "toe: couldn't open terminfo file %s.\n", - name_2); - return(EXIT_FAILURE); + "toe: couldn't open terminfo file %s.\n", + name_2); + return (EXIT_FAILURE); } /* only visit things once, by primary name */ cn = _nc_first_name(lterm.term_names); - if (!strcmp(cn, name_2)) - { + if (!strcmp(cn, name_2)) { /* apply the selected hook function */ - (*hook)(cn, <erm); + (*hook) (cn, <erm); } if (lterm.term_names) { free(lterm.term_names); - lterm.term_names = NULL; + lterm.term_names = 0; } if (lterm.str_table) { free(lterm.str_table); - lterm.str_table = NULL; + lterm.str_table = 0; } } closedir(entrydir); @@ -299,5 +291,5 @@ static int typelist(int eargc, char *eargv[], closedir(termdir); } - return(EXIT_SUCCESS); + return (EXIT_SUCCESS); } diff --git a/progs/tput.c b/progs/tput.c index 7a859f16..63c6d1a5 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * tput.c -- shellscript access to terminal capabilities * @@ -44,7 +43,7 @@ #include #endif -MODULE_ID("$Id: tput.c,v 1.14 1999/07/31 21:18:29 Goran.Uddeborg Exp $") +MODULE_ID("$Id: tput.c,v 1.16 2000/03/19 01:08:08 tom Exp $") #define PUTS(s) fputs(s, stdout) #define PUTCHAR(c) putchar(c) @@ -52,261 +51,268 @@ MODULE_ID("$Id: tput.c,v 1.14 1999/07/31 21:18:29 Goran.Uddeborg Exp $") static char *prg_name; -static void quit(int status, const char *fmt, ...) +static void +quit(int status, const char *fmt,...) { -va_list argp; + va_list argp; - va_start(argp,fmt); - vfprintf (stderr, fmt, argp); - fprintf(stderr, "\n"); - va_end(argp); - exit(status); + va_start(argp, fmt); + vfprintf(stderr, fmt, argp); + fprintf(stderr, "\n"); + va_end(argp); + exit(status); } -static void usage(void) +static void +usage(void) { - fprintf(stderr, "usage: %s [-S] [-T term] capname\n", prg_name); - exit(EXIT_FAILURE); + fprintf(stderr, "usage: %s [-S] [-T term] capname\n", prg_name); + exit(EXIT_FAILURE); } -static int tput(int argc, char *argv[]) +static int +tput(int argc, char *argv[]) { -char *name; -char *s; -int i, j, c; -int reset, status; -FILE *f; - - reset = 0; - name = argv[0]; - if (strcmp(name, "reset") == 0) { - reset = 1; + NCURSES_CONST char *name; + char *s; + int i, j, c; + int reset, status; + FILE *f; + + reset = 0; + name = argv[0]; + if (strcmp(name, "reset") == 0) { + reset = 1; + } + if (reset || strcmp(name, "init") == 0) { + if (init_prog != 0) { + system(init_prog); } - if (reset || strcmp(name, "init") == 0) { - if (init_prog != NULL) { - system(init_prog); - } - FLUSH; + FLUSH; - if (reset && reset_1string != NULL) { - PUTS(reset_1string); - } else if (init_1string != NULL) { - PUTS(init_1string); - } - FLUSH; - - if (reset && reset_2string != NULL) { - PUTS(reset_2string); - } else if (init_2string != NULL) { - PUTS(init_2string); - } - FLUSH; - - if (set_lr_margin != NULL) { - PUTS(tparm(set_lr_margin, 0, columns - 1)); - } else if (set_left_margin_parm != NULL - && set_right_margin_parm != NULL) { - PUTS(tparm(set_left_margin_parm, 0)); - PUTS(tparm(set_right_margin_parm, columns - 1)); - } else if (clear_margins != NULL && set_left_margin != NULL - && set_right_margin != NULL) { - PUTS(clear_margins); - if (carriage_return != NULL) { - PUTS(carriage_return); - } else { - PUTCHAR('\r'); - } - PUTS(set_left_margin); - if (parm_right_cursor) { - PUTS(tparm(parm_right_cursor, columns - 1)); - } else { - for(i = 0; i < columns - 1; i++) { - PUTCHAR(' '); - } - } - PUTS(set_right_margin); - if (carriage_return != NULL) { - PUTS(carriage_return); - } else { - PUTCHAR('\r'); - } - } - FLUSH; - - if (init_tabs != 8) { - if (clear_all_tabs != NULL && set_tab != NULL) { - for(i = 0; i < columns - 1; i += 8) { - if (parm_right_cursor) { - PUTS(tparm(parm_right_cursor, 8)); - } else { - for(j = 0; j < 8; j++) - PUTCHAR(' '); - } - PUTS(set_tab); - } - FLUSH; - } - } + if (reset && reset_1string != 0) { + PUTS(reset_1string); + } else if (init_1string != 0) { + PUTS(init_1string); + } + FLUSH; - if (reset && reset_file != NULL) { - f = fopen(reset_file, "r"); - if (f == NULL) { - quit(errno, "Can't open reset_file: '%s'", reset_file); - } - while((c = fgetc(f)) != EOF) { - PUTCHAR(c); - } - fclose(f); - } else if (init_file != NULL) { - f = fopen(init_file, "r"); - if (f == NULL) { - quit(errno, "Can't open init_file: '%s'", init_file); - } - while((c = fgetc(f)) != EOF) { - PUTCHAR(c); - } - fclose(f); + if (reset && reset_2string != 0) { + PUTS(reset_2string); + } else if (init_2string != 0) { + PUTS(init_2string); + } + FLUSH; + + if (set_lr_margin != 0) { + PUTS(tparm(set_lr_margin, 0, columns - 1)); + } else if (set_left_margin_parm != 0 + && set_right_margin_parm != 0) { + PUTS(tparm(set_left_margin_parm, 0)); + PUTS(tparm(set_right_margin_parm, columns - 1)); + } else if (clear_margins != 0 + && set_left_margin != 0 + && set_right_margin != 0) { + PUTS(clear_margins); + if (carriage_return != 0) { + PUTS(carriage_return); + } else { + PUTCHAR('\r'); + } + PUTS(set_left_margin); + if (parm_right_cursor) { + PUTS(tparm(parm_right_cursor, columns - 1)); + } else { + for (i = 0; i < columns - 1; i++) { + PUTCHAR(' '); } - FLUSH; - - if (reset && reset_3string != NULL) { - PUTS(reset_3string); - } else if (init_2string != NULL) { - PUTS(init_2string); + } + PUTS(set_right_margin); + if (carriage_return != 0) { + PUTS(carriage_return); + } else { + PUTCHAR('\r'); + } + } + FLUSH; + + if (init_tabs != 8) { + if (clear_all_tabs != 0 && set_tab != 0) { + for (i = 0; i < columns - 1; i += 8) { + if (parm_right_cursor) { + PUTS(tparm(parm_right_cursor, 8)); + } else { + for (j = 0; j < 8; j++) + PUTCHAR(' '); + } + PUTS(set_tab); } FLUSH; - return 0; + } } - if (strcmp(name, "longname") == 0) { - PUTS(longname()); - return 0; + if (reset && reset_file != 0) { + f = fopen(reset_file, "r"); + if (f == 0) { + quit(errno, "Can't open reset_file: '%s'", reset_file); + } + while ((c = fgetc(f)) != EOF) { + PUTCHAR(c); + } + fclose(f); + } else if (init_file != 0) { + f = fopen(init_file, "r"); + if (f == 0) { + quit(errno, "Can't open init_file: '%s'", init_file); + } + while ((c = fgetc(f)) != EOF) { + PUTCHAR(c); + } + fclose(f); } + FLUSH; -#ifndef PURE_TERMINFO - { - const struct name_table_entry *np; - - if ((np = _nc_find_entry(name, _nc_get_hash_table(1))) != 0) - switch(np->nte_type) - { - case BOOLEAN: - if (bool_from_termcap[np->nte_index]) - name = boolnames[np->nte_index]; - break; - - case NUMBER: - if (num_from_termcap[np->nte_index]) - name = numnames[np->nte_index]; - break; - - case STRING: - if (str_from_termcap[np->nte_index]) - name = strnames[np->nte_index]; - break; - } + if (reset && reset_3string != 0) { + PUTS(reset_3string); + } else if (init_2string != 0) { + PUTS(init_2string); } + FLUSH; + return 0; + } + + if (strcmp(name, "longname") == 0) { + PUTS(longname()); + return 0; + } +#ifndef PURE_TERMINFO + { + const struct name_table_entry *np; + + if ((np = _nc_find_entry(name, _nc_get_hash_table(1))) != 0) + switch (np->nte_type) { + case BOOLEAN: + if (bool_from_termcap[np->nte_index]) + name = boolnames[np->nte_index]; + break; + + case NUMBER: + if (num_from_termcap[np->nte_index]) + name = numnames[np->nte_index]; + break; + + case STRING: + if (str_from_termcap[np->nte_index]) + name = strnames[np->nte_index]; + break; + } + } #endif - if ((status = tigetflag(name)) != -1) - return(status != 0); - else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) { - (void) printf("%d\n", status); - return(0); - } - else if ((s = tigetstr(name)) == CANCELLED_STRING) - quit(4, "%s: unknown terminfo capability '%s'", prg_name, name); - else if (s != (char *)NULL) { - if (argc > 1) { - int k; - - /* Nasty hack time. The tparm function needs to see numeric - * parameters as numbers, not as pointers to their string - * representations - */ - - for (k = 1; k < argc; k++) - if (isdigit(argv[k][0])) { - long val = atol(argv[k]); - argv[k] = (char *)val; - } - - s = tparm(s,argv[1],argv[2],argv[3],argv[4], - argv[5],argv[6],argv[7],argv[8], - argv[9]); + if ((status = tigetflag(name)) != -1) { + return (status != 0); + } else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) { + (void) printf("%d\n", status); + return (0); + } else if ((s = tigetstr(name)) == CANCELLED_STRING) { + quit(4, "%s: unknown terminfo capability '%s'", prg_name, name); + } else if (s != 0) { + if (argc > 1) { + int k; + char * params[10]; + + /* Nasty hack time. The tparm function needs to see numeric + * parameters as numbers, not as pointers to their string + * representations + */ + + for (k = 1; k < argc; k++) { + if (isdigit(argv[k][0])) { + long val = atol(argv[k]); + params[k] = (char *)val; + } else { + params[k] = argv[k]; } + } + for (k = argc; k <= 9; k++) + params[k] = 0; - /* use putp() in order to perform padding */ - putp(s); - return(0); + s = tparm(s, + params[1], params[2], params[3], + params[4], params[5], params[6], + params[7], params[8], params[9]); } - return(0); + + /* use putp() in order to perform padding */ + putp(s); + return (0); + } + return (0); } -int main(int argc, char **argv) +int +main(int argc, char **argv) { -char *s, *term; -int errret, cmdline = 1; -int c; -char buf[BUFSIZ]; -int errors = 0; - - prg_name = argv[0]; - s = strrchr(prg_name, '/'); - if (s != NULL && *++s != '\0') + char *s, *term; + int errret, cmdline = 1; + int c; + char buf[BUFSIZ]; + int errors = 0; + + prg_name = argv[0]; + s = strrchr(prg_name, '/'); + if (s != 0 && *++s != '\0') prg_name = s; - term = getenv("TERM"); - - while ((c = getopt (argc, argv, "ST:")) != EOF) - switch (c) - { - case 'S': - cmdline = 0; - break; - case 'T': - use_env(FALSE); - term = optarg; - break; - default: - usage(); - /* NOTREACHED */ - } - argc -= optind; - argv += optind; - - if (cmdline && argc == 0) { - usage(); - /* NOTREACHED */ + term = getenv("TERM"); + + while ((c = getopt(argc, argv, "ST:")) != EOF) + switch (c) { + case 'S': + cmdline = 0; + break; + case 'T': + use_env(FALSE); + term = optarg; + break; + default: + usage(); + /* NOTREACHED */ } - - if (term == NULL || *term == '\0') - quit(2, "No value for $TERM and no -T specified"); - - if (setupterm(term, STDOUT_FILENO, &errret) != OK && errret <= 0) - quit(3, "unknown terminal \"%s\"", term); - - if (cmdline) - return tput(argc, argv); - - while (fgets(buf, sizeof(buf), stdin) != (char *)NULL) { - char *argvec[16]; /* command, 9 parms, null, & slop */ - int argnum = 0; - char *cp; - - /* crack the argument list into a dope vector */ - for (cp = buf; *cp; cp++) { - if (isspace(*cp)) - *cp = '\0'; - else if (cp == buf || cp[-1] == 0) - argvec[argnum++] = cp; - } - argvec[argnum] = (char *)NULL; - - if (tput(argnum, argvec) != 0) - errors++; + argc -= optind; + argv += optind; + + if (cmdline && argc == 0) { + usage(); + /* NOTREACHED */ + } + + if (term == 0 || *term == '\0') + quit(2, "No value for $TERM and no -T specified"); + + if (setupterm(term, STDOUT_FILENO, &errret) != OK && errret <= 0) + quit(3, "unknown terminal \"%s\"", term); + + if (cmdline) + return tput(argc, argv); + + while (fgets(buf, sizeof(buf), stdin) != 0) { + char *argvec[16]; /* command, 9 parms, null, & slop */ + int argnum = 0; + char *cp; + + /* crack the argument list into a dope vector */ + for (cp = buf; *cp; cp++) { + if (isspace(*cp)) + *cp = '\0'; + else if (cp == buf || cp[-1] == 0) + argvec[argnum++] = cp; } + argvec[argnum] = 0; - return errors > 0; -} + if (tput(argnum, argvec) != 0) + errors++; + } + return errors > 0; +} diff --git a/progs/tset.c b/progs/tset.c index cef980ad..392aac0e 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ * and: Eric S. Raymond * ****************************************************************************/ - /* * tset.c - terminal initialization utility * @@ -100,10 +99,10 @@ char *ttyname(int fd); #include #endif -#include /* for bool typedef */ +#include /* for bool typedef */ #include -MODULE_ID("$Id: tset.c,v 0.37 1999/03/14 12:30:02 tom Exp $") +MODULE_ID("$Id: tset.c,v 0.41 2000/03/12 00:03:00 tom Exp $") extern char **environ; @@ -114,110 +113,105 @@ const char *_nc_progname = "tset"; static TTY mode, oldmode; -static int terasechar = -1; /* new erase character */ -static int intrchar = -1; /* new interrupt character */ -static int isreset; /* invoked as reset */ -static int tkillchar = -1; /* new kill character */ -static int tlines, tcolumns; /* window size */ +static int terasechar = -1; /* new erase character */ +static int intrchar = -1; /* new interrupt character */ +static int isreset; /* invoked as reset */ +static int tkillchar = -1; /* new kill character */ +static int tlines, tcolumns; /* window size */ #define LOWERCASE(c) ((isalpha(c) && isupper(c)) ? tolower(c) : (c)) static int -CaselessCmp(const char *a, const char *b) /* strcasecmp isn't portable */ -{ - while (*a && *b) { - int cmp = LOWERCASE(*a) - LOWERCASE(*b); - if (cmp != 0) - break; - a++, b++; - } - return LOWERCASE(*a) - LOWERCASE(*b); +CaselessCmp(const char *a, const char *b) +{ /* strcasecmp isn't portable */ + while (*a && *b) { + int cmp = LOWERCASE(*a) - LOWERCASE(*b); + if (cmp != 0) + break; + a++, b++; + } + return LOWERCASE(*a) - LOWERCASE(*b); } -#if !HAVE_STRDUP -#define strdup _nc_strdup -extern char *_nc_strdup(const char *); -#endif /* not HAVE_STRDUP */ - static void -err(const char *fmt, ...) +err(const char *fmt,...) { - va_list ap; - va_start(ap, fmt); - (void)fprintf(stderr, "tset: "); - (void)vfprintf(stderr, fmt, ap); - va_end(ap); - (void)fprintf(stderr, "\n"); - exit(EXIT_FAILURE); - /* NOTREACHED */ + va_list ap; + va_start(ap, fmt); + (void) fprintf(stderr, "tset: "); + (void) vfprintf(stderr, fmt, ap); + va_end(ap); + (void) fprintf(stderr, "\n"); + exit(EXIT_FAILURE); + /* NOTREACHED */ } static void failed(const char *msg) { - char temp[BUFSIZ]; - perror(strcat(strcpy(temp, "tset: "), msg)); - exit(EXIT_FAILURE); - /* NOTREACHED */ + char temp[BUFSIZ]; + perror(strncat(strcpy(temp, "tset: "), msg, sizeof(temp) - 10)); + exit(EXIT_FAILURE); + /* NOTREACHED */ } static void cat(char *file) { - register int fd, nr, nw; - char buf[BUFSIZ]; - - if ((fd = open(file, O_RDONLY, 0)) < 0) - failed(file); - - while ((nr = read(fd, buf, sizeof(buf))) > 0) - if ((nw = write(STDERR_FILENO, buf, (size_t)nr)) == -1) - failed("write to stderr"); - if (nr != 0) - failed(file); - (void)close(fd); + register int fd, nr, nw; + char buf[BUFSIZ]; + + if ((fd = open(file, O_RDONLY, 0)) < 0) + failed(file); + + while ((nr = read(fd, buf, sizeof(buf))) > 0) + if ((nw = write(STDERR_FILENO, buf, (size_t) nr)) == -1) + failed("write to stderr"); + if (nr != 0) + failed(file); + (void) close(fd); } static int outc(int c) { - return putc(c, stderr); + return putc(c, stderr); } /* Prompt the user for a terminal type. */ static const char * askuser(const char *dflt) { - static char answer[256]; - char *p; + static char answer[256]; + char *p; - /* We can get recalled; if so, don't continue uselessly. */ - if (feof(stdin) || ferror(stdin)) { - (void)fprintf(stderr, "\n"); + /* We can get recalled; if so, don't continue uselessly. */ + if (feof(stdin) || ferror(stdin)) { + (void) fprintf(stderr, "\n"); + exit(EXIT_FAILURE); + } + for (;;) { + if (dflt) + (void) fprintf(stderr, "Terminal type? [%s] ", dflt); + else + (void) fprintf(stderr, "Terminal type? "); + (void) fflush(stderr); + + if (fgets(answer, sizeof(answer), stdin) == 0) { + if (dflt == 0) { + (void) fprintf(stderr, "\n"); exit(EXIT_FAILURE); + } + return (dflt); } - for (;;) { - if (dflt) - (void)fprintf(stderr, "Terminal type? [%s] ", dflt); - else - (void)fprintf(stderr, "Terminal type? "); - (void)fflush(stderr); - - if (fgets(answer, sizeof(answer), stdin) == 0) { - if (dflt == 0) { - (void)fprintf(stderr, "\n"); - exit(EXIT_FAILURE); - } - return (dflt); - } - if ((p = strchr(answer, '\n')) != 0) - *p = '\0'; - if (answer[0]) - return (answer); - if (dflt != 0) - return (dflt); - } + if ((p = strchr(answer, '\n')) != 0) + *p = '\0'; + if (answer[0]) + return (answer); + if (dflt != 0) + return (dflt); + } } /************************************************************************** @@ -235,88 +229,89 @@ askuser(const char *dflt) #define LE (LT | EQ) typedef struct map { - struct map *next; /* Linked list of maps. */ - const char *porttype; /* Port type, or "" for any. */ - const char *type; /* Terminal type to select. */ - int conditional; /* Baud rate conditionals bitmask. */ - speed_t speed; /* Baud rate to compare against. */ + struct map *next; /* Linked list of maps. */ + const char *porttype; /* Port type, or "" for any. */ + const char *type; /* Terminal type to select. */ + int conditional; /* Baud rate conditionals bitmask. */ + speed_t speed; /* Baud rate to compare against. */ } MAP; static MAP *cur, *maplist; typedef struct speeds { - const char *string; - int speed; + const char *string; + int speed; } SPEEDS; -static const SPEEDS speeds[] = { - { "0", B0 }, - { "50", B50 }, - { "75", B75 }, - { "110", B110 }, - { "134", B134 }, - { "134.5", B134 }, - { "150", B150 }, - { "200", B200 }, - { "300", B300 }, - { "600", B600 }, - { "1200", B1200 }, - { "1800", B1800 }, - { "2400", B2400 }, - { "4800", B4800 }, - { "9600", B9600 }, - { "19200", B19200 }, - { "38400", B38400 }, - { "19200", B19200 }, - { "38400", B38400 }, +static const SPEEDS speeds[] = +{ + {"0", B0}, + {"50", B50}, + {"75", B75}, + {"110", B110}, + {"134", B134}, + {"134.5", B134}, + {"150", B150}, + {"200", B200}, + {"300", B300}, + {"600", B600}, + {"1200", B1200}, + {"1800", B1800}, + {"2400", B2400}, + {"4800", B4800}, + {"9600", B9600}, + {"19200", B19200}, + {"38400", B38400}, + {"19200", B19200}, + {"38400", B38400}, #ifdef B19200 - { "19200", B19200 }, + {"19200", B19200}, #else #ifdef EXTA - { "19200", EXTA }, + {"19200", EXTA}, #endif #endif #ifdef B38400 - { "38400", B38400 }, + {"38400", B38400}, #else #ifdef EXTB - { "38400", EXTB }, + {"38400", EXTB}, #endif #endif #ifdef B57600 - { "57600", B57600 }, + {"57600", B57600}, #endif #ifdef B115200 - { "115200", B115200 }, + {"115200", B115200}, #endif #ifdef B230400 - { "230400", B230400 }, + {"230400", B230400}, #endif #ifdef B460800 - { "460800", B460800 }, + {"460800", B460800}, #endif - { (char *)0, 0 } + {(char *) 0, 0} }; static int tbaudrate(char *rate) { - const SPEEDS *sp; - int found = FALSE; + const SPEEDS *sp; + int found = FALSE; - /* The baudrate number can be preceded by a 'B', which is ignored. */ - if (*rate == 'B') - ++rate; + /* The baudrate number can be preceded by a 'B', which is ignored. */ + if (*rate == 'B') + ++rate; - for (sp = speeds; sp->string; ++sp) { - if (!CaselessCmp(rate, sp->string)) { - found = TRUE; - break; - } + for (sp = speeds; sp->string; ++sp) { + if (!CaselessCmp(rate, sp->string)) { + found = TRUE; + break; } - if (!found) - err("unknown baud rate %s", rate); - return (sp->speed); + } + if (!found) + err("unknown baud rate %s", rate); + return (sp->speed); } /* @@ -327,110 +322,111 @@ tbaudrate(char *rate) static void add_mapping(const char *port, char *arg) { - MAP *mapp; - char *copy, *p; - const char *termp; - char *base = 0; - - copy = strdup(arg); - mapp = malloc(sizeof(MAP)); - if (copy == 0 || mapp == 0) - failed("malloc"); - mapp->next = 0; - if (maplist == 0) - cur = maplist = mapp; - else { - cur->next = mapp; - cur = mapp; - } - - mapp->porttype = arg; - mapp->conditional = 0; - - arg = strpbrk(arg, "><@=!:"); - - if (arg == 0) { /* [?]term */ - mapp->type = mapp->porttype; - mapp->porttype = 0; - goto done; - } - - if (arg == mapp->porttype) /* [><@=! baud]:term */ - termp = mapp->porttype = 0; - else - termp = base = arg; - - for (;; ++arg) /* Optional conditionals. */ - switch(*arg) { - case '<': - if (mapp->conditional & GT) - goto badmopt; - mapp->conditional |= LT; - break; - case '>': - if (mapp->conditional & LT) - goto badmopt; - mapp->conditional |= GT; - break; - case '@': - case '=': /* Not documented. */ - mapp->conditional |= EQ; - break; - case '!': - mapp->conditional |= NOT; - break; - default: - goto next; - } - -next: if (*arg == ':') { - if (mapp->conditional) - goto badmopt; - ++arg; - } else { /* Optional baudrate. */ - arg = strchr(p = arg, ':'); - if (arg == 0) - goto badmopt; - *arg++ = '\0'; - mapp->speed = tbaudrate(p); - } - - if (arg == (char *)0) /* Non-optional type. */ + MAP *mapp; + char *copy, *p; + const char *termp; + char *base = 0; + + copy = strdup(arg); + mapp = malloc(sizeof(MAP)); + if (copy == 0 || mapp == 0) + failed("malloc"); + mapp->next = 0; + if (maplist == 0) + cur = maplist = mapp; + else { + cur->next = mapp; + cur = mapp; + } + + mapp->porttype = arg; + mapp->conditional = 0; + + arg = strpbrk(arg, "><@=!:"); + + if (arg == 0) { /* [?]term */ + mapp->type = mapp->porttype; + mapp->porttype = 0; + goto done; + } + + if (arg == mapp->porttype) /* [><@=! baud]:term */ + termp = mapp->porttype = 0; + else + termp = base = arg; + + for (;; ++arg) { /* Optional conditionals. */ + switch (*arg) { + case '<': + if (mapp->conditional & GT) goto badmopt; - - mapp->type = arg; - - /* Terminate porttype, if specified. */ - if (termp != 0) - *base = '\0'; - - /* If a NOT conditional, reverse the test. */ - if (mapp->conditional & NOT) - mapp->conditional = ~mapp->conditional & (EQ | GT | LT); - - /* If user specified a port with an option flag, set it. */ -done: if (port) { - if (mapp->porttype) -badmopt: err("illegal -m option format: %s", copy); - mapp->porttype = port; + mapp->conditional |= LT; + break; + case '>': + if (mapp->conditional & LT) + goto badmopt; + mapp->conditional |= GT; + break; + case '@': + case '=': /* Not documented. */ + mapp->conditional |= EQ; + break; + case '!': + mapp->conditional |= NOT; + break; + default: + goto next; } - + } + + next: + if (*arg == ':') { + if (mapp->conditional) + goto badmopt; + ++arg; + } else { /* Optional baudrate. */ + arg = strchr(p = arg, ':'); + if (arg == 0) + goto badmopt; + *arg++ = '\0'; + mapp->speed = tbaudrate(p); + } + + if (arg == (char *) 0) /* Non-optional type. */ + goto badmopt; + + mapp->type = arg; + + /* Terminate porttype, if specified. */ + if (termp != 0) + *base = '\0'; + + /* If a NOT conditional, reverse the test. */ + if (mapp->conditional & NOT) + mapp->conditional = ~mapp->conditional & (EQ | GT | LT); + + /* If user specified a port with an option flag, set it. */ + done:if (port) { + if (mapp->porttype) + badmopt:err("illegal -m option format: %s", copy); + mapp->porttype = port; + } #ifdef MAPDEBUG - (void)printf("port: %s\n", mapp->porttype ? mapp->porttype : "ANY"); - (void)printf("type: %s\n", mapp->type); - (void)printf("conditional: "); - p = ""; - if (mapp->conditional & GT) { - (void)printf("GT"); - p = "/"; - } - if (mapp->conditional & EQ) { - (void)printf("%sEQ", p); - p = "/"; - } - if (mapp->conditional & LT) - (void)printf("%sLT", p); - (void)printf("\nspeed: %d\n", mapp->speed); + (void) printf("port: %s\n", mapp->porttype ? mapp->porttype : "ANY"); + (void) printf("type: %s\n", mapp->type); + (void) printf("conditional: "); + p = ""; + if (mapp->conditional & GT) { + (void) printf("GT"); + p = "/"; + } + if (mapp->conditional & EQ) { + (void) printf("%sEQ", p); + p = "/"; + } + if (mapp->conditional & LT) + (void) printf("%sLT", p); + (void) printf("\nspeed: %d\n", mapp->speed); #endif } @@ -442,38 +438,38 @@ badmopt: err("illegal -m option format: %s", copy); static const char * mapped(const char *type) { - MAP *mapp; - int match; - - for (mapp = maplist; mapp; mapp = mapp->next) - if (mapp->porttype == 0 || !strcmp(mapp->porttype, type)) { - switch (mapp->conditional) { - case 0: /* No test specified. */ - match = TRUE; - break; - case EQ: - match = (ospeed == mapp->speed); - break; - case GE: - match = (ospeed >= mapp->speed); - break; - case GT: - match = (ospeed > mapp->speed); - break; - case LE: - match = (ospeed <= mapp->speed); - break; - case LT: - match = (ospeed < mapp->speed); - break; - default: - match = FALSE; - } - if (match) - return (mapp->type); - } - /* No match found; return given type. */ - return (type); + MAP *mapp; + int match; + + for (mapp = maplist; mapp; mapp = mapp->next) + if (mapp->porttype == 0 || !strcmp(mapp->porttype, type)) { + switch (mapp->conditional) { + case 0: /* No test specified. */ + match = TRUE; + break; + case EQ: + match = (ospeed == mapp->speed); + break; + case GE: + match = (ospeed >= mapp->speed); + break; + case GT: + match = (ospeed > mapp->speed); + break; + case LE: + match = (ospeed <= mapp->speed); + break; + case LT: + match = (ospeed < mapp->speed); + break; + default: + match = FALSE; + } + if (match) + return (mapp->type); + } + /* No match found; return given type. */ + return (type); } /************************************************************************** @@ -489,118 +485,120 @@ mapped(const char *type) static const char * get_termcap_entry(char *userarg) { - int rval, errret; - char *p; - const char *ttype; + int rval, errret; + char *p; + const char *ttype; #if HAVE_GETTTYNAM - struct ttyent *t; + struct ttyent *t; #else - FILE *fp; + FILE *fp; #endif - char *ttypath; + char *ttypath; - if (userarg) { - ttype = userarg; - goto found; - } + if (userarg) { + ttype = userarg; + goto found; + } - /* Try the environment. */ - if ((ttype = getenv("TERM")) != 0) - goto map; + /* Try the environment. */ + if ((ttype = getenv("TERM")) != 0) + goto map; - if ((ttypath = ttyname(STDERR_FILENO)) != 0) { - if ((p = strrchr(ttypath, '/')) != 0) - ++p; - else - p = ttypath; + if ((ttypath = ttyname(STDERR_FILENO)) != 0) { + if ((p = strrchr(ttypath, '/')) != 0) + ++p; + else + p = ttypath; #if HAVE_GETTTYNAM - /* - * We have the 4.3BSD library call getttynam(3); that means - * there's an /etc/ttys to look up device-to-type mappings in. - * Try ttyname(3); check for dialup or other mapping. - */ - if ((t = getttynam(p))) { - ttype = t->ty_type; - goto map; - } + /* + * We have the 4.3BSD library call getttynam(3); that means + * there's an /etc/ttys to look up device-to-type mappings in. + * Try ttyname(3); check for dialup or other mapping. + */ + if ((t = getttynam(p))) { + ttype = t->ty_type; + goto map; + } #else - if ((fp = fopen("/etc/ttytype", "r")) != 0 - || (fp = fopen("/etc/ttys", "r")) != 0) { - char buffer[BUFSIZ]; - char *s, *t, *d; - - while (fgets(buffer, sizeof(buffer)-1, fp) != 0) { - for (s = buffer, t = d = 0; *s; s++) { - if (isspace(*s)) - *s = '\0'; - else if (t == 0) - t = s; - else if (d == 0 && s != buffer && s[-1] == '\0') - d = s; - } - if (t != 0 && d != 0 && !strcmp(d,p)) { - ttype = strdup(t); - fclose(fp); - goto map; - } - } - fclose(fp); + if ((fp = fopen("/etc/ttytype", "r")) != 0 + || (fp = fopen("/etc/ttys", "r")) != 0) { + char buffer[BUFSIZ]; + char *s, *t, *d; + + while (fgets(buffer, sizeof(buffer) - 1, fp) != 0) { + for (s = buffer, t = d = 0; *s; s++) { + if (isspace(*s)) + *s = '\0'; + else if (t == 0) + t = s; + else if (d == 0 && s != buffer && s[-1] == '\0') + d = s; } -#endif /* HAVE_GETTTYNAM */ + if (t != 0 && d != 0 && !strcmp(d, p)) { + ttype = strdup(t); + fclose(fp); + goto map; + } + } + fclose(fp); } +#endif /* HAVE_GETTTYNAM */ + } - /* If still undefined, use "unknown". */ - ttype = "unknown"; + /* If still undefined, use "unknown". */ + ttype = "unknown"; -map: ttype = mapped(ttype); + map:ttype = mapped(ttype); - /* - * If not a path, remove TERMCAP from the environment so we get a - * real entry from /etc/termcap. This prevents us from being fooled - * by out of date stuff in the environment. + /* + * If not a path, remove TERMCAP from the environment so we get a + * real entry from /etc/termcap. This prevents us from being fooled + * by out of date stuff in the environment. + */ + found:if ((p = getenv("TERMCAP")) != 0 && *p != '/') { + /* 'unsetenv("TERMCAP")' is not portable. + * The 'environ' array is better. */ -found: if ((p = getenv("TERMCAP")) != 0 && *p != '/') { - /* 'unsetenv("TERMCAP")' is not portable. - * The 'environ' array is better. - */ - int n; - for (n = 0; environ[n] != 0; n++) { - if (!strncmp("TERMCAP=", environ[n], 8)) { - while ((environ[n] = environ[n+1]) != 0) { - n++; - } - break; - } + int n; + for (n = 0; environ[n] != 0; n++) { + if (!strncmp("TERMCAP=", environ[n], 8)) { + while ((environ[n] = environ[n + 1]) != 0) { + n++; } + break; + } } - - /* - * ttype now contains a pointer to the type of the terminal. - * If the first character is '?', ask the user. - */ - if (ttype[0] == '?') { - if (ttype[1] != '\0') - ttype = askuser(ttype + 1); - else - ttype = askuser(0); - } - /* Find the terminfo entry. If it doesn't exist, ask the user. */ - while ((rval = setupterm((NCURSES_CONST char *)ttype, STDOUT_FILENO, &errret)) != OK) { - if (errret == 0) { - (void)fprintf(stderr, "tset: unknown terminal type %s\n", - ttype); - ttype = 0; - } - else { - (void)fprintf(stderr, "tset: can't initialize terminal type %s (error %d)\n", ttype, errret); - ttype = 0; - } - ttype = askuser(ttype); + } + + /* + * ttype now contains a pointer to the type of the terminal. + * If the first character is '?', ask the user. + */ + if (ttype[0] == '?') { + if (ttype[1] != '\0') + ttype = askuser(ttype + 1); + else + ttype = askuser(0); + } + /* Find the terminfo entry. If it doesn't exist, ask the user. */ + while ((rval = setupterm((NCURSES_CONST char *) ttype, STDOUT_FILENO, + &errret)) != OK) { + if (errret == 0) { + (void) fprintf(stderr, "tset: unknown terminal type %s\n", + ttype); + ttype = 0; + } else { + (void) fprintf(stderr, + "tset: can't initialize terminal type %s (error %d)\n", + ttype, errret); + ttype = 0; } + ttype = askuser(ttype); + } #if BROKEN_LINKER - tgetflag("am"); /* force lib_termcap.o to be linked for 'ospeed' */ + tgetflag("am"); /* force lib_termcap.o to be linked for 'ospeed' */ #endif - return (ttype); + return (ttype); } /************************************************************************** @@ -637,7 +635,7 @@ found: if ((p = getenv("TERMCAP")) != 0 && *p != '/') { #define CHK(val, dft) ((int)val <= 0 ? dft : val) -static bool set_tabs (void); +static bool set_tabs(void); /* * Reset the terminal mode bits to a sensible state. Very useful after @@ -647,115 +645,115 @@ static void reset_mode(void) { #ifdef TERMIOS - tcgetattr(STDERR_FILENO, &mode); + tcgetattr(STDERR_FILENO, &mode); #else - stty(STDERR_FILENO,&mode); + stty(STDERR_FILENO, &mode); #endif #ifdef TERMIOS #if defined(VDISCARD) && defined(CDISCARD) - mode.c_cc[VDISCARD] = CHK(mode.c_cc[VDISCARD], CDISCARD); + mode.c_cc[VDISCARD] = CHK(mode.c_cc[VDISCARD], CDISCARD); #endif - mode.c_cc[VEOF] = CHK(mode.c_cc[VEOF], CEOF); - mode.c_cc[VERASE] = CHK(mode.c_cc[VERASE], CERASE); + mode.c_cc[VEOF] = CHK(mode.c_cc[VEOF], CEOF); + mode.c_cc[VERASE] = CHK(mode.c_cc[VERASE], CERASE); #if defined(VFLUSH) && defined(CFLUSH) - mode.c_cc[VFLUSH] = CHK(mode.c_cc[VFLUSH], CFLUSH); + mode.c_cc[VFLUSH] = CHK(mode.c_cc[VFLUSH], CFLUSH); #endif - mode.c_cc[VINTR] = CHK(mode.c_cc[VINTR], CINTR); - mode.c_cc[VKILL] = CHK(mode.c_cc[VKILL], CKILL); + mode.c_cc[VINTR] = CHK(mode.c_cc[VINTR], CINTR); + mode.c_cc[VKILL] = CHK(mode.c_cc[VKILL], CKILL); #if defined(VLNEXT) && defined(CLNEXT) - mode.c_cc[VLNEXT] = CHK(mode.c_cc[VLNEXT], CLNEXT); + mode.c_cc[VLNEXT] = CHK(mode.c_cc[VLNEXT], CLNEXT); #endif - mode.c_cc[VQUIT] = CHK(mode.c_cc[VQUIT], CQUIT); + mode.c_cc[VQUIT] = CHK(mode.c_cc[VQUIT], CQUIT); #if defined(VREPRINT) && defined(CRPRNT) - mode.c_cc[VREPRINT] = CHK(mode.c_cc[VREPRINT], CRPRNT); + mode.c_cc[VREPRINT] = CHK(mode.c_cc[VREPRINT], CRPRNT); #endif #if defined(VSTART) && defined(CSTART) - mode.c_cc[VSTART] = CHK(mode.c_cc[VSTART], CSTART); + mode.c_cc[VSTART] = CHK(mode.c_cc[VSTART], CSTART); #endif #if defined(VSTOP) && defined(CSTOP) - mode.c_cc[VSTOP] = CHK(mode.c_cc[VSTOP], CSTOP); + mode.c_cc[VSTOP] = CHK(mode.c_cc[VSTOP], CSTOP); #endif #if defined(VSUSP) && defined(CSUSP) - mode.c_cc[VSUSP] = CHK(mode.c_cc[VSUSP], CSUSP); + mode.c_cc[VSUSP] = CHK(mode.c_cc[VSUSP], CSUSP); #endif #if defined(VWERASE) && defined(CWERASE) - mode.c_cc[VWERASE] = CHK(mode.c_cc[VWERASE], CWERASE); + mode.c_cc[VWERASE] = CHK(mode.c_cc[VWERASE], CWERASE); #endif - mode.c_iflag &= ~(IGNBRK | PARMRK | INPCK | ISTRIP | INLCR | IGNCR + mode.c_iflag &= ~(IGNBRK | PARMRK | INPCK | ISTRIP | INLCR | IGNCR #ifdef IUCLC - | IUCLC + | IUCLC #endif #ifdef IXANY - | IXANY + | IXANY #endif - | IXOFF); + | IXOFF); - mode.c_iflag |= (BRKINT | IGNPAR | ICRNL | IXON + mode.c_iflag |= (BRKINT | IGNPAR | ICRNL | IXON #ifdef IMAXBEL - | IMAXBEL + | IMAXBEL #endif - ); + ); - mode.c_oflag &= ~(0 + mode.c_oflag &= ~(0 #ifdef OLCUC - | OLCUC + | OLCUC #endif #ifdef OCRNL - | OCRNL + | OCRNL #endif #ifdef ONOCR - | ONOCR + | ONOCR #endif #ifdef ONLRET - | ONLRET + | ONLRET #endif #ifdef OFILL - | OFILL + | OFILL #endif #ifdef OFDEL - | OFDEL + | OFDEL #endif #ifdef NLDLY - | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY + | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY #endif - ); + ); - mode.c_oflag |= (OPOST + mode.c_oflag |= (OPOST #ifdef ONLCR - | ONLCR + | ONLCR #endif - ); + ); - mode.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CLOCAL); - mode.c_cflag |= (CS8 | CREAD); - mode.c_lflag &= ~(ECHONL | NOFLSH + mode.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CLOCAL); + mode.c_cflag |= (CS8 | CREAD); + mode.c_lflag &= ~(ECHONL | NOFLSH #ifdef TOSTOP - | TOSTOP + | TOSTOP #endif #ifdef ECHOPTR - | ECHOPRT + | ECHOPRT #endif #ifdef XCASE - | XCASE + | XCASE #endif - ); + ); - mode.c_lflag |= (ISIG | ICANON | ECHO | ECHOE | ECHOK + mode.c_lflag |= (ISIG | ICANON | ECHO | ECHOE | ECHOK #ifdef ECHOCTL - | ECHOCTL + | ECHOCTL #endif #ifdef ECHOKE - | ECHOKE + | ECHOKE #endif - ); + ); #endif #ifdef TERMIOS - tcsetattr(STDERR_FILENO, TCSADRAIN, &mode); + tcsetattr(STDERR_FILENO, TCSADRAIN, &mode); #else - stty(STDERR_FILENO, &mode); + stty(STDERR_FILENO, &mode); #endif } @@ -766,16 +764,16 @@ reset_mode(void) static int default_erase(void) { - int result; + int result; - if (over_strike - && key_backspace != 0 - && strlen(key_backspace) == 1) - result = key_backspace[0]; - else - result = CERASE; + if (over_strike + && key_backspace != 0 + && strlen(key_backspace) == 1) + result = key_backspace[0]; + else + result = CERASE; - return result; + return result; } /* @@ -789,14 +787,14 @@ static void set_control_chars(void) { #ifdef TERMIOS - if (mode.c_cc[VERASE] == 0 || terasechar >= 0) - mode.c_cc[VERASE] = terasechar >= 0 ? terasechar : default_erase(); + if (mode.c_cc[VERASE] == 0 || terasechar >= 0) + mode.c_cc[VERASE] = terasechar >= 0 ? terasechar : default_erase(); - if (mode.c_cc[VINTR] == 0 || intrchar >= 0) - mode.c_cc[VINTR] = intrchar >= 0 ? intrchar : CINTR; + if (mode.c_cc[VINTR] == 0 || intrchar >= 0) + mode.c_cc[VINTR] = intrchar >= 0 ? intrchar : CINTR; - if (mode.c_cc[VKILL] == 0 || tkillchar >= 0) - mode.c_cc[VKILL] = tkillchar >= 0 ? tkillchar : CKILL; + if (mode.c_cc[VKILL] == 0 || tkillchar >= 0) + mode.c_cc[VKILL] = tkillchar >= 0 ? tkillchar : CKILL; #endif } @@ -810,62 +808,62 @@ static void set_conversions(void) { #ifdef __OBSOLETE__ - /* - * Conversion logic for some *really* ancient terminal glitches, - * not supported in terminfo. Left here for succeeding generations - * to marvel at. - */ - if (tgetflag("UC")) { + /* + * Conversion logic for some *really* ancient terminal glitches, + * not supported in terminfo. Left here for succeeding generations + * to marvel at. + */ + if (tgetflag("UC")) { #ifdef IUCLC - mode.c_iflag |= IUCLC; - mode.c_oflag |= OLCUC; + mode.c_iflag |= IUCLC; + mode.c_oflag |= OLCUC; #endif - } else if (tgetflag("LC")) { + } else if (tgetflag("LC")) { #ifdef IUCLC - mode.c_iflag &= ~IUCLC; - mode.c_oflag &= ~OLCUC; + mode.c_iflag &= ~IUCLC; + mode.c_oflag &= ~OLCUC; #endif - } - mode.c_iflag &= ~(PARMRK | INPCK); - mode.c_lflag |= ICANON; - if (tgetflag("EP")) { - mode.c_cflag |= PARENB; - mode.c_cflag &= ~PARODD; - } - if (tgetflag("OP")) { - mode.c_cflag |= PARENB; - mode.c_cflag |= PARODD; - } + } + mode.c_iflag &= ~(PARMRK | INPCK); + mode.c_lflag |= ICANON; + if (tgetflag("EP")) { + mode.c_cflag |= PARENB; + mode.c_cflag &= ~PARODD; + } + if (tgetflag("OP")) { + mode.c_cflag |= PARENB; + mode.c_cflag |= PARODD; + } #endif /* __OBSOLETE__ */ #ifdef TERMIOS #ifdef ONLCR - mode.c_oflag |= ONLCR; + mode.c_oflag |= ONLCR; #endif - mode.c_iflag |= ICRNL; - mode.c_lflag |= ECHO; + mode.c_iflag |= ICRNL; + mode.c_lflag |= ECHO; #ifdef OXTABS - mode.c_oflag |= OXTABS; + mode.c_oflag |= OXTABS; #endif /* OXTABS */ - /* test used to be tgetflag("NL") */ - if (newline != (char *)0 && newline[0] == '\n' && !newline[1]) { - /* Newline, not linefeed. */ + /* test used to be tgetflag("NL") */ + if (newline != (char *) 0 && newline[0] == '\n' && !newline[1]) { + /* Newline, not linefeed. */ #ifdef ONLCR - mode.c_oflag &= ~ONLCR; + mode.c_oflag &= ~ONLCR; #endif - mode.c_iflag &= ~ICRNL; - } + mode.c_iflag &= ~ICRNL; + } #ifdef __OBSOLETE__ - if (tgetflag("HD")) /* Half duplex. */ - mode.c_lflag &= ~ECHO; + if (tgetflag("HD")) /* Half duplex. */ + mode.c_lflag &= ~ECHO; #endif /* __OBSOLETE__ */ #ifdef OXTABS - /* test used to be tgetflag("pt") */ - if (has_hardware_tabs) /* Print tabs. */ - mode.c_oflag &= ~OXTABS; + /* test used to be tgetflag("pt") */ + if (has_hardware_tabs) /* Print tabs. */ + mode.c_oflag &= ~OXTABS; #endif /* OXTABS */ - mode.c_lflag |= (ECHOE | ECHOK); + mode.c_lflag |= (ECHOE | ECHOK); #endif } @@ -873,45 +871,45 @@ set_conversions(void) static void set_init(void) { - char *p; - bool settle; + char *p; + bool settle; #ifdef __OBSOLETE__ - if (pad_char != (char *)0) /* Get/set pad character. */ - PC = pad_char[0]; + if (pad_char != (char *) 0) /* Get/set pad character. */ + PC = pad_char[0]; #endif /* OBSOLETE */ #ifdef TAB3 - if (oldmode.c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) { - oldmode.c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET); - tcsetattr(STDERR_FILENO, TCSADRAIN, &oldmode); - } + if (oldmode.c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) { + oldmode.c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET); + tcsetattr(STDERR_FILENO, TCSADRAIN, &oldmode); + } #endif - settle = set_tabs(); + settle = set_tabs(); - if (isreset) { - if ((p = reset_1string) != 0) { - tputs(p, 0, outc); - settle = TRUE; - } - if ((p = reset_2string) != 0) { - tputs(p, 0, outc); - settle = TRUE; - } - /* What about rf, rs3, as per terminfo man page? */ - /* also might be nice to send rmacs, rmul, rmm */ - if ((p = reset_file) != 0 - || (p = init_file) != 0) { - cat(p); - settle = TRUE; - } + if (isreset) { + if ((p = reset_1string) != 0) { + tputs(p, 0, outc); + settle = TRUE; } - - if (settle) { - (void)putc('\r', stderr); - (void)fflush(stderr); - (void)napms(1000); /* Settle the terminal. */ + if ((p = reset_2string) != 0) { + tputs(p, 0, outc); + settle = TRUE; + } + /* What about rf, rs3, as per terminfo man page? */ + /* also might be nice to send rmacs, rmul, rmm */ + if ((p = reset_file) != 0 + || (p = init_file) != 0) { + cat(p); + settle = TRUE; } + } + + if (settle) { + (void) putc('\r', stderr); + (void) fflush(stderr); + (void) napms(1000); /* Settle the terminal. */ + } } /* @@ -923,28 +921,28 @@ set_init(void) static bool set_tabs() { - if (set_tab && clear_all_tabs) { - int c; - - (void)putc('\r', stderr); /* Force to left margin. */ - tputs(clear_all_tabs, 0, outc); - - for (c = 8; c < tcolumns; c += 8) { - /* Get to the right column. In BSD tset, this - * used to try a bunch of half-clever things - * with cup and hpa, for an average saving of - * somewhat less than two character times per - * tab stop, less that .01 sec at 2400cps. We - * lost all this cruft because it seemed to be - * introducing some odd bugs. - * ----------12345678----------- */ - (void)fputs(" ", stderr); - tputs(set_tab, 0, outc); - } - putc('\r', stderr); - return (TRUE); + if (set_tab && clear_all_tabs) { + int c; + + (void) putc('\r', stderr); /* Force to left margin. */ + tputs(clear_all_tabs, 0, outc); + + for (c = 8; c < tcolumns; c += 8) { + /* Get to the right column. In BSD tset, this + * used to try a bunch of half-clever things + * with cup and hpa, for an average saving of + * somewhat less than two character times per + * tab stop, less that .01 sec at 2400cps. We + * lost all this cruft because it seemed to be + * introducing some odd bugs. + * ----------12345678----------- */ + (void) fputs(" ", stderr); + tputs(set_tab, 0, outc); } - return (FALSE); + putc('\r', stderr); + return (TRUE); + } + return (FALSE); } /************************************************************************** @@ -960,32 +958,32 @@ static void report(const char *name, int which, unsigned def) { #ifdef TERMIOS - unsigned older, newer; - char *p; - - newer = mode.c_cc[which]; - older = oldmode.c_cc[which]; - - if (older == newer && older == def) - return; - - (void)fprintf(stderr, "%s %s ", name, older == newer ? "is" : "set to"); - - /* - * Check 'delete' before 'backspace', since the key_backspace value - * is ambiguous. - */ - if (newer == 0177) - (void)fprintf(stderr, "delete.\n"); - else if ((p = key_backspace) != 0 - && newer == (unsigned char)p[0] - && p[1] == '\0') - (void)fprintf(stderr, "backspace.\n"); - else if (newer < 040) { - newer ^= 0100; - (void)fprintf(stderr, "control-%c (^%c).\n", newer, newer); - } else - (void)fprintf(stderr, "%c.\n", newer); + unsigned older, newer; + char *p; + + newer = mode.c_cc[which]; + older = oldmode.c_cc[which]; + + if (older == newer && older == def) + return; + + (void) fprintf(stderr, "%s %s ", name, older == newer ? "is" : "set to"); + + /* + * Check 'delete' before 'backspace', since the key_backspace value + * is ambiguous. + */ + if (newer == 0177) + (void) fprintf(stderr, "delete.\n"); + else if ((p = key_backspace) != 0 + && newer == (unsigned char) p[0] + && p[1] == '\0') + (void) fprintf(stderr, "backspace.\n"); + else if (newer < 040) { + newer ^= 0100; + (void) fprintf(stderr, "control-%c (^%c).\n", newer, newer); + } else + (void) fprintf(stderr, "%c.\n", newer); #endif } @@ -996,205 +994,206 @@ report(const char *name, int which, unsigned def) static void obsolete(char **argv) { - for (; *argv; ++argv) { - char *parm = argv[0]; + for (; *argv; ++argv) { + char *parm = argv[0]; - if (parm[0] == '-' && parm[1] == '\0') - { - argv[0] = strdup("-q"); - continue; - } + if (parm[0] == '-' && parm[1] == '\0') { + argv[0] = strdup("-q"); + continue; + } - if ((parm[0] != '-') - || (argv[1] && argv[1][0] != '-') - || (parm[1] != 'e' && parm[1] != 'i' && parm[1] != 'k') - || (parm[2] != '\0')) - continue; - switch(argv[0][1]) { - case 'e': - argv[0] = strdup("-e^H"); - break; - case 'i': - argv[0] = strdup("-i^C"); - break; - case 'k': - argv[0] = strdup("-k^U"); - break; - } + if ((parm[0] != '-') + || (argv[1] && argv[1][0] != '-') + || (parm[1] != 'e' && parm[1] != 'i' && parm[1] != 'k') + || (parm[2] != '\0')) + continue; + switch (argv[0][1]) { + case 'e': + argv[0] = strdup("-e^H"); + break; + case 'i': + argv[0] = strdup("-i^C"); + break; + case 'k': + argv[0] = strdup("-k^U"); + break; } + } } static void -usage(const char* pname) +usage(const char *pname) { - (void)fprintf(stderr, -"usage: %s [-IQrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]\n", pname); - exit(EXIT_FAILURE); + (void) fprintf(stderr, + "usage: %s [-IQrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]\n", pname); + exit(EXIT_FAILURE); } -static char arg_to_char(void) +static char +arg_to_char(void) { - return (optarg[0] == '^' && optarg[1] != '\0') - ? ((optarg[1] == '?') ? '\177' : CTRL(optarg[1])) - : optarg[0]; + return (optarg[0] == '^' && optarg[1] != '\0') + ? ((optarg[1] == '?') ? '\177' : CTRL(optarg[1])) + : optarg[0]; } int main(int argc, char **argv) { #if defined(TIOCGWINSZ) && defined(TIOCSWINSZ) - struct winsize win; + struct winsize win; #endif - int ch, noinit, noset, quiet, Sflag, sflag, showterm; - const char *p; - const char *ttype; + int ch, noinit, noset, quiet, Sflag, sflag, showterm; + const char *p; + const char *ttype; #ifdef TERMIOS - if (tcgetattr(STDERR_FILENO, &mode) < 0) - failed("standard error"); + if (tcgetattr(STDERR_FILENO, &mode) < 0) + failed("standard error"); - oldmode = mode; - ospeed = cfgetospeed(&mode); + oldmode = mode; + ospeed = cfgetospeed(&mode); #else - if (gtty(STDERR_FILENO, &mode) < 0) - failed("standard error"); + if (gtty(STDERR_FILENO, &mode) < 0) + failed("standard error"); - oldmode = mode; - ospeed = mode.sg_ospeed; + oldmode = mode; + ospeed = mode.sg_ospeed; #endif - if ((p = strrchr(*argv, '/')) != 0) - ++p; - else - p = *argv; - if (!CaselessCmp(p, "reset")) { - isreset = 1; - reset_mode(); - } - - obsolete(argv); - noinit = noset = quiet = Sflag = sflag = showterm = 0; - while ((ch = getopt(argc, argv, "a:d:e:Ii:k:m:np:qQSrs")) != EOF) { - switch (ch) { - case 'q': /* display term only */ - noset = 1; - break; - case 'a': /* OBSOLETE: map identifier to type */ - add_mapping("arpanet", optarg); - break; - case 'd': /* OBSOLETE: map identifier to type */ - add_mapping("dialup", optarg); - break; - case 'e': /* erase character */ - terasechar = arg_to_char(); - break; - case 'I': /* no initialization strings */ - noinit = 1; - break; - case 'i': /* interrupt character */ - intrchar = arg_to_char(); - break; - case 'k': /* kill character */ - tkillchar = arg_to_char(); - break; - case 'm': /* map identifier to type */ - add_mapping(0, optarg); - break; - case 'n': /* OBSOLETE: set new tty driver */ - break; - case 'p': /* OBSOLETE: map identifier to type */ - add_mapping("plugboard", optarg); - break; - case 'Q': /* don't output control key settings */ - quiet = 1; - break; - case 'S': /* OBSOLETE: output TERM & TERMCAP */ - Sflag = 1; - break; - case 'r': /* display term on stderr */ - showterm = 1; - break; - case 's': /* output TERM set command */ - sflag = 1; - break; - case '?': - default: - usage(*argv); - } + if ((p = strrchr(*argv, '/')) != 0) + ++p; + else + p = *argv; + if (!CaselessCmp(p, "reset")) { + isreset = 1; + reset_mode(); + } + + obsolete(argv); + noinit = noset = quiet = Sflag = sflag = showterm = 0; + while ((ch = getopt(argc, argv, "a:d:e:Ii:k:m:np:qQSrs")) != EOF) { + switch (ch) { + case 'q': /* display term only */ + noset = 1; + break; + case 'a': /* OBSOLETE: map identifier to type */ + add_mapping("arpanet", optarg); + break; + case 'd': /* OBSOLETE: map identifier to type */ + add_mapping("dialup", optarg); + break; + case 'e': /* erase character */ + terasechar = arg_to_char(); + break; + case 'I': /* no initialization strings */ + noinit = 1; + break; + case 'i': /* interrupt character */ + intrchar = arg_to_char(); + break; + case 'k': /* kill character */ + tkillchar = arg_to_char(); + break; + case 'm': /* map identifier to type */ + add_mapping(0, optarg); + break; + case 'n': /* OBSOLETE: set new tty driver */ + break; + case 'p': /* OBSOLETE: map identifier to type */ + add_mapping("plugboard", optarg); + break; + case 'Q': /* don't output control key settings */ + quiet = 1; + break; + case 'S': /* OBSOLETE: output TERM & TERMCAP */ + Sflag = 1; + break; + case 'r': /* display term on stderr */ + showterm = 1; + break; + case 's': /* output TERM set command */ + sflag = 1; + break; + case '?': + default: + usage(*argv); } - argc -= optind; - argv += optind; + } + argc -= optind; + argv += optind; - if (argc > 1) - usage(*argv); + if (argc > 1) + usage(*argv); - ttype = get_termcap_entry(*argv); + ttype = get_termcap_entry(*argv); - if (!noset) { - tcolumns = columns; - tlines = lines; + if (!noset) { + tcolumns = columns; + tlines = lines; #if defined(TIOCGWINSZ) && defined(TIOCSWINSZ) - /* Set window size */ - (void)ioctl(STDERR_FILENO, TIOCGWINSZ, &win); - if (win.ws_row == 0 && win.ws_col == 0 && - tlines > 0 && tcolumns > 0) { - win.ws_row = tlines; - win.ws_col = tcolumns; - (void)ioctl(STDERR_FILENO, TIOCSWINSZ, &win); - } + /* Set window size */ + (void) ioctl(STDERR_FILENO, TIOCGWINSZ, &win); + if (win.ws_row == 0 && win.ws_col == 0 && + tlines > 0 && tcolumns > 0) { + win.ws_row = tlines; + win.ws_col = tcolumns; + (void) ioctl(STDERR_FILENO, TIOCSWINSZ, &win); + } #endif - set_control_chars(); - set_conversions(); + set_control_chars(); + set_conversions(); - if (!noinit) - set_init(); + if (!noinit) + set_init(); - /* Set the modes if they've changed. */ - if (memcmp(&mode, &oldmode, sizeof(mode))) + /* Set the modes if they've changed. */ + if (memcmp(&mode, &oldmode, sizeof(mode))) { #ifdef TERMIOS - tcsetattr(STDERR_FILENO, TCSADRAIN, &mode); + tcsetattr(STDERR_FILENO, TCSADRAIN, &mode); #else - stty(STDERR_FILENO, &mode); + stty(STDERR_FILENO, &mode); #endif } + } - /* Get the terminal name from the entry. */ - ttype = _nc_first_name(cur_term->type.term_names); - - if (noset) - (void)printf("%s\n", ttype); - else { - if (showterm) - (void)fprintf(stderr, "Terminal type is %s.\n", ttype); - /* - * If erase, kill and interrupt characters could have been - * modified and not -Q, display the changes. - */ - if (!quiet) { - report("Erase", VERASE, CERASE); - report("Kill", VKILL, CINTR); - report("Interrupt", VINTR, CKILL); - } - } + /* Get the terminal name from the entry. */ + ttype = _nc_first_name(cur_term->type.term_names); - if (Sflag) - err("The -S option is not supported under terminfo."); - - if (sflag) { - /* - * 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")) - p = "set noglob;\nsetenv TERM %s;\nunset noglob;\n"; - else - p = "TERM=%s;\n"; - (void) printf(p, ttype); + if (noset) + (void) printf("%s\n", ttype); + else { + if (showterm) + (void) fprintf(stderr, "Terminal type is %s.\n", ttype); + /* + * If erase, kill and interrupt characters could have been + * modified and not -Q, display the changes. + */ + if (!quiet) { + report("Erase", VERASE, CERASE); + report("Kill", VKILL, CINTR); + report("Interrupt", VINTR, CKILL); } + } + + if (Sflag) + err("The -S option is not supported under terminfo."); + + if (sflag) { + /* + * 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")) + p = "set noglob;\nsetenv TERM %s;\nunset noglob;\n"; + else + p = "TERM=%s;\n"; + (void) printf(p, ttype); + } - return EXIT_SUCCESS; + return EXIT_SUCCESS; } /* tset.c ends here */ diff --git a/shlib-versions b/shlib-versions deleted file mode 100644 index 313d2c2c..00000000 --- a/shlib-versions +++ /dev/null @@ -1,4 +0,0 @@ -.*-.*-linux.* libform=4 -.*-.*-linux.* libmenu=4 -.*-.*-linux.* libncurses=4 -.*-.*-linux.* libpanel=4 diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure index 25d3f06d..e83e0806 100755 --- a/sysdeps/unix/sysv/linux/configure +++ b/sysdeps/unix/sysv/linux/configure @@ -264,7 +264,6 @@ CEOF #define TYPEOF_CHTYPE long #define USE_DATABASE 1 #define USE_HASHMAP 1 -#define USE_SCROLL_HINTS 1 #define USE_LINKS 1 #define NCURSES_NO_PADDING 1 #define USE_SIGWINCH 1 diff --git a/tack/HISTORY b/tack/HISTORY index b1de61d1..3fe2cab0 100644 --- a/tack/HISTORY +++ b/tack/HISTORY @@ -1,6 +1,8 @@ Current history: +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 1999/05/09 Update to build/link on NeXT 1999/04/17 Update to work with ncurses 5.0 beta1 (TERMTYPE struct) @@ -21,7 +23,7 @@ as little of curses as possible. released to USENET in comp.sources. TED was originally written to test both terminfos and termcaps. The original intent was to create a terminfo editor. This code fell quite short of its goal. -Tests were controled by command line switches and editing was done +Tests were controlled by command line switches and editing was done with pen and paper. In 1995 Eric S. Raymond got interested in the program and added diff --git a/tack/Makefile.in b/tack/Makefile.in index 48f4619a..0004447f 100644 --- a/tack/Makefile.in +++ b/tack/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.9 1999/09/18 23:33:48 tom Exp $ +# $Id: Makefile.in,v 1.19 2000/07/08 01:56:35 tom Exp $ # Makefile for tack # # The variable 'srcdir' refers to the source-distribution, and can be set with @@ -24,6 +24,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ +mandir = @mandir@/man1 includedir = @includedir@ datadir = @datadir@ @@ -31,11 +32,13 @@ ticdir = $(datadir)/terminfo INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ AWK = @AWK@ LN_S = @LN_S@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ INCDIR = $(srcdir)/../include @@ -46,30 +49,30 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE CFLAGS_PROFILE = $(CCFLAGS) -pg -CFLAGS_SHARED = $(CCFLAGS) # @CC_SHARED_OPTS@ +CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) LD = @LD@ -LINK = $(CC) +LINK = @LINK_PROGS@ $(CC) LDFLAGS = @EXTRA_LDFLAGS@ \ @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ LDFLAGS_NORMAL = $(LDFLAGS) LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ LDFLAGS_PROFILE = $(LDFLAGS) -pg -LDFLAGS_SHARED = $(LDFLAGS) @CC_SHARED_OPTS@ # @LD_SHARED_OPTS@ +LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) LINT = @LINT@ LINT_OPTS = @LINT_OPTS@ -LINT_LIBS = -lncurses @LIBS@ +LINT_LIBS = -lncurses@LIB_SUFFIX@ @LIBS@ PROGS = tack$x # Default library, for linking applications -DEPS_CURSES = ../lib/libncurses@DFT_DEP_SUFFIX@ +DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@ ################################################################################ all: $(PROGS) @@ -80,16 +83,22 @@ install: install.tack uninstall: uninstall.tack # this line simplifies the configure-script -install.libs: +libs \ +install.libs \ uninstall.libs: -install.tack: $(PROGS) $(INSTALL_PREFIX)$(bindir) - $(INSTALL_PROGRAM) tack$x $(INSTALL_PREFIX)$(bindir)/tack$x +install.tack: $(PROGS) \ + $(INSTALL_PREFIX)$(bindir) \ + $(INSTALL_PREFIX)$(mandir) + $(INSTALL_PROGRAM) tack$x $(INSTALL_PREFIX)$(bindir)/tack$x + $(INSTALL_DATA) $(srcdir)/tack.1 $(INSTALL_PREFIX)$(mandir)/tack.1 uninstall.tack: -@rm -f $(INSTALL_PREFIX)$(bindir)/tack$x + -@rm -f $(INSTALL_PREFIX)$(mandir)/tack.1 -$(INSTALL_PREFIX)$(bindir) : +$(INSTALL_PREFIX)$(bindir) \ +$(INSTALL_PREFIX)$(mandir) : $(srcdir)/../mkinstalldirs $@ # @@ -151,7 +160,7 @@ $(DEPS_CURSES) : cd ../ncurses; $(MAKE) $(CF_MFLAGS) lint: - $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS) + $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/*.c $(LINT_LIBS) ############################################################################### # The remainder of this file is automatically generated during configuration diff --git a/tack/README b/tack/README index c1b0286b..71147042 100644 --- a/tack/README +++ b/tack/README @@ -1,5 +1,14 @@ --- $Id: README,v 1.1 1999/04/18 01:41:31 tom Exp $ +-- $Id: README,v 1.2 2000/03/12 02:39:12 Daniel.Weaver Exp $ -The 'tack' program is distributed with ncurses, but is not an integral -part of ncurses (the two are licensed differently, and the tack directory -may be removed without causing ncurses to configure or build properly). +The 'tack' program is a diagnostic that is designed to create and +verify the correctness of terminfo's. This program can be used to +create new terminal descriptions that are not included in the standard +release. Although 'tack' is distributed with ncurses, it is not an +integral part of ncurses. It may be removed from the release without +limiting the usefulness of ncurses on those terminals described in the +terminfo data base. The best way to remove 'tack' from the build is +to delete or rename the 'tack' directory before running the configure +script. + +Unlike most of ncurses the 'tack' program is covered under the GNU +Public License. diff --git a/tack/ansi.c b/tack/ansi.c index a514a9c1..df7b39f3 100644 --- a/tack/ansi.c +++ b/tack/ansi.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: ansi.c,v 1.2 1999/08/21 23:11:57 tom Exp $") +MODULE_ID("$Id: ansi.c,v 1.5 2000/04/22 21:06:57 tom Exp $") /* * Standalone tests for ANSI terminals. Three entry points: @@ -45,10 +45,9 @@ MODULE_ID("$Id: ansi.c,v 1.2 1999/08/21 23:11:57 tom Exp $") #define MAX_MODES 256 static char default_bank[] = "\033(B\017"; -static int private_use, ape, terminal_class, got_escape; +static int private_use, ape, terminal_class; static short ansi_value[256]; -static char ansi_buf[512], pack_buf[512]; -static char *ach, *pch; +static unsigned char ansi_buf[512], pack_buf[512]; struct ansi_reports { int lvl, final; @@ -71,7 +70,7 @@ static struct ansi_reports report_list[] = { {63, 0, "(DECRQSS) Top and bottom margins", "\033P$qr\033\\"}, {63, 0, "(DECRQSS) Character attributes", "\033P$qm\033\\"}, {63, 0, "(DECRQSS) Illegal request", "\033P$q@\033\\"}, - {63, 0, "(DECRQUPSS) User pref suplemental set", "\033[&u"}, + {63, 0, "(DECRQUPSS) User pref supplemental set", "\033[&u"}, {63, 0, "(DECRQPSR) Cursor information", "\033[1$w"}, {63, 0, "(DECRQPSR) Tab stop information", "\033[2$w"}, {64, 0, "(DA) Tertiary device attributes", "\033[=0c"}, @@ -107,11 +106,11 @@ static const struct request_control rqss[] = { {"\033[0$~\033[1$}", "\033[0$}", 0, 0, 0}, {"Data sent to enabled status line", "1", "$}", 0, 0}, {"\033[2$~\033[1$}", "\033[0$}", 0, 0, 0}, - {"Disbale status line", "0", "$~", "\033[0$~", 0}, + {"Disable status line", "0", "$~", "\033[0$~", 0}, {"Top status line", "1", "$~", "\033[1$~", 0}, {"Bottom status line", "2", "$~", "\033[2$~", 0}, - {"Eraseable character", "0", "\"q", "\033[0\"q", 0}, - {"Noneraseable character", "1", "\"q", "\033[1\"q", "\033[0\"q"}, + {"Erasable character", "0", "\"q", "\033[0\"q", 0}, + {"Nonerasable character", "1", "\"q", "\033[1\"q", "\033[0\"q"}, {"Top and bottom margins", "3;10", "r", "\0337\033[3;10r", 0}, {"\033[r\0338", 0, 0, 0, 0}, {"Top and bottom margins", "default", "r", "\0337\033[r", "\0338"}, @@ -124,48 +123,6 @@ static const struct request_control rqss[] = { {0, 0, 0, 0, 0} }; -/* -** pack_ansi() -** -** read and pack an ANSI character -*/ -static int -pack_ansi(void) -{ - int ch; - - if (*pch) - return *pch++; - - while (1) { - ch = getchp(char_mask); - if (ch == EOF) - return EOF; - if (ch == A_DC1 || ch == A_DC3) - continue; - *ach++ = ch; - *ach = '\0'; - if (got_escape && ch >= ' ') { - got_escape = 0; - if (ch < '@' || ch > '_') { - *pch++ = A_ESC; - *pch = ch; - pch[1] = '\0'; - return A_ESC; - } - ch += 0x40; - break; - } else if (ch == A_ESC) { - got_escape = 1; - } else { - break; - } - } - *pch++ = ch; - *pch = '\0'; - return ch; -} - /* ** read_ansi() @@ -175,34 +132,36 @@ pack_ansi(void) static void read_ansi(void) { - int ch; + int ch, i, j, last_escape; fflush(stdout); - ach = ansi_buf; - pch = pack_buf; - ansi_buf[0] = pack_buf[0] = '\0'; - got_escape = 0; - ch = pack_ansi(); - if (ch == A_ESC) - do { - ch = pack_ansi(); - if (ch == EOF) - return; - } while (ch < '0' || ch > '~'); - else - if (ch == A_CSI) - do { - ch = pack_ansi(); - if (ch == EOF) - return; - } while (ch < '@' || ch > '~'); - else - if (ch == A_DCS) - do { - ch = pack_ansi(); - if (ch == EOF) - return; - } while (ch != A_ST); + read_key(ansi_buf, sizeof(ansi_buf)); + /* Throw away control characters inside CSI sequences. + Convert two character 7-bit sequences into 8-bit sequences. */ + for (i = j = last_escape = 0; (ch = ansi_buf[i]) != 0; i++) { + if (ch == A_ESC) { + if (last_escape == A_ESC) { + pack_buf[j++] = A_ESC; + } + last_escape = A_ESC; + } else + if (last_escape == A_ESC && ch >= '@' && ch <= '_') { + pack_buf[j++] = last_escape = ch + 0x40; + } else + if (last_escape != A_CSI || (ch > 0x20 && ch != 0x80)) { + if (last_escape == A_ESC) { + pack_buf[j++] = A_ESC; + } + if (ch > 0x80 && ch < 0xa0) { + last_escape = ch; + } + pack_buf[j++] = ch; + } + } + if (last_escape == A_ESC) { + pack_buf[j++] = A_ESC; + } + pack_buf[j] = '\0'; return; } @@ -265,11 +224,12 @@ read_reports(void) tc < report_list[i].lvl) { put_crlf(); menu_prompt(); - ptext(" to continue > "); + ptext("/status [q] > "); j = wait_here(); - if (j != 'c' && j != 'C') - return j; + if (j != 'n' && j != 'N') + return 0; tc = report_list[i].lvl; + lc = 1; } else if (lc + 2 >= lines) { put_crlf(); ptext("Hit any key to continue "); @@ -295,15 +255,19 @@ read_reports(void) break; } j = pack_buf[0] & 0xff; - if (j == A_CSI || j == A_DCS) { - s = expand(ansi_buf); - if (char_count + expand_chars >= columns) { - put_str("\r\n "); - lc++; - } - put_str(s); + if (j != A_CSI && j != A_DCS) { + put_crlf(); + s = "*** The above request gives illegal response ***"; + ptext(s); + for (j = strlen(s); j < 49; j++) + putchp(' '); } - put_crlf(); + s = expand(ansi_buf); + if (char_count + expand_chars >= columns) { + put_str("\r\n "); + lc++; + } + putln(s); if (vcr) { /* find out how big the screen is */ tc_putp(report_list[i].request); if (!valid_mode('R')) @@ -324,7 +288,7 @@ read_reports(void) } } menu_prompt(); - ptext(" r->repeat test, to continue > "); + ptext("/status r->repeat test, to continue > "); return wait_here(); } @@ -610,7 +574,7 @@ ansi_report_help(void) ptext("Begin ANSI status report testing. "); ptext(" Parity bit set will be displayed in reverse video. "); ptext(" If the terminal hangs, hit any alphabetic key. "); - ptextln(" Use c to continue testing. Use any other letter to quit."); + ptextln(" Use n to continue testing. Use q to quit."); put_crlf(); } diff --git a/tack/charset.c b/tack/charset.c index c31b78b5..ca0ac6ff 100644 --- a/tack/charset.c +++ b/tack/charset.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 1991, 1997 Free Software Foundation, Inc. +** Copyright (C) 1991, 1997-2000 Free Software Foundation, Inc. ** ** This file is part of TACK. ** @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: charset.c,v 1.2 1999/05/09 18:30:49 tom Exp $") +MODULE_ID("$Id: charset.c,v 1.4 2000/03/04 20:30:52 tom Exp $") /* Menu definitions for alternate character set and SGR tests. @@ -40,7 +40,7 @@ static void charset_smacs(struct test_list *t, int *state, int *ch); static void charset_attributes(struct test_list *t, int *state, int *ch); static void charset_sgr(struct test_list *t, int *state, int *ch); -const struct test_list acs_test_list[] = { +struct test_list acs_test_list[] = { {0, 0, 0, 0, "e) edit terminfo", 0, &edit_menu}, {MENU_NEXT, 3, "bel", 0, 0, charset_bel, 0}, {MENU_NEXT, 3, "flash", 0, 0, charset_flash, 0}, @@ -369,7 +369,7 @@ charset_attributes( /* ** charset_smacs(test_list, status, ch) ** -** display all posible acs characters +** display all possible acs characters ** (smacs) (rmacs) */ static void diff --git a/tack/color.c b/tack/color.c index 710538ae..479081c9 100644 --- a/tack/color.c +++ b/tack/color.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: color.c,v 1.1 1999/04/18 01:24:45 tom Exp $") +MODULE_ID("$Id: color.c,v 1.2 2000/03/04 21:05:54 tom Exp $") /* * Color terminal tests. Has only one entry point: test_color(). @@ -306,7 +306,7 @@ load_palette(int n) static int rainbow(int n) -{ /* print the programable color display */ +{ /* print the programmable color display */ int i, c, d, palette_full, initial_pair; static const struct { const char *name; diff --git a/tack/control.c b/tack/control.c index 4c2158e4..4a85384b 100644 --- a/tack/control.c +++ b/tack/control.c @@ -25,7 +25,7 @@ #include #endif -MODULE_ID("$Id: control.c,v 1.2 1999/06/16 00:45:59 tom Exp $") +MODULE_ID("$Id: control.c,v 1.3 2000/03/04 21:10:59 tom Exp $") /* terminfo test program control subroutines */ @@ -53,14 +53,14 @@ char txt_shorter_augment[80]; /* <) use smaller augment */ int tt_delay_max; /* max number of milliseconds we can delay */ int tt_delay_used; /* number of milliseconds consumed in delay */ const char *tt_cap[TT_MAX]; /* value of string */ -int tt_affected[TT_MAX]; /* lines or columns effected (repitition factor) */ +int tt_affected[TT_MAX]; /* lines or columns effected (repetition factor) */ int tt_count[TT_MAX]; /* Number of times sent */ int tt_delay[TT_MAX]; /* Number of milliseconds delay */ int ttp; /* number of entries used */ /* Saved value of the above data base */ const char *tx_cap[TT_MAX]; /* value of string */ -int tx_affected[TT_MAX]; /* lines or columns effected (repitition factor) */ +int tx_affected[TT_MAX]; /* lines or columns effected (repetition factor) */ int tx_count[TT_MAX]; /* Number of times sent */ int tx_index[TT_MAX]; /* String index */ int tx_delay[TT_MAX]; /* Number of milliseconds delay */ diff --git a/tack/crum.c b/tack/crum.c index 94183635..e66cc05e 100644 --- a/tack/crum.c +++ b/tack/crum.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: crum.c,v 1.2 1999/08/21 23:09:08 tom Exp $") +MODULE_ID("$Id: crum.c,v 1.3 2000/03/04 21:09:18 tom Exp $") /* * Test cursor movement. @@ -81,7 +81,7 @@ move_to( rf = rt; } } - if (sel & 4) { /* paramiterized relative cursor movement */ + if (sel & 4) { /* parameterized relative cursor movement */ if (parm_right_cursor) if (cf < ct) { s = tparm(parm_right_cursor, ct - cf); diff --git a/tack/edit.c b/tack/edit.c index 5685d925..a6281036 100644 --- a/tack/edit.c +++ b/tack/edit.c @@ -23,7 +23,7 @@ #include #include -MODULE_ID("$Id: edit.c,v 1.3 1999/06/16 00:43:43 tom Exp $") +MODULE_ID("$Id: edit.c,v 1.5 2000/03/25 17:26:12 tom Exp $") /* * Terminfo edit features @@ -81,7 +81,7 @@ static int display_lines; /* number of lines displayed */ /* ** send_info_string(str) ** -** Return the terminfo string prefixed by the correct seperator +** Return the terminfo string prefixed by the correct separator */ static void send_info_string( @@ -170,7 +170,7 @@ show_info( /* ** save_info_string(str, fp) ** -** Write the terminfo string prefixed by the correct seperator +** Write the terminfo string prefixed by the correct separator */ static void save_info_string( @@ -341,7 +341,7 @@ show_value( switch (nt->nte_type) { case STRING: _nc_reset_input((FILE *) 0, buf); - _nc_trans_string(tmp); + _nc_trans_string(tmp, tmp + sizeof(tmp)); s = (char *)malloc(strlen(tmp) + 1); strcpy(s, tmp); CUR Strings[nt->nte_index] = s; @@ -556,7 +556,7 @@ mark_cap( ** ** Scan the name list and get the names. ** Enter each name into the can-test data base. -** ( and ) may be used as seperators. +** ( and ) may be used as separators. */ void can_test( @@ -588,7 +588,7 @@ can_test( ** cap_index(name-list, index-list) ** ** Scan the name list and return a list of indexes. -** ( and ) may be used as seperators. +** ( and ) may be used as separators. ** This list is terminated with -1. */ void @@ -629,7 +629,7 @@ cap_index( ** ** Scan the name list and see if the cap is in the list. ** Return TRUE if we find an exact match. -** ( and ) may be used as seperators. +** ( and ) may be used as separators. */ int cap_match( @@ -863,7 +863,7 @@ change_one_entry( ptextln("That string is not currently defined. Please enter a new value, including the padding delay:"); read_string(buf, sizeof(buf)); _nc_reset_input((FILE *) 0, buf); - _nc_trans_string(pad); + _nc_trans_string(pad, pad + sizeof(pad)); t = (char *)malloc(strlen(pad) + 1); strcpy(t, pad); CUR Strings[x] = t; diff --git a/tack/fun.c b/tack/fun.c index 7ddfbbdf..fd895c37 100644 --- a/tack/fun.c +++ b/tack/fun.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: fun.c,v 1.2 1999/06/16 00:46:12 tom Exp $") +MODULE_ID("$Id: fun.c,v 1.3 2000/03/04 20:29:21 tom Exp $") /* * Test the function keys on the terminal. The code for echo tests @@ -215,7 +215,7 @@ enter_key( static void fresh_line(void) -{ /* clear the line for a new fumction key line */ +{ /* clear the line for a new function key line */ if (over_strike) { put_crlf(); } else { @@ -610,7 +610,7 @@ funkey_prog( mm[i] = '\0'; put_crlf(); if (mm[0] != 'a' || mm[1] != 'b' || mm[2] != 'c') { - sprintf(temp, "Error string recieved was: %s", expand(mm)); + sprintf(temp, "Error string received was: %s", expand(mm)); ptextln(temp); } else { putln("Thank you\n"); @@ -764,8 +764,8 @@ report_help(int crx) { ptextln("The following commands may also be entered:"); ptextln(" clear clear screen."); - ptextln(" columns print a test patterm to help count screen width."); - ptextln(" lines print a test patterm to help count screen length."); + ptextln(" columns print a test pattern to help count screen width."); + ptextln(" lines print a test pattern to help count screen length."); ptextln(" end exit."); ptextln(" echo redisplay last report."); if (crx) { diff --git a/tack/init.c b/tack/init.c index e19493d6..42554526 100644 --- a/tack/init.c +++ b/tack/init.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, @@ -22,7 +22,7 @@ #include -MODULE_ID("$Id: init.c,v 1.1 1999/04/18 01:05:23 tom Exp $") +MODULE_ID("$Id: init.c,v 1.2 2000/05/13 19:58:48 Daniel.Weaver Exp $") #if NCURSES_VERSION_MAJOR >= 5 || NCURSES_VERSION_PATCH >= 981219 #define _nc_get_curterm(p) _nc_get_tty_mode(p) @@ -244,7 +244,7 @@ curses_setup( fflush(stdout); /* waste some time */ sleep(1); /* waste more time */ charset_can_test(); - can_test("lines cols cr nxon rf if iprog rmp", FLAG_CAN_TEST); + can_test("lines cols cr nxon rf if iprog rmp smcup rmcup", FLAG_CAN_TEST); edit_init(); /* initialize the edit data base */ if (send_reset_init && enter_ca_mode) { diff --git a/tack/menu.c b/tack/menu.c index a2bcc380..6714d58d 100644 --- a/tack/menu.c +++ b/tack/menu.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: menu.c,v 1.1 1998/01/10 00:29:30 tom Exp $") +MODULE_ID("$Id: menu.c,v 1.2 2000/03/04 21:13:53 tom Exp $") /* Menu control @@ -85,7 +85,7 @@ menu_test_loop( } nch = 0; if (test->test_procedure) { - /* The procedure takes precidence so I can pass + /* The procedure takes precedence so I can pass the menu entry as an argument. */ can_test(test->caps_done, FLAG_TESTED); @@ -340,7 +340,7 @@ subtest_menu( /* ** menu_can_scan(menu-structure) ** -** Recursivly scan the menu tree and find which cap names can be tested. +** Recursively scan the menu tree and find which cap names can be tested. */ void menu_can_scan( @@ -362,7 +362,7 @@ menu_can_scan( /* ** menu_search(menu-structure, cap) ** -** Recursivly search the menu tree and execute any tests that use cap. +** Recursively search the menu tree and execute any tests that use cap. */ static void menu_search( diff --git a/tack/output.c b/tack/output.c index 3c419a8b..fac566e3 100644 --- a/tack/output.c +++ b/tack/output.c @@ -23,7 +23,7 @@ #include #include -MODULE_ID("$Id: output.c,v 1.4 1999/06/16 00:46:53 tom Exp $") +MODULE_ID("$Id: output.c,v 1.5 2000/03/04 21:06:57 tom Exp $") /* globals */ long char_sent; /* number of characters sent */ @@ -409,8 +409,8 @@ put_columns(const char *s, int len, int w) ** ptext(string) ** ** Output a string but do not assume the terminal will wrap to a -** new line. Break the line at a word boundry then send a CR LF. -** This is more estetic on 40 column terminals. +** new line. Break the line at a word boundary then send a CR LF. +** This is more esthetic on 40 column terminals. */ void ptext(const char *s) diff --git a/tack/pad.c b/tack/pad.c index bc6c6933..980258c4 100644 --- a/tack/pad.c +++ b/tack/pad.c @@ -21,7 +21,7 @@ #include -MODULE_ID("$Id: pad.c,v 1.1 1998/01/10 00:30:27 tom Exp $") +MODULE_ID("$Id: pad.c,v 1.2 2000/03/04 21:04:58 tom Exp $") /* test the pad counts on the terminal */ @@ -448,12 +448,14 @@ pad_clear( break; } clear_select++; + /* FALLTHRU */ case 2: end_message = "Clear one character per line. "; if (newline) { break; } clear_select++; + /* FALLTHRU */ case 3: end_message = "Clear one full line. "; break; @@ -1008,7 +1010,7 @@ pad_xch1( if (enter_insert_mode || exit_insert_mode || enter_delete_mode || exit_delete_mode || !insert_character || !delete_character) { - /* this test is quitely ignored */ + /* this test is quietly ignored */ return; } if (skip_pad_test(t, state, ch, @@ -1025,7 +1027,7 @@ pad_xch1( } while(still_testing()); pad_test_shutdown(t, 1); ptextln(xch1); - ptext("The preceeding two lines should be the same. "); + ptext("The preceding two lines should be the same. "); pad_done_message(t, state, ch); } diff --git a/tack/sync.c b/tack/sync.c index d8866a0e..3323b93f 100644 --- a/tack/sync.c +++ b/tack/sync.c @@ -22,7 +22,7 @@ #include #include -MODULE_ID("$Id: sync.c,v 1.1 1998/01/10 00:31:07 tom Exp $") +MODULE_ID("$Id: sync.c,v 1.2 2000/03/04 20:28:16 tom Exp $") /* terminal-synchronization and performance tests */ @@ -157,7 +157,7 @@ probe_enq_ok(void) ptextln(" the terminal is overrun with data."); ptext("\nENQ sequence from (u9): "); putln(expand(tty_ENQ)); - ptext("ACK recieved: "); + ptext("ACK received: "); putln(expand(tty_ACK)); len = user8 ? strlen(user8) : 0; sprintf(temp, "Length of ACK %d. Expected length of ACK %d.", @@ -368,7 +368,7 @@ sync_clear( } /* -** sync_symmary(test_list, status, ch) +** sync_summary(test_list, status, ch) ** ** Print out the test results. */ diff --git a/tack/sysdep.c b/tack/sysdep.c index c07b4d9d..43ef4457 100644 --- a/tack/sysdep.c +++ b/tack/sysdep.c @@ -19,7 +19,7 @@ ** Boston, MA 02111-1307, USA. */ /* - * Operating system dependant functions. We assume the POSIX API. + * Operating system dependent functions. We assume the POSIX API. * Note: on strict-POSIX systems (including BSD/OS) the select_delay_type * global has no effect. */ @@ -43,7 +43,7 @@ #endif #endif -MODULE_ID("$Id: sysdep.c,v 1.6 1999/09/04 13:45:00 tom Exp $") +MODULE_ID("$Id: sysdep.c,v 1.7 2000/03/04 21:02:11 tom Exp $") #if DECL_ERRNO extern int errno; diff --git a/tack/tack.h b/tack/tack.h index 22e15af5..52464d3e 100644 --- a/tack/tack.h +++ b/tack/tack.h @@ -19,7 +19,7 @@ ** Boston, MA 02111-1307, USA. */ -/* $Id: tack.h,v 1.5 1999/06/26 22:14:07 tom Exp $ */ +/* $Id: tack.h,v 1.6 2000/03/04 21:10:07 tom Exp $ */ #ifndef _TACK_H #define _TACK_H 1 @@ -178,14 +178,14 @@ extern const int mode_map[]; extern int tt_delay_max; /* max number of milliseconds we can delay */ extern int tt_delay_used; /* number of milliseconds consumed in delay */ extern const char *tt_cap[TT_MAX]; /* value of string */ -extern int tt_affected[TT_MAX]; /* lines or columns effected (repitition +extern int tt_affected[TT_MAX]; /* lines or columns effected (repetition factor) */ extern int tt_count[TT_MAX]; /* Number of times sent */ extern int tt_delay[TT_MAX]; /* Number of milliseconds delay */ extern int ttp; /* number of entries used */ extern const char *tx_cap[TT_MAX]; /* value of string */ -extern int tx_affected[TT_MAX]; /* lines or columns effected (repitition +extern int tx_affected[TT_MAX]; /* lines or columns effected (repetition factor) */ extern int tx_count[TT_MAX]; /* Number of times sent */ extern int tx_delay[TT_MAX]; /* Number of milliseconds delay */ diff --git a/test/Makefile.in b/test/Makefile.in index b0b9de03..9f573ba0 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.54 1999/10/23 20:01:19 tom Exp $ +# $Id: Makefile.in,v 1.58 2000/05/28 01:28:39 tom Exp $ ############################################################################## -# Copyright (c) 1998,1999 Free Software Foundation, Inc. # +# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -46,6 +46,7 @@ libdir = @libdir@ includedir = @includedir@ CC = @CC@ +CPP = @CPP@ CFLAGS = @CFLAGS@ CPPFLAGS = -I../test -I$(srcdir) @CPPFLAGS@ -DHAVE_CONFIG_H @@ -98,6 +99,7 @@ TESTS = \ ncurses$x \ newdemo$x \ rain$x \ + railroad$x \ tclock$x \ testaddch$x \ testcurs$x \ @@ -161,6 +163,9 @@ newdemo$x: $(MODEL)/newdemo.o $(LOCAL_LIBS) rain$x: $(MODEL)/rain.o $(LOCAL_LIBS) @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/rain.o $(LDFLAGS_DEFAULT) +railroad$x: $(MODEL)/railroad.o $(LOCAL_LIBS) + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/railroad.o $(LDFLAGS_DEFAULT) + tclock$x: $(MODEL)/tclock.o $(LOCAL_LIBS) @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/tclock.o $(LDFLAGS_DEFAULT) $(MATH_LIB) @@ -182,8 +187,9 @@ worm$x: $(MODEL)/worm.o $(LOCAL_LIBS) xmas$x: $(MODEL)/xmas.o $(LOCAL_LIBS) @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/xmas.o $(LDFLAGS_DEFAULT) -install: -install.libs: +libs \ +install \ +install.libs \ install.test: uninstall: diff --git a/test/cardfile.c b/test/cardfile.c index bc2e1adb..980ffbeb 100644 --- a/test/cardfile.c +++ b/test/cardfile.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: cardfile.c,v 1.2 1999/06/16 00:41:57 tom Exp $ + * $Id: cardfile.c,v 1.4 2000/03/19 01:34:00 tom Exp $ * * File format: text beginning in column 1 is a title; other text forms the content. */ @@ -50,11 +50,11 @@ #endif typedef struct _card { - struct _card *link; - PANEL *panel; - FORM *form; - char *title; - char *content; + struct _card *link; + PANEL *panel; + FORM *form; + char *title; + char *content; } CARD; static CARD *all_cards; @@ -62,37 +62,40 @@ static char default_name[] = "cardfile.dat"; #if !HAVE_STRDUP #define strdup my_strdup -static char *strdup (char *s) +static char * +strdup(char *s) { - char *p = (char *)malloc(strlen(s)+1); + char *p = (char *) malloc(strlen(s) + 1); if (p) strcpy(p, s); - return(p); + return (p); } #endif /* not HAVE_STRDUP */ -static char *skip(char *buffer) +static char * +skip(char *buffer) { while (isspace(*buffer)) buffer++; return buffer; } -static void trim(char *buffer) +static void +trim(char *buffer) { unsigned n = strlen(buffer); while (n-- && isspace(buffer[n])) - buffer[n] = 0; + buffer[n] = 0; } /*******************************************************************************/ -static CARD *add_title(const char *title) +static CARD * +add_title(const char *title) { CARD *card, *p, *q; - for (p = all_cards, q = 0; p != 0; q = p, p = p->link) - { + for (p = all_cards, q = 0; p != 0; q = p, p = p->link) { int cmp = strcmp(p->title, title); if (cmp == 0) return p; @@ -100,46 +103,49 @@ static CARD *add_title(const char *title) break; } - card = (CARD *)calloc(1, sizeof(CARD)); + card = (CARD *) calloc(1, sizeof(CARD)); card->title = strdup(title); card->content = strdup(""); - if (q == 0) - { + if (q == 0) { card->link = all_cards; all_cards = card; - } - else - { - card->link = q->link; + } else { + card->link = q->link; q->link = card; } return card; } -static void add_content(CARD *card, char *content) +static void +add_content(CARD * card, char *content) { unsigned total, offset; content = skip(content); - if ((total = strlen(content)) != 0) - { - if ((offset = strlen(card->content)) != 0) - { + if ((total = strlen(content)) != 0) { + if ((offset = strlen(card->content)) != 0) { total += 1 + offset; - card->content = (char *)realloc(card->content, total + 1); + card->content = (char *) realloc(card->content, total + 1); strcpy(card->content + offset++, " "); - } - else - { - card->content = (char *)malloc(total + 1); + } else { + card->content = (char *) malloc(total + 1); } strcpy(card->content + offset, content); } } -static CARD *find_card(char *title) +static CARD * +new_card(void) +{ + CARD *card = add_title(""); + add_content(card, ""); + return card; +} + +static CARD * +find_card(char *title) { CARD *card; @@ -150,25 +156,21 @@ static CARD *find_card(char *title) return card; } -static void read_data(char *fname) +static void +read_data(char *fname) { FILE *fp; CARD *card = 0; char buffer[BUFSIZ]; - if ((fp = fopen(fname, "r")) != 0) - { - while (fgets(buffer, sizeof(buffer), fp)) - { + if ((fp = fopen(fname, "r")) != 0) { + while (fgets(buffer, sizeof(buffer), fp)) { trim(buffer); - if (isspace(*buffer)) - { + if (isspace(*buffer)) { if (card == 0) card = add_title(""); add_content(card, buffer); - } - else if ((card = find_card(buffer)) == 0) - { + } else if ((card = find_card(buffer)) == 0) { card = add_title(buffer); } } @@ -178,7 +180,8 @@ static void read_data(char *fname) /*******************************************************************************/ -static void write_data(const char *fname) +static void +write_data(const char *fname) { FILE *fp; CARD *p = 0; @@ -187,17 +190,13 @@ static void write_data(const char *fname) if (!strcmp(fname, default_name)) fname = "cardfile.out"; - if ((fp = fopen(fname, "w")) != 0) - { - for (p = all_cards; p != 0; p = p->link) - { + if ((fp = fopen(fname, "w")) != 0) { + for (p = all_cards; p != 0; p = p->link) { FIELD **f = form_fields(p->form); - for (n = 0; f[n] != 0; n++) - { + for (n = 0; f[n] != 0; n++) { char *s = field_buffer(f[n], 0); if (s != 0 - && (s = strdup(s)) != 0) - { + && (s = strdup(s)) != 0) { trim(s); fprintf(fp, "%s%s\n", n ? "\t" : "", s); free(s); @@ -213,7 +212,8 @@ static void write_data(const char *fname) /* * Count the cards */ -static int count_cards(void) +static int +count_cards(void) { CARD *p; int count = 0; @@ -227,12 +227,12 @@ static int count_cards(void) /* * Shuffle the panels to keep them in a natural hierarchy. */ -static void order_cards(CARD *first, int depth) +static void +order_cards(CARD * first, int depth) { - if (first) - { + if (first) { if (depth && first->link) - order_cards(first->link, depth-1); + order_cards(first->link, depth - 1); top_panel(first->panel); } } @@ -240,17 +240,19 @@ static void order_cards(CARD *first, int depth) /* * Return the next card in the list */ -static CARD *next_card(CARD *now) +static CARD * +next_card(CARD * now) { if (now->link) - now = now->link; + now = now->link; return now; } /* * Return the previous card in the list */ -static CARD *prev_card(CARD *now) +static CARD * +prev_card(CARD * now) { CARD *p; for (p = all_cards; p != 0; p = p->link) @@ -259,49 +261,49 @@ static CARD *prev_card(CARD *now) return now; } - /*******************************************************************************/ -static int form_virtualize(WINDOW *w) +static int +form_virtualize(WINDOW *w) { - int c = wgetch(w); + int c = wgetch(w); - switch(c) - { + switch (c) { case CTRL('W'): - return(MAX_FORM_COMMAND + 4); + return (MAX_FORM_COMMAND + 4); case CTRL('N'): - return(MAX_FORM_COMMAND + 3); + return (MAX_FORM_COMMAND + 3); case CTRL('P'): - return(MAX_FORM_COMMAND + 2); + return (MAX_FORM_COMMAND + 2); case CTRL('Q'): case 033: - return(MAX_FORM_COMMAND + 1); + return (MAX_FORM_COMMAND + 1); case KEY_BACKSPACE: - return(REQ_DEL_PREV); + return (REQ_DEL_PREV); case KEY_DC: - return(REQ_DEL_CHAR); + return (REQ_DEL_CHAR); case KEY_LEFT: - return(REQ_LEFT_CHAR); + return (REQ_LEFT_CHAR); case KEY_RIGHT: - return(REQ_RIGHT_CHAR); + return (REQ_RIGHT_CHAR); case KEY_DOWN: case KEY_NEXT: - return(REQ_NEXT_FIELD); + return (REQ_NEXT_FIELD); case KEY_UP: case KEY_PREVIOUS: - return(REQ_PREV_FIELD); + return (REQ_PREV_FIELD); default: - return(c); + return (c); } } /*******************************************************************************/ -static void cardfile(char *fname) +static void +cardfile(char *fname) { WINDOW *win; CARD *p; @@ -322,9 +324,8 @@ static void cardfile(char *fname) addstr("Arrow keys move left/right within a field, up/down between fields"); /* make a panel for each CARD */ - for (p = all_cards; p != 0; p = p->link) - { - FIELD **f = (FIELD **)calloc(3, sizeof(FIELD *)); + for (p = all_cards; p != 0; p = p->link) { + FIELD **f = (FIELD **) calloc(3, sizeof(FIELD *)); win = newwin(panel_high, panel_wide, x, y); keypad(win, TRUE); @@ -336,7 +337,7 @@ static void cardfile(char *fname) set_field_back(f[0], A_REVERSE); set_field_buffer(f[0], 0, p->title); - f[1] = new_field(form_high-1, form_wide, 1, 0, 0, 0); + 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); @@ -353,31 +354,28 @@ static void cardfile(char *fname) order_cards(top_card = all_cards, visible_cards); - update_panels(); - - while (!finished) - { + while (!finished) { update_panels(); doupdate(); - switch(form_driver(top_card->form, ch = form_virtualize(panel_window(top_card->panel)))) - { + switch (form_driver(top_card->form, ch = + form_virtualize(panel_window(top_card->panel)))) { case E_OK: break; case E_UNKNOWN_COMMAND: switch (ch) { - case MAX_FORM_COMMAND+1: + case MAX_FORM_COMMAND + 1: finished = TRUE; break; - case MAX_FORM_COMMAND+2: + case MAX_FORM_COMMAND + 2: top_card = prev_card(top_card); order_cards(top_card, visible_cards); break; - case MAX_FORM_COMMAND+3: + case MAX_FORM_COMMAND + 3: top_card = next_card(top_card); order_cards(top_card, visible_cards); break; - case MAX_FORM_COMMAND+4: + case MAX_FORM_COMMAND + 4: write_data(fname); break; default: @@ -394,7 +392,8 @@ static void cardfile(char *fname) /*******************************************************************************/ -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { int n; @@ -402,15 +401,16 @@ int main(int argc, char *argv[]) cbreak(); noecho(); - if (argc > 1) - { + if (argc > 1) { for (n = 1; n < argc; n++) read_data(argv[n]); + if (count_cards() == 0) + new_card(); cardfile(argv[1]); - } - else - { + } else { read_data(default_name); + if (count_cards() == 0) + new_card(); cardfile(default_name); } diff --git a/test/configure b/test/configure index 649dffe9..22661141 100755 --- a/test/configure +++ b/test/configure @@ -1458,21 +1458,22 @@ done for ac_func in \ -curses_version \ gettimeofday \ napms \ resizeterm \ strdup \ +use_default_colors \ vsscanf \ +wresize \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1471: checking for $ac_func" >&5 +echo "configure:1472: 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:1500: \"$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 @@ -1520,14 +1521,59 @@ fi done +echo $ac_n "checking for function curses_version""... $ac_c" 1>&6 +echo "configure:1526: 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 + +if test "$cross_compiling" = yes; then + cf_cv_func_curses_version=unknown +else + cat > conftest.$ac_ext < +int main() +{ + char temp[1024]; + sprintf(temp, "%s\n", curses_version()); + exit(0); +} + +EOF +if { (eval echo configure:1547: \"$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 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + cf_cv_func_curses_version=no + +fi +rm -fr conftest* +fi + +rm -f core +fi + +echo "$ac_t""$cf_cv_func_curses_version" 1>&6 +test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF +#define HAVE_CURSES_VERSION 1 +EOF + + echo $ac_n "checking if sys/time.h conflicts with sys/select.h""... $ac_c" 1>&6 -echo "configure:1525: checking if sys/time.h conflicts with sys/select.h" >&5 +echo "configure:1571: checking if sys/time.h conflicts 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sys_time_select=yes else diff --git a/test/configure.in b/test/configure.in index d963022c..35e2b47c 100644 --- a/test/configure.in +++ b/test/configure.in @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1996,1997,1998 dnl -dnl $Id: configure.in,v 1.27 1999/10/23 20:01:42 tom Exp $ +dnl $Id: configure.in,v 1.29 1999/12/19 03:12:13 tom Exp $ dnl This is a simple configuration-script for the ncurses test programs that dnl allows the test-directory to be separately configured against a reference dnl system (i.e., sysvr4 curses) @@ -129,14 +129,32 @@ unistd.h \ ) AC_CHECK_FUNCS( \ -curses_version \ gettimeofday \ napms \ resizeterm \ strdup \ +use_default_colors \ vsscanf \ +wresize \ ) +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 [CF_SYS_TIME_SELECT] AC_MSG_CHECKING(if sys/time.h conflicts with sys/select.h) diff --git a/test/dots.c b/test/dots.c index 13ec66a5..a5ddcaad 100644 --- a/test/dots.c +++ b/test/dots.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999 Free Software Foundation, Inc. * + * Copyright (c) 1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: dots.c,v 1.2 1999/10/23 13:24:32 tom Exp $ + * $Id: dots.c,v 1.4 2000/02/13 01:05:13 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -125,7 +125,7 @@ main( tputs(tparm(cursor_address, y, x), 1, outc); if (max_colors > 0) { - z = ranf() * max_colors; + z = (int)(ranf() * max_colors); if (ranf() > 0.01) { tputs(tparm(set_a_foreground, z), 1, outc); } else { diff --git a/test/filter.c b/test/filter.c index 6057396a..5d161cb6 100644 --- a/test/filter.c +++ b/test/filter.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey 1998 * - * $Id: filter.c,v 1.2 1998/05/10 00:39:27 tom Exp $ + * $Id: filter.c,v 1.3 1999/11/13 23:39:19 tom Exp $ */ #include @@ -81,7 +81,7 @@ int main( if (has_colors()) { int background = COLOR_BLACK; start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors () != ERR) background = -1; #endif diff --git a/test/firework.c b/test/firework.c index 557a7bf2..ba5cbda2 100644 --- a/test/firework.c +++ b/test/firework.c @@ -1,5 +1,5 @@ /* - * $Id: firework.c,v 1.15 1999/10/16 21:33:39 tom Exp $ + * $Id: firework.c,v 1.16 1999/11/13 23:39:16 tom Exp $ */ #include @@ -133,7 +133,7 @@ main( if (has_colors()) { start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) my_bg = -1; #endif diff --git a/test/gdc.c b/test/gdc.c index ecef2bb1..ea88d6c5 100644 --- a/test/gdc.c +++ b/test/gdc.c @@ -6,7 +6,7 @@ * modified 10-18-89 for curses (jrl) * 10-18-89 added signal handling * - * $Id: gdc.c,v 1.10 1997/10/18 20:06:06 tom Exp $ + * $Id: gdc.c,v 1.14 2000/04/23 00:03:11 tom Exp $ */ #include @@ -20,216 +20,297 @@ #define XLENGTH 54 #define YDEPTH 5 -/* it won't be */ -static time_t now; /* yeah! */ -static struct tm *tm; - -static short disp[11] = { - 075557, 011111, 071747, 071717, 055711, - 074717, 074757, 071111, 075757, 075717, 002020 +static short disp[11] = +{ + 075557, 011111, 071747, 071717, 055711, + 074717, 074757, 071111, 075757, 075717, 002020 }; static long older[6], next[6], newer[6], mask; -static char scrol; static int sigtermed = 0; +static bool redirected = FALSE; +static bool hascolor = FALSE; -static int hascolor = 0; - -static void set(int, int); -static void standt(int); -static void movto(int, int); - -static -RETSIGTYPE sighndl(int signo) +static RETSIGTYPE +sighndl(int signo) { - signal(signo, sighndl); - sigtermed=signo; + signal(signo, sighndl); + sigtermed = signo; + if (redirected) { + endwin(); + exit(EXIT_FAILURE); + } } static void drawbox(void) { - chtype bottom[XLENGTH+1]; - int n; + chtype bottom[XLENGTH + 1]; + int n; - if(hascolor) - attrset(COLOR_PAIR(3)); + if (hascolor) + attrset(COLOR_PAIR(3)); - mvaddch(YBASE - 1, XBASE - 1, ACS_ULCORNER); - hline(ACS_HLINE, XLENGTH); - mvaddch(YBASE - 1, XBASE + XLENGTH, ACS_URCORNER); + mvaddch(YBASE - 1, XBASE - 1, ACS_ULCORNER); + hline(ACS_HLINE, XLENGTH); + mvaddch(YBASE - 1, XBASE + XLENGTH, ACS_URCORNER); - mvaddch(YBASE + YDEPTH, XBASE - 1, ACS_LLCORNER); - mvinchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); - for (n = 0; n < XLENGTH; n++) - bottom[n] = ACS_HLINE | (bottom[n] & (A_ATTRIBUTES | A_COLOR)); - mvaddchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); - mvaddch(YBASE + YDEPTH, XBASE + XLENGTH, ACS_LRCORNER); + mvaddch(YBASE + YDEPTH, XBASE - 1, ACS_LLCORNER); + mvinchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); + for (n = 0; n < XLENGTH; n++) + bottom[n] = ACS_HLINE | (bottom[n] & (A_ATTRIBUTES | A_COLOR)); + mvaddchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); + mvaddch(YBASE + YDEPTH, XBASE + XLENGTH, ACS_LRCORNER); - move(YBASE, XBASE - 1); - vline(ACS_VLINE, YDEPTH); + move(YBASE, XBASE - 1); + vline(ACS_VLINE, YDEPTH); - move(YBASE, XBASE + XLENGTH); - vline(ACS_VLINE, YDEPTH); + move(YBASE, XBASE + XLENGTH); + vline(ACS_VLINE, YDEPTH); - if(hascolor) - attrset(COLOR_PAIR(2)); + if (hascolor) + attrset(COLOR_PAIR(2)); } -int -main(int argc, char *argv[]) +static void +standt(int on) { -long t, a; -int i, j, s, k; -int n = 0; - - signal(SIGINT,sighndl); - signal(SIGTERM,sighndl); - signal(SIGKILL,sighndl); - - initscr(); - cbreak(); - noecho(); - nodelay(stdscr, 1); - curs_set(0); - - hascolor = has_colors(); - - if(hascolor) { - int bg = COLOR_BLACK; - start_color(); -#ifdef NCURSES_VERSION - if (use_default_colors() == OK) - bg = -1; -#endif - init_pair(1, COLOR_BLACK, COLOR_RED); - init_pair(2, COLOR_RED, bg); - init_pair(3, COLOR_WHITE, bg); - attrset(COLOR_PAIR(2)); + if (on) { + if (hascolor) { + attron(COLOR_PAIR(1)); + } else { + attron(A_STANDOUT); } - - clear(); - refresh(); - while(--argc > 0) { - if(**++argv == '-') - scrol = 1; - else - n = atoi(*argv); + } else { + if (hascolor) { + attron(COLOR_PAIR(2)); + } else { + attroff(A_STANDOUT); } - - drawbox(); - do { - char buf[30]; - - mask = 0; - time(&now); - tm = localtime(&now); - set(tm->tm_sec%10, 0); - set(tm->tm_sec/10, 4); - set(tm->tm_min%10, 10); - set(tm->tm_min/10, 14); - set(tm->tm_hour%10, 20); - set(tm->tm_hour/10, 24); - set(10, 7); - set(10, 17); - for(k=0; k<6; k++) { - if(scrol) { - for(i=0; i<5; i++) - newer[i] = (newer[i]&~mask) | (newer[i+1]&mask); - newer[5] = (newer[5]&~mask) | (next[k]&mask); - } else - newer[k] = (newer[k]&~mask) | (next[k]&mask); - next[k] = 0; - for(s=1; s>=0; s--) { - standt(s); - for(i=0; i<6; i++) { - if((a = (newer[i]^older[i])&(s ? newer : older)[i]) != 0) { - for(j=0,t=1<<26; t; t>>=1,j++) { - if(a&t) { - if(!(a&(t<<1))) { - movto(YBASE + i, XBASE + 2*j); - } - addstr(" "); - } - } - } - if(!s) { - older[i] = newer[i]; - } - } - if(!s) { - if (scrol) - drawbox(); - refresh(); - if (scrol) - napms(150); - } - } - } - - /* this depends on the detailed format of ctime(3) */ - (void) strcpy(buf, ctime(&now)); - (void) strcpy(buf + 10, buf + 19); - mvaddstr(16, 30, buf); - - movto(6, 0); - drawbox(); - refresh(); - sleep(1); - while(wgetch(stdscr) != ERR) - continue; - if (sigtermed) { - standend(); - clear(); - refresh(); - curs_set(1); - endwin(); - fprintf(stderr, "gdc terminated by signal %d\n", sigtermed); - return EXIT_FAILURE; - } - } while(--n); - standend(); - clear(); - refresh(); - curs_set(1); - endwin(); - return EXIT_SUCCESS; + } } static void set(int t, int n) { -int i, m; + int i, m; - m = 7<>(4-i)*3)&07)<> (4 - i) * 3) & 07) << n; + mask |= (next[i] ^ older[i]) & m; + } + if (mask & m) + mask |= m; } static void -standt(int on) +usage(void) { - if (on) { - if(hascolor) { - attron(COLOR_PAIR(1)); - } else { - attron(A_STANDOUT); + static const char *msg[] = + { + "Usage: gdc [options] [count]" + ,"" + ,"Options:" + ," -n redirect input to /dev/null" + ," -s scroll each number into place, rather than flipping" + ,"" + ,"If you specify a count, gdc runs for that number of seconds" + }; + unsigned j; + for (j = 0; j < SIZEOF(msg); j++) + fprintf(stderr, "%s\n", msg[j]); + exit(EXIT_FAILURE); +} + +int +main(int argc, char *argv[]) +{ + time_t now; + struct tm *tm; + long t, a; + int i, j, s, k; + int count = 0; + FILE *ofp = stdout; + FILE *ifp = stdin; + bool scrol = FALSE; + + signal(SIGINT, sighndl); + signal(SIGTERM, sighndl); + signal(SIGKILL, sighndl); + + while ((k = getopt(argc, argv, "sn")) != EOF) { + switch (k) { + case 's': + scrol = TRUE; + break; + case 'n': + ifp = fopen("/dev/null", "r"); + redirected = TRUE; + break; + default: + usage(); + } + } + if (optind < argc) { + count = atoi(argv[optind++]); + } + if (optind < argc) + usage(); + + if (redirected) { + char *name = getenv("TERM"); + if (name == 0 + || newterm(name, ofp, ifp) == 0) { + fprintf(stderr, "cannot open terminal\n"); + exit(EXIT_FAILURE); + } + + } else { + initscr(); + } + cbreak(); + noecho(); + nodelay(stdscr, 1); + curs_set(0); + + hascolor = has_colors(); + + if (hascolor) { + int bg = COLOR_BLACK; + start_color(); +#ifdef HAVE_USE_DEFAULT_COLORS + if (use_default_colors() == OK) + bg = -1; +#endif + init_pair(1, COLOR_BLACK, COLOR_RED); + init_pair(2, COLOR_RED, bg); + init_pair(3, COLOR_WHITE, bg); + attrset(COLOR_PAIR(2)); + } + + restart: + for (j = 0; j < 5; j++) + older[j] = newer[j] = next[j] = 0; + + clear(); + drawbox(); + + do { + char buf[30]; + + time(&now); + tm = localtime(&now); + + mask = 0; + set(tm->tm_sec % 10, 0); + set(tm->tm_sec / 10, 4); + set(tm->tm_min % 10, 10); + set(tm->tm_min / 10, 14); + set(tm->tm_hour % 10, 20); + set(tm->tm_hour / 10, 24); + set(10, 7); + set(10, 17); + + for (k = 0; k < 6; k++) { + if (scrol) { + for (i = 0; i < 5; i++) + newer[i] = (newer[i] & ~mask) | (newer[i + 1] & mask); + newer[5] = (newer[5] & ~mask) | (next[k] & mask); + } else + newer[k] = (newer[k] & ~mask) | (next[k] & mask); + next[k] = 0; + for (s = 1; s >= 0; s--) { + standt(s); + for (i = 0; i < 6; i++) { + if ((a = (newer[i] ^ older[i]) & (s ? newer : older)[i]) + != 0) { + for (j = 0, t = 1 << 26; t; t >>= 1, j++) { + if (a & t) { + if (!(a & (t << 1))) { + move(YBASE + i, XBASE + 2 * j); + } + addstr(" "); + } + } + } + if (!s) { + older[i] = newer[i]; + } } - } else { - if(hascolor) { - attron(COLOR_PAIR(2)); - } else { - attroff(A_STANDOUT); + if (!s) { + if (scrol) + drawbox(); + refresh(); + /* + * If we're scrolling, space out the refreshes to fake + * movement. That's 7 frames, or 6 intervals, which would + * be 166 msec if we spread it out over a second. It looks + * better (but will well on a slow terminal, e.g., less + * than 9600bd) to squeeze that into a half-second, and use + * half of 170 msec to ensure that the program doesn't eat + * a lot of time when asking what time it is, at the top of + * this loop -TD + */ + if (scrol) + napms(85); } + } } -} -static void -movto(int line, int col) -{ - move(line, col); + /* this depends on the detailed format of ctime(3) */ + (void) strcpy(buf, ctime(&now)); + (void) strcpy(buf + 10, buf + 19); + mvaddstr(16, 30, buf); + + move(6, 0); + drawbox(); + refresh(); + + /* + * If we're not scrolling, wait 1000 msec (1 sec). Use napms() rather + * than sleep() because the latter does odd things on some systems, + * e.g., suspending output as well. + */ + if (scrol) + napms(500); + else + napms(1000); + + /* + * This is a safe way to check if we're interrupted - making the signal + * handler set a flag that we can check. Since we're running + * nodelay(), the wgetch() call returns immediately, and in particular + * will return an error if interrupted. This works only if we can + * read from the input, of course. + */ + switch (wgetch(stdscr)) { + case 'q': + count = 1; + break; + case 's': + nodelay(stdscr, FALSE); + break; + case ' ': + nodelay(stdscr, TRUE); + break; +#ifdef KEY_RESIZE + case KEY_RESIZE: +#endif + case '?': + goto restart; + case ERR: + if (sigtermed) { + standend(); + endwin(); + fprintf(stderr, "gdc terminated by signal %d\n", sigtermed); + return EXIT_FAILURE; + } + default: + continue; + } + } while (--count); + standend(); + endwin(); + return EXIT_SUCCESS; } diff --git a/test/hanoi.c b/test/hanoi.c index 3ee64b0a..23a86462 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -14,7 +14,7 @@ * * Date: 05.Nov.90 * - * $Id: hanoi.c,v 1.16 1999/10/23 15:01:01 tom Exp $ + * $Id: hanoi.c,v 1.18 2000/04/01 20:01:08 tom Exp $ */ #include @@ -97,7 +97,7 @@ unsigned char AutoFlag = 0; Usage(); return EXIT_FAILURE; } -#ifdef NCURSES_VERSION +#ifdef TRACE trace(TRACE_MAXIMUM); #endif initscr(); @@ -105,7 +105,7 @@ unsigned char AutoFlag = 0; int i; int bg = COLOR_BLACK; start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) bg = -1; #endif diff --git a/test/knight.c b/test/knight.c index fe310119..ad923b42 100644 --- a/test/knight.c +++ b/test/knight.c @@ -6,7 +6,7 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.14 1997/08/20 16:22:38 hjl Exp $ + * $Id: knight.c,v 1.15 1999/11/13 23:39:10 tom Exp $ */ #include @@ -98,7 +98,7 @@ static void init (void) int bg = COLOR_BLACK; start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) bg = -1; #endif diff --git a/test/modules b/test/modules index 3c69bbd4..583f8c76 100644 --- a/test/modules +++ b/test/modules @@ -1,7 +1,7 @@ # Test-Program modules -# $Id: modules,v 1.11 1999/10/23 00:41:02 tom Exp $ +# $Id: modules,v 1.13 2000/02/13 01:05:13 tom Exp $ ############################################################################## -# Copyright (c) 1999 Free Software Foundation, Inc. # +# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -49,6 +49,7 @@ 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 tclock progs $(srcdir) testaddch progs $(srcdir) testcurs progs $(srcdir) diff --git a/test/ncurses.c b/test/ncurses.c index aa24a426..4bd8552e 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,1999 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +39,7 @@ DESCRIPTION AUTHOR Author: Eric S. Raymond 1993 -$Id: ncurses.c,v 1.120 1999/10/23 20:01:30 tom Exp $ +$Id: ncurses.c,v 1.130 2000/07/07 11:05:16 tom Exp $ ***************************************************************************/ @@ -88,7 +88,7 @@ $Id: ncurses.c,v 1.120 1999/10/23 20:01:30 tom Exp $ #ifdef NCURSES_VERSION #ifdef TRACE -static int save_trace = TRACE_ORDINARY|TRACE_CALLS; +static int save_trace = TRACE_ORDINARY | TRACE_CALLS; extern int _nc_tracing; #endif @@ -100,13 +100,13 @@ extern int _nc_tracing; #define mmask_t chtype /* not specified in XSI */ #define attr_t chtype /* not specified in XSI */ -#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 (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 */ #endif @@ -117,118 +117,125 @@ extern int _nc_tracing; #define QUIT CTRL('Q') #define ESCAPE CTRL('[') -#define BLANK ' ' /* this is the background character */ +#define BLANK ' ' /* this is the background character */ /* The behavior of mvhline, mvvline for negative/zero length is unspecified, * though we can rely on negative x/y values to stop the macro. */ -static void do_h_line(int y, int x, chtype c, int to) +static void +do_h_line(int y, int x, chtype c, int to) { - if ((to) > (x)) - mvhline(y, x, c, (to) - (x)); + if ((to) > (x)) + mvhline(y, x, c, (to) - (x)); } -static void do_v_line(int y, int x, chtype c, int to) +static void +do_v_line(int y, int x, chtype c, int to) { - if ((to) > (y)) - mvvline(y, x, c, (to) - (y)); + if ((to) > (y)) + mvvline(y, x, c, (to) - (y)); } /* Common function to allow ^T to toggle trace-mode in the middle of a test * so that trace-files can be made smaller. */ -static int wGetchar(WINDOW *win) +static int +wGetchar(WINDOW *win) { - int c; + int c; #ifdef TRACE - while ((c = wgetch(win)) == CTRL('T')) { - if (_nc_tracing) { - save_trace = _nc_tracing; - _tracef("TOGGLE-TRACING OFF"); - _nc_tracing = 0; - } else { - _nc_tracing = save_trace; - } - trace(_nc_tracing); - if (_nc_tracing) - _tracef("TOGGLE-TRACING ON"); + while ((c = wgetch(win)) == CTRL('T')) { + if (_nc_tracing) { + save_trace = _nc_tracing; + _tracef("TOGGLE-TRACING OFF"); + _nc_tracing = 0; + } else { + _nc_tracing = save_trace; } + trace(_nc_tracing); + if (_nc_tracing) + _tracef("TOGGLE-TRACING ON"); + } #else - c = wgetch(win); + c = wgetch(win); #endif - return c; + return c; } #define Getchar() wGetchar(stdscr) -static void Pause(void) +static void +Pause(void) { - move(LINES - 1, 0); - addstr("Press any key to continue... "); - (void) Getchar(); + move(LINES - 1, 0); + addstr("Press any key to continue... "); + (void) Getchar(); } -static void Cannot(const char *what) +static void +Cannot(const char *what) { - printw("\nThis %s terminal %s\n\n", getenv("TERM"), what); - Pause(); + printw("\nThis %s terminal %s\n\n", getenv("TERM"), what); + Pause(); } -static void ShellOut(bool message) +static void +ShellOut(bool message) { - if (message) - addstr("Shelling out..."); - def_prog_mode(); - endwin(); - system("sh"); - if (message) - addstr("returned from shellout.\n"); - refresh(); + if (message) + addstr("Shelling out..."); + def_prog_mode(); + endwin(); + system("sh"); + if (message) + addstr("returned from shellout.\n"); + refresh(); } #ifdef NCURSES_MOUSE_VERSION -static const char *mouse_decode(MEVENT const *ep) +static const char * +mouse_decode(MEVENT const *ep) { - static char buf[80]; + static char buf[80]; - (void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {", - ep->id, ep->x, ep->y, ep->z, ep->bstate); + (void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {", + ep->id, ep->x, ep->y, ep->z, ep->bstate); #define SHOW(m, s) if ((ep->bstate & m)==m) {strcat(buf,s); strcat(buf, ", ");} - SHOW(BUTTON1_RELEASED, "release-1") - SHOW(BUTTON1_PRESSED, "press-1") - SHOW(BUTTON1_CLICKED, "click-1") - SHOW(BUTTON1_DOUBLE_CLICKED, "doubleclick-1") - SHOW(BUTTON1_TRIPLE_CLICKED, "tripleclick-1") - SHOW(BUTTON1_RESERVED_EVENT, "reserved-1") - SHOW(BUTTON2_RELEASED, "release-2") - SHOW(BUTTON2_PRESSED, "press-2") - SHOW(BUTTON2_CLICKED, "click-2") - SHOW(BUTTON2_DOUBLE_CLICKED, "doubleclick-2") - SHOW(BUTTON2_TRIPLE_CLICKED, "tripleclick-2") - SHOW(BUTTON2_RESERVED_EVENT, "reserved-2") - SHOW(BUTTON3_RELEASED, "release-3") - SHOW(BUTTON3_PRESSED, "press-3") - SHOW(BUTTON3_CLICKED, "click-3") - SHOW(BUTTON3_DOUBLE_CLICKED, "doubleclick-3") - SHOW(BUTTON3_TRIPLE_CLICKED, "tripleclick-3") - SHOW(BUTTON3_RESERVED_EVENT, "reserved-3") - SHOW(BUTTON4_RELEASED, "release-4") - SHOW(BUTTON4_PRESSED, "press-4") - SHOW(BUTTON4_CLICKED, "click-4") - SHOW(BUTTON4_DOUBLE_CLICKED, "doubleclick-4") - SHOW(BUTTON4_TRIPLE_CLICKED, "tripleclick-4") - SHOW(BUTTON4_RESERVED_EVENT, "reserved-4") - SHOW(BUTTON_CTRL, "ctrl") - SHOW(BUTTON_SHIFT, "shift") - SHOW(BUTTON_ALT, "alt") - SHOW(ALL_MOUSE_EVENTS, "all-events") - SHOW(REPORT_MOUSE_POSITION, "position") + SHOW(BUTTON1_RELEASED, "release-1"); + SHOW(BUTTON1_PRESSED, "press-1"); + SHOW(BUTTON1_CLICKED, "click-1"); + SHOW(BUTTON1_DOUBLE_CLICKED, "doubleclick-1"); + SHOW(BUTTON1_TRIPLE_CLICKED, "tripleclick-1"); + SHOW(BUTTON1_RESERVED_EVENT, "reserved-1"); + SHOW(BUTTON2_RELEASED, "release-2"); + SHOW(BUTTON2_PRESSED, "press-2"); + SHOW(BUTTON2_CLICKED, "click-2"); + SHOW(BUTTON2_DOUBLE_CLICKED, "doubleclick-2"); + SHOW(BUTTON2_TRIPLE_CLICKED, "tripleclick-2"); + SHOW(BUTTON2_RESERVED_EVENT, "reserved-2"); + SHOW(BUTTON3_RELEASED, "release-3"); + SHOW(BUTTON3_PRESSED, "press-3"); + SHOW(BUTTON3_CLICKED, "click-3"); + SHOW(BUTTON3_DOUBLE_CLICKED, "doubleclick-3"); + SHOW(BUTTON3_TRIPLE_CLICKED, "tripleclick-3"); + SHOW(BUTTON3_RESERVED_EVENT, "reserved-3"); + SHOW(BUTTON4_RELEASED, "release-4"); + SHOW(BUTTON4_PRESSED, "press-4"); + SHOW(BUTTON4_CLICKED, "click-4"); + SHOW(BUTTON4_DOUBLE_CLICKED, "doubleclick-4"); + SHOW(BUTTON4_TRIPLE_CLICKED, "tripleclick-4"); + SHOW(BUTTON4_RESERVED_EVENT, "reserved-4"); + SHOW(BUTTON_CTRL, "ctrl"); + SHOW(BUTTON_SHIFT, "shift"); + SHOW(BUTTON_ALT, "alt"); + SHOW(ALL_MOUSE_EVENTS, "all-events"); + SHOW(REPORT_MOUSE_POSITION, "position"); #undef SHOW - if (buf[strlen(buf)-1] == ' ') - buf[strlen(buf)-2] = '\0'; - (void) strcat(buf, "}"); - return(buf); + if (buf[strlen(buf) - 1] == ' ') + buf[strlen(buf) - 2] = '\0'; + (void) strcat(buf, "}"); + return (buf); } #endif /* NCURSES_MOUSE_VERSION */ @@ -238,19 +245,20 @@ static const char *mouse_decode(MEVENT const *ep) * ****************************************************************************/ -static void getch_test(void) +static void +getch_test(void) /* test the keypad feature */ { -char buf[BUFSIZ]; -int c; -int incount = 0, firsttime = 0; -bool blocking = TRUE; -int y, x; + char buf[BUFSIZ]; + int c; + int incount = 0, firsttime = 0; + bool blocking = TRUE; + int y, x; refresh(); #ifdef NCURSES_MOUSE_VERSION - mousemask(ALL_MOUSE_EVENTS, (mmask_t *)0); + mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0); #endif (void) printw("Delay in 10ths of a second ( for blocking input)? "); @@ -259,70 +267,59 @@ int y, x; noecho(); nonl(); - if (isdigit(buf[0])) - { + if (isdigit(buf[0])) { timeout(atoi(buf) * 100); blocking = FALSE; } c = '?'; raw(); - for (;;) - { - if (firsttime++) - { + for (;;) { + if (firsttime++) { printw("Key pressed: %04o ", c); #ifdef NCURSES_MOUSE_VERSION - if (c == KEY_MOUSE) - { - MEVENT event; + if (c == KEY_MOUSE) { + MEVENT event; getmouse(&event); printw("KEY_MOUSE, %s\n", mouse_decode(&event)); - } - else -#endif /* NCURSES_MOUSE_VERSION */ - if (c >= KEY_MIN) - { + } else +#endif /* NCURSES_MOUSE_VERSION */ + if (c >= KEY_MIN) { (void) addstr(keyname(c)); addch('\n'); - } - else if (c > 0x80) - { + } else if (c > 0x80) { int c2 = (c & 0x7f); if (isprint(c2)) (void) printw("M-%c", c2); else (void) printw("M-%s", unctrl(c2)); addstr(" (high-half character)\n"); - } - else - { + } else { if (isprint(c)) (void) printw("%c (ASCII printable character)\n", c); else (void) printw("%s (ASCII control character)\n", unctrl(c)); } getyx(stdscr, y, x); - if (y >= LINES-1) - move(0,0); + if (y >= LINES - 1) + move(0, 0); clrtoeol(); } - if (c == 'g') - { + if (c == 'g') { addstr("getstr test: "); - echo(); getstr(buf); noecho(); + echo(); + getstr(buf); + noecho(); printw("I saw `%s'.\n", buf); } - if (c == 's') - { + if (c == 's') { ShellOut(TRUE); } if (c == 'x' || c == 'q' || (c == ERR && blocking)) break; - if (c == '?') - { + if (c == '?') { addstr("Type any key to see its keypad value. Also:\n"); addstr("g -- triggers a getstr test\n"); addstr("s -- shell out\n"); @@ -335,12 +332,12 @@ int y, x; (void) printw("%05d: input timed out\n", incount++); else { (void) printw("%05d: input error\n", incount++); - break; + break; } } #ifdef NCURSES_MOUSE_VERSION - mousemask(0, (mmask_t *)0); + mousemask(0, (mmask_t *) 0); #endif timeout(-1); erase(); @@ -349,27 +346,31 @@ int y, x; endwin(); } -static int show_attr(int row, int skip, chtype attr, const char *name, bool once) +static int +show_attr(int row, int skip, chtype attr, const char *name, bool once) { int ncv = tigetnum("ncv"); mvprintw(row, 8, "%s mode:", name); mvprintw(row, 24, "|"); - if (skip) printw("%*s", skip, " "); + if (skip) + printw("%*s", skip, " "); if (once) attron(attr); else - attrset(attr); + attrset(attr); addstr("abcde fghij klmno pqrst uvwxy z"); if (once) attroff(attr); - if (skip) printw("%*s", skip, " "); + if (skip) + printw("%*s", skip, " "); printw("|"); if (attr != A_NORMAL) { if (!(termattrs() & attr)) { printw(" (N/A)"); } else if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) { - static const attr_t table[] = { + static const attr_t table[] = + { A_STANDOUT, A_UNDERLINE, A_REVERSE, @@ -382,9 +383,9 @@ static int show_attr(int row, int skip, chtype attr, const char *name, bool once }; unsigned n; bool found = FALSE; - for (n = 0; n < sizeof(table)/sizeof(table[0]); n++) { + for (n = 0; n < sizeof(table) / sizeof(table[0]); n++) { if ((table[n] & attr) != 0 - && ((1 << n) & ncv) != 0) { + && ((1 << n) & ncv) != 0) { found = TRUE; break; } @@ -396,7 +397,8 @@ static int show_attr(int row, int skip, chtype attr, const char *name, bool once return row + 2; } -static bool attr_getc(int *skip, int *fg, int *bg) +static bool +attr_getc(int *skip, int *fg, int *bg) { int ch = Getchar(); @@ -409,36 +411,49 @@ static bool attr_getc(int *skip, int *fg, int *bg) return TRUE; } else 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; + 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 >= COLORS) *fg = 0; - if (*fg < 0) *fg = COLORS - 1; - if (*bg >= COLORS) *bg = 0; - if (*bg < 0) *bg = COLORS - 1; + if (*fg >= COLORS) + *fg = 0; + if (*fg < 0) + *fg = COLORS - 1; + if (*bg >= COLORS) + *bg = 0; + if (*bg < 0) + *bg = COLORS - 1; return TRUE; } return FALSE; } -static void attr_test(void) +static void +attr_test(void) /* test text attributes */ { int n; int skip = tigetnum("xmc"); int fg = COLOR_BLACK; /* color pair 0 is special */ int bg = COLOR_BLACK; - bool *pairs = (bool *)calloc(COLOR_PAIRS, sizeof(bool)); + bool *pairs = (bool *) calloc(COLOR_PAIRS, sizeof(bool)); pairs[0] = TRUE; if (skip < 0) - skip = 0; + skip = 0; - n = skip; /* make it easy */ + n = skip; /* make it easy */ do { int row = 2; @@ -447,7 +462,7 @@ static void attr_test(void) if (has_colors()) { int pair = (fg * COLORS) + bg; if (!pairs[pair]) { - init_pair(pair, fg, bg); + init_pair(pair, fg, bg); pairs[pair] = TRUE; } normal |= COLOR_PAIR(pair); @@ -457,30 +472,30 @@ static void attr_test(void) mvaddstr(0, 20, "Character attribute test display"); - row = show_attr(row, n, A_STANDOUT, "STANDOUT", TRUE); - row = show_attr(row, n, A_REVERSE, "REVERSE", TRUE); - row = show_attr(row, n, A_BOLD, "BOLD", TRUE); + row = show_attr(row, n, A_STANDOUT, "STANDOUT", TRUE); + row = show_attr(row, n, A_REVERSE, "REVERSE", TRUE); + row = show_attr(row, n, A_BOLD, "BOLD", TRUE); row = show_attr(row, n, A_UNDERLINE, "UNDERLINE", TRUE); - row = show_attr(row, n, A_DIM, "DIM", TRUE); - row = show_attr(row, n, A_BLINK, "BLINK", TRUE); - row = show_attr(row, n, A_PROTECT, "PROTECT", TRUE); - row = show_attr(row, n, A_INVIS, "INVISIBLE", TRUE); - row = show_attr(row, n, A_NORMAL, "NORMAL", FALSE); + row = show_attr(row, n, A_DIM, "DIM", TRUE); + row = show_attr(row, n, A_BLINK, "BLINK", TRUE); + row = show_attr(row, n, A_PROTECT, "PROTECT", TRUE); + row = show_attr(row, n, A_INVIS, "INVISIBLE", TRUE); + row = show_attr(row, n, A_NORMAL, "NORMAL", FALSE); mvprintw(row, 8, - "This terminal does %shave the magic-cookie glitch", - tigetnum("xmc") > -1 ? "" : "not "); - mvprintw(row+1, 8, - "Enter a digit to set gaps on each side of displayed attributes"); - mvprintw(row+2, 8, - "^L = repaint"); + "This terminal does %shave the magic-cookie glitch", + tigetnum("xmc") > -1 ? "" : "not "); + mvprintw(row + 1, 8, + "Enter a digit to set gaps on each side of displayed attributes"); + mvprintw(row + 2, 8, + "^L = repaint"); if (has_colors()) printw(". f/F/b/F toggle colors (now %d/%d)", fg, bg); - refresh(); + refresh(); } while (attr_getc(&n, &fg, &bg)); - free((char *)pairs); + free((char *) pairs); bkgdset(A_NORMAL | BLANK); erase(); endwin(); @@ -501,10 +516,19 @@ static NCURSES_CONST char *color_names[] = "blue", "magenta", "cyan", - "white" + "white", + "BLACK", + "RED", + "GREEN", + "YELLOW", + "BLUE", + "MAGENTA", + "CYAN", + "WHITE" }; -static void show_color_name(int y, int x, int color) +static void +show_color_name(int y, int x, int color) { if (COLORS > 8) mvprintw(y, x, "%02d ", color); @@ -512,7 +536,8 @@ static void show_color_name(int y, int x, int color) mvaddstr(y, x, color_names[color]); } -static void color_test(void) +static void +color_test(void) /* generate a color test pattern */ { int i; @@ -525,24 +550,22 @@ static void color_test(void) width = (COLORS > 8) ? 4 : 8; hello = (COLORS > 8) ? "Test" : "Hello"; - for (base = 0; base < 2; base++) - { - top = (COLORS > 8) ? 0 : base * (COLORS+3); + for (base = 0; base < 2; base++) { + top = (COLORS > 8) ? 0 : base * (COLORS + 3); clrtobot(); (void) mvprintw(top + 1, 0, - "%dx%d matrix of foreground/background colors, bright *%s*\n", - COLORS, COLORS, - base ? "on" : "off"); + "%dx%d matrix of foreground/background colors, bright *%s*\n", + COLORS, COLORS, + base ? "on" : "off"); for (i = 0; i < COLORS; i++) - show_color_name(top + 2, (i+1) * width, i); + show_color_name(top + 2, (i + 1) * width, i); for (i = 0; i < COLORS; i++) show_color_name(top + 3 + i, 0, i); - for (i = 1; i < COLOR_PAIRS; i++) - { + for (i = 1; i < COLOR_PAIRS; i++) { init_pair(i, i % COLORS, i / COLORS); - attron((attr_t)COLOR_PAIR(i)); + attron((attr_t) COLOR_PAIR(i)); if (base) - attron((attr_t)A_BOLD); + attron((attr_t) A_BOLD); mvaddstr(top + 3 + (i / COLORS), (i % COLORS + 1) * width, hello); attrset(A_NORMAL); } @@ -554,57 +577,59 @@ static void color_test(void) endwin(); } -static void change_color(int current, int field, int value, int usebase) +static void +change_color(int current, int field, int value, int usebase) { - short red, green, blue; + short red, green, blue; - if (usebase) - color_content(current, &red, &green, &blue); - else - red = green = blue = 0; + if (usebase) + color_content(current, &red, &green, &blue); + else + red = green = blue = 0; - switch (field) { - case 0: - red += value; - break; - case 1: - green += value; - break; - case 2: - blue += value; - break; - } + switch (field) { + case 0: + red += value; + break; + case 1: + green += value; + break; + case 2: + blue += value; + break; + } - if (init_color(current, red, green, blue) == ERR) - beep(); + if (init_color(current, red, green, blue) == ERR) + beep(); } -static void color_edit(void) +static void +color_edit(void) /* display the color test pattern, without trying to edit colors */ { - int i, this_c = 0, value = 0, current = 0, field = 0; + int i, this_c = 0, value = 0, current = 0, field = 0; int last_c; + int max_colors = COLORS > 16 ? 16 : COLORS; refresh(); - for (i = 0; i < COLORS; i++) + for (i = 0; i < max_colors; i++) init_pair(i, COLOR_WHITE, i); - mvprintw(LINES-2, 0, "Number: %d", value); + mvprintw(LINES - 2, 0, "Number: %d", value); do { - short red, green, blue; + short red, green, blue; attron(A_BOLD); mvaddstr(0, 20, "Color RGB Value Editing"); attroff(A_BOLD); - for (i = 0; i < COLORS; i++) - { + for (i = 0; i < max_colors; i++) { mvprintw(2 + i, 0, "%c %-8s:", - (i == current ? '>' : ' '), - (i < (int) SIZEOF(color_names) - ? color_names[i] : "")); + (i == current ? '>' : ' '), + (i < (int) SIZEOF(color_names) + ? color_names[i] : "")); attrset(COLOR_PAIR(i)); addstr(" "); attrset(A_NORMAL); @@ -619,24 +644,30 @@ static void color_edit(void) color_content(i, &red, &green, &blue); addstr(" R = "); - if (current == i && field == 0) attron(A_STANDOUT); + if (current == i && field == 0) + attron(A_STANDOUT); printw("%04d", red); - if (current == i && field == 0) attrset(A_NORMAL); + if (current == i && field == 0) + attrset(A_NORMAL); addstr(", G = "); - if (current == i && field == 1) attron(A_STANDOUT); + if (current == i && field == 1) + attron(A_STANDOUT); printw("%04d", green); - if (current == i && field == 1) attrset(A_NORMAL); + if (current == i && field == 1) + attrset(A_NORMAL); addstr(", B = "); - if (current == i && field == 2) attron(A_STANDOUT); + if (current == i && field == 2) + attron(A_STANDOUT); printw("%04d", blue); - if (current == i && field == 2) attrset(A_NORMAL); + if (current == i && field == 2) + attrset(A_NORMAL); attrset(A_NORMAL); addstr(")"); } - mvaddstr(COLORS + 3, 0, + mvaddstr(max_colors + 3, 0, "Use up/down to select a color, left/right to change fields."); - mvaddstr(COLORS + 4, 0, + mvaddstr(max_colors + 4, 0, "Modify field by typing nnn=, nnn-, or nnn+. ? for help."); move(2 + current, 0); @@ -644,16 +675,15 @@ static void color_edit(void) last_c = this_c; this_c = Getchar(); if (isdigit(this_c) && !isdigit(last_c)) - value = 0; + value = 0; - switch (this_c) - { + switch (this_c) { case KEY_UP: - current = (current == 0 ? (COLORS - 1) : current - 1); + current = (current == 0 ? (max_colors - 1) : current - 1); break; case KEY_DOWN: - current = (current == (COLORS - 1) ? 0 : current + 1); + current = (current == (max_colors - 1) ? 0 : current + 1); break; case KEY_RIGHT: @@ -664,8 +694,16 @@ static void color_edit(void) field = (field == 0 ? 2 : field - 1); break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': value = value * 10 + (this_c - '0'); break; @@ -683,18 +721,18 @@ static void color_edit(void) case '?': erase(); - P(" RGB Value Editing Help"); - P(""); - P("You are in the RGB value editor. Use the arrow keys to select one of"); - P("the fields in one of the RGB triples of the current colors; the one"); - P("currently selected will be reverse-video highlighted."); - P(""); - P("To change a field, enter the digits of the new value; they are echoed"); - P("as entered. Finish by typing `='. The change will take effect instantly."); - P("To increment or decrement a value, use the same procedure, but finish"); - P("with a `+' or `-'."); - P(""); - P("To quit, do `x' or 'q'"); + P(" RGB Value Editing Help"); + P(""); + P("You are in the RGB value editor. Use the arrow keys to select one of"); + P("the fields in one of the RGB triples of the current colors; the one"); + P("currently selected will be reverse-video highlighted."); + P(""); + P("To change a field, enter the digits of the new value; they are echoed"); + P("as entered. Finish by typing `='. The change will take effect instantly."); + P("To increment or decrement a value, use the same procedure, but finish"); + P("with a `+' or `-'."); + P(""); + P("To quit, do `x' or 'q'"); Pause(); erase(); @@ -708,7 +746,7 @@ static void color_edit(void) beep(); break; } - mvprintw(LINES-2, 0, "Number: %d", value); + mvprintw(LINES - 2, 0, "Number: %d", value); clrtoeol(); } while (this_c != 'x' && this_c != 'q'); @@ -723,17 +761,17 @@ static void color_edit(void) * ****************************************************************************/ -static void slk_test(void) +static void +slk_test(void) /* exercise the soft keys */ { - int c, fmt = 1; + int c, fmt = 1; char buf[9]; c = CTRL('l'); do { move(0, 0); - switch(c) - { + switch (c) { case CTRL('l'): erase(); attron(A_BOLD); @@ -772,7 +810,7 @@ static void slk_test(void) case 's': mvprintw(20, 0, "Press Q to stop the scrolling-test: "); while ((c = Getchar()) != 'Q' && (c != ERR)) - addch((chtype)c); + addch((chtype) c); break; case 'd': @@ -791,15 +829,22 @@ static void slk_test(void) fmt = 2; break; - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': (void) mvaddstr(20, 0, "Please enter the label value: "); echo(); wgetnstr(stdscr, buf, 8); noecho(); slk_set((c - '0'), buf, fmt); slk_refresh(); - move(20, 0); clrtoeol(); + move(20, 0); + clrtoeol(); break; case 'x': @@ -812,7 +857,7 @@ static void slk_test(void) } while ((c = Getchar()) != EOF); - done: + done: erase(); endwin(); } @@ -826,121 +871,127 @@ static void slk_test(void) /* ISO 6429: codes 0x80 to 0x9f may be control characters that cause the * terminal to perform functions. The remaining codes can be graphic. */ -static void show_upper_chars(int first) +static void +show_upper_chars(int first) { - bool C1 = (first == 128); - int code; - int last = first + 31; - int reply; + bool C1 = (first == 128); + int code; + int last = first + 31; + int reply; - erase(); - attron(A_BOLD); - mvprintw(0, 20, "Display of %s Character Codes %d to %d", - C1 ? "C1" : "GR", first, last); - attroff(A_BOLD); - refresh(); + erase(); + attron(A_BOLD); + mvprintw(0, 20, "Display of %s Character Codes %d to %d", + C1 ? "C1" : "GR", first, last); + attroff(A_BOLD); + refresh(); - for (code = first; code <= last; code++) { - int row = 4 + ((code - first) % 16); - int col = ((code - first) / 16) * COLS / 2; - char tmp[80]; - sprintf(tmp, "%3d (0x%x)", code, code); - mvprintw(row, col, "%*s: ", COLS/4, tmp); - if (C1) - nodelay(stdscr, TRUE); - echochar(code); - if (C1) { - /* (yes, this _is_ crude) */ - while ((reply = Getchar()) != ERR) { - addch(reply); - napms(10); - } - nodelay(stdscr, FALSE); - } + for (code = first; code <= last; code++) { + int row = 4 + ((code - first) % 16); + int col = ((code - first) / 16) * COLS / 2; + char tmp[80]; + sprintf(tmp, "%3d (0x%x)", code, code); + mvprintw(row, col, "%*s: ", COLS / 4, tmp); + if (C1) + nodelay(stdscr, TRUE); + echochar(code); + if (C1) { + /* (yes, this _is_ crude) */ + while ((reply = Getchar()) != ERR) { + addch(reply); + napms(10); + } + nodelay(stdscr, FALSE); } + } } -static int show_1_acs(int n, const char *name, chtype code) +static int +show_1_acs(int n, const char *name, chtype code) { - const int height = 16; - int row = 4 + (n % height); - int col = (n / height) * COLS / 2; - mvprintw(row, col, "%*s : ", COLS/4, name); - addch(code); - return n + 1; + const int height = 16; + int row = 4 + (n % height); + int col = (n / height) * COLS / 2; + mvprintw(row, col, "%*s : ", COLS / 4, name); + addch(code); + return n + 1; } -static void show_acs_chars(void) +static void +show_acs_chars(void) /* display the ACS character set */ { - int n; + int n; #define BOTH(name) #name, name - erase(); - attron(A_BOLD); - mvaddstr(0, 20, "Display of the ACS Character Set"); - attroff(A_BOLD); - refresh(); + erase(); + attron(A_BOLD); + mvaddstr(0, 20, "Display of the ACS Character Set"); + attroff(A_BOLD); + refresh(); - n = show_1_acs(0, BOTH(ACS_ULCORNER)); - n = show_1_acs(n, BOTH(ACS_LLCORNER)); - n = show_1_acs(n, BOTH(ACS_URCORNER)); - n = show_1_acs(n, BOTH(ACS_LRCORNER)); - n = show_1_acs(n, BOTH(ACS_RTEE)); - n = show_1_acs(n, BOTH(ACS_LTEE)); - n = show_1_acs(n, BOTH(ACS_BTEE)); - n = show_1_acs(n, BOTH(ACS_TTEE)); - n = show_1_acs(n, BOTH(ACS_HLINE)); - n = show_1_acs(n, BOTH(ACS_VLINE)); - n = show_1_acs(n, BOTH(ACS_PLUS)); - n = show_1_acs(n, BOTH(ACS_S1)); - n = show_1_acs(n, BOTH(ACS_S9)); - n = show_1_acs(n, BOTH(ACS_DIAMOND)); - n = show_1_acs(n, BOTH(ACS_CKBOARD)); - n = show_1_acs(n, BOTH(ACS_DEGREE)); - n = show_1_acs(n, BOTH(ACS_PLMINUS)); - n = show_1_acs(n, BOTH(ACS_BULLET)); - n = show_1_acs(n, BOTH(ACS_LARROW)); - n = show_1_acs(n, BOTH(ACS_RARROW)); - n = show_1_acs(n, BOTH(ACS_DARROW)); - n = show_1_acs(n, BOTH(ACS_UARROW)); - n = show_1_acs(n, BOTH(ACS_BOARD)); - n = show_1_acs(n, BOTH(ACS_LANTERN)); - n = show_1_acs(n, BOTH(ACS_BLOCK)); - n = show_1_acs(n, BOTH(ACS_S3)); - n = show_1_acs(n, BOTH(ACS_S7)); - n = show_1_acs(n, BOTH(ACS_LEQUAL)); - n = show_1_acs(n, BOTH(ACS_GEQUAL)); - n = show_1_acs(n, BOTH(ACS_PI)); - n = show_1_acs(n, BOTH(ACS_NEQUAL)); - n = show_1_acs(n, BOTH(ACS_STERLING)); -} - -static void acs_display(void) -{ - int c = 'a'; - - do { - switch (c) { - case 'a': - show_acs_chars(); - break; - case '0': - case '1': - case '2': - case '3': - show_upper_chars((c - '0') * 32 + 128); - break; - } - mvprintw(LINES-3,0, "Note: ANSI terminals may not display C1 characters."); - mvprintw(LINES-2,0, "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit"); - refresh(); - } while ((c = Getchar()) != 'x' && c != 'q'); + n = show_1_acs(0, BOTH(ACS_ULCORNER)); + n = show_1_acs(n, BOTH(ACS_LLCORNER)); + n = show_1_acs(n, BOTH(ACS_URCORNER)); + n = show_1_acs(n, BOTH(ACS_LRCORNER)); + n = show_1_acs(n, BOTH(ACS_RTEE)); + n = show_1_acs(n, BOTH(ACS_LTEE)); + n = show_1_acs(n, BOTH(ACS_BTEE)); + n = show_1_acs(n, BOTH(ACS_TTEE)); + n = show_1_acs(n, BOTH(ACS_HLINE)); + n = show_1_acs(n, BOTH(ACS_VLINE)); + n = show_1_acs(n, BOTH(ACS_PLUS)); + n = show_1_acs(n, BOTH(ACS_S1)); + n = show_1_acs(n, BOTH(ACS_S9)); + n = show_1_acs(n, BOTH(ACS_DIAMOND)); + n = show_1_acs(n, BOTH(ACS_CKBOARD)); + n = show_1_acs(n, BOTH(ACS_DEGREE)); + n = show_1_acs(n, BOTH(ACS_PLMINUS)); + n = show_1_acs(n, BOTH(ACS_BULLET)); + n = show_1_acs(n, BOTH(ACS_LARROW)); + n = show_1_acs(n, BOTH(ACS_RARROW)); + n = show_1_acs(n, BOTH(ACS_DARROW)); + n = show_1_acs(n, BOTH(ACS_UARROW)); + n = show_1_acs(n, BOTH(ACS_BOARD)); + n = show_1_acs(n, BOTH(ACS_LANTERN)); + n = show_1_acs(n, BOTH(ACS_BLOCK)); + n = show_1_acs(n, BOTH(ACS_S3)); + n = show_1_acs(n, BOTH(ACS_S7)); + n = show_1_acs(n, BOTH(ACS_LEQUAL)); + n = show_1_acs(n, BOTH(ACS_GEQUAL)); + n = show_1_acs(n, BOTH(ACS_PI)); + n = show_1_acs(n, BOTH(ACS_NEQUAL)); + n = show_1_acs(n, BOTH(ACS_STERLING)); +} - Pause(); - erase(); - endwin(); +static void +acs_display(void) +{ + int c = 'a'; + + do { + switch (c) { + case 'a': + show_acs_chars(); + break; + case '0': + case '1': + case '2': + case '3': + show_upper_chars((c - '0') * 32 + 128); + break; + } + mvprintw(LINES - 3, 0, + "Note: ANSI terminals may not display C1 characters."); + mvprintw(LINES - 2, 0, + "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit"); + refresh(); + } while ((c = Getchar()) != 'x' && c != 'q'); + + Pause(); + erase(); + endwin(); } /* @@ -961,58 +1012,59 @@ test_sgr_attributes(void) } bkgdset(normal); erase(); - mvprintw( 1,20, "Graphic rendition test pattern:"); + mvprintw(1, 20, "Graphic rendition test pattern:"); - mvprintw( 4, 1, "vanilla"); + mvprintw(4, 1, "vanilla"); #define set_sgr(mask) bkgdset((normal^(mask))); set_sgr(A_BOLD); - mvprintw( 4,40, "bold"); + mvprintw(4, 40, "bold"); set_sgr(A_UNDERLINE); - mvprintw( 6, 6, "underline"); + mvprintw(6, 6, "underline"); - set_sgr(A_BOLD|A_UNDERLINE); - mvprintw( 6,45, "bold underline"); + set_sgr(A_BOLD | A_UNDERLINE); + mvprintw(6, 45, "bold underline"); set_sgr(A_BLINK); - mvprintw( 8, 1, "blink"); + mvprintw(8, 1, "blink"); - set_sgr(A_BLINK|A_BOLD); - mvprintw( 8,40, "bold blink"); + set_sgr(A_BLINK | A_BOLD); + mvprintw(8, 40, "bold blink"); - set_sgr(A_UNDERLINE|A_BLINK); + set_sgr(A_UNDERLINE | A_BLINK); mvprintw(10, 6, "underline blink"); - set_sgr(A_BOLD|A_UNDERLINE|A_BLINK); - mvprintw(10,45, "bold underline blink"); + set_sgr(A_BOLD | A_UNDERLINE | A_BLINK); + mvprintw(10, 45, "bold underline blink"); set_sgr(A_REVERSE); mvprintw(12, 1, "negative"); - set_sgr(A_BOLD|A_REVERSE); - mvprintw(12,40, "bold negative"); + set_sgr(A_BOLD | A_REVERSE); + mvprintw(12, 40, "bold negative"); - set_sgr(A_UNDERLINE|A_REVERSE); + set_sgr(A_UNDERLINE | A_REVERSE); mvprintw(14, 6, "underline negative"); - set_sgr(A_BOLD|A_UNDERLINE|A_REVERSE); - mvprintw(14,45, "bold underline negative"); + set_sgr(A_BOLD | A_UNDERLINE | A_REVERSE); + mvprintw(14, 45, "bold underline negative"); - set_sgr(A_BLINK|A_REVERSE); + set_sgr(A_BLINK | A_REVERSE); mvprintw(16, 1, "blink negative"); - set_sgr(A_BOLD|A_BLINK|A_REVERSE); - mvprintw(16,40, "bold blink negative"); + set_sgr(A_BOLD | A_BLINK | A_REVERSE); + mvprintw(16, 40, "bold blink negative"); - set_sgr(A_UNDERLINE|A_BLINK|A_REVERSE); + set_sgr(A_UNDERLINE | A_BLINK | A_REVERSE); mvprintw(18, 6, "underline blink negative"); - set_sgr(A_BOLD|A_UNDERLINE|A_BLINK|A_REVERSE); - mvprintw(18,45, "bold underline blink negative"); + set_sgr(A_BOLD | A_UNDERLINE | A_BLINK | A_REVERSE); + mvprintw(18, 45, "bold underline blink negative"); bkgdset(normal); - mvprintw(LINES-2,1, "%s background. ", pass == 0 ? "Dark" : "Light"); + mvprintw(LINES - 2, 1, "%s background. ", pass == 0 ? "Dark" : + "Light"); clrtoeol(); Pause(); } @@ -1030,196 +1082,240 @@ test_sgr_attributes(void) #define BOTLINES 4 /* number of line stolen from screen bottom */ -typedef struct -{ +typedef struct { int y, x; -} -pair; +} pair; #define FRAME struct frame FRAME { - FRAME *next, *last; - bool do_scroll; - bool do_keypad; - WINDOW *wind; + FRAME *next, *last; + bool do_scroll; + bool do_keypad; + WINDOW *wind; }; /* We need to know if these flags are actually set, so don't look in FRAME. * These names are known to work with SVr4 curses as well as ncurses. */ -static bool HaveKeypad(FRAME *curp) +static bool +HaveKeypad(FRAME * curp) { - WINDOW *win = (curp ? curp->wind : stdscr); - return win->_use_keypad; + WINDOW *win = (curp ? curp->wind : stdscr); + return win->_use_keypad; } -static bool HaveScroll(FRAME *curp) +static bool +HaveScroll(FRAME * curp) { - WINDOW *win = (curp ? curp->wind : stdscr); - return win->_scroll; + WINDOW *win = (curp ? curp->wind : stdscr); + return win->_scroll; } -static void newwin_legend(FRAME *curp) +static void +newwin_legend(FRAME * curp) { - static const struct { - const char *msg; - int code; - } legend[] = { - { "^C = create window", 0 }, - { "^N = next window", 0 }, - { "^P = previous window", 0 }, - { "^F = scroll forward", 0 }, - { "^B = scroll backward", 0 }, - { "^K = keypad(%s)", 1 }, - { "^S = scrollok(%s)", 2 }, - { "^W = save window to file", 0 }, - { "^R = restore window", 0 }, -#ifdef NCURSES_VERSION - { "^X = resize", 0 }, + static const struct { + const char *msg; + int code; + } legend[] = { + { + "^C = create window", 0 + }, + { + "^N = next window", 0 + }, + { + "^P = previous window", 0 + }, + { + "^F = scroll forward", 0 + }, + { + "^B = scroll backward", 0 + }, + { + "^K = keypad(%s)", 1 + }, + { + "^S = scrollok(%s)", 2 + }, + { + "^W = save window to file", 0 + }, + { + "^R = restore window", 0 + }, +#ifdef HAVE_WRESIZE + { + "^X = resize", 0 + }, #endif - { "^Q%s = exit", 3 } - }; - size_t n; - int y, x; - bool do_keypad = HaveKeypad(curp); - bool do_scroll = HaveScroll(curp); - char buf[BUFSIZ]; - - move(LINES-4, 0); - for (n = 0; n < SIZEOF(legend); n++) { - switch (legend[n].code) { - default: - strcpy(buf, legend[n].msg); - break; - case 1: - sprintf(buf, legend[n].msg, do_keypad ? "yes" : "no"); - break; - case 2: - sprintf(buf, legend[n].msg, do_scroll ? "yes" : "no"); - break; - case 3: - sprintf(buf, legend[n].msg, do_keypad ? "/ESC" : ""); - break; - } - getyx(stdscr, y, x); - addstr((COLS < (x + 3 + (int)strlen(buf))) ? "\n" : (n ? ", " : "")); - addstr(buf); + { + "^Q%s = exit", 3 } - clrtoeol(); + }; + size_t n; + int y, x; + bool do_keypad = HaveKeypad(curp); + bool do_scroll = HaveScroll(curp); + char buf[BUFSIZ]; + + move(LINES - 4, 0); + for (n = 0; n < SIZEOF(legend); n++) { + switch (legend[n].code) { + default: + strcpy(buf, legend[n].msg); + break; + case 1: + sprintf(buf, legend[n].msg, do_keypad ? "yes" : "no"); + break; + case 2: + sprintf(buf, legend[n].msg, do_scroll ? "yes" : "no"); + break; + case 3: + sprintf(buf, legend[n].msg, do_keypad ? "/ESC" : ""); + break; + } + getyx(stdscr, y, x); + addstr((COLS < (x + 3 + (int) strlen(buf))) ? "\n" : (n ? ", " : "")); + addstr(buf); + } + clrtoeol(); } -static void transient(FRAME *curp, NCURSES_CONST char *msg) +static void +transient(FRAME * curp, NCURSES_CONST char *msg) { newwin_legend(curp); - if (msg) - { + if (msg) { mvaddstr(LINES - 1, 0, msg); refresh(); napms(1000); } - move(LINES-1, 0); + move(LINES - 1, 0); printw("%s characters are echoed, window should %sscroll.", HaveKeypad(curp) ? "Non-arrow" : "All other", - HaveScroll(curp) ? "" : "not " ); + HaveScroll(curp) ? "" : "not "); clrtoeol(); } -static void newwin_report(FRAME *curp) +static void +newwin_report(FRAME * curp) /* report on the cursor's current position, then restore it */ { - WINDOW *win = (curp != 0) ? curp->wind : stdscr; - int y, x; + WINDOW *win = (curp != 0) ? curp->wind : stdscr; + int y, x; - if (win != stdscr) - transient(curp, (char *)0); - getyx(win, y, x); - move(LINES - 1, COLS - 17); - printw("Y = %2d X = %2d", y, x); - if (win != stdscr) - refresh(); - else - wmove(win, y, x); + if (win != stdscr) + transient(curp, (char *) 0); + getyx(win, y, x); + move(LINES - 1, COLS - 17); + printw("Y = %2d X = %2d", y, x); + if (win != stdscr) + refresh(); + else + wmove(win, y, x); } -static pair *selectcell(int uli, int ulj, int lri, int lrj) +static pair * +selectcell(int uli, int ulj, int lri, int lrj) /* arrows keys move cursor, return location at current on non-arrow key */ { - static pair res; /* result cell */ - int si = lri - uli + 1; /* depth of the select area */ - int sj = lrj - ulj + 1; /* width of the select area */ - int i = 0, j = 0; /* offsets into the select area */ + static pair res; /* result cell */ + int si = lri - uli + 1; /* depth of the select area */ + int sj = lrj - ulj + 1; /* width of the select area */ + int i = 0, j = 0; /* offsets into the select area */ res.y = uli; res.x = ulj; - for (;;) - { + for (;;) { move(uli + i, ulj + j); - newwin_report((FRAME *)0); + newwin_report((FRAME *) 0); - switch(Getchar()) - { - case KEY_UP: i += si - 1; break; - case KEY_DOWN: i++; break; - case KEY_LEFT: j += sj - 1; break; - case KEY_RIGHT: j++; break; + switch (Getchar()) { + case KEY_UP: + i += si - 1; + break; + case KEY_DOWN: + i++; + break; + case KEY_LEFT: + j += sj - 1; + break; + case KEY_RIGHT: + j++; + break; case QUIT: - case ESCAPE: return((pair *)0); + case ESCAPE: + return ((pair *) 0); #ifdef NCURSES_MOUSE_VERSION case KEY_MOUSE: { - MEVENT event; + MEVENT event; getmouse(&event); if (event.y > uli && event.x > ulj) { - i = event.y - uli; - j = event.x - ulj; + i = event.y - uli; + j = event.x - ulj; } else { - beep(); - break; + beep(); + break; } } /* FALLTHRU */ #endif - default: res.y = uli + i; res.x = ulj + j; return(&res); + default: + res.y = uli + i; + res.x = ulj + j; + return (&res); } i %= si; j %= sj; } } -static void outerbox(pair ul, pair lr, bool onoff) +static void +outerbox(pair ul, pair lr, bool onoff) /* draw or erase a box *outside* the given pair of corners */ { - mvaddch(ul.y-1, lr.x-1, onoff ? ACS_ULCORNER : ' '); - mvaddch(ul.y-1, lr.x+1, onoff ? ACS_URCORNER : ' '); - mvaddch(lr.y+1, lr.x+1, onoff ? ACS_LRCORNER : ' '); - mvaddch(lr.y+1, ul.x-1, onoff ? ACS_LLCORNER : ' '); - move(ul.y-1, ul.x); hline(onoff ? ACS_HLINE : ' ', lr.x - ul.x + 1); - move(ul.y, ul.x-1); vline(onoff ? ACS_VLINE : ' ', lr.y - ul.y + 1); - move(lr.y+1, ul.x); hline(onoff ? ACS_HLINE : ' ', lr.x - ul.x + 1); - move(ul.y, lr.x+1); vline(onoff ? ACS_VLINE : ' ', lr.y - ul.y + 1); -} - -static WINDOW *getwindow(void) + mvaddch(ul.y - 1, lr.x - 1, onoff ? ACS_ULCORNER : ' '); + mvaddch(ul.y - 1, lr.x + 1, onoff ? ACS_URCORNER : ' '); + mvaddch(lr.y + 1, lr.x + 1, onoff ? ACS_LRCORNER : ' '); + mvaddch(lr.y + 1, ul.x - 1, onoff ? ACS_LLCORNER : ' '); + move(ul.y - 1, ul.x); + hline(onoff ? ACS_HLINE : ' ', lr.x - ul.x + 1); + move(ul.y, ul.x - 1); + vline(onoff ? ACS_VLINE : ' ', lr.y - ul.y + 1); + move(lr.y + 1, ul.x); + hline(onoff ? ACS_HLINE : ' ', lr.x - ul.x + 1); + move(ul.y, lr.x + 1); + vline(onoff ? ACS_VLINE : ' ', lr.y - ul.y + 1); +} + +static WINDOW * +getwindow(void) /* Ask user for a window definition */ { - WINDOW *rwindow; - pair ul, lr, *tmp; + WINDOW *rwindow; + pair ul, lr, *tmp; - move(0, 0); clrtoeol(); + move(0, 0); + clrtoeol(); addstr("Use arrows to move cursor, anything else to mark corner 1"); refresh(); - if ((tmp = selectcell(2, 1, LINES-BOTLINES-2, COLS-2)) == (pair *)0) - return((WINDOW *)0); + if ((tmp = selectcell(2, 1, LINES - BOTLINES - 2, COLS - 2)) == (pair *) 0) + return ((WINDOW *) 0); memcpy(&ul, tmp, sizeof(pair)); - mvaddch(ul.y-1, ul.x-1, ACS_ULCORNER); - move(0, 0); clrtoeol(); + mvaddch(ul.y - 1, ul.x - 1, ACS_ULCORNER); + move(0, 0); + clrtoeol(); addstr("Use arrows to move cursor, anything else to mark corner 2"); refresh(); - if ((tmp = selectcell(ul.y, ul.x, LINES-BOTLINES-2, COLS-2)) == (pair *)0) - return((WINDOW *)0); + if ((tmp = selectcell(ul.y, ul.x, LINES - BOTLINES - 2, COLS - 2)) == + (pair *) 0) + return ((WINDOW *) 0); memcpy(&lr, tmp, sizeof(pair)); rwindow = subwin(stdscr, lr.y - ul.y + 1, lr.x - ul.x + 1, ul.y, ul.x); @@ -1229,78 +1325,78 @@ static WINDOW *getwindow(void) wrefresh(rwindow); - move(0, 0); clrtoeol(); - return(rwindow); + move(0, 0); + clrtoeol(); + return (rwindow); } -static void newwin_move(FRAME *curp, int dy, int dx) +static void +newwin_move(FRAME * curp, int dy, int dx) { - WINDOW *win = (curp != 0) ? curp->wind : stdscr; - int cur_y, cur_x; - int max_y, max_x; + WINDOW *win = (curp != 0) ? curp->wind : stdscr; + int cur_y, cur_x; + int max_y, max_x; - getyx(win, cur_y, cur_x); - getmaxyx(win, max_y, max_x); - if ((cur_x += dx) < 0) - cur_x = 0; - else if (cur_x >= max_x) - cur_x = max_x - 1; - if ((cur_y += dy) < 0) - cur_y = 0; - else if (cur_y >= max_y) - cur_y = max_y - 1; - wmove(win, cur_y, cur_x); + getyx(win, cur_y, cur_x); + getmaxyx(win, max_y, max_x); + if ((cur_x += dx) < 0) + cur_x = 0; + else if (cur_x >= max_x) + cur_x = max_x - 1; + if ((cur_y += dy) < 0) + cur_y = 0; + else if (cur_y >= max_y) + cur_y = max_y - 1; + wmove(win, cur_y, cur_x); } -static FRAME *delete_framed(FRAME *fp, bool showit) +static FRAME * +delete_framed(FRAME * fp, bool showit) { - FRAME *np; + FRAME *np; - fp->last->next = fp->next; - fp->next->last = fp->last; + fp->last->next = fp->next; + fp->next->last = fp->last; - if (showit) { - werase(fp->wind); - wrefresh(fp->wind); - } - delwin(fp->wind); + if (showit) { + werase(fp->wind); + wrefresh(fp->wind); + } + delwin(fp->wind); - np = (fp == fp->next) ? 0 : fp->next; - free(fp); - return np; + np = (fp == fp->next) ? 0 : fp->next; + free(fp); + return np; } -static void acs_and_scroll(void) +static void +acs_and_scroll(void) /* Demonstrate windows */ { - int c, i; + int c, i; FILE *fp; - FRAME *current = (FRAME *)0, *neww; + FRAME *current = (FRAME *) 0, *neww; WINDOW *usescr = stdscr; #define DUMPFILE "screendump" #ifdef NCURSES_MOUSE_VERSION - mousemask(BUTTON1_CLICKED, (mmask_t *)0); + mousemask(BUTTON1_CLICKED, (mmask_t *) 0); #endif c = CTRL('C'); raw(); do { - transient((FRAME *)0, (char *)0); - switch(c) - { + transient((FRAME *) 0, (char *) 0); + switch (c) { case CTRL('C'): neww = (FRAME *) calloc(1, sizeof(FRAME)); - if ((neww->wind = getwindow()) == (WINDOW *)0) + if ((neww->wind = getwindow()) == (WINDOW *) 0) goto breakout; - if (current == 0) /* First element, */ - { - neww->next = neww; /* so point it at itself */ + if (current == 0) { /* First element, */ + neww->next = neww; /* so point it at itself */ neww->last = neww; - } - else - { + } else { neww->next = current->next; neww->last = current; neww->last->next = neww; @@ -1316,27 +1412,27 @@ static void acs_and_scroll(void) current->do_scroll = HaveScroll(current); break; - case CTRL('N'): /* go to next window */ + case CTRL('N'): /* go to next window */ if (current) current = current->next; break; - case CTRL('P'): /* go to previous window */ + case CTRL('P'): /* go to previous window */ if (current) current = current->last; break; - case CTRL('F'): /* scroll current window forward */ + case CTRL('F'): /* scroll current window forward */ if (current) wscrl(current->wind, 1); break; - case CTRL('B'): /* scroll current window backwards */ + case CTRL('B'): /* scroll current window backwards */ if (current) wscrl(current->wind, -1); break; - case CTRL('K'): /* toggle keypad mode for current */ + case CTRL('K'): /* toggle keypad mode for current */ if (current) { current->do_keypad = !current->do_keypad; keypad(current->wind, current->do_keypad); @@ -1350,13 +1446,12 @@ static void acs_and_scroll(void) } break; - case CTRL('W'): /* save and delete window */ + case CTRL('W'): /* save and delete window */ if (current == current->next) break; - if ((fp = fopen(DUMPFILE, "w")) == (FILE *)0) + if ((fp = fopen(DUMPFILE, "w")) == (FILE *) 0) transient(current, "Can't open screen dump file"); - else - { + else { (void) putwin(current->wind, fp); (void) fclose(fp); @@ -1364,11 +1459,10 @@ static void acs_and_scroll(void) } break; - case CTRL('R'): /* restore window */ - if ((fp = fopen(DUMPFILE, "r")) == (FILE *)0) + case CTRL('R'): /* restore window */ + if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) transient(current, "Can't open screen dump file"); - else - { + else { neww = (FRAME *) calloc(1, sizeof(FRAME)); neww->next = current->next; @@ -1383,22 +1477,21 @@ static void acs_and_scroll(void) } break; -#ifdef NCURSES_VERSION - case CTRL('X'): /* resize window */ - if (current) - { +#ifdef HAVE_WRESIZE + case CTRL('X'): /* resize window */ + if (current) { pair *tmp, ul, lr; int mx, my; - move(0, 0); clrtoeol(); + move(0, 0); + clrtoeol(); addstr("Use arrows to move cursor, anything else to mark new corner"); refresh(); getbegyx(current->wind, ul.y, ul.x); - tmp = selectcell(ul.y, ul.x, LINES-BOTLINES-2, COLS-2); - if (tmp == (pair *)0) - { + tmp = selectcell(ul.y, ul.x, LINES - BOTLINES - 2, COLS - 2); + if (tmp == (pair *) 0) { beep(); break; } @@ -1411,23 +1504,21 @@ static void acs_and_scroll(void) /* strictly cosmetic hack for the test */ getmaxyx(current->wind, my, mx); - if (my > tmp->y - ul.y) - { - getyx(current->wind, lr.y, lr.x); - wmove(current->wind, tmp->y - ul.y + 1, 0); - wclrtobot(current->wind); - wmove(current->wind, lr.y, lr.x); + if (my > tmp->y - ul.y) { + getyx(current->wind, lr.y, lr.x); + wmove(current->wind, tmp->y - ul.y + 1, 0); + wclrtobot(current->wind); + wmove(current->wind, lr.y, lr.x); } if (mx > tmp->x - ul.x) - for (i = 0; i < my; i++) - { - wmove(current->wind, i, tmp->x - ul.x + 1); - wclrtoeol(current->wind); - } + for (i = 0; i < my; i++) { + wmove(current->wind, i, tmp->x - ul.x + 1); + wclrtoeol(current->wind); + } wnoutrefresh(current->wind); memcpy(&lr, tmp, sizeof(pair)); - (void) wresize(current->wind, lr.y-ul.y+0, lr.x-ul.x+0); + (void) wresize(current->wind, lr.y - ul.y + 0, lr.x - ul.x + 0); getbegyx(current->wind, ul.y, ul.x); getmaxyx(current->wind, lr.y, lr.x); @@ -1437,11 +1528,12 @@ static void acs_and_scroll(void) wnoutrefresh(stdscr); wnoutrefresh(current->wind); - move(0, 0); clrtoeol(); + move(0, 0); + clrtoeol(); doupdate(); } break; -#endif /* NCURSES_VERSION */ +#endif /* HAVE_WRESIZE */ case KEY_F(10): /* undocumented --- use this to test area clears */ selectcell(0, 0, LINES - 1, COLS - 1); @@ -1450,16 +1542,16 @@ static void acs_and_scroll(void) break; case KEY_UP: - newwin_move(current, -1, 0); + newwin_move(current, -1, 0); break; case KEY_DOWN: - newwin_move(current, 1, 0); + newwin_move(current, 1, 0); break; case KEY_LEFT: - newwin_move(current, 0, -1); + newwin_move(current, 0, -1); break; case KEY_RIGHT: - newwin_move(current, 0, 1); + newwin_move(current, 0, 1); break; case KEY_BACKSPACE: @@ -1469,9 +1561,9 @@ static void acs_and_scroll(void) int y, x; getyx(current->wind, y, x); if (--x < 0) { - if (--y < 0) - break; - x = getmaxx(current->wind) - 1; + if (--y < 0) + break; + x = getmaxx(current->wind) - 1; } mvwdelch(current->wind, y, x); } @@ -1483,7 +1575,7 @@ static void acs_and_scroll(void) default: if (current) - waddch(current->wind, (chtype)c); + waddch(current->wind, (chtype) c); else beep(); break; @@ -1493,16 +1585,16 @@ static void acs_and_scroll(void) wrefresh(usescr); } while ((c = wGetchar(usescr)) != QUIT - && !((c == ESCAPE) && (usescr->_use_keypad)) - && (c != ERR)); + && !((c == ESCAPE) && (usescr->_use_keypad)) + && (c != ERR)); - breakout: + breakout: while (current != 0) - current = delete_framed(current, FALSE); + current = delete_framed(current, FALSE); scrollok(stdscr, TRUE); /* reset to driver's default */ #ifdef NCURSES_MOUSE_VERSION - mousemask(0, (mmask_t *)0); + mousemask(0, (mmask_t *) 0); #endif noraw(); erase(); @@ -1520,12 +1612,12 @@ static unsigned long nap_msec = 1; static NCURSES_CONST char *mod[] = { - "test ", - "TEST ", - "(**) ", - "*()* ", - "<--> ", - "LAST " + "test ", + "TEST ", + "(**) ", + "*()* ", + "<--> ", + "LAST " }; /*+------------------------------------------------------------------------- @@ -1535,19 +1627,19 @@ static void wait_a_while(unsigned long msec GCC_UNUSED) { #if HAVE_NAPMS - if(nap_msec == 1) - wGetchar(stdscr); - else - napms(nap_msec); + if (nap_msec == 1) + wGetchar(stdscr); + else + napms(nap_msec); #else - if(nap_msec == 1) - wGetchar(stdscr); - else if(msec > 1000L) - sleep((int)msec/1000L); - else - sleep(1); + if (nap_msec == 1) + wGetchar(stdscr); + else if (msec > 1000L) + sleep((int) msec / 1000L); + else + sleep(1); #endif -} /* end of wait_a_while */ +} /* end of wait_a_while */ /*+------------------------------------------------------------------------- saywhat(text) @@ -1555,10 +1647,10 @@ wait_a_while(unsigned long msec GCC_UNUSED) static void saywhat(NCURSES_CONST char *text) { - wmove(stdscr,LINES - 1,0); - wclrtoeol(stdscr); - waddstr(stdscr, text); -} /* end of saywhat */ + wmove(stdscr, LINES - 1, 0); + wclrtoeol(stdscr); + waddstr(stdscr, text); +} /* end of saywhat */ /*+------------------------------------------------------------------------- mkpanel(rows,cols,tly,tlx) - alloc a win and panel and associate them @@ -1566,34 +1658,34 @@ saywhat(NCURSES_CONST char *text) static PANEL * mkpanel(int color, int rows, int cols, int tly, int tlx) { -WINDOW *win; -PANEL *pan = 0; - - if ((win = newwin(rows, cols, tly, tlx)) != 0) { - if ((pan = new_panel(win)) == 0) { - delwin(win); - } else if (has_colors()) { - int fg = (color == COLOR_BLUE) ? COLOR_WHITE : COLOR_BLACK; - int bg = color; - init_pair(color, fg, bg); - wbkgdset(win, COLOR_PAIR(color) | ' '); - } else { - wbkgdset(win, A_BOLD | ' '); - } + WINDOW *win; + PANEL *pan = 0; + + if ((win = newwin(rows, cols, tly, tlx)) != 0) { + if ((pan = new_panel(win)) == 0) { + delwin(win); + } else if (has_colors()) { + int fg = (color == COLOR_BLUE) ? COLOR_WHITE : COLOR_BLACK; + int bg = color; + init_pair(color, fg, bg); + wbkgdset(win, COLOR_PAIR(color) | ' '); + } else { + wbkgdset(win, A_BOLD | ' '); } - return pan; -} /* end of mkpanel */ + } + return pan; +} /* end of mkpanel */ /*+------------------------------------------------------------------------- rmpanel(pan) --------------------------------------------------------------------------*/ static void -rmpanel(PANEL *pan) +rmpanel(PANEL * pan) { -WINDOW *win = panel_window(pan); - del_panel(pan); - delwin(win); -} /* end of rmpanel */ + WINDOW *win = panel_window(pan); + del_panel(pan); + delwin(win); +} /* end of rmpanel */ /*+------------------------------------------------------------------------- pflush() @@ -1601,227 +1693,243 @@ WINDOW *win = panel_window(pan); static void pflush(void) { - update_panels(); - doupdate(); -} /* end of pflush */ + update_panels(); + doupdate(); +} /* end of pflush */ /*+------------------------------------------------------------------------- fill_panel(win) --------------------------------------------------------------------------*/ static void -fill_panel(PANEL *pan) +fill_panel(PANEL * pan) { -WINDOW *win = panel_window(pan); -int num = ((const char *)panel_userptr(pan))[1]; -int y,x; + WINDOW *win = panel_window(pan); + int num = ((const char *) panel_userptr(pan))[1]; + int y, x; - wmove(win,1,1); - wprintw(win,"-pan%c-", num); - wclrtoeol(win); - box(win, 0, 0); - for(y = 2; y < getmaxy(win) - 1; y++) - { - for(x = 1; x < getmaxx(win) - 1; x++) - { - wmove(win,y,x); - waddch(win,num); - } + wmove(win, 1, 1); + wprintw(win, "-pan%c-", num); + wclrtoeol(win); + box(win, 0, 0); + for (y = 2; y < getmaxy(win) - 1; y++) { + for (x = 1; x < getmaxx(win) - 1; x++) { + wmove(win, y, x); + waddch(win, num); } -} /* end of fill_panel */ + } +} /* end of fill_panel */ -static void demo_panels(void) +static void +demo_panels(void) { -int itmp; -register int y,x; + int itmp; + register int y, x; - refresh(); + refresh(); - for(y = 0; y < LINES - 1; y++) - { - for(x = 0; x < COLS; x++) - wprintw(stdscr,"%d",(y + x) % 10); + for (y = 0; y < LINES - 1; y++) { + for (x = 0; x < COLS; x++) + wprintw(stdscr, "%d", (y + x) % 10); + } + for (y = 0; y < 5; y++) { + PANEL *p1; + PANEL *p2; + PANEL *p3; + PANEL *p4; + PANEL *p5; + + p1 = mkpanel(COLOR_RED, + LINES / 2 - 2, + COLS / 8 + 1, + 0, + 0); + set_panel_userptr(p1, "p1"); + + p2 = mkpanel(COLOR_GREEN, + LINES / 2 + 1, + COLS / 7, + LINES / 4, + COLS / 10); + set_panel_userptr(p2, "p2"); + + p3 = mkpanel(COLOR_YELLOW, + LINES / 4, + COLS / 10, + LINES / 2, + COLS / 9); + set_panel_userptr(p3, "p3"); + + p4 = mkpanel(COLOR_BLUE, + LINES / 2 - 2, + COLS / 8, + LINES / 2 - 2, + COLS / 3); + set_panel_userptr(p4, "p4"); + + p5 = mkpanel(COLOR_MAGENTA, + LINES / 2 - 2, + COLS / 8, + LINES / 2, + COLS / 2 - 2); + set_panel_userptr(p5, "p5"); + + fill_panel(p1); + fill_panel(p2); + fill_panel(p3); + fill_panel(p4); + fill_panel(p5); + hide_panel(p4); + hide_panel(p5); + pflush(); + saywhat("press any key to continue"); + wait_a_while(nap_msec); + + saywhat("h3 s1 s2 s4 s5; press any key to continue"); + move_panel(p1, 0, 0); + hide_panel(p3); + show_panel(p1); + show_panel(p2); + show_panel(p4); + show_panel(p5); + pflush(); + wait_a_while(nap_msec); + + saywhat("s1; press any key to continue"); + show_panel(p1); + pflush(); + wait_a_while(nap_msec); + + saywhat("s2; press any key to continue"); + show_panel(p2); + pflush(); + wait_a_while(nap_msec); + + saywhat("m2; press any key to continue"); + move_panel(p2, LINES / 3 + 1, COLS / 8); + pflush(); + wait_a_while(nap_msec); + + saywhat("s3;"); + show_panel(p3); + pflush(); + wait_a_while(nap_msec); + + saywhat("m3; press any key to continue"); + move_panel(p3, LINES / 4 + 1, COLS / 15); + pflush(); + wait_a_while(nap_msec); + + saywhat("b3; press any key to continue"); + bottom_panel(p3); + pflush(); + wait_a_while(nap_msec); + + saywhat("s4; press any key to continue"); + show_panel(p4); + pflush(); + wait_a_while(nap_msec); + + saywhat("s5; press any key to continue"); + show_panel(p5); + pflush(); + wait_a_while(nap_msec); + + saywhat("t3; press any key to continue"); + top_panel(p3); + pflush(); + wait_a_while(nap_msec); + + saywhat("t1; press any key to continue"); + top_panel(p1); + pflush(); + wait_a_while(nap_msec); + + saywhat("t2; press any key to continue"); + top_panel(p2); + pflush(); + wait_a_while(nap_msec); + + saywhat("t3; press any key to continue"); + top_panel(p3); + pflush(); + wait_a_while(nap_msec); + + saywhat("t4; press any key to continue"); + top_panel(p4); + pflush(); + wait_a_while(nap_msec); + + for (itmp = 0; itmp < 6; itmp++) { + WINDOW *w4 = panel_window(p4); + WINDOW *w5 = panel_window(p5); + + saywhat("m4; press any key to continue"); + wmove(w4, LINES / 8, 1); + waddstr(w4, mod[itmp]); + move_panel(p4, LINES / 6, itmp * (COLS / 8)); + wmove(w5, LINES / 6, 1); + waddstr(w5, mod[itmp]); + pflush(); + wait_a_while(nap_msec); + + saywhat("m5; press any key to continue"); + wmove(w4, LINES / 6, 1); + waddstr(w4, mod[itmp]); + move_panel(p5, LINES / 3 - 1, (itmp * 10) + 6); + wmove(w5, LINES / 8, 1); + waddstr(w5, mod[itmp]); + pflush(); + wait_a_while(nap_msec); } - for(y = 0; y < 5; y++) - { - PANEL *p1; - PANEL *p2; - PANEL *p3; - PANEL *p4; - PANEL *p5; - - p1 = mkpanel(COLOR_RED, LINES/2 - 2, COLS/8 + 1, 0, 0); - set_panel_userptr(p1,"p1"); - - p2 = mkpanel(COLOR_GREEN, LINES/2 + 1, COLS/7, LINES/4, COLS/10); - set_panel_userptr(p2,"p2"); - - p3 = mkpanel(COLOR_YELLOW, LINES/4, COLS/10, LINES/2, COLS/9); - set_panel_userptr(p3,"p3"); - - p4 = mkpanel(COLOR_BLUE, LINES/2 - 2, COLS/8, LINES/2 - 2, COLS/3); - set_panel_userptr(p4,"p4"); - - p5 = mkpanel(COLOR_MAGENTA, LINES/2 - 2, COLS/8, LINES/2, COLS/2 - 2); - set_panel_userptr(p5,"p5"); - - fill_panel(p1); - fill_panel(p2); - fill_panel(p3); - fill_panel(p4); - fill_panel(p5); - hide_panel(p4); - hide_panel(p5); - pflush(); - saywhat("press any key to continue"); - wait_a_while(nap_msec); - - saywhat("h3 s1 s2 s4 s5; press any key to continue"); - move_panel(p1,0,0); - hide_panel(p3); - show_panel(p1); - show_panel(p2); - show_panel(p4); - show_panel(p5); - pflush(); - wait_a_while(nap_msec); - - saywhat("s1; press any key to continue"); - show_panel(p1); - pflush(); - wait_a_while(nap_msec); - - saywhat("s2; press any key to continue"); - show_panel(p2); - pflush(); - wait_a_while(nap_msec); - - saywhat("m2; press any key to continue"); - move_panel(p2, LINES/3 + 1, COLS / 8); - pflush(); - wait_a_while(nap_msec); - - saywhat("s3;"); - show_panel(p3); - pflush(); - wait_a_while(nap_msec); - - saywhat("m3; press any key to continue"); - move_panel(p3, LINES/4 + 1, COLS / 15); - pflush(); - wait_a_while(nap_msec); - - saywhat("b3; press any key to continue"); - bottom_panel(p3); - pflush(); - wait_a_while(nap_msec); - - saywhat("s4; press any key to continue"); - show_panel(p4); - pflush(); - wait_a_while(nap_msec); - - saywhat("s5; press any key to continue"); - show_panel(p5); - pflush(); - wait_a_while(nap_msec); - - saywhat("t3; press any key to continue"); - top_panel(p3); - pflush(); - wait_a_while(nap_msec); - - saywhat("t1; press any key to continue"); - top_panel(p1); - pflush(); - wait_a_while(nap_msec); - - saywhat("t2; press any key to continue"); - top_panel(p2); - pflush(); - wait_a_while(nap_msec); - - saywhat("t3; press any key to continue"); - top_panel(p3); - pflush(); - wait_a_while(nap_msec); - - saywhat("t4; press any key to continue"); - top_panel(p4); - pflush(); - wait_a_while(nap_msec); - - for(itmp = 0; itmp < 6; itmp++) - { - WINDOW *w4 = panel_window(p4); - WINDOW *w5 = panel_window(p5); - - saywhat("m4; press any key to continue"); - wmove(w4, LINES/8, 1); - waddstr(w4,mod[itmp]); - move_panel(p4, LINES/6, itmp*(COLS/8)); - wmove(w5, LINES/6, 1); - waddstr(w5,mod[itmp]); - pflush(); - wait_a_while(nap_msec); - - saywhat("m5; press any key to continue"); - wmove(w4, LINES/6, 1); - waddstr(w4,mod[itmp]); - move_panel(p5, LINES/3 - 1,(itmp*10) + 6); - wmove(w5, LINES/8, 1); - waddstr(w5,mod[itmp]); - pflush(); - wait_a_while(nap_msec); - } - saywhat("m4; press any key to continue"); - move_panel(p4, LINES/6, itmp*(COLS/8)); - pflush(); - wait_a_while(nap_msec); - - saywhat("t5; press any key to continue"); - top_panel(p5); - pflush(); - wait_a_while(nap_msec); - - saywhat("t2; press any key to continue"); - top_panel(p2); - pflush(); - wait_a_while(nap_msec); - - saywhat("t1; press any key to continue"); - top_panel(p1); - pflush(); - wait_a_while(nap_msec); - - saywhat("d2; press any key to continue"); - rmpanel(p2); - pflush(); - wait_a_while(nap_msec); - - saywhat("h3; press any key to continue"); - hide_panel(p3); - pflush(); - wait_a_while(nap_msec); - - saywhat("d1; press any key to continue"); - rmpanel(p1); - pflush(); - wait_a_while(nap_msec); - - saywhat("d4; press any key to continue"); - rmpanel(p4); - pflush(); - wait_a_while(nap_msec); - - saywhat("d5; press any key to continue"); - rmpanel(p5); - pflush(); - wait_a_while(nap_msec); - if(nap_msec == 1) - break; - nap_msec = 100L; - } + saywhat("m4; press any key to continue"); + move_panel(p4, LINES / 6, itmp * (COLS / 8)); + pflush(); + wait_a_while(nap_msec); + + saywhat("t5; press any key to continue"); + top_panel(p5); + pflush(); + wait_a_while(nap_msec); + + saywhat("t2; press any key to continue"); + top_panel(p2); + pflush(); + wait_a_while(nap_msec); + + saywhat("t1; press any key to continue"); + top_panel(p1); + pflush(); + wait_a_while(nap_msec); + + saywhat("d2; press any key to continue"); + rmpanel(p2); + pflush(); + wait_a_while(nap_msec); + + saywhat("h3; press any key to continue"); + hide_panel(p3); + pflush(); + wait_a_while(nap_msec); + + saywhat("d1; press any key to continue"); + rmpanel(p1); + pflush(); + wait_a_while(nap_msec); + + saywhat("d4; press any key to continue"); + rmpanel(p4); + pflush(); + wait_a_while(nap_msec); + + saywhat("d5; press any key to continue"); + rmpanel(p5); + pflush(); + wait_a_while(nap_msec); + if (nap_msec == 1) + break; + nap_msec = 100L; + } erase(); endwin(); @@ -1837,40 +1945,45 @@ register int y,x; static bool show_panner_legend = TRUE; -static int panner_legend(int line) -{ - static const char *const legend[] = { - "Use arrow keys (or U,D,L,R) to pan, q to quit (?,t,s flags)", - "Use ! to shell-out. Toggle legend:?, timer:t, scroll mark:s.", - "Use +,- (or j,k) to grow/shrink the panner vertically.", - "Use <,> (or h,l) to grow/shrink the panner horizontally." - }; - int n = (SIZEOF(legend) - (LINES - line)); - if (line < LINES && (n >= 0)) { - move(line, 0); - if (show_panner_legend) - printw("%s", legend[n]); - clrtoeol(); - return show_panner_legend; - } - return FALSE; +static int +panner_legend(int line) +{ + static const char *const legend[] = + { + "Use arrow keys (or U,D,L,R) to pan, q to quit (?,t,s flags)", + "Use ! to shell-out. Toggle legend:?, timer:t, scroll mark:s.", + "Use +,- (or j,k) to grow/shrink the panner vertically.", + "Use <,> (or h,l) to grow/shrink the panner horizontally." + }; + int n = (SIZEOF(legend) - (LINES - line)); + if (line < LINES && (n >= 0)) { + move(line, 0); + if (show_panner_legend) + printw("%s", legend[n]); + clrtoeol(); + return show_panner_legend; + } + return FALSE; } -static void panner_h_cleanup(int from_y, int from_x, int to_x) +static void +panner_h_cleanup(int from_y, int from_x, int to_x) { - if (!panner_legend(from_y)) - do_h_line(from_y, from_x, ' ', to_x); + if (!panner_legend(from_y)) + do_h_line(from_y, from_x, ' ', to_x); } -static void panner_v_cleanup(int from_y, int from_x, int to_y) +static void +panner_v_cleanup(int from_y, int from_x, int to_y) { - if (!panner_legend(from_y)) - do_v_line(from_y, from_x, ' ', to_y); + if (!panner_legend(from_y)) + do_v_line(from_y, from_x, ' ', to_y); } -static void panner(WINDOW *pad, - int top_x, int top_y, int porty, int portx, - int (*pgetc)(WINDOW *)) +static void +panner(WINDOW *pad, + int top_x, int top_y, int porty, int portx, + int (*pgetc) (WINDOW *)) { #if HAVE_GETTIMEOFDAY struct timeval before, after; @@ -1892,13 +2005,16 @@ static void panner(WINDOW *pad, * the port size of the pad to accommodate this. Ncurses automatically * resizes all of the normal windows to fit on the new screen. */ - if (top_x > COLS) top_x = COLS; - if (portx > COLS) portx = COLS; - if (top_y > LINES) top_y = LINES; - if (porty > LINES) porty = LINES; + if (top_x > COLS) + top_x = COLS; + if (portx > COLS) + portx = COLS; + if (top_y > LINES) + top_y = LINES; + if (porty > LINES) + porty = LINES; #endif - switch(c) - { + switch (c) { case KEY_REFRESH: erase(); @@ -1915,7 +2031,7 @@ static void panner(WINDOW *pad, case 't': timing = !timing; if (!timing) - panner_legend(LINES-1); + panner_legend(LINES - 1); break; #endif case 's': @@ -1925,41 +2041,37 @@ static void panner(WINDOW *pad, /* Move the top-left corner of the pad, keeping the bottom-right * corner fixed. */ - case 'h': /* increase-columns: move left edge to left */ + case 'h': /* increase-columns: move left edge to left */ if (top_x <= 0) beep(); - else - { + else { panner_v_cleanup(top_y, top_x, porty); top_x--; } break; - case 'j': /* decrease-lines: move top-edge down */ + case 'j': /* decrease-lines: move top-edge down */ if (top_y >= porty) beep(); - else - { + else { panner_h_cleanup(top_y - 1, top_x - (top_x > 0), portx); top_y++; } break; - case 'k': /* increase-lines: move top-edge up */ + case 'k': /* increase-lines: move top-edge up */ if (top_y <= 0) beep(); - else - { + else { top_y--; panner_h_cleanup(top_y, top_x, portx); } break; - case 'l': /* decrease-columns: move left-edge to right */ + case 'l': /* decrease-columns: move left-edge to right */ if (top_x >= portx) beep(); - else - { + else { panner_v_cleanup(top_y - (top_y > 0), top_x - 1, porty); top_x++; } @@ -1968,47 +2080,43 @@ static void panner(WINDOW *pad, /* Move the bottom-right corner of the pad, keeping the top-left * corner fixed. */ - case KEY_IC: /* increase-columns: move right-edge to right */ + case KEY_IC: /* increase-columns: move right-edge to right */ if (portx >= pxmax || portx >= COLS) beep(); - else - { + else { panner_v_cleanup(top_y - (top_y > 0), portx - 1, porty); ++portx; } break; - case KEY_IL: /* increase-lines: move bottom-edge down */ + case KEY_IL: /* increase-lines: move bottom-edge down */ if (porty >= pymax || porty >= LINES) beep(); - else - { + else { panner_h_cleanup(porty - 1, top_x - (top_x > 0), portx); ++porty; } break; - case KEY_DC: /* decrease-columns: move bottom edge up */ + case KEY_DC: /* decrease-columns: move bottom edge up */ if (portx <= top_x) beep(); - else - { + else { portx--; panner_v_cleanup(top_y - (top_y > 0), portx, porty); } break; - case KEY_DL: /* decrease-lines */ + case KEY_DL: /* decrease-lines */ if (porty <= top_y) beep(); - else - { + else { porty--; panner_h_cleanup(porty, top_x - (top_x > 0), portx); } break; - case KEY_LEFT: /* pan leftwards */ + case KEY_LEFT: /* pan leftwards */ if (basex > 0) basex--; else @@ -2022,20 +2130,34 @@ static void panner(WINDOW *pad, beep(); break; - case KEY_UP: /* pan upwards */ + case KEY_UP: /* pan upwards */ if (basey > 0) basey--; else beep(); break; - case KEY_DOWN: /* pan downwards */ + case KEY_DOWN: /* pan downwards */ if (basey + porty - (pxmax > portx) < pymax) basey++; else beep(); break; + case 'H': + case KEY_HOME: + case KEY_FIND: + basey = 0; + break; + + case 'E': + case KEY_END: + case KEY_SELECT: + basey = pymax - porty; + if (basey < 0) + basey = 0; + break; + default: beep(); break; @@ -2046,11 +2168,11 @@ static void panner(WINDOW *pad, do_h_line(top_y - 1, top_x, ACS_HLINE, portx); if (scrollers && (pxmax > portx - 1)) { - int length = (portx - top_x - 1); + int length = (portx - top_x - 1); float ratio = ((float) length) / ((float) pxmax); - lowend = (int)(top_x + (basex * ratio)); - highend = (int)(top_x + ((basex + length) * ratio)); + lowend = (int) (top_x + (basex * ratio)); + highend = (int) (top_x + ((basex + length) * ratio)); do_h_line(porty - 1, top_x, ACS_HLINE, lowend); if (highend < portx) { @@ -2059,24 +2181,24 @@ static void panner(WINDOW *pad, attroff(A_REVERSE); do_h_line(porty - 1, highend + 1, ACS_HLINE, portx); } - } else + } else do_h_line(porty - 1, top_x, ACS_HLINE, portx); if (scrollers && (pymax > porty - 1)) { - int length = (porty - top_y - 1); + int length = (porty - top_y - 1); float ratio = ((float) length) / ((float) pymax); - lowend = (int)(top_y + (basey * ratio)); - highend = (int)(top_y + ((basey + length) * ratio)); + lowend = (int) (top_y + (basey * ratio)); + highend = (int) (top_y + ((basey + length) * ratio)); do_v_line(top_y, portx - 1, ACS_VLINE, lowend); - if (highend < porty) { + if (highend < porty) { attron(A_REVERSE); do_v_line(lowend, portx - 1, ' ', highend + 1); attroff(A_REVERSE); do_v_line(highend + 1, portx - 1, ACS_VLINE, porty); } - } else + } else do_v_line(top_y, portx - 1, ACS_VLINE, porty); mvaddch(top_y - 1, portx - 1, ACS_URCORNER); @@ -2089,21 +2211,21 @@ static void panner(WINDOW *pad, wnoutrefresh(stdscr); pnoutrefresh(pad, - basey, basex, - top_y, top_x, - porty - (pxmax > portx) - 1, - portx - (pymax > porty) - 1); + basey, basex, + top_y, top_x, + porty - (pxmax > portx) - 1, + portx - (pymax > porty) - 1); doupdate(); #if HAVE_GETTIMEOFDAY if (timing) { - double elapsed; - gettimeofday(&after, 0); - elapsed = (after.tv_sec + after.tv_usec / 1.0e6) - - (before.tv_sec + before.tv_usec / 1.0e6); - move(LINES-1, COLS-20); - printw("Secs: %2.03f", elapsed); - refresh(); + double elapsed; + gettimeofday(&after, 0); + elapsed = (after.tv_sec + after.tv_usec / 1.0e6) + - (before.tv_sec + before.tv_usec / 1.0e6); + move(LINES - 1, COLS - 20); + printw("Secs: %2.03f", elapsed); + refresh(); } #endif @@ -2114,47 +2236,69 @@ static void panner(WINDOW *pad, } static -int padgetch(WINDOW *win) +int +padgetch(WINDOW *win) { - int c; + int c; - switch(c = wGetchar(win)) - { - case '!': ShellOut(FALSE); return KEY_REFRESH; - case CTRL('r'): endwin(); refresh(); return KEY_REFRESH; - case CTRL('l'): return KEY_REFRESH; - case 'U': return(KEY_UP); - case 'D': return(KEY_DOWN); - case 'R': return(KEY_RIGHT); - case 'L': return(KEY_LEFT); - case '+': return(KEY_IL); - case '-': return(KEY_DL); - case '>': return(KEY_IC); - case '<': return(KEY_DC); - case ERR: /* FALLTHRU */ - case 'q': return(KEY_EXIT); - default: return(c); + switch (c = wGetchar(win)) { + case '!': + ShellOut(FALSE); + return KEY_REFRESH; + case CTRL('r'): + endwin(); + refresh(); + return KEY_REFRESH; + case CTRL('l'): + return KEY_REFRESH; + case 'U': + return (KEY_UP); + case 'D': + return (KEY_DOWN); + case 'R': + return (KEY_RIGHT); + case 'L': + return (KEY_LEFT); + case '+': + return (KEY_IL); + case '-': + return (KEY_DL); + case '>': + return (KEY_IC); + case '<': + return (KEY_DC); + case ERR: /* FALLTHRU */ + case 'q': + return (KEY_EXIT); + default: + return (c); } } -static void demo_pad(void) +#define PAD_HIGH 200 +#define PAD_WIDE 200 + +static void +demo_pad(void) /* Demonstrate pads. */ { int i, j; unsigned gridcount = 0; - WINDOW *panpad = newpad(200, 200); + WINDOW *panpad = newpad(PAD_HIGH, PAD_WIDE); - for (i = 0; i < 200; i++) - { - for (j = 0; j < 200; j++) - if (i % GRIDSIZE == 0 && j % GRIDSIZE == 0) - { + if (panpad == 0) { + Cannot("cannot create requested pad"); + return; + } + + for (i = 0; i < PAD_HIGH; i++) { + for (j = 0; j < PAD_WIDE; j++) + if (i % GRIDSIZE == 0 && j % GRIDSIZE == 0) { if (i == 0 || j == 0) waddch(panpad, '+'); else - waddch(panpad, (chtype)('A' + (gridcount++ % 26))); - } - else if (i % GRIDSIZE == 0) + waddch(panpad, (chtype) ('A' + (gridcount++ % 26))); + } else if (i % GRIDSIZE == 0) waddch(panpad, '-'); else if (j % GRIDSIZE == 0) waddch(panpad, '|'); @@ -2172,7 +2316,7 @@ static void demo_pad(void) * We'll still be able to widen it during a test, since that's required * for testing boundaries. */ - panner(panpad, 2, 2, LINES - 5, COLS-15, padgetch); + panner(panpad, 2, 2, LINES - 5, COLS - 15, padgetch); delwin(panpad); endwin(); @@ -2186,7 +2330,8 @@ static void demo_pad(void) * ****************************************************************************/ -static void Continue (WINDOW *win) +static void +Continue(WINDOW *win) { noecho(); wmove(win, 10, 1); @@ -2195,32 +2340,29 @@ static void Continue (WINDOW *win) wGetchar(win); } -static void flushinp_test(WINDOW *win) +static void +flushinp_test(WINDOW *win) /* Input test, adapted from John Burnell's PDCurses tester */ { int w, h, bx, by, sw, sh, i; WINDOW *subWin; - wclear (win); + wclear(win); - getmaxyx(win, h, w); + getmaxyx(win, h, w); getbegyx(win, by, bx); sw = w / 3; sh = h / 3; - if((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == 0) - return; + if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == 0) + return; #ifdef A_COLOR - if (has_colors()) - { - init_pair(2,COLOR_CYAN,COLOR_BLUE); - wattrset(subWin, COLOR_PAIR(2) | A_BOLD); + if (has_colors()) { + init_pair(2, COLOR_CYAN, COLOR_BLUE); + wbkgd(subWin, COLOR_PAIR(2) | ' '); } - else - wattrset(subWin, A_BOLD); -#else - wattrset(subWin, A_BOLD); #endif + wattrset(subWin, A_BOLD); box(subWin, ACS_VLINE, ACS_HLINE); mvwaddstr(subWin, 2, 1, "This is a subwindow"); wrefresh(win); @@ -2237,29 +2379,28 @@ static void flushinp_test(WINDOW *win) mvwaddstr(win, 2, 1, "Type random keys for 5 seconds."); mvwaddstr(win, 3, 1, - "These should be discarded (not echoed) after the subwindow goes away."); + "These should be discarded (not echoed) after the subwindow goes away."); wrefresh(win); - for (i = 0; i < 5; i++) - { - mvwprintw (subWin, 1, 1, "Time = %d", i); + for (i = 0; i < 5; i++) { + mvwprintw(subWin, 1, 1, "Time = %d", i); wrefresh(subWin); napms(1000); flushinp(); } - delwin (subWin); + delwin(subWin); werase(win); flash(); wrefresh(win); napms(1000); mvwaddstr(win, 2, 1, - "If you were still typing when the window timer expired,"); + "If you were still typing when the window timer expired,"); mvwaddstr(win, 3, 1, - "or else you typed nothing at all while it was running,"); + "or else you typed nothing at all while it was running,"); mvwaddstr(win, 4, 1, - "test was invalid. You'll see garbage or nothing at all. "); + "test was invalid. You'll see garbage or nothing at all. "); mvwaddstr(win, 6, 1, "Press a key"); wmove(win, 9, 10); wrefresh(win); @@ -2267,7 +2408,7 @@ static void flushinp_test(WINDOW *win) wGetchar(win); flushinp(); mvwaddstr(win, 12, 0, - "If you see any key other than what you typed, flushinp() is broken."); + "If you see any key other than what you typed, flushinp() is broken."); Continue(win); wmove(win, 9, 10); @@ -2276,7 +2417,7 @@ static void flushinp_test(WINDOW *win) wmove(win, 12, 0); clrtoeol(); waddstr(win, - "What you typed should now have been deleted; if not, wdelch() failed."); + "What you typed should now have been deleted; if not, wdelch() failed."); Continue(win); cbreak(); @@ -2293,66 +2434,69 @@ static void flushinp_test(WINDOW *win) #define MENU_Y 8 #define MENU_X 8 -static int menu_virtualize(int c) +static int +menu_virtualize(int c) { if (c == '\n' || c == KEY_EXIT) - return(MAX_COMMAND + 1); + return (MAX_COMMAND + 1); else if (c == 'u') - return(REQ_SCR_ULINE); + return (REQ_SCR_ULINE); else if (c == 'd') - return(REQ_SCR_DLINE); + return (REQ_SCR_DLINE); else if (c == 'b' || c == KEY_NPAGE) - return(REQ_SCR_UPAGE); + return (REQ_SCR_UPAGE); else if (c == 'f' || c == KEY_PPAGE) - return(REQ_SCR_DPAGE); + return (REQ_SCR_DPAGE); else if (c == 'n' || c == KEY_DOWN) - return(REQ_NEXT_ITEM); + return (REQ_NEXT_ITEM); else if (c == 'p' || c == KEY_UP) - return(REQ_PREV_ITEM); + return (REQ_PREV_ITEM); else if (c == ' ') - return(REQ_TOGGLE_ITEM); + return (REQ_TOGGLE_ITEM); else { if (c != KEY_MOUSE) beep(); - return(c); + return (c); } } static const char *animals[] = { "Lions", "Tigers", "Bears", "(Oh my!)", "Newts", "Platypi", "Lemurs", - (char *)0 + (char *) 0 }; -static void menu_test(void) +static void +menu_test(void) { - MENU *m; - ITEM *items[SIZEOF(animals)]; - ITEM **ip = items; - const char **ap; - int mrows, mcols, c; - WINDOW *menuwin; + MENU *m; + ITEM *items[SIZEOF(animals)]; + ITEM **ip = items; + const char **ap; + int mrows, mcols, c; + WINDOW *menuwin; #ifdef NCURSES_MOUSE_VERSION - mousemask(ALL_MOUSE_EVENTS, (mmask_t *)0); + mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0); #endif mvaddstr(0, 0, "This is the menu test:"); mvaddstr(2, 0, " Use up and down arrow to move the select bar."); mvaddstr(3, 0, " 'n' and 'p' act like arrows."); - mvaddstr(4, 0, " 'b' and 'f' scroll up/down (page), 'u' and 'd' (line)."); + mvaddstr(4, 0, + " 'b' and 'f' scroll up/down (page), 'u' and 'd' (line)."); mvaddstr(5, 0, " Press return to exit."); refresh(); for (ap = animals; *ap; ap++) *ip++ = new_item(*ap, ""); - *ip = (ITEM *)0; + *ip = (ITEM *) 0; m = new_menu(items); - set_menu_format(m, (SIZEOF(animals)+1)/2, 1); + set_menu_format(m, (SIZEOF(animals) + 1) / 2, 1); scale_menu(m, &mrows, &mcols); - menuwin = newwin(mrows + 2, mcols + 2, MENU_Y, MENU_X); + menuwin = newwin(mrows + 2, mcols + 2, MENU_Y, MENU_X); set_menu_win(m, menuwin); keypad(menuwin, TRUE); box(menuwin, 0, 0); @@ -2368,7 +2512,7 @@ static void menu_test(void) } (void) mvprintw(LINES - 2, 0, - "You chose: %s\n", item_name(current_item(m))); + "You chose: %s\n", item_name(current_item(m))); (void) addstr("Press any key to continue..."); wGetchar(stdscr); @@ -2379,17 +2523,18 @@ static void menu_test(void) for (ip = items; *ip; ip++) free_item(*ip); #ifdef NCURSES_MOUSE_VERSION - mousemask(0, (mmask_t *)0); + mousemask(0, (mmask_t *) 0); #endif } #ifdef TRACE #define T_TBL(name) { #name, name } static struct { - const char *name; - int mask; + const char *name; + int mask; } t_tbl[] = { - T_TBL(TRACE_DISABLE), + + T_TBL(TRACE_DISABLE), T_TBL(TRACE_TIMES), T_TBL(TRACE_TPUTS), T_TBL(TRACE_UPDATE), @@ -2402,41 +2547,45 @@ static struct { T_TBL(TRACE_BITS), T_TBL(TRACE_ICALLS), T_TBL(TRACE_CCALLS), + T_TBL(TRACE_DATABASE), T_TBL(TRACE_MAXIMUM), - { (char *)0, 0 } + { + (char *) 0, 0 + } }; -static char *tracetrace(int tlevel) +static char * +tracetrace(int tlevel) { - static char *buf; - int n; + static char *buf; + int n; if (buf == 0) { size_t need = 12; for (n = 0; t_tbl[n].name != 0; n++) need += strlen(t_tbl[n].name) + 2; - buf = (char *)malloc(need); + buf = (char *) malloc(need); } sprintf(buf, "0x%02x = {", tlevel); if (tlevel == 0) { sprintf(buf + strlen(buf), "%s, ", t_tbl[0].name); } else { for (n = 1; t_tbl[n].name != 0; n++) - if ((tlevel & t_tbl[n].mask) == t_tbl[n].mask) - { + if ((tlevel & t_tbl[n].mask) == t_tbl[n].mask) { strcat(buf, t_tbl[n].name); strcat(buf, ", "); } } if (buf[strlen(buf) - 2] == ',') buf[strlen(buf) - 2] = '\0'; - return(strcat(buf,"}")); + return (strcat(buf, "}")); } /* fake a dynamically reconfigurable menu using the 0th entry to deselect * the others */ -static int run_trace_menu(MENU *m) +static int +run_trace_menu(MENU * m) { ITEM **items; ITEM *i, **p; @@ -2451,14 +2600,14 @@ static int run_trace_menu(MENU *m) i = current_item(m); if (i == items[0]) { if (item_value(i)) { - for (p = items+1; *p != 0; p++) + for (p = items + 1; *p != 0; p++) if (item_value(*p)) { set_item_value(*p, FALSE); changed = TRUE; } } } else { - for (p = items+1; *p != 0; p++) + for (p = items + 1; *p != 0; p++) if (item_value(*p)) { set_item_value(items[0], FALSE); changed = TRUE; @@ -2471,15 +2620,16 @@ static int run_trace_menu(MENU *m) } } -static void trace_set(void) +static void +trace_set(void) /* interactively set the trace level */ { - MENU *m; - ITEM *items[SIZEOF(t_tbl)]; - ITEM **ip = items; - int mrows, mcols, newtrace; - int n; - WINDOW *menuwin; + MENU *m; + ITEM *items[SIZEOF(t_tbl)]; + ITEM **ip = items; + int mrows, mcols, newtrace; + int n; + WINDOW *menuwin; mvaddstr(0, 0, "Interactively set trace level:"); mvaddstr(2, 0, " Press space bar to toggle a selection."); @@ -2491,7 +2641,7 @@ static void trace_set(void) for (n = 0; t_tbl[n].name != 0; n++) *ip++ = new_item(t_tbl[n].name, ""); - *ip = (ITEM *)0; + *ip = (ITEM *) 0; m = new_menu(items); @@ -2499,7 +2649,7 @@ static void trace_set(void) scale_menu(m, &mrows, &mcols); menu_opts_off(m, O_ONEVALUE); - menuwin = newwin(mrows + 2, mcols + 2, MENU_Y, MENU_X); + menuwin = newwin(mrows + 2, mcols + 2, MENU_Y, MENU_X); set_menu_win(m, menuwin); keypad(menuwin, TRUE); box(menuwin, 0, 0); @@ -2527,7 +2677,7 @@ static void trace_set(void) _tracef("trace level interactively set to %s", tracetrace(_nc_tracing)); (void) mvprintw(LINES - 2, 0, - "Trace level is %s\n", tracetrace(_nc_tracing)); + "Trace level is %s\n", tracetrace(_nc_tracing)); (void) addstr("Press any key to continue..."); wGetchar(stdscr); @@ -2547,38 +2697,39 @@ static void trace_set(void) * ****************************************************************************/ #if USE_LIBFORM -static FIELD *make_label(int frow, int fcol, NCURSES_CONST char *label) +static FIELD * +make_label(int frow, int fcol, NCURSES_CONST char *label) { - FIELD *f = new_field(1, strlen(label), frow, fcol, 0, 0); + FIELD *f = new_field(1, strlen(label), frow, fcol, 0, 0); - if (f) - { + if (f) { set_field_buffer(f, 0, label); set_field_opts(f, field_opts(f) & ~O_ACTIVE); } - return(f); + return (f); } -static FIELD *make_field(int frow, int fcol, int rows, int cols, bool secure) +static FIELD * +make_field(int frow, int fcol, int rows, int cols, bool secure) { - FIELD *f = new_field(rows, cols, frow, fcol, 0, secure ? 1 : 0); + FIELD *f = new_field(rows, cols, frow, fcol, 0, secure ? 1 : 0); if (f) { set_field_back(f, A_UNDERLINE); - set_field_userptr(f, (void *)0); + set_field_userptr(f, (void *) 0); } - return(f); + return (f); } -static void display_form(FORM *f) +static void +display_form(FORM * f) { - WINDOW *w; + WINDOW *w; int rows, cols; scale_form(f, &rows, &cols); - if ((w =newwin(rows+2, cols+4, 0, 0)) != (WINDOW *)0) - { + 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); @@ -2589,10 +2740,11 @@ static void display_form(FORM *f) wrefresh(w); } -static void erase_form(FORM *f) +static void +erase_form(FORM * f) { - WINDOW *w = form_win(f); - WINDOW *s = form_sub(f); + WINDOW *w = form_win(f); + WINDOW *s = form_sub(f); unpost_form(f); werase(w); @@ -2601,17 +2753,18 @@ static void erase_form(FORM *f) delwin(w); } -static int edit_secure(FIELD *me, int c) +static int +edit_secure(FIELD * me, int c) { - int rows, cols, frow, fcol, nbuf; + int rows, cols, frow, fcol, nrow, nbuf; - if (field_info(me, &rows, &cols, &frow, &fcol, (int *)0, &nbuf) == E_OK - && nbuf > 0) { + if (field_info(me, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK + && nbuf > 0) { char temp[80]; long len; strcpy(temp, field_buffer(me, 1)); - len = (long)(char *) field_userptr(me); + len = (long) (char *) field_userptr(me); if (c <= KEY_MAX) { if (isgraph(c)) { temp[len++] = c; @@ -2652,62 +2805,137 @@ static int edit_secure(FIELD *me, int c) temp[--len] = 0; set_field_buffer(me, 1, temp); } - break; + break; } } - set_field_userptr(me, (void *)len); - } - return c; + set_field_userptr(me, (void *) len); + } + return c; } -static int form_virtualize(FORM *f, WINDOW *w) +static int +form_virtualize(FORM * f, WINDOW *w) { static const struct { int code; int result; } lookup[] = { - { CTRL('A'), REQ_NEXT_CHOICE }, - { CTRL('B'), REQ_PREV_WORD }, - { CTRL('C'), REQ_CLR_EOL }, - { CTRL('D'), REQ_DOWN_FIELD }, - { CTRL('E'), REQ_END_FIELD }, - { CTRL('F'), REQ_NEXT_PAGE }, - { CTRL('G'), REQ_DEL_WORD }, - { CTRL('H'), REQ_DEL_PREV }, - { CTRL('I'), REQ_INS_CHAR }, - { CTRL('K'), REQ_CLR_EOF }, - { CTRL('L'), REQ_LEFT_FIELD }, - { CTRL('M'), REQ_NEW_LINE }, - { CTRL('N'), REQ_NEXT_FIELD }, - { CTRL('O'), REQ_INS_LINE }, - { CTRL('P'), REQ_PREV_FIELD }, - { CTRL('R'), REQ_RIGHT_FIELD }, - { CTRL('S'), REQ_BEG_FIELD }, - { CTRL('U'), REQ_UP_FIELD }, - { CTRL('V'), REQ_DEL_CHAR }, - { CTRL('W'), REQ_NEXT_WORD }, - { CTRL('X'), REQ_CLR_FIELD }, - { CTRL('Y'), REQ_DEL_LINE }, - { CTRL('Z'), REQ_PREV_CHOICE }, - { ESCAPE, MAX_FORM_COMMAND + 1 }, - { KEY_BACKSPACE, REQ_DEL_PREV }, - { KEY_DOWN, REQ_DOWN_CHAR }, - { KEY_END, REQ_LAST_FIELD }, - { KEY_HOME, REQ_FIRST_FIELD }, - { KEY_LEFT, REQ_LEFT_CHAR }, - { KEY_LL, REQ_LAST_FIELD }, - { KEY_NEXT, REQ_NEXT_FIELD }, - { KEY_NPAGE, REQ_NEXT_PAGE }, - { KEY_PPAGE, REQ_PREV_PAGE }, - { KEY_PREVIOUS, REQ_PREV_FIELD }, - { KEY_RIGHT, REQ_RIGHT_CHAR }, - { KEY_UP, REQ_UP_CHAR }, - { QUIT, MAX_FORM_COMMAND + 1 } + { + CTRL('A'), REQ_NEXT_CHOICE + }, + { + CTRL('B'), REQ_PREV_WORD + }, + { + CTRL('C'), REQ_CLR_EOL + }, + { + CTRL('D'), REQ_DOWN_FIELD + }, + { + CTRL('E'), REQ_END_FIELD + }, + { + CTRL('F'), REQ_NEXT_PAGE + }, + { + CTRL('G'), REQ_DEL_WORD + }, + { + CTRL('H'), REQ_DEL_PREV + }, + { + CTRL('I'), REQ_INS_CHAR + }, + { + CTRL('K'), REQ_CLR_EOF + }, + { + CTRL('L'), REQ_LEFT_FIELD + }, + { + CTRL('M'), REQ_NEW_LINE + }, + { + CTRL('N'), REQ_NEXT_FIELD + }, + { + CTRL('O'), REQ_INS_LINE + }, + { + CTRL('P'), REQ_PREV_FIELD + }, + { + CTRL('R'), REQ_RIGHT_FIELD + }, + { + CTRL('S'), REQ_BEG_FIELD + }, + { + CTRL('U'), REQ_UP_FIELD + }, + { + CTRL('V'), REQ_DEL_CHAR + }, + { + CTRL('W'), REQ_NEXT_WORD + }, + { + CTRL('X'), REQ_CLR_FIELD + }, + { + CTRL('Y'), REQ_DEL_LINE + }, + { + CTRL('Z'), REQ_PREV_CHOICE + }, + { + ESCAPE, MAX_FORM_COMMAND + 1 + }, + { + KEY_BACKSPACE, REQ_DEL_PREV + }, + { + KEY_DOWN, REQ_DOWN_CHAR + }, + { + KEY_END, REQ_LAST_FIELD + }, + { + KEY_HOME, REQ_FIRST_FIELD + }, + { + KEY_LEFT, REQ_LEFT_CHAR + }, + { + KEY_LL, REQ_LAST_FIELD + }, + { + KEY_NEXT, REQ_NEXT_FIELD + }, + { + KEY_NPAGE, REQ_NEXT_PAGE + }, + { + KEY_PPAGE, REQ_PREV_PAGE + }, + { + KEY_PREVIOUS, REQ_PREV_FIELD + }, + { + KEY_RIGHT, REQ_RIGHT_CHAR + }, + { + KEY_UP, REQ_UP_CHAR + }, + { + QUIT, MAX_FORM_COMMAND + 1 + } }; - static int mode = REQ_INS_MODE; - int c = wGetchar(w); - unsigned n; + static int mode = REQ_INS_MODE; + int c = wGetchar(w); + unsigned n; FIELD *me = current_field(f); if (c == CTRL(']')) { @@ -2717,7 +2945,7 @@ static int form_virtualize(FORM *f, WINDOW *w) mode = REQ_INS_MODE; c = mode; } else { - for (n = 0; n < sizeof(lookup)/sizeof(lookup[0]); n++) { + for (n = 0; n < sizeof(lookup) / sizeof(lookup[0]); n++) { if (lookup[n].code == c) { c = lookup[n].result; break; @@ -2739,25 +2967,26 @@ static int form_virtualize(FORM *f, WINDOW *w) return c; } -static int my_form_driver(FORM *form, int c) +static int +my_form_driver(FORM * form, int c) { if (c == (MAX_FORM_COMMAND + 1) - && form_driver(form, REQ_VALIDATION) == E_OK) - return(TRUE); - else - { + && form_driver(form, REQ_VALIDATION) == E_OK) + return (TRUE); + else { beep(); - return(FALSE); + return (FALSE); } } -static void demo_forms(void) +static void +demo_forms(void) { - WINDOW *w; - FORM *form; - FIELD *f[12], *secure; - int finished = 0, c; - unsigned n = 0; + WINDOW *w; + FORM *form; + FIELD *f[12], *secure; + int finished = 0, c; + unsigned n = 0; move(18, 0); addstr("Defined form-traversal keys: ^Q/ESC- exit form\n"); @@ -2788,8 +3017,8 @@ static void demo_forms(void) 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); - f[n++] = (FIELD *)0; + f[n++] = make_field(5, 30, 1, 9, TRUE); + f[n++] = (FIELD *) 0; form = new_form(f); @@ -2797,10 +3026,9 @@ static void demo_forms(void) w = form_win(form); raw(); - while (!finished) - { - switch(form_driver(form, c = form_virtualize(form, w))) - { + nonl(); /* lets us read ^M's */ + while (!finished) { + switch (form_driver(form, c = form_virtualize(form, w))) { case E_OK: mvaddstr(5, 57, field_buffer(secure, 1)); clrtoeol(); @@ -2819,10 +3047,11 @@ static void demo_forms(void) free_form(form); for (c = 0; f[c] != 0; c++) - free_field(f[c]); + free_field(f[c]); noraw(); + nl(); } -#endif /* USE_LIBFORM */ +#endif /* USE_LIBFORM */ /**************************************************************************** * @@ -2830,42 +3059,42 @@ static void demo_forms(void) * ****************************************************************************/ -static void fillwin(WINDOW *win, char ch) +static void +fillwin(WINDOW *win, char ch) { int y, x; int y1, x1; getmaxyx(win, y1, x1); - for (y = 0; y < y1; y++) - { + for (y = 0; y < y1; y++) { wmove(win, y, 0); for (x = 0; x < x1; x++) waddch(win, ch); } } -static void crosswin(WINDOW *win, char ch) +static void +crosswin(WINDOW *win, char ch) { int y, x; int y1, x1; getmaxyx(win, y1, x1); - for (y = 0; y < y1; y++) - { + for (y = 0; y < y1; y++) { for (x = 0; x < x1; x++) if (((x > (x1 - 1) / 3) && (x <= (2 * (x1 - 1)) / 3)) - || (((y > (y1 - 1) / 3) && (y <= (2 * (y1 - 1)) / 3)))) - { + || (((y > (y1 - 1) / 3) && (y <= (2 * (y1 - 1)) / 3)))) { wmove(win, y, x); waddch(win, ch); } } } -static void overlap_test(void) +static void +overlap_test(void) /* test effects of overlapping windows */ { - int ch; + int ch; WINDOW *win1 = newwin(9, 20, 3, 3); WINDOW *win2 = newwin(9, 20, 9, 16); @@ -2877,7 +3106,6 @@ static void overlap_test(void) printw("the shared region of two overlapping windows A and B. The cross\n"); printw("pattern in each window does not overlap the other.\n"); - move(18, 0); printw("a = refresh A, then B, then doupdate. b = refresh B, then A, then doupdaute\n"); printw("c = fill window A with letter A. d = fill window B with letter B.\n"); @@ -2887,8 +3115,7 @@ static void overlap_test(void) printw("^Q/ESC = terminate test."); while ((ch = Getchar()) != QUIT && ch != ESCAPE) - switch (ch) - { + switch (ch) { case 'a': /* refresh window A first, then B */ wnoutrefresh(win1); wnoutrefresh(win2); @@ -2952,8 +3179,7 @@ static bool do_single_test(const char c) /* perform a single specified test */ { - switch (c) - { + switch (c) { case 'a': getch_test(); break; @@ -3023,12 +3249,12 @@ do_single_test(const char c) #endif case 's': - overlap_test(); + overlap_test(); break; #if USE_LIBMENU && defined(TRACE) case 't': - trace_set(); + trace_set(); break; #endif @@ -3045,10 +3271,15 @@ do_single_test(const char c) static void usage(void) { - static const char *const tbl[] = { - "Usage: ncurses [options]" + static const char *const tbl[] = + { + "Usage: ncurses [options]" ,"" ,"Options:" +#ifdef NCURSES_VERSION + ," -a f,b set default-colors (assumed white-on-black)" + ," -d use default-colors if terminal supports them" +#endif ," -e fmt specify format for soft-keys test (e)" ," -f rip-off footer line (can repeat)" ," -h rip-off header line (can repeat)" @@ -3058,7 +3289,7 @@ usage(void) #endif }; size_t n; - for (n = 0; n < sizeof(tbl)/sizeof(tbl[0]); n++) + for (n = 0; n < sizeof(tbl) / sizeof(tbl[0]); n++) fprintf(stderr, "%s\n", tbl[n]); exit(EXIT_FAILURE); } @@ -3075,30 +3306,33 @@ set_terminal_modes(void) } #ifdef SIGUSR1 -static RETSIGTYPE announce_sig(int sig) +static RETSIGTYPE +announce_sig(int sig) { (void) fprintf(stderr, "Handled signal %d\r\n", sig); } #endif -static int rip_footer(WINDOW *win, int columns) +static int +rip_footer(WINDOW *win, int columns) { - wbkgd(win, A_REVERSE); - werase(win); - wmove(win, 0, 0); - wprintw(win, "footer: %d columns", columns); - wnoutrefresh(win); - return OK; + wbkgd(win, A_REVERSE); + werase(win); + wmove(win, 0, 0); + wprintw(win, "footer: %d columns", columns); + wnoutrefresh(win); + return OK; } -static int rip_header(WINDOW *win, int columns) +static int +rip_header(WINDOW *win, int columns) { - wbkgd(win, A_REVERSE); - werase(win); - wmove(win, 0, 0); - wprintw(win, "header: %d columns", columns); - wnoutrefresh(win); - return OK; + wbkgd(win, A_REVERSE); + werase(win); + wmove(win, 0, 0); + wprintw(win, "header: %d columns", columns); + wnoutrefresh(win); + return OK; } /*+------------------------------------------------------------------------- @@ -3108,23 +3342,38 @@ static int rip_header(WINDOW *win, int columns) int main(int argc, char *argv[]) { - int command, c; - int my_e_param = 1; + int command, c; + int my_e_param = 1; +#ifdef NCURSES_VERSION + int default_fg = COLOR_WHITE; + int default_bg = COLOR_BLACK; + bool assumed_colors = FALSE; + bool default_colors = FALSE; +#endif #if HAVE_LOCALE_H setlocale(LC_CTYPE, ""); #endif - while ((c = getopt(argc, argv, "e:fhs:t:")) != EOF) { + while ((c = getopt(argc, argv, "a:de:fhs:t:")) != EOF) { switch (c) { +#ifdef NCURSES_VERSION + case 'a': + assumed_colors = TRUE; + sscanf(optarg, "%d,%d", &default_fg, &default_bg); + break; + case 'd': + default_colors = TRUE; + break; +#endif case 'e': my_e_param = atoi(optarg); #ifdef NCURSES_VERSION if (my_e_param > 3) /* allow extended layouts */ - usage(); + usage(); #else if (my_e_param > 1) - usage(); + usage(); #endif break; case 'f': @@ -3159,7 +3408,7 @@ main(int argc, char *argv[]) trace(save_trace); #else if (!isatty(fileno(stdin))) - trace(save_trace); + trace(save_trace); #endif /* USE_LIBMENU */ #endif /* TRACE */ @@ -3176,7 +3425,15 @@ main(int argc, char *argv[]) bkgdset(BLANK); /* tests, in general, will want these modes */ - start_color(); + if (has_colors()) { + start_color(); +#ifdef NCURSES_VERSION + if (default_colors) + use_default_colors(); + else if (assumed_colors) + assume_default_colors(default_fg, default_bg); +#endif + } set_terminal_modes(); def_prog_mode(); @@ -3190,9 +3447,9 @@ main(int argc, char *argv[]) (void) printf("Welcome to %s. Press ? for help.\n", curses_version()); #elif defined(NCURSES_VERSION_MAJOR) && defined(NCURSES_VERSION_MINOR) && defined(NCURSES_VERSION_PATCH) (void) printf("Welcome to ncurses %d.%d.%d. Press ? for help.\n", - NCURSES_VERSION_MAJOR, - NCURSES_VERSION_MINOR, - NCURSES_VERSION_PATCH); + NCURSES_VERSION_MAJOR, + NCURSES_VERSION_MINOR, + NCURSES_VERSION_PATCH); #else (void) puts("Welcome to ncurses. Press ? for help."); #endif @@ -3226,7 +3483,7 @@ main(int argc, char *argv[]) (void) puts("? = repeat this command summary"); (void) fputs("> ", stdout); - (void) fflush(stdout); /* necessary under SVr4 curses */ + (void) fflush(stdout); /* necessary under SVr4 curses */ /* * This used to be an 'fgets()' call. However (on Linux, at least) @@ -3234,41 +3491,44 @@ main(int argc, char *argv[]) * input stream to be flushed when switching between the two. */ command = 0; - for(;;) { - char ch; - if (read(fileno(stdin), &ch, 1) <= 0) { - if (command == 0) - command = 'q'; - break; - } else if (command == 0 && !isspace(ch)) { - command = ch; - } else if (ch == '\n' || ch == '\r') { - if (command != 0) - break; - (void) fputs("> ", stdout); - (void) fflush(stdout); - } + for (;;) { + char ch; + if (read(fileno(stdin), &ch, 1) <= 0) { + if (command == 0) + command = 'q'; + break; + } else if (command == 0 && !isspace(ch)) { + command = ch; + } else if (ch == '\n' || ch == '\r') { + if (command != 0) + break; + (void) fputs("> ", stdout); + (void) fflush(stdout); + } } if (do_single_test(command)) { - /* - * This may be overkill; it's intended to reset everything back - * to the initial terminal modes so that tests don't get in - * each other's way. - */ - flushinp(); - set_terminal_modes(); - reset_prog_mode(); - clear(); - refresh(); - endwin(); - if (command == '?') { - (void) puts("This is the ncurses capability tester."); - (void) puts("You may select a test from the main menu by typing the"); - (void) puts("key letter of the choice (the letter to left of the =)"); - (void) puts("at the > prompt. The commands `x' or `q' will exit."); - } - continue; + /* + * This may be overkill; it's intended to reset everything back + * to the initial terminal modes so that tests don't get in + * each other's way. + */ + flushinp(); + set_terminal_modes(); + reset_prog_mode(); + clear(); + refresh(); + endwin(); + if (command == '?') { + (void) puts("This is the ncurses capability tester."); + (void) + puts("You may select a test from the main menu by typing the"); + (void) + puts("key letter of the choice (the letter to left of the =)"); + (void) + puts("at the > prompt. The commands `x' or `q' will exit."); + } + continue; } } while (command != 'q'); diff --git a/test/railroad.c b/test/railroad.c new file mode 100644 index 00000000..d3dc2eae --- /dev/null +++ b/test/railroad.c @@ -0,0 +1,201 @@ +/**************************************************************************** + * Copyright (c) 2000 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/* + * Author: Thomas E. Dickey 2000 + * + * $Id: railroad.c,v 1.1 2000/01/15 02:41:27 tom Exp $ + * + * A simple demo of the termcap interface. + */ +#include + +#include +#include +#include + +static char *finisC; +static char *finisS; +static char *finisU; + +static char *startC; +static char *startS; +static char *startU; + +static char *backup; + +static bool interrupted = FALSE; + +static int +outc(int c) +{ + if (interrupted) { + char tmp = c; + write(STDOUT_FILENO, &tmp, 1); + } else { + putc(c, stdout); + } + return 0; +} + +static void +PutChar(int ch) +{ + putchar(ch); + fflush(stdout); + napms(50); /* not really termcap... */ +} + +static void +Backup(void) +{ + tputs(backup != 0 ? backup : "\b", 1, outc); +} + +static void +ShowCursor(int flag) +{ + if (startC != 0 && finisC != 0) { + tputs(flag ? startC : finisC, 1, outc); + } +} + +static void +StandOut(int flag) +{ + if (startS != 0 && finisS != 0) { + tputs(flag ? startS : finisS, 1, outc); + } +} + +static void +Underline(int flag) +{ + if (startU != 0 && finisU != 0) { + tputs(flag ? startU : finisU, 1, outc); + } +} + +static void +ShowSign(char *string) +{ + int ch, first, last; + + while (*string != 0) { + ch = *string; + last = ch; + if (isalpha(ch)) { + first = isupper(ch) ? 'A' : 'a'; + } else if (isdigit(ch)) { + first = '0'; + } else { + first = ch; + } + if (first < last) { + Underline(1); + while (first < last) { + PutChar(first); + Backup(); + first++; + } + Underline(0); + } + StandOut(1); + PutChar(ch); + StandOut(0); + fflush(stdout); + string++; + } + putchar('\n'); +} + +static void +cleanup(void) +{ + Underline(0); + StandOut(0); + ShowCursor(1); +} + +static void +onsig(int n GCC_UNUSED) +{ + interrupted = TRUE; + cleanup(); + exit(EXIT_FAILURE); +} + +static void +railroad(char **args) +{ + char *name = getenv("TERM"); + char buffer[1024]; + char area[1024], *ap = area; + int j; + + if (name == 0) + name = "dumb"; + if (tgetent(buffer, name)) { + startS = tgetstr("so", &ap); + finisS = tgetstr("se", &ap); + + startU = tgetstr("us", &ap); + finisU = tgetstr("ue", &ap); + + backup = tgetstr("le", &ap); + + startC = tgetstr("ve", &ap); + finisC = tgetstr("vi", &ap); + + ShowCursor(0); + + for (j = SIGHUP; j <= SIGTERM; j++) + if (signal(j, SIG_IGN) != SIG_IGN) + signal(j, onsig); + + while (*args) { + ShowSign(*args++); + } + ShowCursor(1); + } +} + +int +main( + int argc, + char *argv[]) +{ + if (argc > 1) { + railroad(argv + 1); + } else { + static char *hello[] = + {"Hello World", 0}; + railroad(hello); + } + return EXIT_SUCCESS; +} diff --git a/test/rain.c b/test/rain.c index 646ab96e..262f87d2 100644 --- a/test/rain.c +++ b/test/rain.c @@ -1,5 +1,5 @@ /* - * $Id: rain.c,v 1.13 1999/10/23 01:31:26 tom Exp $ + * $Id: rain.c,v 1.14 1999/11/13 23:39:07 tom Exp $ */ #include @@ -42,7 +42,7 @@ float c; if (has_colors()) { int bg = COLOR_BLACK; start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) bg = -1; #endif diff --git a/test/tclock.c b/test/tclock.c index 0c795684..838f45e7 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -128,7 +128,7 @@ main( if (has_colors()) { start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) my_bg = -1; #endif diff --git a/test/test.priv.h b/test/test.priv.h index 0ae43319..affed8d7 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996 * ****************************************************************************/ -/* $Id: test.priv.h,v 1.15 1998/02/11 12:14:04 tom Exp $ */ +/* $Id: test.priv.h,v 1.16 2000/04/15 17:52:08 tom Exp $ */ #if HAVE_CONFIG_H #include #endif @@ -68,6 +68,9 @@ extern int optind; #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H #include +#else +#define typeMalloc(type,n) (type *) malloc(n * sizeof(type)) +#define typeRealloc(type,n,p) (type *) realloc(p, n * sizeof(type)) #endif #ifndef ExitProgram diff --git a/test/testcurs.c b/test/testcurs.c index ff776570..5fa054a9 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -7,7 +7,7 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.19 1999/02/14 00:42:28 tom Exp $ + * $Id: testcurs.c,v 1.22 2000/06/17 23:23:34 tom Exp $ */ #include @@ -17,103 +17,102 @@ char *XCursesProgramName = "testcurs"; #endif -static int initTest (WINDOW **); -static void display_menu (int,int); -static void inputTest (WINDOW *); -static void introTest (WINDOW *); -static void outputTest (WINDOW *); -static void padTest (WINDOW *); -static void scrollTest (WINDOW *); -# if defined(PDCURSES) && !defined(XCURSES) -static void resizeTest (WINDOW *); +static int initTest(WINDOW **); +static void display_menu(int, int); +static void inputTest(WINDOW *); +static void introTest(WINDOW *); +static void outputTest(WINDOW *); +static void padTest(WINDOW *); +static void scrollTest(WINDOW *); +#if defined(PDCURSES) && !defined(XCURSES) +static void resizeTest(WINDOW *); #endif -struct commands -{ - NCURSES_CONST char *text; - void (*function)(WINDOW *); +struct commands { + NCURSES_CONST char *text; + void (*function) (WINDOW *); }; typedef struct commands COMMAND; const COMMAND command[] = { - {"Intro Test", introTest}, - {"Pad Test", padTest}, -# if defined(PDCURSES) && !defined(XCURSES) - {"Resize Test", resizeTest}, + {"Intro Test", introTest}, + {"Pad Test", padTest}, +#if defined(PDCURSES) && !defined(XCURSES) + {"Resize Test", resizeTest}, #endif - {"Scroll Test", scrollTest}, - {"Input Test", inputTest}, - {"Output Test", outputTest} + {"Scroll Test", scrollTest}, + {"Input Test", inputTest}, + {"Output Test", outputTest} }; #define MAX_OPTIONS ((sizeof(command)/sizeof(command[0]))) -int width, height; +int width, height; int main( - int argc GCC_UNUSED, - char *argv[] GCC_UNUSED) + int argc GCC_UNUSED, + char *argv[]GCC_UNUSED) { -WINDOW *win; -int key,old_option=(-1),new_option=0; -bool quit=FALSE; + WINDOW *win; + int key, old_option = (-1), new_option = 0; + bool quit = FALSE; #ifdef PDCDEBUG - PDC_debug("testcurs started\n"); + PDC_debug("testcurs started\n"); #endif - if (!initTest (&win)) return EXIT_FAILURE; + if (!initTest(&win)) + return EXIT_FAILURE; + erase(); + display_menu(old_option, new_option); + while (1) { #ifdef A_COLOR - if (has_colors()) - { - init_pair(1,COLOR_WHITE,COLOR_BLUE); - wbkgd(win, COLOR_PAIR(1)); - } - else - wbkgd(win, A_REVERSE); + if (has_colors()) { + init_pair(1, COLOR_WHITE, COLOR_BLUE); + wbkgd(win, COLOR_PAIR(1)); + } else + wbkgd(win, A_REVERSE); #else - wbkgd(win, A_REVERSE); + wbkgd(win, A_REVERSE); #endif + werase(win); + + noecho(); + keypad(stdscr, TRUE); + raw(); + key = getch(); + switch (key) { + case 10: + case 13: + case KEY_ENTER: + erase(); + refresh(); + (*command[new_option].function) (win); + erase(); + display_menu(old_option, new_option); + break; + case KEY_UP: + new_option = (new_option == 0) ? new_option : new_option - 1; + display_menu(old_option, new_option); + break; + case KEY_DOWN: + new_option = (new_option == MAX_OPTIONS - 1) ? new_option : + new_option + 1; + display_menu(old_option, new_option); + break; + case 'Q': + case 'q': + quit = TRUE; + break; + default: + break; + } + if (quit == TRUE) + break; + } - erase(); - display_menu(old_option,new_option); - while(1) - { - noecho(); - keypad(stdscr,TRUE); - raw(); - key = getch(); - switch(key) - { - case 10: - case 13: - case KEY_ENTER: - erase(); - refresh(); - (*command[new_option].function)(win); - erase(); - display_menu(old_option,new_option); - break; - case KEY_UP: - new_option = (new_option == 0) ? new_option : new_option-1; - display_menu(old_option,new_option); - break; - case KEY_DOWN: - new_option = (new_option == MAX_OPTIONS-1) ? new_option : new_option+1; - display_menu(old_option,new_option); - break; - case 'Q': - case 'q': - quit = TRUE; - break; - default: break; - } - if (quit == TRUE) - break; - } - - delwin (win); + delwin(win); endwin(); #ifdef XCURSES @@ -122,24 +121,35 @@ bool quit=FALSE; return EXIT_SUCCESS; } -static -void Continue (WINDOW *win) +static void +Continue(WINDOW *win) { - wmove(win, 10, 1); + int y1 = getmaxy(win); + int x1 = getmaxx(win); + int y0 = y1 < 10 ? y1 : 10; + int x0 = 1; + long save; + + save = mvwinch(win, y0, x1 - 1); + + mvwaddstr(win, y0, x0, " Press any key to continue"); wclrtoeol(win); - mvwaddstr(win, 10, 1, " Press any key to continue"); - wrefresh(win); + getyx(win, y0, x0); + + mvwaddch(win, y0, x1 - 1, save); + + wmove(win, y0, x0); raw(); wgetch(win); } static int -initTest (WINDOW **win) +initTest(WINDOW **win) { #ifdef PDCDEBUG PDC_debug("initTest called\n"); #endif -#ifdef NCURSES_VERSION +#ifdef TRACE trace(TRACE_MAXIMUM); #endif initscr(); @@ -148,106 +158,115 @@ initTest (WINDOW **win) #endif #ifdef A_COLOR if (has_colors()) - start_color(); + start_color(); #endif - width = 60; - height = 13; /* Create a drawing window */ - *win = newwin(height, width, (LINES-height)/2, (COLS-width)/2); - if(*win == NULL) - { - endwin(); - return 0; + width = 60; + height = 13; /* Create a drawing window */ + *win = newwin(height, width, (LINES - height) / 2, (COLS - width) / 2); + if (*win == NULL) { + endwin(); + return 0; } return 1; } static void -introTest (WINDOW *win) +introTest(WINDOW *win) { - wmove( win, height/2-5, width/2 ); - wvline( win, ACS_VLINE, 10 ); - wmove( win, height/2, width/2-10 ); - whline( win, ACS_HLINE, 20 ); + wmove(win, height / 2 - 5, width / 2); + wvline(win, ACS_VLINE, 10); + wmove(win, height / 2, width / 2 - 10); + whline(win, ACS_HLINE, 20); Continue(win); - beep (); + beep(); werase(win); box(win, ACS_VLINE, ACS_HLINE); wrefresh(win); - cbreak (); - mvwaddstr(win, 1, 1, "You should have rectangle in the middle of the screen"); + cbreak(); + mvwaddstr(win, 1, 1, + "You should have rectangle in the middle of the screen"); mvwaddstr(win, 2, 1, "You should have heard a beep"); Continue(win); return; } static void -scrollTest (WINDOW *win) +scrollTest(WINDOW *win) { int i; + int half; int OldX, OldY; NCURSES_CONST char *Message = "The window will now scroll slowly"; wclear(win); - mvwprintw (win, height - 2, 1, Message); - wrefresh (win); + getmaxyx(win, OldY, OldX); + half = OldY / 2; + mvwprintw(win, OldY - 2, 1, Message); + wrefresh(win); scrollok(win, TRUE); - for (i = 1; i <= height; i++) { - napms(250); - scroll(win); - wrefresh (win); + for (i = 1; i <= OldY; i++) { + napms(600); + scroll(win); + wrefresh(win); } - getmaxyx (win, OldY, OldX); - mvwprintw (win, 6, 1, "The top of the window will scroll"); - wmove (win, 1, 1); - wsetscrreg (win, 0, 4); + werase(win); + for (i = 1; i < OldY; i++) { + mvwprintw(win, i, 1, "Line %d", i); + } + mvwprintw(win, OldY - 2, 1, "The top of the window will scroll"); + wmove(win, 1, 1); + wsetscrreg(win, 0, half - 1); box(win, ACS_VLINE, ACS_HLINE); - wrefresh (win); - for (i = 1; i <= 5; i++) { - napms(500); - scroll(win); - wrefresh (win); + wrefresh(win); + for (i = 1; i <= half; i++) { + napms(600); + scroll(win); + box(win, ACS_VLINE, ACS_HLINE); + wrefresh(win); } - mvwprintw (win, 3, 1, "The bottom of the window will scroll"); - wmove (win, 8, 1); - wsetscrreg (win, 5, --OldY); + werase(win); + for (i = 1; i < OldY; i++) { + mvwprintw(win, i, 1, "Line %d", i); + } + mvwprintw(win, 1, 1, "The bottom of the window will scroll"); + wmove(win, OldY - 2, 1); + wsetscrreg(win, half, --OldY); box(win, ACS_VLINE, ACS_HLINE); - wrefresh (win); - for (i = 5; i <= OldY; i++) { - napms (300); - wscrl(win,-1); - wrefresh (win); + wrefresh(win); + for (i = half; i <= OldY; i++) { + napms(600); + wscrl(win, -1); + box(win, ACS_VLINE, ACS_HLINE); + wrefresh(win); } - wsetscrreg (win, 0, OldY); - + wsetscrreg(win, 0, OldY); } static void -inputTest (WINDOW *win) +inputTest(WINDOW *win) { - int w, h, bx, by, sw, sh, i, c,num; - char buffer [80]; + int w, h, bx, by, sw, sh, i, c, num; + char buffer[80]; WINDOW *subWin; - wclear (win); + wclear(win); - getmaxyx(win, h, w); + getmaxyx(win, h, w); getbegyx(win, by, bx); sw = w / 3; sh = h / 3; - if((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL) - return; + if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL) + return; #ifdef A_COLOR - if (has_colors()) - { - init_pair(2,COLOR_WHITE,COLOR_RED); - wbkgd(subWin, COLOR_PAIR(2) | A_BOLD); - } - else - wbkgd(subWin, A_BOLD); + if (has_colors()) { + init_pair(2, COLOR_WHITE, COLOR_RED); + wbkgd(subWin, COLOR_PAIR(2) | A_BOLD); + } else + wbkgd(subWin, A_BOLD); #else wbkgd(subWin, A_BOLD); #endif @@ -259,16 +278,16 @@ inputTest (WINDOW *win) mvwaddstr(win, 1, 1, "Pressing ^C should do nothing"); wrefresh(win); - werase (subWin); + werase(subWin); box(subWin, ACS_VLINE, ACS_HLINE); for (i = 0; i < 5; i++) { - mvwprintw (subWin, 1, 1, "Time = %d", i); - wrefresh(subWin); - napms(1000); - flushinp(); + mvwprintw(subWin, 1, 1, "Time = %d", i); + wrefresh(subWin); + napms(1000); + flushinp(); } - delwin (subWin); + delwin(subWin); werase(win); flash(); wrefresh(win); @@ -287,7 +306,7 @@ inputTest (WINDOW *win) mvwaddstr(win, 4, 1, "The character should now have been deleted"); Continue(win); - wclear (win); + wclear(win); mvwaddstr(win, 1, 1, "Press keys (or mouse buttons) to show their names"); mvwaddstr(win, 2, 1, "Press spacebar to finish"); wrefresh(win); @@ -298,49 +317,44 @@ inputTest (WINDOW *win) #if defined(PDCURSES) mouse_set(ALL_MOUSE_EVENTS); #endif - while(1) { - wmove(win,3,5); - c = wgetch(win); - wclrtobot(win); - if (c >= KEY_MIN) - wprintw(win,"Key Pressed: %s", keyname(c)); - else - if (isprint(c)) - wprintw(win,"Key Pressed: %c", c); - else - wprintw(win,"Key Pressed: %s", unctrl(c)); + while (1) { + wmove(win, 3, 5); + c = wgetch(win); + wclrtobot(win); + if (c >= KEY_MIN) + wprintw(win, "Key Pressed: %s", keyname(c)); + else if (isprint(c)) + wprintw(win, "Key Pressed: %c", c); + else + wprintw(win, "Key Pressed: %s", unctrl(c)); #if defined(PDCURSES) - if (c == KEY_MOUSE) { - int button=0; - request_mouse_pos(); - if (BUTTON_CHANGED(1)) - button = 1; - else - if (BUTTON_CHANGED(2)) - button = 2; - else - if (BUTTON_CHANGED(3)) - button = 3; - else - button = 0; - wmove(win,4,18); - wprintw(win,"Button %d: ",button); - if (MOUSE_MOVED) - wprintw(win,"moved: "); - else - if ((BUTTON_STATUS(button) & BUTTON_ACTION_MASK) == BUTTON_PRESSED) - wprintw(win,"pressed: "); - else - if ((BUTTON_STATUS(button) & BUTTON_ACTION_MASK) == BUTTON_DOUBLE_CLICKED) - wprintw(win,"double: "); - else - wprintw(win,"released: "); - wprintw(win," Position: Y: %d X: %d",MOUSE_Y_POS,MOUSE_X_POS); - } + if (c == KEY_MOUSE) { + int button = 0; + request_mouse_pos(); + if (BUTTON_CHANGED(1)) + button = 1; + else if (BUTTON_CHANGED(2)) + button = 2; + else if (BUTTON_CHANGED(3)) + button = 3; + else + button = 0; + wmove(win, 4, 18); + wprintw(win, "Button %d: ", button); + if (MOUSE_MOVED) + wprintw(win, "moved: "); + else if ((BUTTON_STATUS(button) & BUTTON_ACTION_MASK) == BUTTON_PRESSED) + wprintw(win, "pressed: "); + else if ((BUTTON_STATUS(button) & BUTTON_ACTION_MASK) == BUTTON_DOUBLE_CLICKED) + wprintw(win, "double: "); + else + wprintw(win, "released: "); + wprintw(win, " Position: Y: %d X: %d", MOUSE_Y_POS, MOUSE_X_POS); + } #endif - wrefresh(win); - if (c == ' ') - break; + wrefresh(win); + if (c == ' ') + break; } #if 0 nodelay(win, TRUE); @@ -351,9 +365,10 @@ inputTest (WINDOW *win) mouse_set(0L); #endif refresh(); - wclear (win); + wclear(win); mvwaddstr(win, 3, 2, "The window should have moved"); - mvwaddstr(win, 4, 2, "This text should have appeared without you pressing a key"); + mvwaddstr(win, 4, 2, + "This text should have appeared without you pressing a key"); mvwaddstr(win, 6, 2, "Enter a number then a string separated by space"); mvwin(win, 2, 1); wrefresh(win); @@ -361,25 +376,26 @@ inputTest (WINDOW *win) noraw(); num = 0; *buffer = 0; - mvwscanw(win, 7, 6, "%d %s", &num,buffer); - mvwprintw(win, 8, 6, "String: %s Number: %d", buffer,num); + mvwscanw(win, 7, 6, "%d %s", &num, buffer); + mvwprintw(win, 8, 6, "String: %s Number: %d", buffer, num); Continue(win); } static void -outputTest (WINDOW *win) +outputTest(WINDOW *win) { WINDOW *win1; - char Buffer [80]; + char Buffer[80]; chtype ch; int by, bx; - nl (); - wclear (win); - mvwaddstr(win, 1, 1, "You should now have a screen in the upper left corner, and this text should have wrapped"); + nl(); + wclear(win); + mvwaddstr(win, 1, 1, + "You should now have a screen in the upper left corner, and this text should have wrapped"); mvwin(win, 2, 1); - waddstr(win,"\nThis text should be down\n"); - waddstr(win, "and broken into two here ^"); + waddstr(win, "\nThis text should be down\n"); + waddstr(win, "and broken into two here ^"); Continue(win); wclear(win); @@ -392,51 +408,51 @@ outputTest (WINDOW *win) getbegyx(win, by, bx); if (LINES < 24 || COLS < 75) { - mvwaddstr(win, 5, 1, "Some tests have been skipped as they require a"); - mvwaddstr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); - Continue(win); + mvwaddstr(win, 5, 1, + "Some tests have been skipped as they require a"); + mvwaddstr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); + Continue(win); } else { - win1 = newwin(10, 50, 14, 25); - if(win1 == NULL) - { - endwin(); - return; - } + win1 = newwin(10, 50, 14, 25); + if (win1 == NULL) { + endwin(); + return; + } #ifdef A_COLOR - if (has_colors()) - { - init_pair(3,COLOR_BLUE,COLOR_WHITE); - wbkgd(win1, COLOR_PAIR(3)); - } - else - wbkgd(win1, A_NORMAL); + if (has_colors()) { + init_pair(3, COLOR_BLUE, COLOR_WHITE); + wbkgd(win1, COLOR_PAIR(3)); + } else + wbkgd(win1, A_NORMAL); #else - wbkgd(win1, A_NORMAL); + wbkgd(win1, A_NORMAL); #endif - wclear (win1); - mvwaddstr(win1, 5, 1, "This text should appear; using overlay option"); - copywin(win, win1,0,0,0,0,9,49,TRUE); + wclear(win1); + mvwaddstr(win1, 5, 1, + "This text should appear; using overlay option"); + copywin(win, win1, 0, 0, 0, 0, 9, 49, TRUE); #if defined(PDCURSES) && !defined(XCURSES) - box(win1,0xb3,0xc4); + box(win1, 0xb3, 0xc4); #else - box(win1,ACS_VLINE,ACS_HLINE); + box(win1, ACS_VLINE, ACS_HLINE); #endif - wmove(win1, 8, 26); - wrefresh(win1); - wgetch(win1); - - wclear(win1); - wattron(win1, A_BLINK); - mvwaddstr(win1, 4, 1, "This blinking text should appear in only the second window"); - wattroff(win1, A_BLINK); - mvwin(win1, by, bx); - overlay(win, win1); - mvwin(win1,14,25); - wmove(win1, 8, 26); - wrefresh(win1); - wgetch(win1); - delwin(win1); + wmove(win1, 8, 26); + wrefresh(win1); + wgetch(win1); + + wclear(win1); + wattron(win1, A_BLINK); + mvwaddstr(win1, 4, 1, + "This blinking text should appear in only the second window"); + wattroff(win1, A_BLINK); + mvwin(win1, by, bx); + overlay(win, win1); + mvwin(win1, 14, 25); + wmove(win1, 8, 26); + wrefresh(win1); + wgetch(win1); + delwin(win1); } clear(); @@ -446,74 +462,75 @@ outputTest (WINDOW *win) mvwaddstr(win, 4, 2, "Only half of the next line is visible"); mvwaddstr(win, 5, 2, "Only half of the next line is visible"); wmove(win, 6, 1); - wclrtobot (win); + wclrtobot(win); wmove(win, 5, 20); - wclrtoeol (win); + wclrtoeol(win); mvwaddstr(win, 8, 2, "This line also shouldn't appear"); wmove(win, 8, 1); wdeleteln(win); Continue(win); - wmove (win, 5, 9); - ch = winch (win); + wmove(win, 5, 9); + ch = winch(win); wclear(win); - wmove (win, 6, 2); - waddstr (win, "The next char should be l: "); - winsch (win, ch); + wmove(win, 6, 2); + waddstr(win, "The next char should be l: "); + winsch(win, ch); Continue(win); - mvwinsstr( win, 6, 2, "A1B2C3D4E5" ); + mvwinsstr(win, 6, 2, "A1B2C3D4E5"); Continue(win); wmove(win, 5, 1); - winsertln (win); + winsertln(win); mvwaddstr(win, 5, 2, "The lines below should have moved down"); Continue(win); wclear(win); wmove(win, 2, 2); - wprintw(win, "This is a formatted string in a window: %d %s\n", 42, "is it"); + wprintw(win, "This is a formatted string in a window: %d %s\n", 42, + "is it"); mvwaddstr(win, 10, 1, "Enter a string: "); wrefresh(win); noraw(); echo(); *Buffer = 0; - wscanw (win, "%s", Buffer); + wscanw(win, "%s", Buffer); printw("This is a formatted string in stdscr: %d %s\n", 42, "is it"); mvaddstr(10, 1, "Enter a string: "); *Buffer = 0; - scanw ("%s", Buffer); + scanw("%s", Buffer); if (tigetstr("cvvis") != 0) { - wclear(win); - curs_set(2); - mvwaddstr(win, 1, 1, "The cursor should appear as a block (visible)"); - Continue(win); + wclear(win); + curs_set(2); + mvwaddstr(win, 1, 1, "The cursor should appear as a block (visible)"); + Continue(win); } if (tigetstr("civis") != 0) { - wclear(win); - curs_set(0); - mvwaddstr(win, 1, 1, "The cursor should have disappeared (invisible)"); - Continue(win); + wclear(win); + curs_set(0); + mvwaddstr(win, 1, 1, + "The cursor should have disappeared (invisible)"); + Continue(win); } if (tigetstr("cnorm") != 0) { - wclear(win); - curs_set(1); - mvwaddstr(win, 1, 1, "The cursor should be an underline (normal)"); - Continue(win); + wclear(win); + curs_set(1); + mvwaddstr(win, 1, 1, "The cursor should be an underline (normal)"); + Continue(win); } - #ifdef A_COLOR - if ( has_colors() ) { - wclear(win); - mvwaddstr(win, 1, 1, "Colors should change after you press a key"); - Continue(win); - init_pair(1, COLOR_RED, COLOR_WHITE); - wrefresh(win); + if (has_colors()) { + wclear(win); + mvwaddstr(win, 1, 1, "Colors should change after you press a key"); + Continue(win); + init_pair(1, COLOR_RED, COLOR_WHITE); + wrefresh(win); } #endif @@ -521,16 +538,16 @@ outputTest (WINDOW *win) mvwaddstr(win, 1, 1, "Information About Your Terminal"); mvwaddstr(win, 3, 1, termname()); mvwaddstr(win, 4, 1, longname()); - if ( termattrs() & A_BLINK ) - mvwaddstr(win,5, 1, "This terminal supports blinking."); + if (termattrs() & A_BLINK) + mvwaddstr(win, 5, 1, "This terminal supports blinking."); else - mvwaddstr(win,5, 1, "This terminal does NOT support blinking."); + mvwaddstr(win, 5, 1, "This terminal does NOT support blinking."); - mvwaddnstr( win, 7,5, "Have a nice day!ok", 16 ); + mvwaddnstr(win, 7, 5, "Have a nice day!ok", 16); wrefresh(win); - mvwinnstr( win, 7,5, Buffer, 18 ); - mvaddstr( LINES-2, 10, Buffer ); + mvwinnstr(win, 7, 5, Buffer, 18); + mvaddstr(LINES - 2, 10, Buffer); refresh(); Continue(win); } @@ -541,35 +558,34 @@ resizeTest(WINDOW *dummy GCC_UNUSED) { WINDOW *win1; - savetty (); + savetty(); clear(); refresh(); # if defined(OS2) - resize_term(50,120); + resize_term(50, 120); # else - resize_term(50,80); + resize_term(50, 80); # endif win1 = newwin(10, 50, 14, 25); - if(win1 == NULL) - { endwin(); - return; + if (win1 == NULL) { + endwin(); + return; } #ifdef A_COLOR - if (has_colors()) - { - init_pair(3,COLOR_BLUE,COLOR_WHITE); - wattrset(win1, COLOR_PAIR(3)); - } + if (has_colors()) { + init_pair(3, COLOR_BLUE, COLOR_WHITE); + wattrset(win1, COLOR_PAIR(3)); + } #endif - wclear (win1); + wclear(win1); mvwaddstr(win1, 1, 1, "The screen may now have 50 lines"); Continue(win1); - wclear (win1); - resetty (); + wclear(win1); + resetty(); mvwaddstr(win1, 1, 1, "The screen should now be reset"); Continue(win1); @@ -585,56 +601,57 @@ resizeTest(WINDOW *dummy GCC_UNUSED) static void padTest(WINDOW *dummy GCC_UNUSED) { -WINDOW *pad, *spad; - - pad = newpad(50,100); - wattron(pad, A_REVERSE); - mvwaddstr(pad, 5, 2, "This is a new pad"); - wattrset(pad,A_NORMAL); - mvwaddstr(pad, 8, 0, "The end of this line should be truncated here:except now"); - mvwaddstr(pad,11, 1, "This line should not appear.It will now"); - wmove(pad, 10, 1); - wclrtoeol(pad); - mvwaddstr(pad, 10, 1, " Press any key to continue"); - prefresh(pad,0,0,0,0,10,45); - keypad(pad, TRUE); - raw(); - wgetch(pad); - - spad = subpad(pad,12,25,6,52); - mvwaddstr(spad, 2, 2, "This is a new subpad"); - box(spad,0,0); - prefresh(pad,0,0,0,0,15,75); - keypad(pad, TRUE); - raw(); - wgetch(pad); - - mvwaddstr(pad, 35, 2, "This is displayed at line 35 in the pad"); - mvwaddstr(pad, 40, 1, " Press any key to continue"); - prefresh(pad,30,0,0,0,10,45); - keypad(pad, TRUE); - raw(); - wgetch(pad); - - delwin(pad); + WINDOW *pad, *spad; + + pad = newpad(50, 100); + wattron(pad, A_REVERSE); + mvwaddstr(pad, 5, 2, "This is a new pad"); + wattrset(pad, A_NORMAL); + mvwaddstr(pad, 8, 0, + "The end of this line should be truncated here:except now"); + mvwaddstr(pad, 11, 1, "This line should not appear.It will now"); + wmove(pad, 10, 1); + wclrtoeol(pad); + mvwaddstr(pad, 10, 1, " Press any key to continue"); + prefresh(pad, 0, 0, 0, 0, 10, 45); + keypad(pad, TRUE); + raw(); + wgetch(pad); + + spad = subpad(pad, 12, 25, 6, 52); + mvwaddstr(spad, 2, 2, "This is a new subpad"); + box(spad, 0, 0); + prefresh(pad, 0, 0, 0, 0, 15, 75); + keypad(pad, TRUE); + raw(); + wgetch(pad); + + mvwaddstr(pad, 35, 2, "This is displayed at line 35 in the pad"); + mvwaddstr(pad, 40, 1, " Press any key to continue"); + prefresh(pad, 30, 0, 0, 0, 10, 45); + keypad(pad, TRUE); + raw(); + wgetch(pad); + + delwin(pad); } static void -display_menu(int old_option,int new_option) +display_menu(int old_option, int new_option) { - register size_t i; - - attrset(A_NORMAL); - mvaddstr(3,20,"PDCurses Test Program"); - - for (i=0;i July 1995 to demonstrate - * the use of 'resizeterm()'. + * the use of 'resizeterm()', and May 2000 to illustrate wide-character + * handling. * * Takes a filename argument. It's a simple file-viewer with various * scroll-up and scroll-down commands. @@ -22,7 +23,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.27 1998/08/22 18:33:41 tom Exp $ + * $Id: view.c,v 1.29 2000/05/21 01:43:03 tom Exp $ */ #include @@ -52,7 +53,7 @@ static RETSIGTYPE finish(int sig) GCC_NORETURN; static void show_all(void); -#if defined(SIGWINCH) && defined(TIOCGWINSZ) && defined(NCURSES_VERSION) +#if defined(SIGWINCH) && defined(TIOCGWINSZ) && defined(HAVE_RESIZETERM) #define CAN_RESIZE 1 #else #define CAN_RESIZE 0 @@ -60,33 +61,23 @@ static void show_all(void); #if CAN_RESIZE static RETSIGTYPE adjust(int sig); -static int interrupted; +static int interrupted; #endif -static int waiting; -static int shift; +static int waiting; +static int shift; +static int utf8_mode = FALSE; -static char *fname; -static char **lines; -static char **lptr; +static char *fname; +static chtype **lines; +static chtype **lptr; -#if !HAVE_STRDUP -#define strdup my_strdup -static char *strdup (char *s) +static void +usage(void) { - char *p; - - p = malloc(strlen(s)+1); - if (p) - strcpy(p,s); - return(p); -} -#endif /* not HAVE_STRDUP */ - -static void usage(void) -{ - static const char *msg[] = { - "Usage: view [options] file" + static const char *msg[] = + { + "Usage: view [options] file" ,"" ,"Options:" ," -n NUM specify maximum number of lines (default 1000)" @@ -97,27 +88,117 @@ static void usage(void) ," -t trace screen updates" ," -T NUM specify trace mask" #endif + ," -u translate UTF-8 data" }; size_t n; for (n = 0; n < SIZEOF(msg); n++) fprintf(stderr, "%s\n", msg[n]); - exit (EXIT_FAILURE); + exit(EXIT_FAILURE); +} + +static int +ch_len(chtype * src) +{ + int result = 0; + while (*src++) + result++; + return result; +} + +/* + * Allocate a string into an array of chtype's. If UTF-8 mode is + * active, translate the string accordingly. + */ +static chtype * +ch_dup(char *src) +{ + unsigned len = strlen(src); + chtype *dst = typeMalloc(chtype, len + 1); + unsigned j, k; + unsigned utf_count = 0; + unsigned utf_char = 0; + +#define UCS_REPL 0xfffd + + for (j = k = 0; j < len; j++) { + if (utf8_mode) { + unsigned c = src[j] & 0xff; + /* Combine UTF-8 into Unicode */ + if (c < 0x80) { + /* We received an ASCII character */ + if (utf_count > 0) + dst[k++] = UCS_REPL; /* prev. sequence incomplete */ + dst[k++] = c; + utf_count = 0; + } else if (c < 0xc0) { + /* We received a continuation byte */ + if (utf_count < 1) { + dst[k++] = UCS_REPL; /* ... unexpectedly */ + } else { + if (!utf_char && !((c & 0x7f) >> (7 - utf_count))) { + utf_char = UCS_REPL; + } + /* characters outside UCS-2 become UCS_REPL */ + if (utf_char > 0x03ff) { + /* value would be >0xffff */ + utf_char = UCS_REPL; + } else { + utf_char <<= 6; + utf_char |= (c & 0x3f); + } + utf_count--; + if (utf_count == 0) + dst[k++] = utf_char; + } + } else { + /* We received a sequence start byte */ + if (utf_count > 0) + dst[k++] = UCS_REPL; /* prev. sequence incomplete */ + if (c < 0xe0) { + utf_count = 1; + utf_char = (c & 0x1f); + if (!(c & 0x1e)) + utf_char = UCS_REPL; /* overlong sequence */ + } else if (c < 0xf0) { + utf_count = 2; + utf_char = (c & 0x0f); + } else if (c < 0xf8) { + utf_count = 3; + utf_char = (c & 0x07); + } else if (c < 0xfc) { + utf_count = 4; + utf_char = (c & 0x03); + } else if (c < 0xfe) { + utf_count = 5; + utf_char = (c & 0x01); + } else { + dst[k++] = UCS_REPL; + utf_count = 0; + } + } + } else { + dst[k++] = src[j]; + } + } + dst[k] = 0; + return dst; } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { -int MAXLINES = 1000; -FILE *fp; -char buf[BUFSIZ]; -int i; -char **olptr; -int done = FALSE; -int length = 0; + int MAXLINES = 1000; + FILE *fp; + char buf[BUFSIZ]; + int i; + chtype **olptr; + int done = FALSE; + int length = 0; #if CAN_RESIZE -bool use_resize = TRUE; + bool use_resize = TRUE; #endif - while ((i = getopt(argc, argv, "n:rtT:")) != EOF) { + while ((i = getopt(argc, argv, "n:rtT:u")) != EOF) { switch (i) { case 'n': if ((MAXLINES = atoi(optarg)) < 1) @@ -136,6 +217,9 @@ bool use_resize = TRUE; trace(TRACE_CALLS); break; #endif + case 'u': + utf8_mode = TRUE; + break; default: usage(); } @@ -143,7 +227,7 @@ bool use_resize = TRUE; if (optind + 1 != argc) usage(); - if ((lines = (char **)calloc(MAXLINES+2, sizeof(*lines))) == 0) + if ((lines = typeMalloc(chtype *, MAXLINES + 2)) == 0) usage(); fname = argv[optind]; @@ -152,16 +236,16 @@ bool use_resize = TRUE; return EXIT_FAILURE; } - (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ + (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ #if CAN_RESIZE if (use_resize) - (void) signal(SIGWINCH, adjust); /* arrange interrupts to resize */ + (void) signal(SIGWINCH, adjust); /* arrange interrupts to resize */ #endif /* slurp the file */ for (lptr = &lines[0]; (lptr - lines) < MAXLINES; lptr++) { char temp[BUFSIZ], *s, *d; - int col; + int col; if (fgets(buf, sizeof(buf), fp) == 0) break; @@ -173,9 +257,9 @@ bool use_resize = TRUE; break; } else if (*d == '\t') { col = (col | 7) + 1; - while ((d-temp) != col) + while ((d - temp) != col) *d++ = ' '; - } else if (isprint(*d)) { + } else if (isprint(*d) || utf8_mode) { col++; d++; } else { @@ -184,17 +268,17 @@ bool use_resize = TRUE; col = (d - temp); } } - *lptr = strdup(temp); + *lptr = ch_dup(temp); } (void) fclose(fp); length = lptr - lines; - (void) initscr(); /* initialize the curses library */ - keypad(stdscr, TRUE); /* enable keyboard mapping */ - (void) nonl(); /* tell curses not to do NL->CR/NL on output */ - (void) cbreak(); /* take input chars one at a time, no wait for \n */ - (void) noecho(); /* don't echo input */ - idlok(stdscr, TRUE); /* allow use of insert/delete line */ + (void) initscr(); /* initialize the curses library */ + keypad(stdscr, TRUE); /* enable keyboard mapping */ + (void) nonl(); /* tell curses not to do NL->CR/NL on output */ + (void) cbreak(); /* take input chars one at a time, no wait for \n */ + (void) noecho(); /* don't echo input */ + idlok(stdscr, TRUE); /* allow use of insert/delete line */ lptr = lines; while (!done) { @@ -205,7 +289,7 @@ bool use_resize = TRUE; got_number = FALSE; n = 0; - for (;;) { + for (;;) { #if CAN_RESIZE if (interrupted) adjust(0); @@ -215,20 +299,19 @@ bool use_resize = TRUE; waiting = FALSE; if ((c < 127) && isdigit(c)) { if (!got_number) { - mvprintw(0,0, "Count: "); + mvprintw(0, 0, "Count: "); clrtoeol(); } addch(c); n = 10 * n + (c - '0'); got_number = TRUE; - } - else + } else break; } if (!got_number && n == 0) n = 1; - switch(c) { + switch (c) { case KEY_DOWN: case 'n': olptr = lptr; @@ -282,7 +365,7 @@ bool use_resize = TRUE; break; #ifdef KEY_RESIZE - case KEY_RESIZE: /* ignore this; ncurses will repaint */ + case KEY_RESIZE: /* ignore this; ncurses will repaint */ break; #endif #if CAN_RESIZE @@ -297,7 +380,8 @@ bool use_resize = TRUE; finish(0); /* we're done */ } -static RETSIGTYPE finish(int sig) +static RETSIGTYPE +finish(int sig) { endwin(); exit(sig != 0 ? EXIT_FAILURE : EXIT_SUCCESS); @@ -309,54 +393,55 @@ static RETSIGTYPE finish(int sig) * Linux. The 'wrefresh(curscr)' is needed to force the refresh to start from * the top of the screen -- some xterms mangle the bitmap while resizing. */ -static RETSIGTYPE adjust(int sig) +static RETSIGTYPE +adjust(int sig) { - if (waiting || sig == 0) { + if (waiting || sig == 0) { struct winsize size; - if (ioctl(fileno(stdout), TIOCGWINSZ, &size) == 0) { - resizeterm(size.ws_row, size.ws_col); - wrefresh(curscr); /* Linux needs this */ - show_all(); - } - interrupted = FALSE; - } else { - interrupted = TRUE; + if (ioctl(fileno(stdout), TIOCGWINSZ, &size) == 0) { + resizeterm(size.ws_row, size.ws_col); + wrefresh(curscr); /* Linux needs this */ + show_all(); } - (void) signal(SIGWINCH, adjust); /* some systems need this */ + interrupted = FALSE; + } else { + interrupted = TRUE; + } + (void) signal(SIGWINCH, adjust); /* some systems need this */ } -#endif /* CAN_RESIZE */ +#endif /* CAN_RESIZE */ -static void show_all(void) +static void +show_all(void) { - int i; - char temp[BUFSIZ]; - char *s; + int i; + char temp[BUFSIZ]; + chtype *s; #if CAN_RESIZE - sprintf(temp, "(%3dx%3d) col %d ", LINES, COLS, shift); - i = strlen(temp); - sprintf(temp+i, "view %.*s", (int)(sizeof(temp)-7-i), fname); + sprintf(temp, "(%3dx%3d) col %d ", LINES, COLS, shift); + i = strlen(temp); + sprintf(temp + i, "view %.*s", (int) (sizeof(temp) - 7 - i), fname); #else - sprintf(temp, "view %.*s", (int)sizeof(temp)-7, fname); + sprintf(temp, "view %.*s", (int) sizeof(temp) - 7, fname); #endif - move(0,0); - printw("%.*s", COLS, temp); + move(0, 0); + printw("%.*s", COLS, temp); + clrtoeol(); + + scrollok(stdscr, FALSE); /* prevent screen from moving */ + for (i = 1; i < LINES; i++) { + move(i, 0); + printw("%3d:", (lptr + i - lines)); clrtoeol(); - - scrollok(stdscr, FALSE); /* prevent screen from moving */ - for (i = 1; i < LINES; i++) { - move(i, 0); - if ((s = lptr[i-1]) != 0 && (int)strlen(s) > shift) - printw("%3ld:%.*s", (long) (lptr+i-lines), COLS-4, s + shift); - else - printw("%3ld:", (long) (lptr+i-lines)); - clrtoeol(); + if ((s = lptr[i - 1]) != 0) { + int len = ch_len(s); + if (len > shift) + addchstr(s + shift); } - setscrreg(1, LINES-1); - scrollok(stdscr, TRUE); - refresh(); + } + setscrreg(1, LINES - 1); + scrollok(stdscr, TRUE); + refresh(); } - -/* view.c ends here */ - diff --git a/test/worm.c b/test/worm.c index 5f0ab5dc..43a898f8 100644 --- a/test/worm.c +++ b/test/worm.c @@ -34,16 +34,13 @@ Options: traces will be dumped. The program stops and waits for one character of input at the beginning and end of the interval. - $Id: worm.c,v 1.26 1999/10/23 01:31:40 tom Exp $ + $Id: worm.c,v 1.30 2000/04/15 17:51:56 tom Exp $ */ #include #include -#define typeAlloc(type,n) (type *) malloc(n * sizeof(type)) -#define typeRealloc(type,n,p) (type *) realloc(p, n * sizeof(type)) - static chtype flavor[] = { 'O', '*', '#', '$', '%', '0', '@', @@ -185,7 +182,6 @@ main(int argc, char *argv[]) short **ref; int x, y; int n; - int ch; struct worm *w; const struct options *op; int h; @@ -255,7 +251,7 @@ main(int argc, char *argv[]) if (has_colors()) { int bg = COLOR_BLACK; start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) bg = -1; #endif @@ -274,9 +270,9 @@ main(int argc, char *argv[]) } #endif /* A_COLOR */ - ref = typeAlloc(short *, LINES); + ref = typeMalloc(short *, LINES); for (y = 0; y < LINES; y++) { - ref[y] = typeAlloc(short, COLS); + ref[y] = typeMalloc(short, COLS); for (x = 0; x < COLS; x++) { ref[y][x] = 0; } @@ -289,14 +285,14 @@ main(int argc, char *argv[]) for (n = number, w = &worm[0]; --n >= 0; w++) { w->orientation = w->head = 0; - if (!(ip = typeAlloc(short, (length + 1)))) { + if (!(ip = typeMalloc(short, (length + 1)))) { fprintf(stderr, "%s: out of memory\n", *argv); return EXIT_FAILURE; } w->xpos = ip; for (x = length; --x >= 0;) *ip++ = -1; - if (!(ip = typeAlloc(short, (length + 1)))) { + if (!(ip = typeMalloc(short, (length + 1)))) { fprintf(stderr, "%s: out of memory\n", *argv); return EXIT_FAILURE; } @@ -338,6 +334,8 @@ main(int argc, char *argv[]) generation++; } #else + int ch; + if ((ch = getch()) > 0) { #ifdef KEY_RESIZE if (ch == KEY_RESIZE) { @@ -350,11 +348,11 @@ main(int argc, char *argv[]) last = COLS - 1; } if (bottom != LINES - 1) { - ref = typeRealloc(short *, LINES, ref); - for (y = COLS; y <= bottom; y++) + for (y = LINES; y <= bottom; y++) free(ref[y]); + ref = typeRealloc(short *, LINES, ref); for (y = bottom + 1; y < LINES; y++) { - ref[y] = typeAlloc(short, COLS); + ref[y] = typeMalloc(short, COLS); for (x = 0; x < COLS; x++) ref[y][x] = 0; } diff --git a/test/xmas.c b/test/xmas.c index 3923c771..57d42923 100644 --- a/test/xmas.c +++ b/test/xmas.c @@ -92,7 +92,7 @@ /******************************************************************************/ /* - * $Id: xmas.c,v 1.12 1998/01/18 01:13:47 tom Exp $ + * $Id: xmas.c,v 1.13 1999/11/13 23:39:01 tom Exp $ */ #include @@ -183,7 +183,7 @@ int loopy; #endif if (has_colors()) { start_color(); -#ifdef NCURSES_VERSION +#ifdef HAVE_USE_DEFAULT_COLORS if (use_default_colors() == OK) my_bg = -1; #endif -- 2.44.0